forked from renpy/renpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·64 lines (49 loc) · 1.35 KB
/
run.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
# This builds out of date modules using the default C compiler, and then
# runs them.
export RENPY_CYTHON=cython
try () {
"$@" || exit -1
}
QUIET=${RENPY_QUIET- --quiet}
if [ -n "$RENPY_COVERAGE" ]; then
variant="renpy-coverage"
else
variant="renpy-run"
fi
if [ -n "$RENPY_VIRTUAL_ENV" ] ; then
. "$RENPY_VIRTUAL_ENV/bin/activate"
fi
if [ -z "$PYTHONPATH" -a -z "$VIRTUAL_ENV" ] ; then
echo Neither PYTHONPATH nor VIRTUAL_ENV is set.
exit 1
fi
ROOT="$(dirname $(realpath $0))"
setup () {
pushd $1 >/dev/null
if [ -n "$PYTHONPATH" ]; then
try python setup.py $QUIET \
build -b build/lib.$variant -t build/tmp.$variant \
$RENPY_BUILD_ARGS install_lib -d "$PYTHONPATH"
else
try python setup.py $QUIET \
build -b build/lib.$variant -t build/tmp.$variant \
$RENPY_BUILD_ARGS install
fi
popd >/dev/null
}
if [ -e "$ROOT/pygame_sdl2" ]; then
setup "$ROOT/pygame_sdl2/"
fi
if [ -e "$ROOT/cubism" ]; then
export CUBISM="$ROOT/cubism"
export CUBISM_PLATFORM=${CUBISM_PLATFORM:-linux/x86_64}
export LD_LIBRARY_PATH="$CUBISM/Core/dll/$CUBISM_PLATFORM"
fi
setup "$ROOT/module/"
python $ROOT/distribute.py --link-directories
if [ "$1" = "--build" ] ; then
echo "Ren'Py build complete."
else
exec $RENPY_GDB python -O $ROOT/renpy.py "$@"
fi