Last active
December 20, 2017 11:47
-
-
Save YaLTeR/262d60eef7933f8c61e122cde0c548cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -ex | |
# Check your distribution to find out how it runs Steam. | |
# Replace 1 with 0 if it's not using Steam's bundled libraries. | |
USE_STEAM_BUNDLED_LIBRARIES=1 | |
# Make sure the paths below do not contain spaces. | |
# Set this to the full path to the .steam folder, usually ~/.steam | |
# This folder should contain bin32 and steam folders/symlinks. | |
export STEAM_ROOT=~/.steam | |
# Set this to the path to your Half-Life folder, usually $STEAM_ROOT/steam/steamapps/common/Half-Life | |
export HL_ROOT=$STEAM_ROOT/steam/steamapps/common/Half-Life | |
# Set this to the full path to libhl_capture.so | |
export HL_CAPTURE_PATH=/full/path/to/libhl_capture.so | |
# If you are using the pre-built static 32-bit FFMpeg libraries from the installation guide, | |
# uncomment the following line and adjust the path accordingly. | |
# export FFMPEG_LIBRARY_PATH=/full/path/to/where/ffmpeg/libraries/are | |
if [ "$USE_STEAM_BUNDLED_LIBRARIES" -eq 1 ]; then | |
export PLATFORM=bin32 | |
export STEAM_RUNTIME=$STEAM_ROOT/$PLATFORM/steam-runtime | |
export LD_LIBRARY_PATH=\ | |
$HL_ROOT:\ | |
$STEAM_ROOT/$PLATFORM:\ | |
$STEAM_RUNTIME/i386/lib/i386-linux-gnu:\ | |
$STEAM_RUNTIME/i386/lib:\ | |
$STEAM_RUNTIME/i386/usr/lib/i386-linux-gnu:\ | |
$STEAM_RUNTIME/i386/usr/lib:\ | |
$STEAM_RUNTIME/amd64/lib/x86_64-linux-gnu:\ | |
$STEAM_RUNTIME/amd64/lib:\ | |
$STEAM_RUNTIME/amd64/usr/lib/x86_64-linux-gnu:\ | |
$STEAM_RUNTIME/amd64/usr/lib:\ | |
/usr/lib32 | |
else | |
export LD_LIBRARY_PATH=$HL_ROOT:/usr/lib32 | |
fi | |
if [ -n "$FFMPEG_LIBRARY_PATH" ]; then | |
export LD_LIBRARY_PATH=$FFMPEG_LIBRARY_PATH:$LD_LIBRARY_PATH | |
fi | |
export LD_PRELOAD=$HL_CAPTURE_PATH | |
cd $HL_ROOT | |
exec ./hl_linux -steam "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment