From 56eb97c65900621d669e3d129ced5b8bdb6c7e6a Mon Sep 17 00:00:00 2001 From: stormdragon2976 Date: Mon, 23 Jan 2023 20:18:36 -0500 Subject: [PATCH] First code using the new wine version code. All Aprone games now use Wine 7.7, this fixes problems with Swamp frequently disconnecting. If you find this doesn't work for you, please use the master branch to play Swamp until the bugs are fixed. I tested it here, and Swamp launched, but I also have wine 7.7 installed system wide currently. --- audiogame-manager.sh | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 3af3671..9dd5a0c 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -305,7 +305,9 @@ get_bottle() { "puzzle-divided"*) ;& "revelation"*) ;& "swamp"*) ;& - "triple -triad"*) export WINEPREFIX="${HOME}/.local/wine/aprone" ;; + "triple -triad"*) + version="7.7" + export WINEPREFIX="${HOME}/.local/wine/aprone" ;; "bg-"*) export WINEPREFIX="${HOME}/.local/wine/bg";; # ESP Pinball games "esp-pinball-classic"*) export WINEPREFIX="${HOME}/.local/wine/esp-pinball";; @@ -470,6 +472,7 @@ install_wine() { if [[ -d "${wineInstallationPath}" ]]; then return fi + mkdir -p "${wineInstallationPath}" 2> /dev/null # This probably does not need to be cached, so download to tmp. installationFile="$(mktemp)" local v=$2 @@ -747,7 +750,6 @@ game_launcher() { # kill any previous existing wineservers for this prefix in case they didn't shut down properly. wineserver -k # launch the game - # launch the game if command -v qjoypad &> /dev/null ; then mkdir -p ~/.qjoypad3 touch "${HOME}/.qjoypad3/${game%|*}.lyt" @@ -843,9 +845,23 @@ game_launcher() { fi if [[ -d "${WINEPREFIX}/drive_c/windows/syswow64" ]]; then pgrep -u "$USER" nvda2speechd &> /dev/null || ${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd & - wine64 start /realtime /d "${winePath}" "$wineExec" + # Figure out which wine version to use + if [[ -n "${version}" ]]; then + install_wine "${version}" "64" + wine="${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/wine_64/${version}/bin/wine" + else + wine="$(command -v wine64)" + fi + $wine start /realtime /d "${winePath}" "$wineExec" else - wine start /d "${winePath}" "$wineExec" /realtime + # Figure out which wine version to use + if [[ -n "${version}" ]]; then + install_wine "${version}" "32" + wine="${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/wine_32/${version}/bin/wine" + else + wine="$(command -v wine)" + fi + $wine start /d "${winePath}" "$wineExec" /realtime fi fi exit 0 @@ -914,6 +930,7 @@ export BOX86_NOBANNER=1 unset noCache # Manual installation is not default, make sure it's unset unset manualInstall +unset version # The list of games available for installation.