diff options
Diffstat (limited to 'distribution/osx/bundle')
-rw-r--r-- | distribution/osx/bundle/CMakeLists.txt | 13 | ||||
-rw-r--r-- | distribution/osx/bundle/Info.plist.in | 16 | ||||
-rw-r--r-- | distribution/osx/bundle/volume.icns | bin | 0 -> 50316 bytes | |||
-rw-r--r-- | distribution/osx/bundle/volume.png | bin | 0 -> 21056 bytes | |||
-rw-r--r-- | distribution/osx/bundle/volume.xcf | bin | 0 -> 51420 bytes | |||
-rw-r--r-- | distribution/osx/bundle/xtrackcad-startup | 43 |
6 files changed, 72 insertions, 0 deletions
diff --git a/distribution/osx/bundle/CMakeLists.txt b/distribution/osx/bundle/CMakeLists.txt new file mode 100644 index 0000000..65f30dd --- /dev/null +++ b/distribution/osx/bundle/CMakeLists.txt @@ -0,0 +1,13 @@ +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist @ONLY) + +SET(CPACK_GENERATOR "Bundle") +SET(CPACK_BUNDLE_ICON "${XTrkCAD_SOURCE_DIR}/app/lib/icon.icns") +SET(CPACK_BUNDLE_NAME "XTrackCAD") +SET(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist") +SET(CPACK_BUNDLE_STARTUP_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/xtrackcad-startup") +SET(CPACK_INSTALL_CMAKE_PROJECTS "${XTrkCAD_BINARY_DIR};xtrkcad;ALL;/") +SET(CPACK_PACKAGE_FILE_NAME "xtrkcad-setup-${XTRKCAD_VERSION}-${CMAKE_SYSTEM_PROCESSOR}") +SET(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/volume.icns") + +INCLUDE(CPack) + diff --git a/distribution/osx/bundle/Info.plist.in b/distribution/osx/bundle/Info.plist.in new file mode 100644 index 0000000..ba946ee --- /dev/null +++ b/distribution/osx/bundle/Info.plist.in @@ -0,0 +1,16 @@ +<?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>XTrackCAD</string> + <key>CFBundleGetInfoString</key> + <string>@XTRKCAD_VERSION@</string> + <key>CFBundleIconFile</key> + <string>XTrackCAD</string> + <key>LSMinimumSystemVersion</key> + <string>10.5</string> + </dict> +</plist> diff --git a/distribution/osx/bundle/volume.icns b/distribution/osx/bundle/volume.icns Binary files differnew file mode 100644 index 0000000..12850fb --- /dev/null +++ b/distribution/osx/bundle/volume.icns diff --git a/distribution/osx/bundle/volume.png b/distribution/osx/bundle/volume.png Binary files differnew file mode 100644 index 0000000..a1ea62a --- /dev/null +++ b/distribution/osx/bundle/volume.png diff --git a/distribution/osx/bundle/volume.xcf b/distribution/osx/bundle/volume.xcf Binary files differnew file mode 100644 index 0000000..45e3363 --- /dev/null +++ b/distribution/osx/bundle/volume.xcf diff --git a/distribution/osx/bundle/xtrackcad-startup b/distribution/osx/bundle/xtrackcad-startup new file mode 100644 index 0000000..e82d444 --- /dev/null +++ b/distribution/osx/bundle/xtrackcad-startup @@ -0,0 +1,43 @@ +#!/bin/sh +# +# Author: Aaron Voisine <aaron@voisine.org> +# Inkscape Modifications: Michael Wybrow <mjwybrow@users.sourceforge.net> +# XTrackCAD Modifications: Timothy M. Shead <tshead@k-3d.com> + +XTRKCAD_BUNDLE="`echo "$0" | sed -e 's/\/Contents\/MacOS\/XTrackCAD//'`" +XTRKCAD_RESOURCES="$XTRKCAD_BUNDLE/Contents/Resources" +XTRKCAD_TEMP="/tmp/xtrkcad/$UID" +XTRKCAD_ETC="$XTRKCAD_TEMP/etc" +XTRKCAD_GDK_PIXBUF_MODULE_FILE="$XTRKCAD_ETC/gtk-2.0/gdk-pixbuf.loaders" +XTRKCAD_GTK_IM_MODULE_FILE="$XTRKCAD_ETC/gtk-2.0/gtk.immodules" +XTRKCAD_PANGO_RC_FILE="$XTRKCAD_ETC/pango/pangorc" + +echo "XTrackCAD: Starting $0" +echo "XTrackCAD: XTRKCAD_BUNDLE: $XTRKCAD_BUNDLE" + +# Setup temporary runtime files +rm -rf "$XTRKCAD_TEMP" + +# Because the bundle could be located anywhere at runtime, we have to +# create temporary copies of the Pango configuration files that +# reflect our current location +mkdir -p "$XTRKCAD_ETC/gtk-2.0" +sed -e 's|/opt/local|'"$XTRKCAD_RESOURCES|g" "$XTRKCAD_RESOURCES/etc/gtk-2.0/gdk-pixbuf.loaders" > "$XTRKCAD_GDK_PIXBUF_MODULE_FILE" +sed -e 's|/opt/local|'"$XTRKCAD_RESOURCES|g" "$XTRKCAD_RESOURCES/etc/gtk-2.0/gtk.immodules" > "$XTRKCAD_GTK_IM_MODULE_FILE" +mkdir -p "$XTRKCAD_ETC/pango" +sed -e 's|/opt/local/etc|'"$XTRKCAD_ETC|g" "$XTRKCAD_RESOURCES/etc/pango/pangorc" > "$XTRKCAD_ETC/pango/pangorc" +sed -e 's|/opt/local|\"'"$XTRKCAD_RESOURCES|g" -e "s/\.so/.so\"/g" "$XTRKCAD_RESOURCES/etc/pango/pango.modules" > "$XTRKCAD_ETC/pango/pango.modules" + +export "DYLD_LIBRARY_PATH=$XTRKCAD_RESOURCES/lib" +export "FONTCONFIG_PATH=$XTRKCAD_RESOURCES/etc/fonts" +export "GDK_PIXBUF_MODULE_FILE=$XTRKCAD_GDK_PIXBUF_MODULE_FILE" +export "GTK_IM_MODULE_FILE=$XTRKCAD_GTK_IM_MODULE_FILE" +export "PANGO_RC_FILE=$XTRKCAD_PANGO_RC_FILE" +export "PATH=$XTRKCAD_RESOURCES/bin:$PATH" +export "XTRKCADLIB=$XTRKCAD_RESOURCES/share/xtrkcad" + +export +exec "$XTRKCAD_RESOURCES/bin/xtrkcad" + +echo "XTrackCAD: Finishing $0" + |