5
ICNS=code/unix/MacSupport/ioquake3.icns
6
DESTDIR=build/release-darwin-ub
9
Q3_VERSION=`grep "\#define Q3_VERSION" code/qcommon/q_shared.h | \
10
sed -e 's/.*".* \([^ ]*\)"/\1/'`;
13
build/release-darwin-ppc/ioquake3.ppc
14
build/release-darwin-i386/ioquake3.i386
17
build/release-darwin-ppc/$BASEDIR/cgameppc.dylib
18
build/release-darwin-i386/$BASEDIR/cgamei386.dylib
19
build/release-darwin-ppc/$BASEDIR/uippc.dylib
20
build/release-darwin-i386/$BASEDIR/uii386.dylib
21
build/release-darwin-ppc/$BASEDIR/qagameppc.dylib
22
build/release-darwin-i386/$BASEDIR/qagamei386.dylib
25
build/release-darwin-ppc/$MPACKDIR/cgameppc.dylib
26
build/release-darwin-i386/$MPACKDIR/cgamei386.dylib
27
build/release-darwin-ppc/$MPACKDIR/uippc.dylib
28
build/release-darwin-i386/$MPACKDIR/uii386.dylib
29
build/release-darwin-ppc/$MPACKDIR/qagameppc.dylib
30
build/release-darwin-i386/$MPACKDIR/qagamei386.dylib
32
if [ ! -f Makefile ]; then
33
echo "This script must be run from the ioquake3 build directory";
36
if [ ! -d /Developer/SDKs/MacOSX10.2.8.sdk ]; then
38
/Developer/SDKs/MacOSX10.2.8.sdk/ is missing.
39
The installer for this SDK is included with XCode 2.2 or newer"
43
if [ ! -d /Developer/SDKs/MacOSX10.4u.sdk ]; then
45
/Developer/SDKs/MacOSX10.4u.sdk/ is missing.
46
The installer for this SDK is included with XCode 2.2 or newer"
50
(BUILD_MACOSX_UB=ppc make && BUILD_MACOSX_UB=i386 make) || exit 1;
52
echo "Creating .app bundle $DESTDIR/$APPBUNDLE"
53
if [ ! -d $DESTDIR/$APPBUNDLE/Contents/MacOS/$BASEDIR ]; then
54
mkdir -p $DESTDIR/$APPBUNDLE/Contents/MacOS/$BASEDIR || exit 1;
56
if [ ! -d $DESTDIR/$APPBUNDLE/Contents/MacOS/$MPACKDIR ]; then
57
mkdir -p $DESTDIR/$APPBUNDLE/Contents/MacOS/$MPACKDIR || exit 1;
59
if [ ! -d $DESTDIR/$APPBUNDLE/Contents/Resources ]; then
60
mkdir -p $DESTDIR/$APPBUNDLE/Contents/Resources
62
cp $ICNS $DESTDIR/$APPBUNDLE/Contents/Resources/ioquake3.icns || exit 1;
63
echo $PKGINFO > $DESTDIR/$APPBUNDLE/Contents/PkgInfo
65
<?xml version=\"1.0\" encoding="UTF-8"?>
67
PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"
68
\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
69
<plist version=\"1.0\">
71
<key>CFBundleDevelopmentRegion</key>
72
<string>English</string>
73
<key>CFBundleExecutable</key>
74
<string>$BINARY</string>
75
<key>CFBundleGetInfoString</key>
76
<string>ioquake3 $Q3_VERSION</string>
77
<key>CFBundleIconFile</key>
78
<string>ioquake3.icns</string>
79
<key>CFBundleIdentifier</key>
80
<string>org.icculus.quake3</string>
81
<key>CFBundleInfoDictionaryVersion</key>
83
<key>CFBundleName</key>
84
<string>ioquake3</string>
85
<key>CFBundlePackageType</key>
87
<key>CFBundleShortVersionString</key>
88
<string>$Q3_VERSION</string>
89
<key>CFBundleSignature</key>
90
<string>$PKGINFO</string>
91
<key>CFBundleVersion</key>
92
<string>$Q3_VERSION</string>
93
<key>NSExtensions</key>
95
<key>NSPrincipalClass</key>
96
<string>NSApplication</string>
99
" > $DESTDIR/$APPBUNDLE/Contents/Info.plist
101
lipo -create -o $DESTDIR/$APPBUNDLE/Contents/MacOS/$BINARY $BIN_OBJ
102
cp $BASE_OBJ $DESTDIR/$APPBUNDLE/Contents/MacOS/$BASEDIR/
103
cp $MPACK_OBJ $DESTDIR/$APPBUNDLE/Contents/MacOS/$MPACKDIR/
104
cp code/libs/macosx/*.dylib $DESTDIR/$APPBUNDLE/Contents/MacOS/