2011-07-22 00:17:43 +00:00
|
|
|
#!/bin/sh
|
2011-07-26 21:23:52 +00:00
|
|
|
# Q3Rally Unix Launcher
|
|
|
|
|
|
|
|
PLATFORM=`uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'|sed -e 's/\//_/g'`
|
2018-01-10 02:58:42 +00:00
|
|
|
ARCH=`uname -m | sed -e s/i.86/x86/`
|
2011-07-26 21:23:52 +00:00
|
|
|
BUILD=release
|
|
|
|
|
2018-01-10 02:58:42 +00:00
|
|
|
if [ $ARCH = "x86" ]; then
|
|
|
|
FULLBINEXT=
|
|
|
|
else
|
|
|
|
FULLBINEXT=.$ARCH
|
|
|
|
fi
|
|
|
|
|
|
|
|
BIN=engine/build/$BUILD-$PLATFORM-$ARCH/q3rally$FULLBINEXT
|
2011-07-26 21:23:52 +00:00
|
|
|
|
|
|
|
if [ ! -f $BIN ]; then
|
2011-08-10 20:04:11 +00:00
|
|
|
echo "Game binary '$BIN' not found, building it..."
|
|
|
|
make -C engine BUILD_GAME_SO=0 BUILD_SERVER=0
|
2011-07-26 21:23:52 +00:00
|
|
|
fi
|
|
|
|
|
2011-08-10 20:04:11 +00:00
|
|
|
# Create links to game logic qvms
|
2011-08-03 05:12:59 +00:00
|
|
|
if [ ! -f baseq3r/vm/ui.qvm ]; then
|
2011-08-10 20:04:11 +00:00
|
|
|
DIR=`pwd`
|
|
|
|
ln -st "$DIR/baseq3r/vm/" "$DIR/engine/build/$BUILD-$PLATFORM-$ARCH/baseq3r/vm/cgame.qvm"
|
|
|
|
ln -st "$DIR/baseq3r/vm/" "$DIR/engine/build/$BUILD-$PLATFORM-$ARCH/baseq3r/vm/qagame.qvm"
|
|
|
|
ln -st "$DIR/baseq3r/vm/" "$DIR/engine/build/$BUILD-$PLATFORM-$ARCH/baseq3r/vm/ui.qvm"
|
2011-08-03 05:12:59 +00:00
|
|
|
fi
|
|
|
|
|
2011-07-26 21:23:52 +00:00
|
|
|
# Run the game
|
2011-08-10 20:04:11 +00:00
|
|
|
./$BIN +set fs_basepath "." +set vm_game 2 +set vm_cgame 2 +set vm_ui 2 $@
|
2011-07-22 00:17:43 +00:00
|
|
|
|