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

View File

@@ -72,9 +72,9 @@ game_installer() {
game_removal() { game_removal() {
source .includes/bottle.sh source .includes/bottle.sh
if [[ "$(uname -m)" == "aarch64" ]]; then if [[ "$(uname -m)" == "aarch64" ]]; then
export wine="${wine:-/usr/bin/wine}" # Modern wine is unified
else else
export wine="${wine:-/usr/bin/wine}" # Modern wine is unified
fi fi
mapfile -t lines < <(sed -e '/^$/d' -e '/^[[:space:]]*#/d' "${configFile}" 2> /dev/null) mapfile -t lines < <(sed -e '/^$/d' -e '/^[[:space:]]*#/d' "${configFile}" 2> /dev/null)
if [[ ${#lines} -eq 0 ]]; then if [[ ${#lines} -eq 0 ]]; then
@@ -111,7 +111,7 @@ game_removal() {
if [[ "${HOME}/.local/wine/${game%|*}" == "${WINEPREFIX}" ]]; then if [[ "${HOME}/.local/wine/${game%|*}" == "${WINEPREFIX}" ]]; then
read -rp "To remove the wine bottle \"${WINEPREFIX##*/}\" and all of its contents press enter. To cancel press control+c. " continue read -rp "To remove the wine bottle \"${WINEPREFIX##*/}\" and all of its contents press enter. To cancel press control+c. " continue
# kill any previous existing wineservers for this prefix in case they didn't shut down properly. # kill any previous existing wineservers for this prefix in case they didn't shut down properly.
${wine}server -k wineserver -k
# remove the game # remove the game
rm -rf "${WINEPREFIX}" rm -rf "${WINEPREFIX}"
else else
@@ -129,9 +129,9 @@ game_removal() {
kill_game() { kill_game() {
source .includes/bottle.sh source .includes/bottle.sh
if [[ "$(uname -m)" == "aarch64" ]]; then if [[ "$(uname -m)" == "aarch64" ]]; then
export wine="${wine:-/usr/bin/wine}" # Modern wine is unified
else else
export wine="${wine:-/usr/bin/wine}" # Modern wine is unified
fi fi
mapfile -t lines < <(sed '/^$/d' "${configFile}" 2> /dev/null) mapfile -t lines < <(sed '/^$/d' "${configFile}" 2> /dev/null)
if [[ ${#lines} -eq 0 ]]; then if [[ ${#lines} -eq 0 ]]; then
@@ -163,7 +163,7 @@ kill_game() {
wineExec="${wineExec##*\\}" wineExec="${wineExec##*\\}"
# kill the wine server. # kill the wine server.
get_bottle "${game%|*}" get_bottle "${game%|*}"
${wine}server -k wineserver -k
echo "The selected game has been stopped." echo "The selected game has been stopped."
fi fi
exit 0 exit 0
@@ -231,7 +231,7 @@ custom_launch_parameters() {
fi fi
if [[ "${game[0]}" == "screaming-strike-2" ]]; then if [[ "${game[0]}" == "screaming-strike-2" ]]; then
pushd "$(winepath "$winePath")" pushd "$(winepath "$winePath")"
${wine} "$wineExec" wine "$wineExec"
popd popd
exit 0 exit 0
fi fi
@@ -249,7 +249,7 @@ custom_launch_parameters() {
fi fi
if [[ -d "${WINEPREFIX}/drive_c/windows/syswow64" ]]; then if [[ -d "${WINEPREFIX}/drive_c/windows/syswow64" ]]; then
# switch to wine64 for 64 bit prefix. # switch to wine64 for 64 bit prefix.
[[ "${wine}" == "/usr/bin/wine" ]] && export wine="/usr/bin/wine64" # Modern wine is unified - no separate wine32/wine64 executables
fi fi
} }
@@ -334,14 +334,14 @@ game_launcher() {
get_bottle "${game[0]}" get_bottle "${game[0]}"
# make sure wine is actually set to something # make sure wine is actually set to something
if [[ "$(uname -m)" == "aarch64" ]]; then if [[ "$(uname -m)" == "aarch64" ]]; then
export wine="${wine:-/usr/bin/wine}" # Modern wine is unified
else else
export wine="${wine:-/usr/bin/wine}" # Modern wine is unified
fi fi
echo -n "launching " echo -n "launching "
${wine} --version wine --version
# kill any previous existing wineservers for this prefix in case they didn't shut down properly. # kill any previous existing wineservers for this prefix in case they didn't shut down properly.
${wine}server -k wineserver -k
# launch the game # launch the game
if command -v qjoypad &> /dev/null ; then if command -v qjoypad &> /dev/null ; then
mkdir -p ~/.qjoypad3 mkdir -p ~/.qjoypad3
@@ -358,7 +358,7 @@ game_launcher() {
fi fi
process_launcher_flags process_launcher_flags
custom_launch_parameters custom_launch_parameters
${wine:-/usr/bin/wine} start /d "${game[1]%\\*}" "${game[1]##*\\}" /realtime wine start /d "${game[1]%\\*}" "${game[1]##*\\}" /realtime
fi fi
exit 0 exit 0
} }