summaryrefslogtreecommitdiffstats
path: root/Modules/NSIS.template.in
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-01-10 15:05:13 (GMT)
committerBrad King <brad.king@kitware.com>2011-01-11 20:42:42 (GMT)
commit5a9e8e701e6e55ddacbc465f4bfb0da3d028ccb0 (patch)
tree6381744e0c017f9c82be88f00779199f7676e528 /Modules/NSIS.template.in
parent1bbe4e69171f3155f262bb12f15437db4b71c207 (diff)
downloadCMake-5a9e8e701e6e55ddacbc465f4bfb0da3d028ccb0.zip
CMake-5a9e8e701e6e55ddacbc465f4bfb0da3d028ccb0.tar.gz
CMake-5a9e8e701e6e55ddacbc465f4bfb0da3d028ccb0.tar.bz2
CPack: Add CPACK_NSIS_INSTALL_ROOT variable (#9148)
Control the root directory of the default directory presented to the end user of an NSIS installer by a CPack variable. Previously, the value used in the NSIS script was $PROGRAMFILES, which is equivalent to the "ProgramFiles" environment variable. That default value is still the same, but now a project may override the value by setting this new variable.
Diffstat (limited to 'Modules/NSIS.template.in')
-rw-r--r--Modules/NSIS.template.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in
index 776bc07..e11ec48 100644
--- a/Modules/NSIS.template.in
+++ b/Modules/NSIS.template.in
@@ -25,7 +25,7 @@
!include "MUI.nsh"
;Default installation folder
- InstallDir "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
+ InstallDir "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
;--------------------------------
;General
@@ -906,7 +906,7 @@ Function .onInit
; install directory that is expected to be the
; default
StrCpy $IS_DEFAULT_INSTALLDIR 0
- StrCmp "$INSTDIR" "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2
+ StrCmp "$INSTDIR" "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2
StrCpy $IS_DEFAULT_INSTALLDIR 1
StrCpy $SV_ALLUSERS "JustMe"
@@ -939,7 +939,7 @@ Function .onInit
done:
StrCmp $SV_ALLUSERS "AllUsers" 0 +3
StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
- StrCpy $INSTDIR "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
+ StrCpy $INSTDIR "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini"