work on calling the correct version of wine when a game is launched.

This commit is contained in:
Storm Dragon
2025-08-07 02:38:04 -04:00
parent e94b4ed13b
commit 81d00ef4f2
3 changed files with 28 additions and 18 deletions

View File

@@ -41,13 +41,33 @@ check_wine32() {
} | agm_progressbox "Wine32 Setup" "Extracting Wine32 for SAPI compatibility..."
fi
# Export wine32 path for bottle.sh
# Export wine32 path for function overrides
if [[ -f "$wine32Dir/bin/wine" ]]; then
export wine32="$wine32Dir/bin/wine"
export wine32server="$wine32Dir/bin/wineserver"
fi
}
# Wine function overrides for automatic architecture detection
wine() {
if [[ "$WINEPREFIX" =~ wine32 ]] && [[ -n "$wine32" ]]; then
"$wine32" "$@"
else
command wine "$@"
fi
}
wineserver() {
if [[ "$WINEPREFIX" =~ wine32 ]] && [[ -n "$wine32server" ]]; then
"$wine32server" "$@"
else
command wineserver "$@"
fi
}
# Export functions so they're available in subshells and sourced scripts
export -f wine wineserver
# Install games
game_installer() {
export LANG="en_US.UTF-8"