-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate-env.sh
executable file
·60 lines (43 loc) · 1.56 KB
/
create-env.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
#!/bin/bash
# fail on error
set -e
if [ -d dev ]; then
echo "dev directory already exists" >&1
exit 1
fi
echo "detecting Lethal Company.exe location..."
lethal_exe_path=$(protontricks --cwd-app -c 'realpath "Lethal Company.exe"' 1966720 2>/dev/null)
if [ -z "$lethal_exe_path" ]; then
echo "failed to detect lethal company path" >&1
exit 1
fi
echo "found lethal company exe: $lethal_exe_path"
download_path="/tmp/bepinex.zip"
if [ -f "$download_path" ]; then
echo "BepInEx already downloaded, skipping..."
else
echo "downloading BepInEx..."
curl --progress-bar -L https://github.com/BepInEx/BepInEx/releases/download/v5.4.22/BepInEx_x64_5.4.22.0.zip -o "$download_path"
fi
echo "setting up dev dir"
mkdir -p dev
unzip -q "$download_path" -d dev
echo "creating start.sh"
# Create start.sh script
cat > dev/start.sh << EOF
#!/bin/bash
cd "\$(dirname "\$0")"
WINEDEBUG="fixme-all" protontricks-launch \\
--appid 1966720 \\
"$lethal_exe_path" \\
--doorstop-enable true \\
--doorstop-target "Z:\$(realpath ./BepInEx/core/BepInEx.Preloader.dll)"
EOF
chmod +x dev/start.sh
echo "downloading mods"
mkdir dev/BepInEx/plugins
mkdir dev/BepInEx/config
"$(dirname "$0")"/download-thunderstore.sh https://thunderstore.io/package/download/megumin/LethalDevMode/1.0.0/
"$(dirname "$0")"/download-thunderstore.sh https://thunderstore.io/package/download/CTNOriginals/DevelopmentStartup/1.2.0/
"$(dirname "$0")"/download-thunderstore.sh https://thunderstore.io/package/download/flerouwu/LC_FastStartup/1.1.2/
echo "setup complete! run dev/start.sh to start the game with BepInEx"