5
# This is to run Oolite with the standalone Dependencies Pack.
7
# Usage: ./oolite-wrapper
8
# Dylan Smith, 2005-09-03
11
# 2009-09-30: Added DTDs transport to $HOME/GNUstep/Library (Address DTD not found issue)
12
# 2010-04-23: Added x86_64 exports for GNUSTEP
13
# 2010-04-26: Command line arguments passing to oolite executable
14
# 2011-03-22: 1) Removed TOPLEVEL environment variable. A small fix in the default.*.apspec file
15
# made TOPLEVEL obsolete. OOLITE_ROOT is more than enough.
16
# 2) Replaced any usage of ~ as homepath by $HOME
17
# 3) Fixed a problem where oolite needed to run twice before the
18
# the $HOME/.Oolite/.oolite-run file could be created.
19
# 2011-03-26: Updated to support the new self-extractable package
20
# 2011-04-03: Updated to facilitate rsync repository setup for oolite-update script
24
OOLITE_ROOT=$(cd $(dirname $0); cd ..; pwd -P)
26
if [ ! -f $HOME/.Oolite/.oolite${TRUNK}-run ]
28
mkdir -p $HOME/.Oolite/
29
touch $HOME/.Oolite/.oolite${TRUNK}-run
30
cat ${OOLITE_ROOT}/doc/README-PREAMBLE.TXT \
31
${OOLITE_ROOT}/doc/README.TXT | more
34
# Oolite fails with a black message box with no text with the title
35
# 'Critical' if this doesn't exist.
36
if [ ! -d $HOME/GNUstep/Library/DTDs ]; then
37
mkdir -p $HOME/GNUstep/Library/DTDs
38
cp -r ${OOLITE_ROOT}/oolite-deps/DTDs/* $HOME/GNUstep/Library/DTDs/.
41
# Set GNUstep environment.
42
HOST_ARCH=`uname -m | sed -e s/amd64/x86_64/`
43
if [ "$HOST_ARCH" = "x86_64" ]; then
44
export GNUSTEP_HOST=x86_64-pc-linux-gnu
45
export GNUSTEP_HOST_CPU=x86_64
47
export GNUSTEP_HOST=i686-pc-linux-gnu
48
export GNUSTEP_HOST_CPU=ix86
50
export GNUSTEP_FLATTENED=yes
51
export GNUSTEP_HOST_OS=linux-gnu
52
export GNUSTEP_HOST_VENDOR=pc
53
# export GNUSTEP_ROOT=${OOLITE_ROOT}/oolite-deps/GNUstep
54
# export GNUSTEP_PATHLIST=${OOLITE_ROOT}/oolite-deps/GNUstep:${OOLITE_ROOT}/oolite-deps/GNUstep/Local:${OOLITE_ROOT}/oolite-deps/GNUstep/System
55
# export GNUSTEP_USER_ROOT=${OOLITE_ROOT}/oolite-deps/GNUstep
56
# export GNUSTEP_SYSTEM_ROOT=${OOLITE_ROOT}/oolite-deps/GNUstep/System
57
# export GNUSTEP_NETWORK_ROOT=${OOLITE_ROOT}/oolite-deps/GNUstep/Local
58
# export GNUSTEP_LOCAL_ROOT=${OOLITE_ROOT}/oolite-deps/GNUstep/Local
60
export LD_LIBRARY_PATH=${OOLITE_ROOT}/oolite-deps/lib
61
export ESPEAK_DATA_PATH=${OOLITE_ROOT}/oolite.app/Resources/
64
./oolite.app/oolite $@
68
echo "Erk. It looks like Oolite${TRUNK} died with an error. When making an error"
69
echo "report, please copy + paste the log above into the report."
71
echo "(Press Ctrl-C to continue)"