[svn-r23978] Add Bundle and plist file. Update script file add icon

This commit is contained in:
Allen Byrne 2013-08-08 16:25:32 -05:00
parent bdeb1f6c43
commit 111a57ca26
4 changed files with 30 additions and 3 deletions

View File

@ -1208,16 +1208,37 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
SET (CPACK_PACKAGE_RELOCATABLE TRUE)
SET (CPACK_GENERATOR "TGZ")
IF (WIN32)
SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_NAME}-${HDF5_PACKAGE_VERSION}-${LIB_TYPE}")
LIST (APPEND CPACK_GENERATOR "NSIS")
SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${LIB_TYPE}")
SET (CPACK_MONOLITHIC_INSTALL ON)
SET (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}")
SET (CPACK_NSIS_MODIFY_PATH ON)
SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${HDF5_PACKAGE_VERSION}")
SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${CPACK_PACKAGE_VERSION}")
ELSEIF (APPLE)
LIST (APPEND CPACK_GENERATOR "DragNDrop")
SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
SET (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}")
SET (CPACK_PACKAGING_INSTALL_PREFIX "/")
SET (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif")
SET (CPACK_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/".
LIST (APPEND CPACK_GENERATOR "Bundle")
#-----------------------------------------------------------------------------
# Configure the Info.plist file for the install bundle
#-----------------------------------------------------------------------------
CONFIGURE_FILE (
${CMAKE_ROOT}/Modules/CPack.Info.plist.in
${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY
)
SET (CMAKE_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
SET (CMAKE_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in /
SET (CMAKE_INSTALL_PREFIX "/${CMAKE_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}")
SET (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif")
SET (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist")
# SET (CPACK_BUNDLE_STARTUP_COMMAND "${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-startup.sh")
ELSE (WIN32)
SET (CPACK_PACKAGING_INSTALL_PREFIX "/usr")
SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)

View File

@ -2412,6 +2412,7 @@
./config/cmake/CTestCustom.cmake
./config/cmake/ConfigureChecks.cmake
./config/cmake/CPack.cmake
./config/cmake/hdf.gif
./config/cmake/NSIS.template.in
./config/cmake/NSIS.InstallOptions.ini.in

View File

@ -442,6 +442,7 @@ if(NOT CPACK_GENERATOR)
endif()
else()
option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON)
option(CPACK_BINARY_WIX "Enable to build WiX packages" OFF)
option(CPACK_BINARY_ZIP "Enable to build ZIP packages" OFF)
endif()
@ -457,6 +458,7 @@ if(NOT CPACK_GENERATOR)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TGZ TGZ)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TBZ2 TBZ2)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_WIX WIX)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP)
endif()
@ -487,7 +489,7 @@ endif()
mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11
CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2
CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ
CPACK_BINARY_NSIS CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE
CPACK_BINARY_NSIS CPACK_BINARY_WIX CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE
CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ
CPACK_SOURCE_TZ CPACK_SOURCE_ZIP CPACK_BINARY_DRAGNDROP)
@ -526,6 +528,9 @@ cpack_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
cpack_set_if_not_set(CPACK_NSIS_INSTALLER_ICON_CODE "")
cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
# WiX specific variables
cpack_set_if_not_set(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}")
if(DEFINED CPACK_COMPONENTS_ALL)
if(CPACK_MONOLITHIC_INSTALL)
message("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.")

BIN
config/cmake/hdf.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 B