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"
|
export WINESERVER="$wine32server"
|
||||||
# Also prepend to PATH for regular wine calls
|
# Also prepend to PATH for regular wine calls
|
||||||
export PATH="${wine32%/*}:$PATH"
|
export PATH="${wine32%/*}:$PATH"
|
||||||
# Unset WINEARCH to avoid conflicts with system wine
|
# Keep WINEARCH for compatibility
|
||||||
unset WINEARCH
|
echo "DEBUG: Using managed wine32 for LAUNCHER (WINE=$WINE, PATH updated)"
|
||||||
echo "DEBUG: Using managed wine32 for LAUNCHER (WINE=$WINE, PATH updated, WINEARCH unset)"
|
|
||||||
else
|
else
|
||||||
# Clear wine variables for system wine
|
# Clear wine variables for system wine but preserve WINEARCH if set
|
||||||
unset WINE WINESERVER WINEARCH
|
unset WINE WINESERVER
|
||||||
echo "DEBUG: Using system wine for LAUNCHER (architecture $architecture)"
|
echo "DEBUG: Using system wine for LAUNCHER (architecture $architecture)"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -30,11 +29,12 @@ set_wine_env() {
|
|||||||
export WINE="$wine32"
|
export WINE="$wine32"
|
||||||
export WINESERVER="$wine32server"
|
export WINESERVER="$wine32server"
|
||||||
export PATH="${wine32%/*}:$PATH"
|
export PATH="${wine32%/*}:$PATH"
|
||||||
unset WINEARCH
|
# Don't unset WINEARCH - preserve it for proper architecture selection
|
||||||
echo "DEBUG: Set wine32 environment for INSTALLATION (WINE=$WINE)"
|
echo "DEBUG: Set wine32 environment for INSTALLATION (WINE=$WINE, WINEARCH=$WINEARCH)"
|
||||||
else
|
else
|
||||||
unset WINE WINESERVER WINEARCH
|
unset WINE WINESERVER
|
||||||
echo "DEBUG: Set system wine environment for INSTALLATION"
|
# Don't unset WINEARCH - preserve it for proper architecture selection
|
||||||
|
echo "DEBUG: Set system wine environment for INSTALLATION (WINEARCH=$WINEARCH)"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,6 +108,7 @@ install_wine_bottle() {
|
|||||||
# Just set up the wine environment for game installation
|
# Just set up the wine environment for game installation
|
||||||
|
|
||||||
# Determine architecture from WINEARCH or speechsdk dependency
|
# Determine architecture from WINEARCH or speechsdk dependency
|
||||||
|
# Preserve existing WINEARCH if already set
|
||||||
if [[ -z "$WINEARCH" ]]; then
|
if [[ -z "$WINEARCH" ]]; then
|
||||||
if [[ "$*" =~ speechsdk ]]; then
|
if [[ "$*" =~ speechsdk ]]; then
|
||||||
export WINEARCH="win32"
|
export WINEARCH="win32"
|
||||||
|
Reference in New Issue
Block a user