Skip to content

Instantly share code, notes, and snippets.

@YellowApple
Created July 9, 2019 08:55
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 YellowApple/8f91daf000153195e643e8d721e734d0 to your computer and use it in GitHub Desktop.
Save YellowApple/8f91daf000153195e643e8d721e734d0 to your computer and use it in GitHub Desktop.
protonrun [appid] [exe]
#!/bin/bash
# I don't *think* I'm the original author, but I can't recall who was.
# I think maybe from:
# https://steamcommunity.com/app/244160/discussions/0/2727382174641131600/
# But as y'all can surely see, this is very different, so ¯\_(ツ)_/¯
# -- RyNo
game_id="$1"; shift;
TODO: accept these as arguments or otherwise allow overrides
steamapps="${HOME}/.steam/steam/steamapps"
proton_vsn="Proton 3.16 Beta"
proton_path="${steamapps}/common/${proton_vsn}"
[[ -d "${proton_path}" ]] || { echo "Couldn't find Proton" ; exit 1 ; }
wine_cmd="${proton_path}/dist/bin/wine64"
[[ -f "${wine_cmd}" ]] || { echo "Missing ${wine_cmd}" ; exit 1 ; }
WINEDEBUG="-all" \
WINEPREFIX="${steamapps}/compatdata/${game_id}/pfx/" \
SteamGameId="${game_id}" \
SteamAppId="${game_id}" \
STEAM_COMPAT_CLIENT_INSTALL_PATH="${HOME}/.local/share/Steam" \
"${wine_cmd}" start /unix "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment