[ros-diffs] [peterw] 30988: - Detect if running on a x64 system and use PROGRAMFILES64 if so, PROGRAMFILES otherwise.

peterw at svn.reactos.org peterw at svn.reactos.org
Mon Dec 3 22:51:15 CET 2007


Author: peterw
Date: Tue Dec  4 00:51:14 2007
New Revision: 30988

URL: http://svn.reactos.org/svn/reactos?rev=30988&view=rev
Log:
- Detect if running on a x64 system and use PROGRAMFILES64 if so, PROGRAMFILES otherwise.

Modified:
    trunk/tools/RosBE/RosBE-Windows/RosBE.nsi

Modified: trunk/tools/RosBE/RosBE-Windows/RosBE.nsi
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/RosBE.nsi?rev=30988&r1=30987&r2=30988&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/RosBE.nsi (original)
+++ trunk/tools/RosBE/RosBE-Windows/RosBE.nsi Tue Dec  4 00:51:14 2007
@@ -10,7 +10,6 @@
 ;;
 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
 OutFile "RosBE-${PRODUCT_VERSION}.exe"
-InstallDir "$PROGRAMFILES64\RosBE"
 InstallDirRegKey HKCU "${PRODUCT_DIR_REGKEY}" ""
 ShowInstDetails show
 ShowUnInstDetails show
@@ -35,6 +34,7 @@
 !include "InstallOptions.nsh"
 !include "RosSourceDir.nsh"
 !include "LogicLib.nsh"
+!include "x64.nsh"
 
 ;; MUI begin.
 
@@ -42,6 +42,11 @@
 ;; Read our custom page ini, remove previous version.
 ;;
 Function .onInit
+    ${If} ${RunningX64}
+        StrCpy $INSTDIR "$PROGRAMFILES64\RosBE"
+    ${Else}
+        StrCpy $INSTDIR "$PROGRAMFILES\RosBE"
+    ${Endif}
     Call UninstallPrevious
     !insertmacro INSTALLOPTIONS_EXTRACT "RosSourceDir.ini"
 FunctionEnd




More information about the Ros-diffs mailing list