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

@@ -67,9 +67,9 @@ install_rhvoice() {
download "${RHVoice[${voiceName}]}"
winetricks -q win8 | agm_progressbox "RHVoice Setup" "Preparing Windows environment for RHVoice..."
echo "Installing RHVoice ${voiceName^}..."
"${WINE:-wine}" "${cache}/${voiceFile}" &
wine "${cache}/${voiceFile}" &
sleep 20 | agm_progressbox "RHVoice Setup" "Installing RHVoice ${voiceName^} voice..."
"${WINESERVER:-wineserver}" -k
wineserver -k
}
install_wine_bottle() {
@@ -93,16 +93,6 @@ install_wine_bottle() {
export WINEPREFIX="$HOME/.local/wine${architecture}"
# Use managed wine32 for SAPI compatibility, system wine for everything else
if [[ "$WINEARCH" == "win32" ]] && [[ -n "$wine32" ]]; then
export WINE="$wine32"
export WINESERVER="$wine32server"
echo "Using managed Wine32 for SAPI compatibility"
else
export WINE="wine"
export WINESERVER="wineserver"
fi
# Check if bottle already exists and is properly initialized
local bottleExists=false
if [[ -d "$WINEPREFIX" ]] && [[ -f "$WINEPREFIX/system.reg" ]] && [[ -f "$WINEPREFIX/user.reg" ]]; then
@@ -113,8 +103,8 @@ install_wine_bottle() {
# Only do basic setup if bottle doesn't exist
if [[ "$bottleExists" == false ]]; then
echo -n "Creating new wine${architecture} bottle - Using "
"$WINE" --version
DISPLAY="" "$WINE" wineboot -u | agm_progressbox "Wine Setup" "Initializing wine bottle..."
wine --version
DISPLAY="" wine wineboot -u | agm_progressbox "Wine Setup" "Initializing wine bottle..."
# Install mono and gecko only for new bottles
monoPath="$(find /usr/share/wine/ -maxdepth 1 -type d -name mono 2> /dev/null)"
@@ -127,8 +117,8 @@ install_wine_bottle() {
download 'http://dl.winehq.org/wine/wine-gecko/2.40/wine_gecko-2.40-x86.msi'
geckoPath="${cache}/wine_gecko-2.40-x86.msi"
fi
"$WINE" msiexec /i z:"$monoPath" /quiet | agm_progressbox "Wine Setup" "Installing .NET Framework..."
"$WINE" msiexec /i z:"$geckoPath" /quiet | agm_progressbox "Wine Setup" "Installing Web Browser support..."
wine msiexec /i z:"$monoPath" /quiet | agm_progressbox "Wine Setup" "Installing .NET Framework..."
wine msiexec /i z:"$geckoPath" /quiet | agm_progressbox "Wine Setup" "Installing Web Browser support..."
fi
# Install RHVoice only if needed and not already installed