Last active
August 19, 2025 00:25
-
-
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") | |
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" | |
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 | |
export WINEPREFIX="$HOME/.xlcore/wineprefix" | |
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