From 6e155de3e18a84b554407d61b5b0f96535b8524e Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 10 Aug 2024 02:14:40 -0400 Subject: [PATCH] Windows installer: Change HAVE_64BIT_OS to HAVE_64BIT_BUILD https://bugzilla.mozilla.org/show_bug.cgi?id=598615 --- app/build.sh | 4 ++-- app/win/installer/common.nsh | 12 ++++++------ app/win/installer/defines.nsi | 2 +- app/win/installer/installer.nsi | 6 +++--- app/win/installer/uninstaller.nsi | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/build.sh b/app/build.sh index 40b335152d..2b41c114fa 100755 --- a/app/build.sh +++ b/app/build.sh @@ -765,7 +765,7 @@ if [ $BUILD_WIN == 1 ]; then if [ "$arch" = "win32" ]; then "`cygpath -u \"${NSIS_DIR}makensis.exe\"`" /V1 "`cygpath -w \"$BUILD_DIR/win_installer/uninstaller.nsi\"`" elif [[ "$arch" = "win-x64" ]] || [[ "$arch" = "win-arm64" ]]; then - "`cygpath -u \"${NSIS_DIR}makensis.exe\"`" /DHAVE_64BIT_OS /V1 "`cygpath -w \"$BUILD_DIR/win_installer/uninstaller.nsi\"`" + "`cygpath -u \"${NSIS_DIR}makensis.exe\"`" /DHAVE_64BIT_BUILD /V1 "`cygpath -w \"$BUILD_DIR/win_installer/uninstaller.nsi\"`" fi mv "$BUILD_DIR/win_installer/helper.exe" "$APPDIR/uninstall" @@ -799,7 +799,7 @@ if [ $BUILD_WIN == 1 ]; then if [ "$arch" = "win32" ]; then "`cygpath -u \"${NSIS_DIR}makensis.exe\"`" /V1 "`cygpath -w \"$BUILD_DIR/win_installer/installer.nsi\"`" elif [[ "$arch" = "win-x64" ]] || [[ "$arch" = "win-arm64" ]]; then - "`cygpath -u \"${NSIS_DIR}makensis.exe\"`" /DHAVE_64BIT_OS /V1 "`cygpath -w \"$BUILD_DIR/win_installer/installer.nsi\"`" + "`cygpath -u \"${NSIS_DIR}makensis.exe\"`" /DHAVE_64BIT_BUILD /V1 "`cygpath -w \"$BUILD_DIR/win_installer/installer.nsi\"`" fi mv "$BUILD_DIR/win_installer/setup.exe" "$INSTALLER_STAGE_DIR" diff --git a/app/win/installer/common.nsh b/app/win/installer/common.nsh index 95d012141c..3df4e699e6 100755 --- a/app/win/installer/common.nsh +++ b/app/win/installer/common.nsh @@ -959,7 +959,7 @@ Var Trash !define KEY_SET_VALUE 0x0002 !define KEY_WOW64_64KEY 0x0100 -!ifndef HAVE_64BIT_OS +!ifndef HAVE_64BIT_BUILD !define CREATE_KEY_SAM ${KEY_SET_VALUE} !else !define CREATE_KEY_SAM ${KEY_SET_VALUE}|${KEY_WOW64_64KEY} @@ -2118,7 +2118,7 @@ FunctionEnd ; Set the registry to the 32 bit registry for 64 bit installations or to ; the 64 bit registry for 32 bit installations at the beginning so it can ; easily be set back to the correct registry view when finished. - !ifdef HAVE_64BIT_OS + !ifdef HAVE_64BIT_BUILD SetRegView 32 !else SetRegView 64 @@ -2187,7 +2187,7 @@ FunctionEnd ${If} ${RunningX64} ${AndIf} "$R0" == "false" ; Set the registry to the correct view. - !ifdef HAVE_64BIT_OS + !ifdef HAVE_64BIT_BUILD SetRegView 64 !else SetRegView 32 @@ -4150,7 +4150,7 @@ FunctionEnd Push $R6 Push $R5 - !ifdef HAVE_64BIT_OS + !ifdef HAVE_64BIT_BUILD ${Unless} ${RunningX64} ${OrUnless} ${AtLeastWin7} MessageBox MB_OK|MB_ICONSTOP "$R9" IDOK @@ -4199,7 +4199,7 @@ FunctionEnd SetSilent silent ReadINIStr $R8 $R7 "Install" "InstallDirectoryName" ${If} $R8 != "" - !ifdef HAVE_64BIT_OS + !ifdef HAVE_64BIT_BUILD StrCpy $INSTDIR "$PROGRAMFILES64\$R8" !else StrCpy $INSTDIR "$PROGRAMFILES32\$R8" @@ -4768,7 +4768,7 @@ FunctionEnd ${LogMsg} "OS Name : Unable to detect" ${EndIf} - !ifdef HAVE_64BIT_OS + !ifdef HAVE_64BIT_BUILD ${LogMsg} "Target CPU : x64" !else ${LogMsg} "Target CPU : x86" diff --git a/app/win/installer/defines.nsi b/app/win/installer/defines.nsi index 18ab264f42..d04d448d14 100644 --- a/app/win/installer/defines.nsi +++ b/app/win/installer/defines.nsi @@ -42,7 +42,7 @@ # ARCH is used when it is necessary to differentiate the x64 registry keys from # the x86 registry keys (e.g. the uninstall registry key). -!ifdef HAVE_64BIT_OS +!ifdef HAVE_64BIT_BUILD !define ARCH "x86" !define MinSupportedVer "64-bit Microsoft Windows 7" !else diff --git a/app/win/installer/installer.nsi b/app/win/installer/installer.nsi index c59166588a..d416c6c2a5 100755 --- a/app/win/installer/installer.nsi +++ b/app/win/installer/installer.nsi @@ -105,7 +105,7 @@ VIAddVersionKey "OriginalFilename" "setup.exe" Name "${BrandFullName}" OutFile "setup.exe" -!ifdef HAVE_64BIT_OS +!ifdef HAVE_64BIT_BUILD InstallDir "$PROGRAMFILES64\${BrandFullName}\" !else InstallDir "$PROGRAMFILES32\${BrandFullName}\" @@ -928,7 +928,7 @@ Function .onInit StrCpy $R2 "An older version of Zotero is installed. If you continue, the existing version will be removed.$\n$\nYour Zotero data will not be affected." Call UninstallOld - !ifdef HAVE_64BIT_OS + !ifdef HAVE_64BIT_BUILD SetRegView 32 StrCpy $R1 "Zotero" StrCpy $R2 "A 32-bit version of Zotero is installed. If you continue, it will be replaced with a 64-bit version that offers better performance.$\n$\nYour Zotero data will not be affected." @@ -936,7 +936,7 @@ Function .onInit SetRegView 64 !endif - !ifndef HAVE_64BIT_OS + !ifndef HAVE_64BIT_BUILD ${If} ${RunningX64} MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION|MB_DEFBUTTON2 \ "This installer is for the 32-bit version of Zotero, but you appear to be running a 64-bit version of Windows.$\n$\nFor the best performance, please cancel and download the 64-bit version of Zotero." \ diff --git a/app/win/installer/uninstaller.nsi b/app/win/installer/uninstaller.nsi index 08a58f4611..a6f7161b02 100755 --- a/app/win/installer/uninstaller.nsi +++ b/app/win/installer/uninstaller.nsi @@ -96,7 +96,7 @@ VIAddVersionKey "OriginalFilename" "helper.exe" Name "${BrandFullName}" OutFile "helper.exe" -!ifdef HAVE_64BIT_OS +!ifdef HAVE_64BIT_BUILD InstallDir "$PROGRAMFILES64\${BrandFullName}\" !else InstallDir "$PROGRAMFILES32\${BrandFullName}\" @@ -594,7 +594,7 @@ Function .onInit Reboot Quit ; Nothing initialized so no need to call OnEndCommon - !ifdef HAVE_64BIT_OS + !ifdef HAVE_64BIT_BUILD SetRegView 64 !endif @@ -697,7 +697,7 @@ Function un.onInit Abort ${EndUnless} - !ifdef HAVE_64BIT_OS + !ifdef HAVE_64BIT_BUILD SetRegView 64 !endif