For Swamp wine version < 11.17 require the quarts override from winetricks. In wine 17.11 and probably later, it needs the internal wine provided version. Added a function to deal with this.

This commit is contained in:
Storm Dragon
2026-09-22 14:07:28 -04:00
parent 17aed35d5b
commit ab2c6d267a
2 changed files with 33 additions and 2 deletions
+29
View File
@@ -22,6 +22,35 @@ get_bottle() {
fi
}
apply_swamp_quartz_override() {
local exePath="$1"
local wineVersion="$2"
local exeName="${exePath##*\\}"
local wineMajor
local wineMinor
local quartzOverride
exeName="${exeName##*/}"
if [[ "${exeName,,}" != "swamp.exe" ]]; then
return
fi
if [[ ! "$wineVersion" =~ wine-([0-9]+)\.([0-9]+) ]]; then
echo 'Could not determine the Wine version.' >&2
return
fi
wineMajor="${BASH_REMATCH[1]}"
wineMinor="${BASH_REMATCH[2]}"
if (( wineMajor > 11 || (wineMajor == 11 && wineMinor >= 17) )); then
quartzOverride="b"
else
quartzOverride="n,b"
fi
export WINEDLLOVERRIDES="${WINEDLLOVERRIDES:+${WINEDLLOVERRIDES};}quartz=${quartzOverride}"
}
# Set wine environment for installation (called from install_wine_bottle)
set_wine_env() {
local architecture="$1"
+4 -2
View File
@@ -820,8 +820,10 @@ game_launcher() {
exit 0
fi
get_bottle "${game[0]}"
echo -n "launching "
wine --version
local wineVersion
wineVersion="$(wine --version)"
printf 'launching %s\n' "$wineVersion"
apply_swamp_quartz_override "${game[1]}" "$wineVersion"
# kill any previous existing wineservers for this prefix in case they didn't shut down properly.
wineserver -k
# launch the game