With upgrade to wow64 no need to use a variable so switch to direct wine calls.
This commit is contained in:
@@ -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
|
||||
if [[ "$*" =~ speechsdk || "$*" =~ sapi ]]; then
|
||||
architecture=32
|
||||
export WINEARCH="win32"
|
||||
echo "Using wine32 for speech API compatibility (SAPI5 broken in WOW64)"
|
||||
else
|
||||
architecture=64
|
||||
# Simple rule: wine64 for everything, let WOW64 handle 32-bit speech APIs
|
||||
local architecture=64
|
||||
export WINEARCH="win64"
|
||||
|
||||
if [[ "$*" =~ speechsdk || "$*" =~ sapi ]]; then
|
||||
echo "Using wine64 with WOW64 for speech API compatibility"
|
||||
else
|
||||
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
|
||||
|
@@ -72,9 +72,9 @@ game_installer() {
|
||||
game_removal() {
|
||||
source .includes/bottle.sh
|
||||
if [[ "$(uname -m)" == "aarch64" ]]; then
|
||||
export wine="${wine:-/usr/bin/wine}"
|
||||
# Modern wine is unified
|
||||
else
|
||||
export wine="${wine:-/usr/bin/wine}"
|
||||
# Modern wine is unified
|
||||
fi
|
||||
mapfile -t lines < <(sed -e '/^$/d' -e '/^[[:space:]]*#/d' "${configFile}" 2> /dev/null)
|
||||
if [[ ${#lines} -eq 0 ]]; then
|
||||
@@ -111,7 +111,7 @@ game_removal() {
|
||||
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
|
||||
# kill any previous existing wineservers for this prefix in case they didn't shut down properly.
|
||||
${wine}server -k
|
||||
wineserver -k
|
||||
# remove the game
|
||||
rm -rf "${WINEPREFIX}"
|
||||
else
|
||||
@@ -129,9 +129,9 @@ game_removal() {
|
||||
kill_game() {
|
||||
source .includes/bottle.sh
|
||||
if [[ "$(uname -m)" == "aarch64" ]]; then
|
||||
export wine="${wine:-/usr/bin/wine}"
|
||||
# Modern wine is unified
|
||||
else
|
||||
export wine="${wine:-/usr/bin/wine}"
|
||||
# Modern wine is unified
|
||||
fi
|
||||
mapfile -t lines < <(sed '/^$/d' "${configFile}" 2> /dev/null)
|
||||
if [[ ${#lines} -eq 0 ]]; then
|
||||
@@ -163,7 +163,7 @@ kill_game() {
|
||||
wineExec="${wineExec##*\\}"
|
||||
# kill the wine server.
|
||||
get_bottle "${game%|*}"
|
||||
${wine}server -k
|
||||
wineserver -k
|
||||
echo "The selected game has been stopped."
|
||||
fi
|
||||
exit 0
|
||||
@@ -231,7 +231,7 @@ custom_launch_parameters() {
|
||||
fi
|
||||
if [[ "${game[0]}" == "screaming-strike-2" ]]; then
|
||||
pushd "$(winepath "$winePath")"
|
||||
${wine} "$wineExec"
|
||||
wine "$wineExec"
|
||||
popd
|
||||
exit 0
|
||||
fi
|
||||
@@ -249,7 +249,7 @@ custom_launch_parameters() {
|
||||
fi
|
||||
if [[ -d "${WINEPREFIX}/drive_c/windows/syswow64" ]]; then
|
||||
# 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
|
||||
}
|
||||
|
||||
@@ -334,14 +334,14 @@ game_launcher() {
|
||||
get_bottle "${game[0]}"
|
||||
# make sure wine is actually set to something
|
||||
if [[ "$(uname -m)" == "aarch64" ]]; then
|
||||
export wine="${wine:-/usr/bin/wine}"
|
||||
# Modern wine is unified
|
||||
else
|
||||
export wine="${wine:-/usr/bin/wine}"
|
||||
# Modern wine is unified
|
||||
fi
|
||||
echo -n "launching "
|
||||
${wine} --version
|
||||
wine --version
|
||||
# kill any previous existing wineservers for this prefix in case they didn't shut down properly.
|
||||
${wine}server -k
|
||||
wineserver -k
|
||||
# launch the game
|
||||
if command -v qjoypad &> /dev/null ; then
|
||||
mkdir -p ~/.qjoypad3
|
||||
@@ -358,7 +358,7 @@ game_launcher() {
|
||||
fi
|
||||
process_launcher_flags
|
||||
custom_launch_parameters
|
||||
${wine:-/usr/bin/wine} start /d "${game[1]%\\*}" "${game[1]##*\\}" /realtime
|
||||
wine start /d "${game[1]%\\*}" "${game[1]##*\\}" /realtime
|
||||
fi
|
||||
exit 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user