From 3a5adf859a06d8e2c1b91cd55d7c76e6cd73658c Mon Sep 17 00:00:00 2001 From: tjw Date: Tue, 26 Sep 2006 03:12:54 +0000 Subject: * make-macosx-ub.sh script now creates an .app bundle git-svn-id: svn://svn.icculus.org/quake3/trunk@917 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/unix/MacSupport/ioquake3.icns | Bin 0 -> 35224 bytes make-macosx-ub.sh | 67 ++++++++++++++++++++++++++++++------- 2 files changed, 55 insertions(+), 12 deletions(-) create mode 100755 code/unix/MacSupport/ioquake3.icns diff --git a/code/unix/MacSupport/ioquake3.icns b/code/unix/MacSupport/ioquake3.icns new file mode 100755 index 0000000..30e3b67 Binary files /dev/null and b/code/unix/MacSupport/ioquake3.icns differ diff --git a/make-macosx-ub.sh b/make-macosx-ub.sh index 7cbcc64..fc34f63 100755 --- a/make-macosx-ub.sh +++ b/make-macosx-ub.sh @@ -1,8 +1,13 @@ #!/bin/sh - +APPBUNDLE=ioquake3.app +BINARY=ioquake3.ub +PKGINFO=APPIOQ3 +ICNS=code/unix/MacSupport/ioquake3.icns DESTDIR=build/release-darwin-ub BASEDIR=baseq3 MPACKDIR=missionpack +Q3_VERSION=`grep "\#define Q3_VERSION" code/qcommon/q_shared.h | \ + sed -e 's/.*".* \([^ ]*\)"/\1/'`; BIN_OBJ=" build/release-darwin-ppc/ioquake3.ppc @@ -44,19 +49,57 @@ fi (BUILD_MACOSX_UB=ppc make && BUILD_MACOSX_UB=i386 make) || exit 1; -if [ ! -d $DESTDIR ]; then - mkdir $DESTDIR || exit 1; +echo "Creating .app bundle $DESTDIR/$APPBUNDLE" +if [ ! -d $DESTDIR/$APPBUNDLE/Contents/MacOS/$BASEDIR ]; then + mkdir -p $DESTDIR/$APPBUNDLE/Contents/MacOS/$BASEDIR || exit 1; fi -if [ ! -d $DESTDIR/$BASEDIR ]; then - mkdir $DESTDIR/$BASEDIR || exit 1; +if [ ! -d $DESTDIR/$APPBUNDLE/Contents/MacOS/$MPACKDIR ]; then + mkdir -p $DESTDIR/$APPBUNDLE/Contents/MacOS/$MPACKDIR || exit 1; fi -if [ ! -d $DESTDIR/$MPACKDIR ]; then - mkdir $DESTDIR/$MPACKDIR || exit 1; +if [ ! -d $DESTDIR/$APPBUNDLE/Contents/Resources ]; then + mkdir -p $DESTDIR/$APPBUNDLE/Contents/Resources fi +cp $ICNS $DESTDIR/$APPBUNDLE/Contents/Resources/ioquake3.icns || exit 1; +echo $PKGINFO > $DESTDIR/$APPBUNDLE/Contents/PkgInfo +echo " + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + $BINARY + CFBundleGetInfoString + ioquake3 $Q3_VERSION + CFBundleIconFile + ioquake3.icns + CFBundleIdentifier + org.icculus.quake3 + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ioquake3 + CFBundlePackageType + APPL + CFBundleShortVersionString + $Q3_VERSION + CFBundleSignature + $PKGINFO + CFBundleVersion + $Q3_VERSION + NSExtensions + + NSPrincipalClass + NSApplication + + + " > $DESTDIR/$APPBUNDLE/Contents/Info.plist -echo "Installing Universal Binaries in $DESTDIR" -lipo -create -o $DESTDIR/ioquake3.ub $BIN_OBJ -cp $BASE_OBJ $DESTDIR/$BASEDIR/ -cp $MPACK_OBJ $DESTDIR/$MPACKDIR/ -cp code/libs/macosx/*.dylib $DESTDIR/ +lipo -create -o $DESTDIR/$APPBUNDLE/Contents/MacOS/$BINARY $BIN_OBJ +cp $BASE_OBJ $DESTDIR/$APPBUNDLE/Contents/MacOS/$BASEDIR/ +cp $MPACK_OBJ $DESTDIR/$APPBUNDLE/Contents/MacOS/$MPACKDIR/ +cp code/libs/macosx/*.dylib $DESTDIR/$APPBUNDLE/Contents/MacOS/ -- cgit v1.2.3