With upgrade to wow64 no need to use a variable so switch to direct wine calls.

This commit is contained in:
Storm Dragon
2025-08-04 20:13:38 -04:00
parent 4d2134b9a9
commit ddecf09fb1
2 changed files with 27 additions and 29 deletions

View File

@@ -67,28 +67,26 @@ install_rhvoice() {
download "${RHVoice[${voiceName}]}"
winetricks -q win8
echo "Installing RHVoice ${voiceName^}..."
${wine} "${cache}/${voiceFile}" &
wine "${cache}/${voiceFile}" &
sleep 20
${wine}server -k
wineserver -k
}
install_wine_bottle() {
# Simple rule: wine64 for everything, wine32 ONLY for speech APIs (SAPI5 doesn't work in WOW64)
local architecture
# Simple rule: wine64 for everything, let WOW64 handle 32-bit speech APIs
local architecture=64
export WINEARCH="win64"
if [[ "$*" =~ speechsdk || "$*" =~ sapi ]]; then
architecture=32
export WINEARCH="win32"
echo "Using wine32 for speech API compatibility (SAPI5 broken in WOW64)"
echo "Using wine64 with WOW64 for speech API compatibility"
else
architecture=64
export WINEARCH="win64"
echo "Using wine64 for optimal performance"
fi
export WINEPREFIX="$HOME/.local/wine${architecture}"
export wine="${wine:-$(command -v wine)}"
export WINE="${wine}"
export WINESERVER="${wine}server"
# Modern wine is unified - no separate wine32/wine64 executables
export WINE="wine"
export WINESERVER="wineserver"
# Arguments to the function are dependancies to be installed.
# Get location of mono and gecko.
monoPath="$(find /usr/share/wine/ -maxdepth 1 -type d -name mono 2> /dev/null)"
@@ -102,10 +100,10 @@ install_wine_bottle() {
geckoPath="${cache}/wine_gecko-2.40-x86.msi"
fi
echo -n "Using "
${wine} --version
DISPLAY="" ${wine}boot -u
${wine} msiexec /i z:"$monoPath" /quiet
${wine} msiexec /i z:"$geckoPath" /quiet
wine --version
DISPLAY="" wineboot -u
wine msiexec /i z:"$monoPath" /quiet
wine msiexec /i z:"$geckoPath" /quiet
if [[ "${*}" =~ (speechsdk|sapi) ]]; then
install_rhvoice
fi