Fix WINEARCH preservation in wine bottle management
Preserve explicitly set WINEARCH variables instead of unsetting them in wine environment functions. This ensures that installers setting WINEARCH="win32" are properly respected for architecture selection. Changes: - Remove unset WINEARCH from get_bottle() and set_wine_env() - Add comments explaining WINEARCH preservation - Update debug messages to show current WINEARCH value
This commit is contained in:
@@ -13,12 +13,11 @@ get_bottle() {
|
||||
export WINESERVER="$wine32server"
|
||||
# Also prepend to PATH for regular wine calls
|
||||
export PATH="${wine32%/*}:$PATH"
|
||||
# Unset WINEARCH to avoid conflicts with system wine
|
||||
unset WINEARCH
|
||||
echo "DEBUG: Using managed wine32 for LAUNCHER (WINE=$WINE, PATH updated, WINEARCH unset)"
|
||||
# Keep WINEARCH for compatibility
|
||||
echo "DEBUG: Using managed wine32 for LAUNCHER (WINE=$WINE, PATH updated)"
|
||||
else
|
||||
# Clear wine variables for system wine
|
||||
unset WINE WINESERVER WINEARCH
|
||||
# Clear wine variables for system wine but preserve WINEARCH if set
|
||||
unset WINE WINESERVER
|
||||
echo "DEBUG: Using system wine for LAUNCHER (architecture $architecture)"
|
||||
fi
|
||||
}
|
||||
@@ -30,11 +29,12 @@ set_wine_env() {
|
||||
export WINE="$wine32"
|
||||
export WINESERVER="$wine32server"
|
||||
export PATH="${wine32%/*}:$PATH"
|
||||
unset WINEARCH
|
||||
echo "DEBUG: Set wine32 environment for INSTALLATION (WINE=$WINE)"
|
||||
# Don't unset WINEARCH - preserve it for proper architecture selection
|
||||
echo "DEBUG: Set wine32 environment for INSTALLATION (WINE=$WINE, WINEARCH=$WINEARCH)"
|
||||
else
|
||||
unset WINE WINESERVER WINEARCH
|
||||
echo "DEBUG: Set system wine environment for INSTALLATION"
|
||||
unset WINE WINESERVER
|
||||
# Don't unset WINEARCH - preserve it for proper architecture selection
|
||||
echo "DEBUG: Set system wine environment for INSTALLATION (WINEARCH=$WINEARCH)"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -108,6 +108,7 @@ install_wine_bottle() {
|
||||
# Just set up the wine environment for game installation
|
||||
|
||||
# Determine architecture from WINEARCH or speechsdk dependency
|
||||
# Preserve existing WINEARCH if already set
|
||||
if [[ -z "$WINEARCH" ]]; then
|
||||
if [[ "$*" =~ speechsdk ]]; then
|
||||
export WINEARCH="win32"
|
||||
|
Reference in New Issue
Block a user