summaryrefslogtreecommitdiff
path: root/platform/windows/wscript
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-11-27 23:24:17 +0000
committerCarl Hetherington <cth@carlh.net>2015-11-28 00:32:06 +0000
commit4e67c8bd53d7e5a733a4978819d4a11b1e62e9f4 (patch)
treeda8660a78b418f3179173eb6394c9b6881411270 /platform/windows/wscript
parent338abcf37e20bc9683a075dc0f6f50eb1d930e8e (diff)
Fix order of InstallDir setup so that suggested value is
set up before the user gets the chance to change it; fixes #705, #643.
Diffstat (limited to 'platform/windows/wscript')
-rw-r--r--platform/windows/wscript18
1 files changed, 9 insertions, 9 deletions
diff --git a/platform/windows/wscript b/platform/windows/wscript
index d3b16435f..cb0a64265 100644
--- a/platform/windows/wscript
+++ b/platform/windows/wscript
@@ -31,10 +31,15 @@ def write_installer(bits, version, debug):
!include "Sections.nsh"
""", file=f)
+ if bits == 64:
+ program_files = "$PROGRAMFILES64"
+ else:
+ program_files = "$PROGRAMFILES"
+
if debug:
- print('InstallDir "$PROGRAMFILES\\DCP-o-matic 2 Debug"', file=f)
+ print('InstallDir "%s\\DCP-o-matic 2 Debug"' % program_files, file=f)
else:
- print('InstallDir "$PROGRAMFILES\\DCP-o-matic 2"', file=f)
+ print('InstallDir "%s\\DCP-o-matic 2"' % program_files, file=f)
print("""
!insertmacro MUI_PAGE_WELCOME
@@ -48,13 +53,8 @@ SectionIn RO
if bits == 64:
print("""
-${If} ${RunningX64}
- DetailPrint "Installer running on 64-bit host"
- ; disable registry redirection (enable access to 64-bit portion of registry)
- SetRegView 64
- ; change install dir
- StrCpy $INSTDIR "$PROGRAMFILES64\DCP-o-matic 2"
-${EndIf}
+; disable registry redirection (enable access to 64-bit portion of registry)
+SetRegView 64
""", file=f)
print("""