-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.sh
44 lines (38 loc) · 1.23 KB
/
project.sh
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
#!/bin/sh
# The directory containing this shell script - an absolute path.
ROOT=$(dirname "$0")
ROOT=$(cd "$ROOT"; pwd)
# The name of this shell script without the .sh on the end.
BASEFILE=$(basename "$0" .sh)
if [ -z "$RENPY_PLATFORM" ] ; then
case "$(uname -s)-$(uname -m)" in
Darwin-*)
RENPY_PLATFORM="darwin-x86_64"
ROOT1="$ROOT/../Resources/autorun"
ROOT2="$ROOT/../../.."
;;
*-x86_64|amd64)
RENPY_PLATFORM="linux-x86_64"
ROOT1="$ROOT"
ROOT2="$ROOT"
;;
*-i*86)
RENPY_PLATFORM="linux-i686"
ROOT1="$ROOT"
ROOT2="$ROOT"
;;
*)
echo "Ren'Py could not detect that platform it's running on. Please set"
echo "the RENPY_PLATFORM environment variable to one of \"linux-i686\" or"
echo "\"linux-x86_64\", or \"darwin-x86_64\" and run this command again."
exit 1
;;
esac
fi
for BASE in "$ROOT" "$ROOT1" "$ROOT2"; do
LIB="$BASE/lib/$RENPY_PLATFORM"
if test -d "$LIB"; then
break
fi
done
exec $RENPY_GDB "$LIB/$BASEFILE" $RENPY_PYARGS -EOO "$BASE/$BASEFILE.py" "$@"