aboutsummaryrefslogtreecommitdiffstats
path: root/make-macosx-ub.sh
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-12-14 16:54:13 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-12-14 16:54:13 +0000
commit7fda2bcce8db155720ec8bfe16b7ea17667aaf89 (patch)
tree595404ebc19c4c242fe0d1182cb095ad361104b0 /make-macosx-ub.sh
parent1e7a5984c95f4538338de10d295f2af3edb44faf (diff)
downloadioquake3-aero-7fda2bcce8db155720ec8bfe16b7ea17667aaf89.tar.gz
ioquake3-aero-7fda2bcce8db155720ec8bfe16b7ea17667aaf89.zip
Fix building on MacOSX.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1238 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'make-macosx-ub.sh')
-rwxr-xr-xmake-macosx-ub.sh32
1 files changed, 22 insertions, 10 deletions
diff --git a/make-macosx-ub.sh b/make-macosx-ub.sh
index 6f524f2..6758e1e 100755
--- a/make-macosx-ub.sh
+++ b/make-macosx-ub.sh
@@ -1,10 +1,12 @@
#!/bin/sh
APPBUNDLE=ioquake3.app
BINARY=ioquake3.ub
+DEDBIN=ioq3ded.ub
PKGINFO=APPLIOQ3
ICNS=misc/quake3.icns
DESTDIR=build/release-darwin-ub
BASEDIR=baseq3
+SDKDIR=""
MPACKDIR=missionpack
Q3_VERSION=`grep "\#define Q3_VERSION" code/qcommon/q_shared.h | \
sed -e 's/.*".* \([^ ]*\)"/\1/'`;
@@ -13,6 +15,10 @@ BIN_OBJ="
build/release-darwin-ppc/ioquake3.ppc
build/release-darwin-i386/ioquake3.i386
"
+BIN_DEDOBJ="
+ build/release-darwin-ppc/ioq3ded.ppc
+ build/release-darwin-i386/ioq3ded.i386
+"
BASE_OBJ="
build/release-darwin-ppc/$BASEDIR/cgameppc.dylib
build/release-darwin-i386/$BASEDIR/cgamei386.dylib
@@ -33,18 +39,23 @@ if [ ! -f Makefile ]; then
echo "This script must be run from the ioquake3 build directory";
fi
-if [ ! -d /Developer/SDKs/MacOSX10.2.8.sdk ]; then
- echo "
-/Developer/SDKs/MacOSX10.2.8.sdk/ is missing.
-The installer for this SDK is included with XCode 2.2 or newer"
- exit 1;
-fi
+# this is kind of a hack to find out the latest SDK to use. I assume that newer SDKs appear later in this for loop,
+# thus the last valid one is the one we want.
+
+for availsdks in /Developer/SDKs/*
+do
+ if [ -d $availsdks ]
+ then
+ SDKDIR="$availsdks"
+ fi
+done
-if [ ! -d /Developer/SDKs/MacOSX10.4u.sdk ]; then
- echo "
-/Developer/SDKs/MacOSX10.4u.sdk/ is missing.
-The installer for this SDK is included with XCode 2.2 or newer"
+if [ -z $SDKDIR ]
+then
+ echo "MacOSX SDK is missing. Please install a recent version of the MacOSX SDK."
exit 1;
+else
+ echo "Using $SDKDIR for compilation"
fi
(BUILD_MACOSX_UB=ppc make && BUILD_MACOSX_UB=i386 make) || exit 1;
@@ -99,6 +110,7 @@ echo "
" > $DESTDIR/$APPBUNDLE/Contents/Info.plist
lipo -create -o $DESTDIR/$APPBUNDLE/Contents/MacOS/$BINARY $BIN_OBJ
+lipo -create -o $DESTDIR/$APPBUNDLE/Contents/MacOS/$DEDBIN $BIN_DEDOBJ
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/