Don't install 64 bit viewer on 32 bit OS

This commit is contained in:
Latif Khalifa
2013-10-28 20:23:35 +01:00
parent 603221fa48
commit d8728f17ee
2 changed files with 15 additions and 0 deletions

View File

@@ -35,6 +35,14 @@ RequestExecutionLevel admin ; on Vista we must be admin because we write to Prog
%%GRID_VARS%%
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Alows us to determine if we're running on 64 bit OS; ${If} macros
!include "x64.nsh"
!include "LogicLib.nsh"
;; are 64 bit binaries packaged in this installer
%%WIN64_BIN_BUILD%%
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; - language files - one for each language (or flavor thereof)
;; (these files are in the same place as the nsi template but the python script generates a new nsi file in the
@@ -664,6 +672,12 @@ FunctionEnd
;; entry to the language ID selector below
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function .onInit
!ifdef WIN64_BIN_BUILD
${IfNot} ${RunningX64}
MessageBox MB_OK|MB_ICONSTOP "This version requires 64 bit operating sytem."
Quit
${EndIf}
!endif
Push $0
${GetParameters} $COMMANDLINE ; get our command line
${GetOptions} $COMMANDLINE "/LANGID=" $0 ; /LANGID=1033 implies US English

View File

@@ -461,6 +461,7 @@ class WindowsManifest(ViewerManifest):
"%%INSTALL_FILES%%":self.nsi_file_commands(True),
"%%DELETE_FILES%%":self.nsi_file_commands(False),
"%%INSTALLDIR%%":"%s\\%s" % ('$PROGRAMFILES64' if self.is_win64() else '$PROGRAMFILES', self.channel_oneword()),
"%%WIN64_BIN_BUILD%%":"!define WIN64_BIN_BUILD 1" if self.is_win64() else "",
})
# We use the Unicode version of NSIS, available from