summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rwxr-xr-xModules/CPack.OSXScriptLauncher.inbin0 -> 1345804 bytes
-rw-r--r--Modules/CPack.OSXX11.Info.plist.in36
-rwxr-xr-xModules/CPack.RuntimeScript.in40
3 files changed, 76 insertions, 0 deletions
diff --git a/Modules/CPack.OSXScriptLauncher.in b/Modules/CPack.OSXScriptLauncher.in
new file mode 100755
index 0000000..a3e1737
--- /dev/null
+++ b/Modules/CPack.OSXScriptLauncher.in
Binary files differ
diff --git a/Modules/CPack.OSXX11.Info.plist.in b/Modules/CPack.OSXX11.Info.plist.in
new file mode 100644
index 0000000..30ce2de
--- /dev/null
+++ b/Modules/CPack.OSXX11.Info.plist.in
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//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>@CPACK_PACKAGE_FILE_NAME@</string>
+ <key>CFBundleGetInfoString</key>
+ <string>@CPACK_APPLE_GUI_INFO_STRING@</string>
+ <key>CFBundleIconFile</key>
+ <string>@CPACK_APPLE_GUI_ICON@</string>
+ <key>CFBundleIdentifier</key>
+ <string>@CPACK_APPLE_GUI_IDENTIFIER@</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleLongVersionString</key>
+ <string>@CPACK_APPLE_GUI_LONG_VERSION_STRING@</string>
+ <key>CFBundleName</key>
+ <string>@CPACK_APPLE_GUI_BUNDLE_NAME@</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>@CPACK_APPLE_GUI_SHORT_VERSION_STRING@</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>@CPACK_APPLE_GUI_BUNDLE_VERSION@</string>
+ <key>CSResourcesFileMapped</key>
+ <true/>
+ <key>LSRequiresCarbon</key>
+ <true/>
+ <key>NSHumanReadableCopyright</key>
+ <string>@CPACK_APPLE_GUI_COPYRIGHT@</string>
+</dict>
+</plist>
diff --git a/Modules/CPack.RuntimeScript.in b/Modules/CPack.RuntimeScript.in
new file mode 100755
index 0000000..9195d52
--- /dev/null
+++ b/Modules/CPack.RuntimeScript.in
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# Modified from: Aaron Voisine <aaron@voisine.org>
+
+CWD="`dirname \"$0\"`"
+TMP=/tmp/$UID/TemporaryItems
+
+ps -wx -ocommand | grep -e '[X]11.app' > /dev/null
+if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
+ echo "rm -f ~/.xinitrc" > ~/.xinitrc
+ sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> ~/.xinitrc
+fi
+
+mkdir -p $TMP
+cat << __END_OF_GETDISPLAY_SCRIPT__ > "$TMP/getdisplay.sh"
+#!/bin/sh
+mkdir -p "$TMP"
+
+if [ "\$DISPLAY"x == "x" ]; then
+ echo :0 > "$TMP/display"
+else
+ echo \$DISPLAY > "$TMP/display"
+fi
+__END_OF_GETDISPLAY_SCRIPT__
+rm -f $TMP/display
+open-x11 $TMP/getdisplay.sh || \
+open -a XDarwin $TMP/getdisplay.sh || \
+echo ":0" > $TMP/display
+
+while [ "$?" == "0" -a ! -f $TMP/display ]; do sleep 1; done
+export "DISPLAY=`cat $TMP/display`"
+
+ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11
+
+cd ~/
+echo "$@" > /tmp/arguments.log
+if echo $1 | grep -- "^-psn_"; then
+ shift
+fi
+exec "$CWD/bin/@CPACK_EXECUTABLE_NAME@" "$@" > /tmp/slicer.output 2>&1