mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-26 05:52:03 +00:00
* make-macosx-ub.sh script now creates an .app bundle
This commit is contained in:
parent
fbf09d64c5
commit
338ca1689e
2 changed files with 55 additions and 12 deletions
BIN
code/unix/MacSupport/ioquake3.icns
Executable file
BIN
code/unix/MacSupport/ioquake3.icns
Executable file
Binary file not shown.
|
@ -1,8 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
APPBUNDLE=ioquake3.app
|
||||||
|
BINARY=ioquake3.ub
|
||||||
|
PKGINFO=APPIOQ3
|
||||||
|
ICNS=code/unix/MacSupport/ioquake3.icns
|
||||||
DESTDIR=build/release-darwin-ub
|
DESTDIR=build/release-darwin-ub
|
||||||
BASEDIR=baseq3
|
BASEDIR=baseq3
|
||||||
MPACKDIR=missionpack
|
MPACKDIR=missionpack
|
||||||
|
Q3_VERSION=`grep "\#define Q3_VERSION" code/qcommon/q_shared.h | \
|
||||||
|
sed -e 's/.*".* \([^ ]*\)"/\1/'`;
|
||||||
|
|
||||||
BIN_OBJ="
|
BIN_OBJ="
|
||||||
build/release-darwin-ppc/ioquake3.ppc
|
build/release-darwin-ppc/ioquake3.ppc
|
||||||
|
@ -44,19 +49,57 @@ fi
|
||||||
|
|
||||||
(BUILD_MACOSX_UB=ppc make && BUILD_MACOSX_UB=i386 make) || exit 1;
|
(BUILD_MACOSX_UB=ppc make && BUILD_MACOSX_UB=i386 make) || exit 1;
|
||||||
|
|
||||||
if [ ! -d $DESTDIR ]; then
|
echo "Creating .app bundle $DESTDIR/$APPBUNDLE"
|
||||||
mkdir $DESTDIR || exit 1;
|
if [ ! -d $DESTDIR/$APPBUNDLE/Contents/MacOS/$BASEDIR ]; then
|
||||||
|
mkdir -p $DESTDIR/$APPBUNDLE/Contents/MacOS/$BASEDIR || exit 1;
|
||||||
fi
|
fi
|
||||||
if [ ! -d $DESTDIR/$BASEDIR ]; then
|
if [ ! -d $DESTDIR/$APPBUNDLE/Contents/MacOS/$MPACKDIR ]; then
|
||||||
mkdir $DESTDIR/$BASEDIR || exit 1;
|
mkdir -p $DESTDIR/$APPBUNDLE/Contents/MacOS/$MPACKDIR || exit 1;
|
||||||
fi
|
fi
|
||||||
if [ ! -d $DESTDIR/$MPACKDIR ]; then
|
if [ ! -d $DESTDIR/$APPBUNDLE/Contents/Resources ]; then
|
||||||
mkdir $DESTDIR/$MPACKDIR || exit 1;
|
mkdir -p $DESTDIR/$APPBUNDLE/Contents/Resources
|
||||||
fi
|
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/$APPBUNDLE/Contents/MacOS/$BINARY $BIN_OBJ
|
||||||
lipo -create -o $DESTDIR/ioquake3.ub $BIN_OBJ
|
cp $BASE_OBJ $DESTDIR/$APPBUNDLE/Contents/MacOS/$BASEDIR/
|
||||||
cp $BASE_OBJ $DESTDIR/$BASEDIR/
|
cp $MPACK_OBJ $DESTDIR/$APPBUNDLE/Contents/MacOS/$MPACKDIR/
|
||||||
cp $MPACK_OBJ $DESTDIR/$MPACKDIR/
|
cp code/libs/macosx/*.dylib $DESTDIR/$APPBUNDLE/Contents/MacOS/
|
||||||
cp code/libs/macosx/*.dylib $DESTDIR/
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue