summaryrefslogtreecommitdiff
path: root/distribution/osx
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-12-28 16:52:56 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-12-28 16:52:56 +0100
commit7b358424ebad9349421acd533c2fa1cbf6cf3e3e (patch)
tree686678532eefed525c242fd214d0cfb2914726c5 /distribution/osx
Initial import of xtrkcad version 1:4.0.2-2
Diffstat (limited to 'distribution/osx')
-rw-r--r--distribution/osx/CMakeLists.txt55
-rw-r--r--distribution/osx/bundle/CMakeLists.txt13
-rw-r--r--distribution/osx/bundle/Info.plist.in16
-rw-r--r--distribution/osx/bundle/volume.icnsbin0 -> 50316 bytes
-rw-r--r--distribution/osx/bundle/volume.pngbin0 -> 21056 bytes
-rw-r--r--distribution/osx/bundle/volume.xcfbin0 -> 51420 bytes
-rw-r--r--distribution/osx/bundle/xtrackcad-startup43
-rw-r--r--distribution/osx/dependencies.cmake.in9
-rw-r--r--distribution/osx/yosemite-fix/libiconv.2.dylibbin0 -> 944420 bytes
-rw-r--r--distribution/osx/yosemite-fix/libxml2.2.dylibbin0 -> 2381112 bytes
-rw-r--r--distribution/osx/yosemite-fix/libz.1.dylibbin0 -> 169312 bytes
11 files changed, 136 insertions, 0 deletions
diff --git a/distribution/osx/CMakeLists.txt b/distribution/osx/CMakeLists.txt
new file mode 100644
index 0000000..5269250
--- /dev/null
+++ b/distribution/osx/CMakeLists.txt
@@ -0,0 +1,55 @@
+# Automatically generate most of our external dependencies ...
+GET_TARGET_PROPERTY(XTRKCAD_LOCATION xtrkcad LOCATION)
+CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/dependencies.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/dependencies.cmake" @ONLY)
+INSTALL(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/dependencies.cmake")
+
+# Handle some external dependencies that can't be detected automatically ...
+SET(MACPORTS_DIR "/opt/local" CACHE PATH "Root directory containing installed MacPort packages")
+MARK_AS_ADVANCED(MACPORTS_DIR)
+
+INSTALL(DIRECTORY
+ ${MACPORTS_DIR}/lib/gtk-2.0
+ DESTINATION lib
+ USE_SOURCE_PERMISSIONS
+ )
+
+INSTALL(DIRECTORY
+ ${MACPORTS_DIR}/etc/gtk-2.0
+ DESTINATION etc
+ USE_SOURCE_PERMISSIONS
+ )
+
+INSTALL(DIRECTORY
+ ${MACPORTS_DIR}/lib/pango
+ DESTINATION lib
+ USE_SOURCE_PERMISSIONS
+ )
+
+INSTALL(DIRECTORY
+ ${MACPORTS_DIR}/lib/gdk-pixbuf-2.0
+ DESTINATION lib
+ USE_SOURCE_PERMISSIONS
+ )
+
+INSTALL(FILES
+ ${MACPORTS_DIR}/etc/pango/pangorc
+ ${MACPORTS_DIR}/etc/pango/pango.modules
+ DESTINATION etc/pango
+ )
+
+INSTALL(FILES
+ ${MACPORTS_DIR}/etc/fonts/fonts.conf
+ ${MACPORTS_DIR}/etc/fonts/fonts.dtd
+ DESTINATION etc/fonts
+ )
+
+INSTALL(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/yosemite-fix/libxml2.2.dylib
+ ${CMAKE_CURRENT_SOURCE_DIR}/yosemite-fix/libz.1.dylib
+ ${CMAKE_CURRENT_SOURCE_DIR}/yosemite-fix/libiconv.2.dylib
+ DESTINATION lib
+)
+
+# Generate bundles ...
+ADD_SUBDIRECTORY(bundle)
+
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
new file mode 100644
index 0000000..12850fb
--- /dev/null
+++ b/distribution/osx/bundle/volume.icns
Binary files differ
diff --git a/distribution/osx/bundle/volume.png b/distribution/osx/bundle/volume.png
new file mode 100644
index 0000000..a1ea62a
--- /dev/null
+++ b/distribution/osx/bundle/volume.png
Binary files differ
diff --git a/distribution/osx/bundle/volume.xcf b/distribution/osx/bundle/volume.xcf
new file mode 100644
index 0000000..45e3363
--- /dev/null
+++ b/distribution/osx/bundle/volume.xcf
Binary files differ
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"
+
diff --git a/distribution/osx/dependencies.cmake.in b/distribution/osx/dependencies.cmake.in
new file mode 100644
index 0000000..dfa3221
--- /dev/null
+++ b/distribution/osx/dependencies.cmake.in
@@ -0,0 +1,9 @@
+INCLUDE(GetPrerequisites)
+GET_PREREQUISITES(@XTRKCAD_LOCATION@ DEPENDENCIES 1 1 "" "")
+
+FOREACH(DEPENDENCY ${DEPENDENCIES})
+ GET_FILENAME_COMPONENT(DEPENDENCY_NAME "${DEPENDENCY}" NAME)
+ GET_FILENAME_COMPONENT(DEPENDENCY_ACTUAL "${DEPENDENCY}" REALPATH)
+ FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE PROGRAM RENAME "${DEPENDENCY_NAME}" FILES "${DEPENDENCY_ACTUAL}")
+ENDFOREACH()
+
diff --git a/distribution/osx/yosemite-fix/libiconv.2.dylib b/distribution/osx/yosemite-fix/libiconv.2.dylib
new file mode 100644
index 0000000..ef12b3a
--- /dev/null
+++ b/distribution/osx/yosemite-fix/libiconv.2.dylib
Binary files differ
diff --git a/distribution/osx/yosemite-fix/libxml2.2.dylib b/distribution/osx/yosemite-fix/libxml2.2.dylib
new file mode 100644
index 0000000..4dbea97
--- /dev/null
+++ b/distribution/osx/yosemite-fix/libxml2.2.dylib
Binary files differ
diff --git a/distribution/osx/yosemite-fix/libz.1.dylib b/distribution/osx/yosemite-fix/libz.1.dylib
new file mode 100644
index 0000000..5abd84b
--- /dev/null
+++ b/distribution/osx/yosemite-fix/libz.1.dylib
Binary files differ