Commit 9bcfcf62 authored by ghweber's avatar ghweber
Browse files

Added support for creating a DMG with a VisIt app bundle.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@15448 18c085ea-50e0-402c-830e-de6fd14e8384
parent 916aa016
......@@ -239,6 +239,10 @@
# Add VISIT_FORCE_SSH_TUNNELING that always forces ssh tunneling for all
# data connections.
#
# Gunther H. Weber, Wed Jul 20 15:32:26 PDT 2011
# Add support for creating a Mac App bundle by setting
# VISIT_CREATE_APPBUNDLE_PACKAGE to ON.
#
#****************************************************************************/
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
......@@ -438,7 +442,7 @@ OPTION(VISIT_DATA_MANUAL_EXAMPLES "Build Getting Data Into VisIt examples" OFF)
OPTION(IGNORE_THIRD_PARTY_LIB_PROBLEMS "Ignore problems finding requested third party libraries")
OPTION(VISIT_FORCE_SSH_TUNNELING "Force ssh tunnelling for sockets" OFF)
OPTION(VISIT_CREATE_APPBUNDLE_PACKAGE "Create DMG file with Mac App bundle with make package" OFF)
MACRO(VISIT_3RDPARTY_VAR libvar comment)
IF(NOT DEFINED VISIT_${libvar})
......@@ -1816,33 +1820,40 @@ INSTALL(FILES ${VISIT_BINARY_DIR}/include/VisItLibraryDependencies.cmake
# packages up a VisIt distribution.
#-----------------------------------------------------------------------------
CONFIGURE_FILE(${VISIT_SOURCE_DIR}/svn_bin/Info.plist.in
${VISIT_BINARY_DIR}/svn_bin/Info.plist @ONLY IMMEDIATE)
# temporarily turn this off on windows
IF (NOT WIN32)
SET(CPACK_PACKAGE_NAME "visit")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "VisIt ${VISIT_VERSION} is a parallel visualization and data analysis tool")
SET(CPACK_PACKAGE_VENDOR "LLNS")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/help/en_US/copyright.html")
# We should probably parse ${VISIT_VERSION} into its component parts instead.
SET(CPACK_PACKAGE_VERSION_MAJOR "2")
SET(CPACK_PACKAGE_VERSION_MINOR "0")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
#IF(WIN32)
# SET(CPACK_PACKAGE_FILE_NAME "visit${VISIT_VERSION}")
# SET(CPACK_PACKAGE_INSTALL_DIRECTORY "VisIt ${VISIT_VERSION}")
#
# SET(CPACK_GENERATOR "NSIS")
#ELSE(WIN32)
STRING(REPLACE "." "_" UL_VERSION ${VISIT_VERSION})
SET(CPACK_PACKAGE_FILE_NAME "visit${UL_VERSION}.${VISIT_INSTALL_PLATFORM}")
SET(CPACK_GENERATOR "TGZ")
IF(NOT APPLE)
SET(CPACK_STRIP_FILES TRUE)
ENDIF(NOT APPLE)
#ENDIF(WIN32)
INCLUDE(CPack)
IF (APPLE AND VISIT_CREATE_APPBUNDLE_PACKAGE)
SET (CPACK_GENERATOR "Bundle")
SET (CPACK_PACKAGE_FILE_NAME "VisIt-${VISIT_VERSION}")
SET (CPACK_BUNDLE_NAME "VisIt")
SET (CPACK_BUNDLE_ICON "${VISIT_SOURCE_DIR}/common/icons/VisItIcon.icns")
SET (CPACK_BUNDLE_PLIST "${VISIT_BINARY_DIR}/svn_bin/Info.plist")
SET (CPACK_BUNDLE_STARTUP_COMMAND "${VISIT_SOURCE_DIR}/svn_bin/LaunchVisItFromAppBundle.sh")
ELSE(APPLE AND VISIT_CREATE_APPBUNDLE_PACKAGE)
SET(CPACK_GENERATOR "TGZ")
SET(CPACK_PACKAGE_NAME "visit")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "VisIt ${VISIT_VERSION} is a parallel visualization and data analysis tool")
SET(CPACK_PACKAGE_VENDOR "LLNS")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/help/en_US/copyright.html")
# We should probably parse ${VISIT_VERSION} into its component parts instead.
SET(CPACK_PACKAGE_VERSION_MAJOR "2")
SET(CPACK_PACKAGE_VERSION_MINOR "0")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
STRING(REPLACE "." "_" UL_VERSION ${VISIT_VERSION})
SET(CPACK_PACKAGE_FILE_NAME "visit${UL_VERSION}.${VISIT_INSTALL_PLATFORM}")
IF(NOT APPLE)
SET(CPACK_STRIP_FILES TRUE)
ENDIF(NOT APPLE)
ENDIF(APPLE AND VISIT_CREATE_APPBUNDLE_PACKAGE)
INCLUDE(CPack)
ELSE (NOT WIN32)
# create a custom target that will run our nsis scripts.
# Make sure it won't run unless specifically called.
......@@ -1872,9 +1883,9 @@ ELSE (NOT WIN32)
ADD_CUSTOM_COMMAND(TARGET _PACKAGE PRE_BUILD
COMMAND ${CMAKE_COMMAND} -DBUILD_TYPE=${CMAKE_CFG_INTDIR} -P ${VISIT_BINARY_DIR}/data/cmake_install.cmake)
ENDIF(IS_DIRECTORY ${VISIT_SOURCE_DIR}/../data)
SET_TARGET_PROPERTIES(_PACKAGE PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
# source installer
ADD_CUSTOM_COMMAND(OUTPUT visitdev${VISIT_VERSION}.exe
COMMAND ${MAKENSIS}
......@@ -1888,5 +1899,3 @@ ELSE (NOT WIN32)
SET_TARGET_PROPERTIES(_SRC_PACKAGE PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
ENDIF (${MAKENSIS_FOUND})
ENDIF (NOT WIN32)
#!/bin/sh
visit_version=`readlink $1/current`
if [ $? != 0 ]; then
echo "Cannot determine VisIt version number"
exit
fi
mkdir $1/Contents
cat >$1/Contents/Info.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
......@@ -13,19 +5,17 @@ cat >$1/Contents/Info.plist <<EOF
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>visit</string>
<string>VisIt</string>
<key>CFBundleGetInfoString</key>
<string>VisIt Visualization Tool</string>
<key>CFBundleIconFile</key>
<string>VisItIcon.icns</string>
<string>VisIt.icns</string>
<key>CFBundleIdentifier</key>
<string>VISI</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
EOF
echo " <string>VisIt version $visit_version</string>" >> $1/Contents/Info.plist
cat >> $1/Contents/Info.plist <<EOF
<string>VisIt version @VISIT_VERSION@</string>
<key>LSEnvironment</key>
<dict>
<key>TERM_PROGRAM</key>
......@@ -34,21 +24,15 @@ cat >> $1/Contents/Info.plist <<EOF
<string>TRUE</string>
</dict>
<key>CFBundleName</key>
EOF
echo " <string>VisIt $visit_version</string>" >> $1/Contents/Info.plist
cat >>$1/Contents/Info.plist <<EOF
<string>VisIt @VISIT_VERSION@</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
EOF
echo " <string>VisIt $visit_version</string>" >> $1/Contents/Info.plist
cat >>$1/Contents/Info.plist <<EOF
<string>VisIt @VISIT_VERSION@</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
EOF
echo " <string>$visit_version</string>" >>$1/Contents/Info.plist
cat >>$1/Contents/Info.plist <<EOF
<string>@VISIT_VERSION@</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
......@@ -57,9 +41,3 @@ cat >>$1/Contents/Info.plist <<EOF
<string>Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC</string>
</dict>
</plist>
EOF
mkdir $1/Contents/MacOS
ln -s ../../bin/visit $1/Contents/MacOS/visit
mkdir $1/Contents/Resources
cp $1/current/darwin-*/bin/gui.app/Contents/Resources/VisItIcon.icns $1/Contents/Resources
mv $1 `dirname $1`/VisIt.app
#!/bin/sh
exec $(dirname $0)/../Resources/bin/visit $*
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment