[Cmake-commits] CMake branch, next, updated. v2.8.3-1287-g267c77e
Brad King
brad.king at kitware.com
Tue Jan 11 15:44:28 EST 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 267c77eb52b74b0bbd71524dfa7825c933e95b9e (commit)
via 5a9e8e701e6e55ddacbc465f4bfb0da3d028ccb0 (commit)
from 8c041faf14490aa4e8838032085940dd15d642c5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=267c77eb52b74b0bbd71524dfa7825c933e95b9e
commit 267c77eb52b74b0bbd71524dfa7825c933e95b9e
Merge: 8c041fa 5a9e8e7
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 11 15:44:26 2011 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 11 15:44:26 2011 -0500
Merge topic 'fix-9148-cpack-nsis-installer-root' into next
5a9e8e7 CPack: Add CPACK_NSIS_INSTALL_ROOT variable (#9148)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5a9e8e701e6e55ddacbc465f4bfb0da3d028ccb0
commit 5a9e8e701e6e55ddacbc465f4bfb0da3d028ccb0
Author: David Cole <david.cole at kitware.com>
AuthorDate: Mon Jan 10 10:05:13 2011 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Jan 11 15:42:42 2011 -0500
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.
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 7033e31..105efc3 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -210,6 +210,11 @@
# CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Registry key used when
# installing this project.
#
+# CPACK_NSIS_INSTALL_ROOT - The default installation directory presented
+# to the end user by the NSIS installer is under this root dir. The full
+# directory presented to the end user is:
+# ${CPACK_NSIS_INSTALL_ROOT}/${CPACK_PACKAGE_INSTALL_DIRECTORY}
+#
# CPACK_NSIS_MUI_ICON - The icon file (.ico) for the generated
# install program.
#
@@ -777,6 +782,11 @@ IF(${__cpack_system_name} MATCHES Windows)
ENDIF(${__cpack_system_name} MATCHES Windows)
cpack_set_if_not_set(CPACK_SYSTEM_NAME "${__cpack_system_name}")
+# Root dir: default value should be the string literal "$PROGRAMFILES"
+# for backwards compatibility. Projects may set this value to anything.
+set(__cpack_root_default "$PROGRAMFILES")
+cpack_set_if_not_set(CPACK_NSIS_INSTALL_ROOT "${__cpack_root_default}")
+
# <project>-<major>.<minor>.<patch>-<release>-<platform>.<pkgtype>
cpack_set_if_not_set(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")
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"
diff --git a/Tests/CPackComponents/CMakeLists.txt b/Tests/CPackComponents/CMakeLists.txt
index bbe834d..58f5bdf 100644
--- a/Tests/CPackComponents/CMakeLists.txt
+++ b/Tests/CPackComponents/CMakeLists.txt
@@ -78,6 +78,9 @@ set(CPACK_NSIS_MENU_LINKS
"news://newsserver" "Test News Link"
)
+# Suggested default root for end users of the installer:
+set(CPACK_NSIS_INSTALL_ROOT "C:\\Program Files\\CMake Tests Install Root")
+
# Include CPack to introduce the appropriate targets
include(CPack)
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list