From 8bdba9d93e5c6581247efe626e3801ed4caa5d36 Mon Sep 17 00:00:00 2001 From: stormdragon2976 Date: Tue, 24 Jan 2023 16:04:58 -0500 Subject: [PATCH] More very experimental changes. Now games should install using the required version of wine if necessary. It works in all the tests I have done, but that doesn't mean there are no bugs. --- audiogame-manager.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 45e0e2f..35598f4 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -466,6 +466,7 @@ install_wine() { fi # Figure out wineInstallationPath wineInstallationPath="${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/wine_$2/$1" + export wine="${wineInstallationPath}/bin/wine" # If the path exists, wine should already be installed. # Just make sure we didn't wind up with a empty directory for some reason rmdir "${wineInstallationPath}" 2> /dev/null @@ -538,6 +539,11 @@ install_rhvoice() { install_wine_bottle() { # 32 bit installations work best and are the default here, if you need to override it, do it in the game specific installation steps. export WINEARCH="${WINEARCH:-win32}" + # Figure out if we are using a specific version of wine + wine="${wine:-$(command -v wine)}" + # Set the WINE and WINESERVER environmental variables so winetricks will use the right installation. + WINE="${wine}" + WINESERVER="${wine}server" if [[ -z "$bottle" ]]; then local bottle="${game,,}" bottle="${bottle//[[:space:]]/-}" @@ -560,9 +566,9 @@ install_wine_bottle() { geckoPath="${cache}/wine_gecko-2.40-x86.msi" fi # This is in a brace list to pipe through dialog. - { DISPLAY="" wineboot -u - wine msiexec /i z:"$monoPath" /quiet - wine msiexec /i z:"$geckoPath" /quiet + { DISPLAY="" ${wine}boot -u + $wine msiexec /i z:"$monoPath" /quiet + $wine msiexec /i z:"$geckoPath" /quiet if [[ "${*}" =~ (speechsdk|sapi) ]]; then install_rhvoice fi @@ -2565,10 +2571,11 @@ EOF ;; "Shadow Line") export version="7.7" + install_wine "$version" "32" export winVer="win8" install_wine_bottle download "https://www.mm-galabo.com/sr/Download_files_srfv/shadowrine_fullvoice3.171.exe" - wine "${cache}/shadowrine_fullvoice3.171.exe" /sp- & + $wine "${cache}/shadowrine_fullvoice3.171.exe" /sp- & xdotool sleep 30 key --clearmodifiers --delay=500 Return xdotool key --clearmodifiers --delay=500 Return xdotool key --clearmodifiers --delay=500 Return @@ -2577,7 +2584,7 @@ EOF xdotool sleep 180 key --clearmodifiers --delay=500 Down xdotool key --clearmodifiers --delay=500 space xdotool key --clearmodifiers --delay=500 alt+f - wineserver -w + ${wine}server -w add_launcher "c:\Program Files\GalaxyLaboratory\ShadowRine_FullVoice\play_sr.exe" ;; "Silver Dollar")