From 096fa46199ccfbdfcf6e8fd172245fa529feb91a Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 1 Jul 2021 16:22:57 -0400 Subject: [PATCH] Improved the -r option so it handles multiple games installed in a single bottle more gracefully. Added BG Yahtzee. --- audiogame-manager.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index af42aef..48c5fb0 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -505,7 +505,7 @@ game_removal() { exit 0 fi local winePath="${game#*|}" - winePath="${winePath%\\*.exe}" + export winePath="${winePath%\\*.exe}" local wineExec="${game#*|}" wineExec="${wineExec%|*}" wineExec="${wineExec##*\\}" @@ -519,7 +519,8 @@ game_removal() { # remove the game rm -rf "${WINEPREFIX}" else - read -rp "This bottle \"${WINEPREFIX##*/}\" contains multiple entries and must be handled manually. To remove only the launcher from the menu, press enter. To cancel press control+c. " continue + read -rp "This bottle \"${WINEPREFIX##*/}\" contains multiple entries, so only the game will be removed. To continue press enter. To cancel press control+c. " continue + rm -rf "$(winepath "${winePath}")" fi # remove the launcher gawk -i inplace -vLine="${game//\\/\\\\}" '!index($0,Line)' "$configFile" @@ -728,6 +729,7 @@ gameList=( "BG Scorpion Solitaire" "BG Sudoku" "BG Uno" + "BG Yahtzee" "Bloodshed" "Bombercats" #"Breed Memorial" @@ -1028,6 +1030,14 @@ case "${game}" in wine "${cache}/${bgInstaller}" /silent add_launcher "c:\Program Files\Games\UnoB\UnoB.exe" ;; + "BG Yahtzee") + bgInstaller="BGY32Setup10a.exe" + export bottle="bg" + get_installer "${bgInstaller}" + install_wine_bottle speechsdk + wine "${cache}/${bgInstaller}" /silent + add_launcher "c:\Program Files\Games\yahtzeeB\BGYahtzee.exe" + ;; "Bloodshed") export winVer="win7" install_wine_bottle speechsdk