[Cmake-commits] [cmake-commits] hoffman committed NSIS.template.in 1.39 1.40
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Oct 26 17:14:58 EDT 2009
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv13502
Modified Files:
NSIS.template.in
Log Message:
Allow for /D to change install directory on the command line.
Index: NSIS.template.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/NSIS.template.in,v
retrieving revision 1.39
retrieving revision 1.40
diff -C 2 -d -r1.39 -r1.40
*** NSIS.template.in 4 Oct 2009 18:19:43 -0000 1.39
--- NSIS.template.in 26 Oct 2009 21:14:56 -0000 1.40
***************
*** 19,23 ****
Var ADD_TO_PATH_CURRENT_USER
Var INSTALL_DESKTOP
!
;--------------------------------
;Include Modern UI
--- 19,23 ----
Var ADD_TO_PATH_CURRENT_USER
Var INSTALL_DESKTOP
! Var IS_DEFAULT_INSTALLDIR
;--------------------------------
;Include Modern UI
***************
*** 893,898 ****
!insertmacro SectionList "InitSection"
StrCpy $SV_ALLUSERS "JustMe"
! StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
ClearErrors
--- 893,909 ----
!insertmacro SectionList "InitSection"
+ ; check to see if /D has been used to change
+ ; the install directory by comparing it to the
+ ; install directory that is expected to be the
+ ; default
+ StrCpy $IS_DEFAULT_INSTALLDIR 0
+ StrCmp "$INSTDIR" "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2
+ StrCpy $IS_DEFAULT_INSTALLDIR 1
+
StrCpy $SV_ALLUSERS "JustMe"
! ; if default install dir then change the default
! ; if it is installed for JustMe
! StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
! StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
ClearErrors
***************
*** 918,923 ****
done:
! StrCmp $SV_ALLUSERS "AllUsers" 0 +2
! StrCpy $INSTDIR "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage
--- 929,935 ----
done:
! StrCmp $SV_ALLUSERS "AllUsers" 0 +3
! StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
! StrCpy $INSTDIR "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage
More information about the Cmake-commits
mailing list