add command line options:

-global-Key Value
-gamename.game-Key Value

and use it in netradiant.sh on OS X to detect whether NetRadiant.app is located
in a subdir of a Nexuiz install. If it is, automatically select this game dir.


git-svn-id: svn://svn.icculus.org/netradiant/trunk@202 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
divverent
2009-03-04 08:12:04 +00:00
parent 469e4fc146
commit 03c2a5a99f
5 changed files with 52 additions and 8 deletions

View File

@@ -7,8 +7,33 @@ MY_DIRECTORY="${MY_DIRECTORY%/*}" # cut off Contents
#export DYLD_LIBRARY_PATH="$MY_DIRECTORY/Contents/MacOS"
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
exec /usr/bin/open-x11 ./radiant.ppc
exec /usr/bin/open-x11 ./radiant.ppc "$@"
else
exec ./radiant.ppc
exec ./radiant.ppc "$@"
fi