From 7e4931cf2590a469562812f92c25519c22377b97 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 13 May 2022 18:52:52 -0400 Subject: [PATCH] Windows build: Switch to 64-bit Node.js executable --- CHANGELOG.md | 2 ++ src/bin/buildForWindows.sh | 2 +- src/bin/nsis/etherpad.nsi | 9 ++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f0aafe4..6d9ba740 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ * Windows build: * The bundled `node.exe` was upgraded from v12 to v16. + * The bundled `node.exe` is now a 64-bit executable. If you need the 32-bit + version you must download and install Node.js yourself. * Improvements to login session management: * `express_sid` cookies and `sessionstorage:*` database records are no longer created unless `requireAuthentication` is `true` (or a plugin causes them to diff --git a/src/bin/buildForWindows.sh b/src/bin/buildForWindows.sh index ee977958..3d04fff7 100755 --- a/src/bin/buildForWindows.sh +++ b/src/bin/buildForWindows.sh @@ -49,7 +49,7 @@ try rm -rf node_modules try mv node_modules_resolved node_modules log "download windows node..." -try wget "https://nodejs.org/dist/latest-v16.x/win-x86/node.exe" -O node.exe +try wget "https://nodejs.org/dist/latest-v16.x/win-x64/node.exe" -O node.exe log "create the zip..." try zip -9 -r "${OUTPUT}" ./* diff --git a/src/bin/nsis/etherpad.nsi b/src/bin/nsis/etherpad.nsi index 28003ac1..3140e6bb 100644 --- a/src/bin/nsis/etherpad.nsi +++ b/src/bin/nsis/etherpad.nsi @@ -1,5 +1,6 @@ ;Include Modern UI !include "MUI2.nsh" +!include x64.nsh ;-------------------------------- ;Styling @@ -15,11 +16,17 @@ Page directory Page instfiles ; The default installation directory -InstallDir "$PROGRAMFILES\Etherpad Foundation\Etherpad Server" +InstallDir "$PROGRAMFILES64\Etherpad Foundation\Etherpad Server" Section SectionIn RO + ${If} ${RunningX64} + DetailPrint "Installer running on x64 host" + ${Else} + Abort "Unsupported CPU architecture (only x64 is supported)" + ${Endif} + ; Set output path to the installation directory. SetOutPath $INSTDIR