2006-08-02 04:01:36 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
DESTDIR=build/release-darwin-ub
|
|
|
|
BASEDIR=baseq3
|
|
|
|
MPACKDIR=missionpack
|
|
|
|
|
|
|
|
BIN_OBJ="
|
|
|
|
build/release-darwin-ppc/ioquake3.ppc
|
2006-08-02 05:12:20 +00:00
|
|
|
build/release-darwin-i386/ioquake3.i386
|
2006-08-02 04:01:36 +00:00
|
|
|
"
|
|
|
|
BASE_OBJ="
|
|
|
|
build/release-darwin-ppc/$BASEDIR/cgameppc.dylib
|
2006-08-02 05:12:20 +00:00
|
|
|
build/release-darwin-i386/$BASEDIR/cgamei386.dylib
|
2006-08-02 04:01:36 +00:00
|
|
|
build/release-darwin-ppc/$BASEDIR/uippc.dylib
|
2006-08-02 05:12:20 +00:00
|
|
|
build/release-darwin-i386/$BASEDIR/uii386.dylib
|
2006-08-02 04:01:36 +00:00
|
|
|
build/release-darwin-ppc/$BASEDIR/qagameppc.dylib
|
2006-08-02 05:12:20 +00:00
|
|
|
build/release-darwin-i386/$BASEDIR/qagamei386.dylib
|
2006-08-02 04:01:36 +00:00
|
|
|
"
|
|
|
|
MPACK_OBJ="
|
|
|
|
build/release-darwin-ppc/$MPACKDIR/cgameppc.dylib
|
2006-08-02 05:12:20 +00:00
|
|
|
build/release-darwin-i386/$MPACKDIR/cgamei386.dylib
|
2006-08-02 04:01:36 +00:00
|
|
|
build/release-darwin-ppc/$MPACKDIR/uippc.dylib
|
2006-08-02 05:12:20 +00:00
|
|
|
build/release-darwin-i386/$MPACKDIR/uii386.dylib
|
2006-08-02 04:01:36 +00:00
|
|
|
build/release-darwin-ppc/$MPACKDIR/qagameppc.dylib
|
2006-08-02 05:12:20 +00:00
|
|
|
build/release-darwin-i386/$MPACKDIR/qagamei386.dylib
|
2006-08-02 04:01:36 +00:00
|
|
|
"
|
|
|
|
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
|
|
|
|
|
|
|
|
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"
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
2006-08-02 05:12:20 +00:00
|
|
|
(BUILD_MACOSX_UB=ppc make && BUILD_MACOSX_UB=i386 make) || exit 1;
|
2006-08-02 04:01:36 +00:00
|
|
|
|
|
|
|
if [ ! -d $DESTDIR ]; then
|
|
|
|
mkdir $DESTDIR || exit 1;
|
|
|
|
fi
|
|
|
|
if [ ! -d $DESTDIR/$BASEDIR ]; then
|
|
|
|
mkdir $DESTDIR/$BASEDIR || exit 1;
|
|
|
|
fi
|
|
|
|
if [ ! -d $DESTDIR/$MPACKDIR ]; then
|
|
|
|
mkdir $DESTDIR/$MPACKDIR || exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
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/
|
|
|
|
|