From 204242e4da194f2d7f87bfc95a950f8dcf9f481b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Sat, 23 Oct 2010 13:22:44 +0200 Subject: Improved Mac packaging. diff --git a/Swift/Packaging/MacOSX/Swift.dmg.gz b/Swift/Packaging/MacOSX/Swift.dmg.gz new file mode 100644 index 0000000..1e56881 Binary files /dev/null and b/Swift/Packaging/MacOSX/Swift.dmg.gz 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 diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index 78579a6..0bb0708 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -152,11 +152,8 @@ if env["PLATFORM"] == "darwin" : frameworks.append(env["GROWL_FRAMEWORK"]) app = myenv.AppBundle("Swift", version = myenv["SWIFT_VERSION"], resources = ["../resources/MacOSX/Swift.icns"] + commonResources, frameworks = frameworks) if env["DIST"] : - myenv.Command(["Swift-${SWIFT_VERSION}.dmg"], [app], [ - "$QTDIR/bin/macdeployqt $SOURCE -dmg", - Move("$TARGET", "$SOURCE.dir/Swift.dmg") - ]) - + myenv.Command(["Swift-${SWIFT_VERSION}.dmg"], [app], ["Swift/Packaging/MacOSX/package.sh " + app.path + " Swift/Packaging/MacOSX/Swift.dmg.gz $TARGET $QTDIR"]) + if env.get("SWIFT_INSTALLDIR", "") : env.Install(os.path.join(env["SWIFT_INSTALLDIR"], "bin"), swiftProgram) env.InstallAs(os.path.join(env["SWIFT_INSTALLDIR"], "share", "pixmaps", "swift.xpm"), "../resources/logo/logo-icon-32.xpm") diff --git a/Swift/resources/logo/dmg.svg b/Swift/resources/logo/dmg.svg new file mode 100644 index 0000000..1c88cb4 --- /dev/null +++ b/Swift/resources/logo/dmg.svg @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + Swift + + + -- cgit v0.10.2-6-g49f6