diff options
author | DRC <dcommander@users.sourceforge.net> | 2011-06-24 06:55:18 +0000 |
---|---|---|
committer | DRC <dcommander@users.sourceforge.net> | 2011-06-24 06:55:18 +0000 |
commit | 1a1840795d08d5382d0f2586829a3a50d10ad9c4 (patch) | |
tree | 712ad8929af6c7c51ca498972dcba2ab749c568e /release/makemacapp.in | |
parent | 94a803f0a055b39a6f279fca3b3542037e1899e2 (diff) | |
download | tigervnc-1a1840795d08d5382d0f2586829a3a50d10ad9c4.tar.gz tigervnc-1a1840795d08d5382d0f2586829a3a50d10ad9c4.zip |
Deploy Mac TigerVNC Viewer as an application bundle instead of a package, and consolidate all of the installer scripts under release/ and cmake/
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4538 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'release/makemacapp.in')
-rw-r--r-- | release/makemacapp.in | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/release/makemacapp.in b/release/makemacapp.in new file mode 100644 index 00000000..d8470860 --- /dev/null +++ b/release/makemacapp.in @@ -0,0 +1,75 @@ +#!/bin/sh + +set -u +set -e +trap onexit INT +trap onexit TERM +trap onexit EXIT + +TMPDIR= + +onexit() +{ + if [ ! "$TMPDIR" = "" ]; then + rm -rf $TMPDIR + fi +} + +usage() +{ + echo "$0 [universal]" + exit 1 +} + +UNIVERSAL=0 + +PACKAGE_NAME=TigerVNC +VERSION=@VERSION@ +BUILD=@BUILD@ +SRCDIR=@CMAKE_SOURCE_DIR@ +BUILDDIR32=@OSX_X86_BUILD@ +if [ $# -gt 0 ]; then + if [ "$1" = "universal" ]; then + UNIVERSAL=1 + fi +fi + +if [ -f $PACKAGE_NAME.dmg ]; then + rm -f $PACKAGE_NAME.dmg +fi + +umask 022 +TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX` +APPROOT="$TMPDIR/dmg/TigerVNC Viewer $VERSION.app" +mkdir -p "$APPROOT/Contents/MacOS" +mkdir -p "$APPROOT/Contents/Resources" + +install -m 755 vncviewer/vncviewer "$APPROOT/Contents/MacOS/TigerVNC Viewer" +if [ $UNIVERSAL = 1 ]; then + if [ ! -d $BUILDDIR32 ]; then + echo ERROR: 32-bit build directory $BUILDDIR32 does not exist + exit 1 + fi + if [ ! -f $BUILDDIR32/Makefile ]; then + echo ERROR: 32-bit build directory $BUILDDIR32 is not configured + exit 1 + fi + pushd $BUILDDIR32 + make + popd + lipo -create -arch i386 $BUILDDIR32/vncviewer/vncviewer -arch x86_64 \ + "$APPROOT/Contents/MacOS/TigerVNC Viewer" \ + -output "$APPROOT/Contents/MacOS/TigerVNC Viewer" +fi +install -m 644 $SRCDIR/release/tigervnc.icns "$APPROOT/Contents/Resources/" +install -m 644 release/Info.plist "$APPROOT/Contents/" + +install -m 644 $SRCDIR/LICENCE.txt $TMPDIR/dmg/ +install -m 644 $SRCDIR/release/README.txt $TMPDIR/dmg/ + +hdiutil create -fs HFS+ -volname $PACKAGE_NAME-$VERSION \ + -srcfolder "$TMPDIR/dmg" \ + $TMPDIR/$PACKAGE_NAME-$VERSION.dmg +cp $TMPDIR/$PACKAGE_NAME-$VERSION.dmg . + +exit |