Last active
December 24, 2025 01:54
-
-
Save tyrone-sudeium/d08029ee3f581594476be661600309f0 to your computer and use it in GitHub Desktop.
Runs specific program in XLCore's configured wine (requires the @rankynbass fork of XLCore)
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
| #!/bin/bash | |
| # Runs specified program in XLCore's configured wine | |
| read_from_ini() { | |
| awk -F "=" "/$1/ {print \$2}" "$HOME/.xlcore/launcher.ini" | |
| } | |
| WINE_TYPE=$(read_from_ini "RB_WineStartupType") | |
| MANAGED_WINE_VERSION=$(read_from_ini "RB_WineVersion") | |
| CUSTOM_WINE_PATH=$(read_from_ini "RB_WineBinaryPath") | |
| ESYNC_ENABLED=$(read_from_ini "ESyncEnabled") | |
| FSYNC_ENABLED=$(read_from_ini "FSyncEnabled") | |
| UMU_LAUNCHER=$(read_from_ini "RB_UmuLauncher") | |
| PROTON_VERSION=$(read_from_ini "RB_ProtonVersion") | |
| NTSYNC_ENABLED=$(read_from_ini "NTSyncEnabled") | |
| export WINEPREFIX="$HOME/.xlcore/wineprefix" | |
| if [ "$WINE_TYPE" == "Custom" ]; then | |
| XLCORE_WINE_BIN="$CUSTOM_WINE_PATH/wine64" | |
| elif [ "$WINE_TYPE" == "Managed" ]; then | |
| XLCORE_WINE_BIN="$HOME/.xlcore/compatibilitytool/wine/$MANAGED_WINE_VERSION/bin/wine64" | |
| elif [ "$WINE_TYPE" == "Proton" ]; then | |
| export WINEPREFIX="$HOME/.xlcore/protonprefix" | |
| if [ "$UMU_LAUNCHER" != "Disabled" ]; then | |
| echo "xlcore-wine: unsupported wine config from xlcore (umu unsupported)" 1>&2 | |
| exit 1 | |
| fi | |
| XLCORE_WINE_BIN="$HOME/.local/share/Steam/compatibilitytools.d/$PROTON_VERSION/files/bin/wine64" | |
| else | |
| echo "xlcore-wine: unsupported wine config from xlcore" 1>&2 | |
| exit 1 | |
| fi | |
| [ "$ESYNC_ENABLED" == "true" ] && export WINEESYNC=1 | |
| [ "$FSYNC_ENABLED" == "true" ] && export WINEFSYNC=1 | |
| if [ "$NTSYNC_ENABLED" == "true" ]; then | |
| export PROTON_NO_NTSYNC=0 | |
| export PROTON_USE_NTSYNC=1 | |
| export WINENTSYNC=1 | |
| fi | |
| export WINEDLLOVERRIDES="msquic=,mscoree=n,b;d3d9,d3d11,d3d10core,dxgi=n,b" | |
| "$XLCORE_WINE_BIN" "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment