Skip to content

Instantly share code, notes, and snippets.

@Airradda
Created April 13, 2019 02:53
Show Gist options
  • Save Airradda/328c1e831e2c438c691ab0ae252a1b18 to your computer and use it in GitHub Desktop.
Save Airradda/328c1e831e2c438c691ab0ae252a1b18 to your computer and use it in GitHub Desktop.
BepInEx Console Fix Script
if [[ $# -lt 1 ]]; then
echo "Usage: winecfg.sh <appid>"
exit
fi
if !([[ -d "/vol/data/SteamLibrary/steamapps/compatdata/$1/pfx/" ]]); then
echo "PFX dir for the given app id does not exist"
exit
fi
export STEAMROOT="$HOME/.steam"
export PROTONROOT="$STEAMROOT/debian-installation/steamapps/common/Proton 4.2"
export STEAMRUNTIME="$STEAMROOT/ubuntu12_32/steam-runtime"
export PATH="$PROTONROOT/dist/bin/:$STEAMRUNTIME/amd64/bin:$STEAMRUNTIME/amd64/usr/bin:$PATH"
export WINEDEBUG="-all"
export WINEDLLPATH="$PROTONROOT/dist/lib64/wine:$PROTONROOT/dist/lib/wine"
export LD_LIBRARY_PATH="$PROTONROOT/dist/lib64:$PROTONROOT/dist/lib:$STEAMRUNTIME/pinned_libs_32:$STEAMRUNTIME/pinned_libs_64:/usr/lib/x86_64-linux-gnu/libfakeroot:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/local/lib:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib:/usr/lib/i386-linux-gnu/i686:/usr/lib/i386-linux-gnu/sse2:/usr/lib/i386-linux-gnu/i686/sse2:$STEAMRUNTIME/i386/lib/i386-linux-gnu:$STEAMROOT/i386/lib:$STEAMRUNTIME/i386/usr/lib/i386-linux-gnu:$STEAMRUNTIME/i386/usr/lib:$STEAMRUNTIME/amd64/lib/x86_64-linux-gnu:$STEAMRUNTIME/amd64/lib:$STEAMRUNTIME/amd64/usr/lib/x86_64-linux-gnu:$STEAMRUNTIME/amd64/usr/lib:"
export WINEDLLOVERRIDES="d3d11=n;dxgi=n"
WINEPREFIX=/vol/data/SteamLibrary/steamapps/compatdata/$1/pfx/ wine winecfg
@Jan200101
Copy link

$HOME/.steam/debian-installation is not something every steam installation exposes (and even on debian it depends on where you get the package from)
it would probably be better to set STEAMROOT to $HOME/.local/share/Steam and go from there

@RuiGuilherme
Copy link

RuiGuilherme commented Nov 7, 2021

I made some changes and worked perfectly at Arch Linux

#Change 632360(RoR2) if need
if !([[ -d "/home/"$USER"/.steam/steam/steamapps/compatdata/632360/pfx" ]]); then
    echo "PFX dir for the given app <$1> id does not exist"
    exit
fi

export STEAMROOT="$HOME/.steam"

# You need change "Proton - Experimental" to correct version, for example: Proton 4.2 or Proton 6.3.
# Just run this command to get all version:
# ls $HOME/.local/share/Steam/steamapps/common | grep Proton
export PROTONROOT="$HOME/.local/share/Steam/steamapps/common/Proton - Experimental"

export STEAMRUNTIME="$STEAMROOT/ubuntu12_32/steam-runtime"
export PATH="$PROTONROOT/dist/bin/:$STEAMRUNTIME/amd64/bin:$STEAMRUNTIME/amd64/usr/bin:$PATH"
export WINEDEBUG="-all"
export WINEDLLPATH="$PROTONROOT/dist/lib64/wine:$PROTONROOT/dist/lib/wine"
export LD_LIBRARY_PATH="$PROTONROOT/dist/lib64:$PROTONROOT/dist/lib:$STEAMRUNTIME/pinned_libs_32:$STEAMRUNTIME/pinned_libs_64:/usr/lib/x86_64-linux-gnu/libfakeroot:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/local/lib:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib:/usr/lib/i386-linux-gnu/i686:/usr/lib/i386-linux-gnu/sse2:/usr/lib/i386-linux-gnu/i686/sse2:$STEAMRUNTIME/i386/lib/i386-linux-gnu:$STEAMROOT/i386/lib:$STEAMRUNTIME/i386/usr/lib/i386-linux-gnu:$STEAMRUNTIME/i386/usr/lib:$STEAMRUNTIME/amd64/lib/x86_64-linux-gnu:$STEAMRUNTIME/amd64/lib:$STEAMRUNTIME/amd64/usr/lib/x86_64-linux-gnu:$STEAMRUNTIME/amd64/usr/lib:"
export WINEDLLOVERRIDES="d3d11=n;dxgi=n"

#Change 632360(RoR2) if need
WINEPREFIX=/home/"$USER"/.steam/steam/steamapps/compatdata/632360/pfx wine winecfg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment