-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoolite.src
executable file
·69 lines (59 loc) · 2.54 KB
/
oolite.src
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#
# Oolite Run Script
# This is to run Oolite with the standalone Dependencies Pack.
#
# Usage: ./oolite-wrapper
# Dylan Smith, 2005-09-03
#
# Konstantinos Sykas
# 2009-09-30: Added DTDs transport to $HOME/GNUstep/Library (Address DTD not found issue)
# 2010-04-23: Added x86_64 exports for GNUSTEP
# 2010-04-26: Command line arguments passing to oolite executable
# 2011-03-22: 1) Removed TOPLEVEL environment variable. A small fix in the default.*.apspec file
# made TOPLEVEL obsolete. OOLITE_ROOT is more than enough.
# 2) Replaced any usage of ~ as homepath by $HOME
# 3) Fixed a problem where oolite needed to run twice before the
# the $HOME/.Oolite/.oolite-run file could be created.
# 2011-03-26: Updated to support the new self-extractable package
# 2011-04-03: Updated to facilitate rsync repository setup for oolite-update script
# 2013-01-27: (CIM) Fix argument parsing as per Walbrigg at http://aegidian.org/bb/viewtopic.php?p=193962#p193962
# 2023-07-10: (hiran) Move interactive parts to calling script
#
OOLITE_ROOT=$(cd $(dirname $0); cd ..; pwd -P)
# Oolite fails with a black message box with no text with the title
# 'Critical' if this doesn't exist.
if [ ! -d $HOME/GNUstep/Library/DTDs ]; then
mkdir -p $HOME/GNUstep/Library/DTDs
cp -r ${OOLITE_ROOT}/oolite-deps/DTDs/* $HOME/GNUstep/Library/DTDs/.
fi
# Set GNUstep environment.
HOST_ARCH=`uname -m | sed -e s/amd64/x86_64/`
if [ "$HOST_ARCH" = "x86_64" ]; then
export GNUSTEP_HOST=x86_64-pc-linux-gnu
export GNUSTEP_HOST_CPU=x86_64
else
export GNUSTEP_HOST=i686-pc-linux-gnu
export GNUSTEP_HOST_CPU=ix86
fi
export GNUSTEP_FLATTENED=yes
export GNUSTEP_HOST_OS=linux-gnu
export GNUSTEP_HOST_VENDOR=pc
# export GNUSTEP_ROOT=${OOLITE_ROOT}/oolite-deps/GNUstep
# export GNUSTEP_PATHLIST=${OOLITE_ROOT}/oolite-deps/GNUstep:${OOLITE_ROOT}/oolite-deps/GNUstep/Local:${OOLITE_ROOT}/oolite-deps/GNUstep/System
# export GNUSTEP_USER_ROOT=${OOLITE_ROOT}/oolite-deps/GNUstep
# export GNUSTEP_SYSTEM_ROOT=${OOLITE_ROOT}/oolite-deps/GNUstep/System
# export GNUSTEP_NETWORK_ROOT=${OOLITE_ROOT}/oolite-deps/GNUstep/Local
# export GNUSTEP_LOCAL_ROOT=${OOLITE_ROOT}/oolite-deps/GNUstep/Local
export LD_LIBRARY_PATH=${OOLITE_ROOT}/oolite-deps/lib
export ESPEAK_DATA_PATH=${OOLITE_ROOT}/oolite.app/Resources/
cd ${OOLITE_ROOT}/
./oolite.app/oolite "$@"
RC=$?
if [ "${RC}" != "0" ]
then
echo
echo "Erk. It looks like Oolite${TRUNK} died with an error. When making an error"
echo "report, please copy + paste the log above into the report."
echo
fi
exit $RC