Don't install Windows 64bit binaries on 32bit system

Also warn people installing 32bit binaries on a 64bit system

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-10-29 11:24:43 -07:00
parent d5f19c43c9
commit 0e0d6135af
3 changed files with 19 additions and 1 deletions

View file

@ -32,6 +32,7 @@ if [[ $1 == "Qt5-64" ]] ; then
LIBMARBLEDEVEL=../marble \
LIBGIT2DEVEL=../libgit2 CONFIG+=libgit21-api \
QMAKE_LIBDIR+=../openssl \
CONFIG+=win64target \
$BASEDIR/../../subsurface.pro
elif [[ $1 == "Qt5" ]] ; then

View file

@ -84,6 +84,19 @@
# Default installer section
Section
!include x64.nsh
${If} 64BITBUILDTOKEN
${IfNot} ${RunningX64}
Abort "You cannot install the 64bit version of Subsurface on a 32bit version of Windows"
${EndIf}
${Else}
${If} ${RunningX64}
MessageBox MB_YESNO "Do you really want to install the 32bit version of Subsurface on your 64bit version of Windows?" IDYES goforit
Abort "Please download the 64bit version of the Subsurface installer"
goforit:
${EndIf}
${Endif}
SetShellVarContext all
# Installation path

View file

@ -118,7 +118,11 @@ mac {
dlls.depends += $(DESTDIR_TARGET)
nsis.commands += $(CHK_DIR_EXISTS) $$WINDOWSSTAGING;
nsis.commands += cat $$NSIINPUTFILE | sed -e \'s/VERSIONTOKEN/$$VERSION_STRING/;s/PRODVTOKEN/$${PRODVERSION_STRING}/\' > $$NSIFILE
win64target {
nsis.commands += cat $$NSIINPUTFILE | sed -e \'s/VERSIONTOKEN/$$VERSION_STRING/;s/PRODVTOKEN/$${PRODVERSION_STRING}/;s/64BITBUILDTOKEN/1 == 1/\' > $$NSIFILE
} else {
nsis.commands += cat $$NSIINPUTFILE | sed -e \'s/VERSIONTOKEN/$$VERSION_STRING/;s/PRODVTOKEN/$${PRODVERSION_STRING}/;s/64BITBUILDTOKEN/1 == 0/\' > $$NSIFILE
}
nsis.depends += $$NSIINPUTFILE
nsis.target = $$NSISFILE
installer.commands += $$MAKENSIS $$NSIFILE