Fix order of InstallDir setup so that suggested value is
authorCarl Hetherington <cth@carlh.net>
Fri, 27 Nov 2015 23:24:17 +0000 (23:24 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 28 Nov 2015 00:32:06 +0000 (00:32 +0000)
set up before the user gets the chance to change it; fixes #705, #643.

ChangeLog
platform/windows/wscript

index ed895995ff678668f236c5ac23ccd77f7b98ca8f..3eedb7c01915e0771a60bcb0ad6079f855f368a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
 
        * Updated nl_NL translation from Rob van Nieuwkerk.
 
+       * Fix various problems with specification of install directory
+       on Windows (#643, #705).
+
 2015-11-27  Carl Hetherington  <cth@carlh.net>
 
        * Add config and server list to the batch converter's menus (#765).
index d3b16435f1ec2273c6c4f075a41c477134b0d084..cb0a642651250b6090ebc68b67c6fa04863ed917 100644 (file)
@@ -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("""