summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-23 11:22:44 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-23 11:22:44 (GMT)
commit204242e4da194f2d7f87bfc95a950f8dcf9f481b (patch)
tree5c2fd201af1c48252b5208525e2683da8ba3cbf0 /Swift/Packaging
parentca8268eb662fedeef039bc39f7b8206c08610299 (diff)
downloadswift-contrib-204242e4da194f2d7f87bfc95a950f8dcf9f481b.zip
swift-contrib-204242e4da194f2d7f87bfc95a950f8dcf9f481b.tar.bz2
Improved Mac packaging.
Diffstat (limited to 'Swift/Packaging')
-rw-r--r--Swift/Packaging/MacOSX/Swift.dmg.gzbin0 -> 220326 bytes
-rwxr-xr-xSwift/Packaging/MacOSX/package.sh27
2 files changed, 27 insertions, 0 deletions
diff --git a/Swift/Packaging/MacOSX/Swift.dmg.gz b/Swift/Packaging/MacOSX/Swift.dmg.gz
new file mode 100644
index 0000000..1e56881
--- /dev/null
+++ b/Swift/Packaging/MacOSX/Swift.dmg.gz
Binary files differ
diff --git a/Swift/Packaging/MacOSX/package.sh b/Swift/Packaging/MacOSX/package.sh
new file mode 100755
index 0000000..884403b
--- /dev/null
+++ b/Swift/Packaging/MacOSX/package.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+APP=$1
+TEMPLATE=$2
+TARGET=$3
+QTDIR=$4
+
+if [[ ! -f "$TEMPLATE" || ! -d "$APP" || ! -d "$QTDIR" || -z "$TARGET" ]]; then
+ echo "Error"
+ exit -1
+fi
+
+set -e -x
+
+WC_DIR=`dirname $TEMPLATE`/tmp
+WC_DMG=`dirname $TEMPLATE`/tmp.dmg
+
+gunzip -c $TEMPLATE > $WC_DMG
+rm -rf $WC_DIR
+mkdir -p $WC_DIR
+hdiutil attach "$WC_DMG" -noautoopen -quiet -mountpoint "$WC_DIR"
+ditto -rsrc "$APP" "$WC_DIR"/`basename $APP`
+$QTDIR/bin/macdeployqt "$WC_DIR"/`basename $APP`
+hdiutil detach "$WC_DIR" -quiet -force
+rm -f $TARGET
+hdiutil convert "$WC_DMG" -quiet -format UDZO -imagekey zlib-level=9 -o "$TARGET"
+rm -rf $WC_DMG $WC_DIR