diff options
Diffstat (limited to '')
| -rwxr-xr-x | play.sh | 14 |
1 files changed, 14 insertions, 0 deletions
| @@ -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 | ||
| 4 | set -e | ||
| 5 | GAME="$HOME/.local/share/Steam/steamapps/common/Half-Life 2" | ||
| 6 | LIB="$(cd "$(dirname "$0")" && pwd)/libhl2hake.so" | ||
| 7 | |||
| 8 | if [ ! -f "$LIB" ]; then | ||
| 9 | echo "libhl2hake.so not found - run ./build.sh first" >&2 | ||
| 10 | exit 1 | ||
| 11 | fi | ||
| 12 | |||
| 13 | export LD_PRELOAD="$LIB" | ||
| 14 | exec "$HOME/.steam/steam/ubuntu12_32/steam-runtime/run.sh" -- "$GAME/hl2.sh" -steam -novid -console "$@" | ||
