-
Notifications
You must be signed in to change notification settings - Fork 0
/
LinuxLauncher.sh
50 lines (40 loc) · 1.28 KB
/
LinuxLauncher.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
#!/bin/sh
## Copyright 2019-2022 Azariel Del Carmen (GanstaKingofSA). All rights reserved.
## Based off the original renpy.sh file with Ren'Py 6 removal patch applied.
# The directory containing this shell script - an absolute path.
ROOT=$(dirname "$SCRIPT")
ROOT=$(cd "$ROOT"; pwd)
if [ -z "$RENPY_PLATFORM" ] ; then
RENPY_PLATFORM="$(uname -s)-$(uname -m)"
case "$RENPY_PLATFORM" in
Darwin-*|mac-*)
RENPY_PLATFORM="mac-x86_64"
;;
*-x86_64|amd64)
RENPY_PLATFORM="linux-x86_64"
;;
*-i*86)
RENPY_PLATFORM="linux-i686"
;;
Linux-*)
RENPY_PLATFORM="linux-$(uname -m)"
;;
*)
;;
esac
fi
LIB="$ROOT/lib/$RENPY_PLATFORM"
# Removes the lib folder left from Ren'Py 6
if [ -d "$LIB/lib" ]; then
echo "Removing Ren'Py 6 files due to 'future.standard_library' error."
rm -r "$LIB/lib"
fi
SHFILE="$(ls -I "DDLC.sh" -I "LinuxLauncher.sh" "$ROOT" | grep ".sh")"
if test -z "$SHFILE"; then
echo "Error: Unable to find a mod shell script file. Defaulting to 'DDLC.sh'."
SHFILE="DDLC.sh"
fi
# The name of this shell script without the .sh on the end.
SHNAME=$(basename "$SHFILE" .sh)
echo "Preparing to launch $SHNAME..."
exec "$ROOT/$SHFILE"