mirror of
https://github.com/reactos/CMake.git
synced 2024-11-23 19:49:51 +00:00
ENH: Give Mac installers package relocation capability. Default location is still the same for backwards compatibility, but packages will now be relocatable by default like they are on Windows via the NSIS installer. New CPack variables for controlling this functionality are CPACK_PACKAGE_DEFAULT_LOCATION and CPACK_PACKAGE_RELOCATABLE.
This commit is contained in:
parent
ad788fe4c8
commit
764f6838a7
@ -34,3 +34,7 @@ if(CPACK_GENERATOR MATCHES "CygwinSource")
|
||||
SET(CPACK_SOURCE_IGNORE_FILES
|
||||
"/CVS/" "/\\.build/" "/\\.svn/" "\\.swp$" "\\.#" "/#" "~$")
|
||||
endif(CPACK_GENERATOR MATCHES "CygwinSource")
|
||||
|
||||
if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
|
||||
SET(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
|
||||
endif("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
|
||||
|
@ -12,7 +12,7 @@
|
||||
<key>IFPkgFlagAuthorizationAction</key>
|
||||
<string>AdminAuthorization</string>
|
||||
<key>IFPkgFlagDefaultLocation</key>
|
||||
<string>/</string>
|
||||
<string>@CPACK_PACKAGE_DEFAULT_LOCATION@</string>
|
||||
<key>IFPkgFlagInstallFat</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagIsRequired</key>
|
||||
@ -20,7 +20,7 @@
|
||||
<key>IFPkgFlagOverwritePermissions</key>
|
||||
<true/>
|
||||
<key>IFPkgFlagRelocatable</key>
|
||||
<false/>
|
||||
<@CPACK_PACKAGE_RELOCATABLE@/>
|
||||
<key>IFPkgFlagRestartAction</key>
|
||||
<string>NoRestart</string>
|
||||
<key>IFPkgFlagRootVolumeOnly</key>
|
||||
|
@ -78,6 +78,15 @@ cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_DIRECTORY
|
||||
"${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
|
||||
cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
|
||||
"${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
|
||||
cpack_set_if_not_set(CPACK_PACKAGE_DEFAULT_LOCATION "/")
|
||||
cpack_set_if_not_set(CPACK_PACKAGE_RELOCATABLE "true")
|
||||
|
||||
# always force to exactly "true" or "false" for CPack.Info.plist.in:
|
||||
if(CPACK_PACKAGE_RELOCATABLE)
|
||||
set(CPACK_PACKAGE_RELOCATABLE "true")
|
||||
else(CPACK_PACKAGE_RELOCATABLE)
|
||||
set(CPACK_PACKAGE_RELOCATABLE "false")
|
||||
endif(CPACK_PACKAGE_RELOCATABLE)
|
||||
|
||||
macro(cpack_check_file_exists file description)
|
||||
if(NOT EXISTS "${file}")
|
||||
|
Loading…
Reference in New Issue
Block a user