mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 21:00:01 -05:00
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.
This commit is contained in:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user