ADD_SUBDIRECTORY(tests)
ENDIF()
+ADD_SUBDIRECTORY(cpack)
+
#
# And finally, print the configuration:
#
# DEAL_II_COMPONENT_EXAMPLES
# DEAL_II_COMPONENT_MESH_CONVERTER
# DEAL_II_COMPONENT_PARAMETER_GUI
+# DEAL_II_COMPONENT_PACKAGE
# DEAL_II_FORCE_AUTODETECTION
#
# Options regarding compilation and linking:
OFF
)
+OPTION(DEAL_II_COMPONENT_PACKAGE
+ "Generates additional targets for packaging deal.II"
+ OFF
+ )
########################################################################
--- /dev/null
+## ---------------------------------------------------------------------
+##
+## Copyright (C) 2012 - 2014 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## The deal.II library is free software; you can use it, redistribute
+## it, and/or modify it under the terms of the GNU Lesser General
+## Public License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+## The full text of the license can be found in the file LICENSE at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+IF(DEAL_II_COMPONENT_PACKAGE)
+ MESSAGE(STATUS "Setting up CPack")
+ SET(CPACK_GENERATOR "Bundle")
+
+ SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cpack/mac-bundle/dealii-icon.icns")
+ set(CPACK_PACKAGE_FILE_NAME "${DEAL_II_PACKAGE_NAME}-${DEAL_II_PACKAGE_VERSION}")
+ set(CPACK_BUNDLE_NAME "${DEAL_II_PACKAGE_NAME}")
+ SET(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/cpack/mac-bundle/dealii-icon.icns")
+ SET(CPACK_BUNDLE_PLIST "${CMAKE_SOURCE_DIR}/cpack/mac-bundle/Info.plist")
+ SET(CPACK_BUNDLE_STARTUP_COMMAND "${CMAKE_SOURCE_DIR}/cpack/mac-bundle/mac_startup_script.sh")
+
+ INSTALL(FILES ${CMAKE_SOURCE_DIR}/cpack/mac-bundle/dealii.conf DESTINATION etc/)
+ INSTALL(FILES ${CMAKE_SOURCE_DIR}/cpack/mac-bundle/dealii.location DESTINATION etc/)
+ INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/cpack/mac-bundle/dealii-terminal DESTINATION bin/)
+
+ OPTION(DEAL_II_INSTALLS_EXTERNAL_LIBS
+ "Install external libraries together with deal.II."
+ OFF
+ )
+
+ IF(DEAL_II_INSTALLS_EXTERNAL_LIBS)
+ SET(DEAL_II_EXTERNAL_LIBS_TREE "NOT_SET" CACHE PATH
+ "Path to tree of external libraries that will be installed in bundle package."
+ )
+ INSTALL(DIRECTORY ${DEAL_II_EXTERNAL_LIBS_TREE}/
+ DESTINATION opt
+ USE_SOURCE_PERMISSIONS)
+ ENDIF()
+
+ INCLUDE(CPack)
+ MESSAGE(STATUS "Setting up CPack - Done")
+ENDIF()
--- /dev/null
+<?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">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>deal.II</string>
+ <key>CFBundleGetInfoString</key>
+ <string>8.2.pre</string>
+ <key>CFBundleIconFile</key>
+ <string>deal.II</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.dealii</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>8.2.pre</string>
+ <key>CFBundleSignature</key>
+ <string>deal.II</string>
+ <key>CFBundleVersion</key>
+ <string>8.2.pre</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>GPL</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>10.9</string>
+</dict>
+</plist>
--- /dev/null
+#!/bin/bash
+
+if [ "$BASH_SOURCE" == "$0" ]
+then
+ export DEAL_II_BUNDLE=`echo "$0" | sed -e 's|/Contents/.*||'`
+ export DEAL_II_RESOURCES=$DEAL_II_BUNDLE/Contents/Resources
+else
+ export DEAL_II_BUNDLE=`echo "$BASH_SOURCE" | sed -e 's|/Contents/MacOS/.*||'`
+ export DEAL_II_RESOURCES=$DEAL_II_BUNDLE/Contents/Resources
+fi
+
+# Make sure DEAL_II_BUNDLE is set correctly
+if [ -z "$DEAL_II_BUNDLE" ]; then
+ export DEAL_II_BUNDLE=/Applications/deal.II.app
+ if [ ! -d $DEAL_II_BUNDLE ]; then
+ return=`/usr/bin/osascript <<EOF
+tell app "System Events"
+ Activate
+ display dialog "This commands need to know where you installed the deal.II appliaction. If you moved it or renamed it, and you want to run this script from the command line, export the variable DEAL_II_BUNDLE to the correct path." buttons "OK" default button 1 with title "Location of deal.II changed." with icon 0
+end tell
+EOF`
+ exit 1
+ fi
+fi
+
+if [ -z "$DEAL_II_RESOURCES" ]; then
+ export DEAL_II_RESOURCES=$DEAL_II_BUNDLE/Contents/Resources
+fi
+
+# Make sure XCode is installed
+if ! [[ -x /usr/bin/xcodebuild ]]; then
+ return=`/usr/bin/osascript <<EOF
+tell app "System Events"
+ Activate
+ display dialog "This package requires XCode to be installed in order to run. Please install XCode from the OS X install disc and try again." buttons "OK" default button 1 with title "XCode Missing" with icon 0
+end tell
+EOF`
+ exit 1
+fi
+
+# Everything seems to be okay. Launch a terminal with PATH's
+# set up to work with deal.II.
+CONF=$DEAL_II_RESOURCES/etc/dealii.conf
+
+if ! [[ -f $CONF ]]; then
+ return=`/usr/bin/osascript <<EOF
+tell app "System Events"
+ Activate
+ display dialog "I could not find the file $CONF. Make sure your deal.II app is installed correctly." buttons "OK" default button 1 with title "XCode Missing" with icon 0
+end tell
+EOF`
+ exit 1
+fi
+/bin/bash --rcfile $CONF -i
--- /dev/null
+# Make sure DEAL_II_BUNDLE is set correctly
+if [ -z "$DEAL_II_BUNDLE" ]; then
+ export DEAL_II_BUNDLE=/Applications/deal.II.app
+ if [ ! -d $DEAL_II_BUNDLE ]; then
+ cat << EOF
+*** Warning: I did not find the deal.II installation in $DEAL_II_BUNDLE.
+ Could not set the environment to work with deal.II. Either reinstall
+ or set the environment vairiable DEAL_II_BUNDLE to the correct value.
+ Things may not work as you expect if you continue.
+EOF
+ fi
+fi
+
+# Check if DEAL_II_RESOURCES is set, otherwise set it to the default
+if [ -z "$DEAL_II_RESOURCES" ]; then
+ export DEAL_II_RESOURCES=$DEAL_II_BUNDLE/Contents/Resources
+fi
+
+# Start with default compilers libraries
+export PATH=$DEAL_II_RESOURCES/bin:$PATH
+export DYLD_LIBRARY_PATH=$DEAL_II_RESOURCES/lib:$DYLD_LIBRARY_PATH
+export DEAL_II_DIR=$DEAL_II_RESOURCES
+
+# Do wathever the external library tells us to
+if [ -f $DEAL_II_RESOURCES/opt/external.conf ]; then
+ . $DEAL_II_RESOURCES/opt/external.conf
+fi
+
+if [ -z "$DEAL_II_CONF_SILENT" ]; then
+ # Clear screen
+ clear
+
+ # Set prompt
+ # export PS1="\[\033[01;32m\]\u@\h:\[\033[01;34m\]\W\$ \[\033[00m\]"
+
+ # Set terminal title
+ # echo -n -e "\033]0;deal.II - an open source finite element library DEAL_II \007"
+
+ cat << EOF
+ ______ _ _____ _____
+ | _ \ | ||_ _|_ _|
+ | | | |___ __ _| | | | | |
+ | | | / _ \/ _| | | | | | |
+ | |/ / __/ (_| | |__| |_ _| |_
+ |___/ \___|\__,_|_(_)___/ \___/
+
+This is a shell with PATH's and DYLD_LIBRARY_PATH setup to work with Deal.II.
+If you are new to Deal.II you probably want to have a look at
+
+ $DEAL_II_RESOURCES/examples/
+
+For more information please visit the project website:
+
+http://www.dealii.org
+
+If you want to set up your daily Terminal to work with deal.II, add
+these lines to your ~/.profile file (the first line turns off this message):
+
+ export DEAL_II_CONF_SILENT=ON
+ . $DEAL_II_RESOURCES/etc/dealii.conf
+
+EOF
+fi
+
+if ! [[ -x /usr/bin/xcodebuild ]]; then
+ cat << EOF
+*** Warning: This package requires XCode to be installed in order to run.
+ Please install XCode from the OS X install disc before you continue.
+
+EOF
+fi
--- /dev/null
+/Applications/deal.II.app
--- /dev/null
+#!/bin/sh
+
+function relocate_if_necessary {
+ # If necessary, we relocate the libraries and binaries to the new place,
+ # by calling install_name_tool on each library in the installation tree
+ OLD=`cat $1/Contents/Resources/etc/dealii.location`
+ if [ ! "$OLD"=="$1" ];then
+ echo $1 > $1/Contents/Resources/etc/dealii.location
+ echo Needs relocation from $OLD to $1!
+ fi
+ return
+}
+
+if [ "$BASH_SOURCE" == "$0" ]
+then
+ export DEAL_II_BUNDLE=`echo "$0" | sed -e 's|/Contents/MacOS/.*||'`
+ export DEAL_II_RESOURCES=$DEAL_II_BUNDLE/Contents/Resources
+ open -a /Applications/Utilities/Terminal.app $DEAL_II_RESOURCES/bin/dealii-terminal
+else
+ export DEAL_II_BUNDLE=`echo "$BASH_SOURCE" | sed -e 's|/Contents/MacOS/.*||'`
+ export DEAL_II_RESOURCES=$DEAL_II_BUNDLE/Contents/Resources
+ source $DEAL_II_RESOURCES/etc/dealii.conf
+fi