Followup to handle not installing x64 on x86 systems for Bug 1305453 - Prevent non-esr stand alone installers from installing on XP/Vista. r=mhowell
authorRobert Strong <robert.bugzilla@gmail.com>
Mon, 21 Nov 2016 12:12:01 -0800
changeset 323732 86a19f0dfa67bd5753f6e5dc9a6519243b82dea4
parent 323731 af88a04128f6498228eb321e34a70f1307d8cc90
child 323733 c68af995d66de6baaa83ea3ba79f3130a5e3617a
push id21
push usermaklebus@msu.edu
push dateThu, 01 Dec 2016 06:22:08 +0000
reviewersmhowell
bugs1305453
milestone53.0a1
Followup to handle not installing x64 on x86 systems for Bug 1305453 - Prevent non-esr stand alone installers from installing on XP/Vista. r=mhowell
browser/installer/windows/nsis/defines.nsi.in
browser/installer/windows/nsis/installer.nsi
--- a/browser/installer/windows/nsis/defines.nsi.in
+++ b/browser/installer/windows/nsis/defines.nsi.in
@@ -63,22 +63,22 @@
 
 !define BaseURLStubPing "http://download-stats.mozilla.org/stub"
 
 # 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_BUILD
 !define HAVE_64BIT_BUILD
 !define ARCH "x64"
+!define MinSupportedVer "Microsoft Windows 7 x64"
 #else
+!define MinSupportedVer "Microsoft Windows 7"
 !define ARCH "x86"
 #endif
 
-!define MinSupportedVer "Microsoft Windows 7"
-
 !define MinSupportedCPU "SSE2"
 
 #ifdef MOZ_MAINTENANCE_SERVICE
 !define MOZ_MAINTENANCE_SERVICE
 #endif
 
 # File details shared by both the installer and uninstaller
 VIProductVersion "1.0.0.0"
--- a/browser/installer/windows/nsis/installer.nsi
+++ b/browser/installer/windows/nsis/installer.nsi
@@ -1156,16 +1156,21 @@ Function .onInit
   ; SSE2 CPU support
   ${If} "$R7" == "0"
     MessageBox MB_OKCANCEL|MB_ICONSTOP "$(WARN_MIN_SUPPORTED_CPU_MSG)" IDCANCEL +2
     ExecShell "open" "${URLSystemRequirements}"
     Quit
   ${EndIf}
 
 !ifdef HAVE_64BIT_BUILD
+  ${Unless} ${RunningX64}
+    MessageBox MB_OKCANCEL|MB_ICONSTOP "$(WARN_MIN_SUPPORTED_OSVER_MSG)" IDCANCEL +2
+    ExecShell "open" "${URLSystemRequirements}"
+    Quit
+  ${EndUnless}
   SetRegView 64
 !endif
 
   ${InstallOnInitCommon} "$(WARN_MIN_SUPPORTED_OSVER_CPU_MSG)"
 
 ; The commands inside this ifndef are needed prior to NSIS 3.0a2 and can be
 ; removed after we require NSIS 3.0a2 or greater.
 !ifndef NSIS_PACKEDVERSION