detect being inside a Nexuiz install from Radiant C code, no longer from a shell script on OS X. This should make it work on all systems.

git-svn-id: svn://svn.icculus.org/netradiant/trunk@210 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
divverent
2009-03-05 11:27:30 +00:00
parent bc8893fcd7
commit b7cd2135c9
2 changed files with 81 additions and 26 deletions

View File

@@ -9,31 +9,6 @@ export PANGO_RC_FILE="$MY_DIRECTORY/Contents/MacOS/install/pangorc"
export GDK_PIXBUF_MODULE_FILE="$MY_DIRECTORY/Contents/MacOS/install/gdk-pixbuf.loaders"
cd "$MY_DIRECTORY/Contents/MacOS/install"
# autodetect nexuiz installs
NEX_DIRECTORY="/${MY_DIRECTORY%/*}"
while :; do
if [ -z "$NEX_DIRECTORY" ]; then
break
fi
if [ -f "$NEX_DIRECTORY/data/common-spog.pk3" ]; then
if [ -d "$NEX_DIRECTORY/Nexuiz.app" ]; then
break
fi
fi
NEX_DIRECTORY=${NEX_DIRECTORY%/*}
done
case "$NEX_DIRECTORY" in
//*)
NEX_DIRECTORY=${NEX_DIRECTORY#/}
set -- -global-gamefile nexuiz.game -nexuiz.game-EnginePath "$NEX_DIRECTORY/"
# -global-gamePrompt false?
;;
*)
set --
;;
esac
if [ -x /usr/bin/open-x11 ]; then
/usr/bin/open-x11 ./radiant.ppc "$@" &
else