Custom game wrapper for osx. Point it at a standard game dir, and it will run it without needing any other dependencies installed.

Internal mono works; still uses system SDL and Cg
This commit is contained in:
Paul Chote
2010-07-01 21:20:25 +12:00
committed by Chris Forbes
parent ec9bdb03c5
commit 4c8575b1f5
4 changed files with 128 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
#!/bin/bash
# Where is the game we are trying to load?
GAME_DIR="/Users/paul/src/OpenRA/"
# Find where we are and what we want to run
APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+3] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'`
EXE_DIR="$APP_PATH/Contents/MacOS/"
# Override paths so mono can find itself and the libraries it depends on
export MONO_PATH="$APP_PATH/Contents/Frameworks/Mono.framework/Versions/2.6.3/lib/"
export LD_LIBRARY_PATH="$MONO":"$MONO_PATH"
export MONO_LOG_LEVEL=debug
# Run the game
cd $GAME_DIR
${EXE_DIR}mono OpenRA.Game.exe