diff options
| author | 2014-10-29 11:24:43 -0700 | |
|---|---|---|
| committer | 2014-11-13 10:12:03 -0800 | |
| commit | 90224c273b41d29802f27a019ffe42aee2c4170f (patch) | |
| tree | 9a19640e08d95408702768e0d828a72f13b0f414 | |
| parent | a5c282f93967a36e65780560a6a2d57d54271773 (diff) | |
| download | subsurface-90224c273b41d29802f27a019ffe42aee2c4170f.tar.gz | |
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>
| -rwxr-xr-x | packaging/windows/mingw-make.sh | 1 | ||||
| -rw-r--r-- | packaging/windows/subsurface.nsi.in | 13 | ||||
| -rw-r--r-- | subsurface-install.pri | 6 |
3 files changed, 19 insertions, 1 deletions
diff --git a/packaging/windows/mingw-make.sh b/packaging/windows/mingw-make.sh index e9a55ba3a..6e1a79601 100755 --- a/packaging/windows/mingw-make.sh +++ b/packaging/windows/mingw-make.sh @@ -33,6 +33,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 diff --git a/packaging/windows/subsurface.nsi.in b/packaging/windows/subsurface.nsi.in index f1af9e9e5..58b59a66b 100644 --- a/packaging/windows/subsurface.nsi.in +++ b/packaging/windows/subsurface.nsi.in @@ -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 diff --git a/subsurface-install.pri b/subsurface-install.pri index c06f5bd30..be11b49bf 100644 --- a/subsurface-install.pri +++ b/subsurface-install.pri @@ -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 |