From 111a57ca261c0145d6d1216809c448f98925b4aa Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 8 Aug 2013 16:25:32 -0500 Subject: [svn-r23978] Add Bundle and plist file. Update script file add icon --- CMakeLists.txt | 25 +++++++++++++++++++++++-- MANIFEST | 1 + config/cmake/CPack.cmake | 7 ++++++- config/cmake/hdf.gif | Bin 0 -> 1016 bytes 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 config/cmake/hdf.gif diff --git a/CMakeLists.txt b/CMakeLists.txt index cb283a3..dc6e383 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/MANIFEST b/MANIFEST index 45099ca..436ecb1 100644 --- a/MANIFEST +++ b/MANIFEST @@ -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 diff --git a/config/cmake/CPack.cmake b/config/cmake/CPack.cmake index d96fe43..bdfa5b8 100644 --- a/config/cmake/CPack.cmake +++ b/config/cmake/CPack.cmake @@ -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.") diff --git a/config/cmake/hdf.gif b/config/cmake/hdf.gif new file mode 100644 index 0000000..656617b Binary files /dev/null and b/config/cmake/hdf.gif differ -- cgit v0.12