forked from renpy/renpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·43 lines (34 loc) · 958 Bytes
/
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
# This builds out of date modules using the default C compiler, and then
# runs them.
export RENPY_CYTHON=cython
try () {
"$@" || exit -1
}
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
setup () {
if [ -n "$PYTHONPATH" ]; then
try python $1 --quiet \
build -b build/lib.renpy-run -t build/tmp.renpy-run \
$RENPY_BUILD_ARGS install_lib -d "$PYTHONPATH"
else
try python $1 --quiet \
build -b build/lib.renpy-run -t build/tmp.renpy-run \
$RENPY_BUILD_ARGS install
fi
}
ROOT="$(dirname $(realpath $0))"
if [ -e "$ROOT/pygame_sdl2" ]; then
setup "$ROOT/pygame_sdl2/setup.py"
fi
setup "$ROOT/module/setup.py"
if [ "$1" = "--build" ] ; then
echo "Ren'Py build complete."
else
exec python -O ./renpy.py "$@"
fi