summaryrefslogtreecommitdiffstats
path: root/play.sh
diff options
context:
space:
mode:
Diffstat (limited to 'play.sh')
-rwxr-xr-xplay.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/play.sh b/play.sh
new file mode 100755
index 0000000..3d791b0
--- /dev/null
+++ b/play.sh
@@ -0,0 +1,14 @@
1#!/bin/sh
2# Launch HL2 with hl2hake preloaded (through Steam's bundled 32-bit runtime).
3# Extra args are passed to the game, e.g.: ./play.sh -windowed +map d1_trainstation_01
4set -e
5GAME="$HOME/.local/share/Steam/steamapps/common/Half-Life 2"
6LIB="$(cd "$(dirname "$0")" && pwd)/libhl2hake.so"
7
8if [ ! -f "$LIB" ]; then
9 echo "libhl2hake.so not found - run ./build.sh first" >&2
10 exit 1
11fi
12
13export LD_PRELOAD="$LIB"
14exec "$HOME/.steam/steam/ubuntu12_32/steam-runtime/run.sh" -- "$GAME/hl2.sh" -steam -novid -console "$@"