summaryrefslogtreecommitdiff
path: root/make-macosx-ub.sh
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2006-11-28 23:46:04 +0000
committerTim Angus <tim@ngus.net>2006-11-28 23:46:04 +0000
commit92905745a71578eed267f25311d7a18d49976f6d (patch)
tree5836f0a4424b938c6782190ec9c28c6be808f389 /make-macosx-ub.sh
parent6af24abf02f1d0dedc5dbe655a37d5afc9f0646a (diff)
* Merge ioq3-989
Diffstat (limited to 'make-macosx-ub.sh')
-rwxr-xr-xmake-macosx-ub.sh65
1 files changed, 56 insertions, 9 deletions
diff --git a/make-macosx-ub.sh b/make-macosx-ub.sh
index a641e655..0bcee56c 100755
--- a/make-macosx-ub.sh
+++ b/make-macosx-ub.sh
@@ -1,7 +1,12 @@
#!/bin/sh
-
+APPBUNDLE=ioquake3.app
+BINARY=ioquake3.ub
+PKGINFO=APPIOQ3
+ICNS=code/unix/MacSupport/ioquake3.icns
DESTDIR=build/release-darwin-ub
BASEDIR=base
+Q3_VERSION=`grep "\#define Q3_VERSION" code/qcommon/q_shared.h | \
+ sed -e 's/.*".* \([^ ]*\)"/\1/'`;
BIN_OBJ="
build/release-darwin-ppc/tremulous.ppc
@@ -36,15 +41,57 @@ fi
(BUILD_MACOSX_UB=ppc make && BUILD_MACOSX_UB=x86 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/$APPBUNDLE/Contents/MacOS/$MPACKDIR ]; then
+ mkdir -p $DESTDIR/$APPBUNDLE/Contents/MacOS/$MPACKDIR || exit 1;
fi
-if [ ! -d $DESTDIR/$BASEDIR ]; then
- mkdir $DESTDIR/$BASEDIR || 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 "
+ <?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>$BINARY</string>
+ <key>CFBundleGetInfoString</key>
+ <string>ioquake3 $Q3_VERSION</string>
+ <key>CFBundleIconFile</key>
+ <string>ioquake3.icns</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.icculus.quake3</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>ioquake3</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>$Q3_VERSION</string>
+ <key>CFBundleSignature</key>
+ <string>$PKGINFO</string>
+ <key>CFBundleVersion</key>
+ <string>$Q3_VERSION</string>
+ <key>NSExtensions</key>
+ <dict/>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+ </dict>
+ </plist>
+ " > $DESTDIR/$APPBUNDLE/Contents/Info.plist
-echo "Installing Universal Binaries in $DESTDIR"
-lipo -create -o $DESTDIR/Tremulous $BIN_OBJ
-cp $BASE_OBJ $DESTDIR/$BASEDIR/
-cp src/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/