-
Notifications
You must be signed in to change notification settings - Fork 9
/
runhl.sh
executable file
·55 lines (42 loc) · 1.44 KB
/
runhl.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
#!/bin/sh
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
# If your Steam library is somewhere else, correct this path.
export HL_ROOT="$HOME/.steam/steam/steamapps/common/Half-Life"
# Debug or release bxt-rs:
export BXT_RS="$SCRIPT_DIR/target/i686-unknown-linux-gnu/debug/libbxt_rs.so"
# export BXT_RS="$SCRIPT_DIR/target/i686-unknown-linux-gnu/release/libbxt_rs.so"
# If you want regular Bunnymod XT, uncomment and correct the path:
# export BXT="/replace/this/with/path/to/libBunnymodXT.so"
# Check that the Half-Life folder exists.
if [ ! -d "$HL_ROOT" ]; then
echo "Half-Life folder does not exist at $HL_ROOT"
exit 1
fi
# Check that bxt-rs exists.
if [ ! -f "$BXT_RS" ]; then
echo "bxt-rs does not exist at $BXT_RS"
exit 1
fi
export LD_PRELOAD="$BXT_RS"
if [ "$BXT" ]; then
# Check that Bunnymod XT exists.
if [ ! -f "$BXT" ]; then
echo "Bunnymod XT does not exist at $BXT"
exit 1
fi
export LD_PRELOAD="$LD_PRELOAD:$BXT"
fi
# Run Half-Life.
export LD_LIBRARY_PATH="$HL_ROOT:$LD_LIBRARY_PATH"
export SteamEnv=1 # Fix the annoying locale error.
# Set bxt-rs debug variables.
# export BXT_RS_VULKAN_DEBUG=1
# export BXT_RS_PROFILE=1
# export BXT_RS_PROFILE_TRACY=1
# export BXT_RS_VERBOSE=1
# Allow running the ffmpeg binary from the HL folder.
# export PATH="$HL_ROOT:$PATH"
# Set to disable BXT and bxt-rs.
# export LD_PRELOAD=""
cd "$HL_ROOT" || exit 1
exec ~/.steam/bin/steam-runtime/run.sh ./hl_linux -steam "$@"