Skip to content

Instantly share code, notes, and snippets.

@SleepProgger
Last active October 26, 2018 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SleepProgger/2538c8931c61b752f42cfcf6326e3621 to your computer and use it in GitHub Desktop.
Save SleepProgger/2538c8931c61b752f42cfcf6326e3621 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ -z "$STEAMDIR" ]; then
STEAMDIR="$HOME/.steam/steam/steamapps"
fi
if [ -z "$PROTON_VERSION" ]; then
PROTON_VERSION="Proton 3.16"
fi
PROTON_DIR="${STEAMDIR}/common/${PROTON_VERSION}"
PROTON_WINE_PATH="${PROTON_DIR}/dist/bin/wine64"
if [ ! -z "$KILL_WINE" ]; then
# A bit hardcore, but whatever
wineserver -k; killall -9 wine wineserver; for i in `ps ax|egrep "*\.exe"|grep -v 'egrep'|awk '{print $1 }'`;do kill -9 $i;done
fi
if [ -z "$1" ]; then
PROTON_DEF_PFX="${PROTON_DIR}/dist/share/default_pfx"
echo -e "\e[32m\e[1mUSING proton default environment\e[0m"
else
PROTON_DEF_PFX="${STEAMDIR}/compatdata/${1}/pfx"
echo -e "\e[32m\e[1mUSING app sepcific environment for APPID: $1\e[0m"
fi
shift
WINEESYNC=1 env WINEPREFIX="$PROTON_DEF_PFX" WINEPATH="$PROTON_WINE_PATH" "$PROTON_WINE_PATH" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment