Improved the -r option so it handles multiple games installed in a single bottle more gracefully. Added BG Yahtzee.

This commit is contained in:
Storm Dragon 2021-07-01 16:22:57 -04:00
parent efd1922ec6
commit 096fa46199

View File

@ -505,7 +505,7 @@ game_removal() {
exit 0 exit 0
fi fi
local winePath="${game#*|}" local winePath="${game#*|}"
winePath="${winePath%\\*.exe}" export winePath="${winePath%\\*.exe}"
local wineExec="${game#*|}" local wineExec="${game#*|}"
wineExec="${wineExec%|*}" wineExec="${wineExec%|*}"
wineExec="${wineExec##*\\}" wineExec="${wineExec##*\\}"
@ -519,7 +519,8 @@ game_removal() {
# remove the game # remove the game
rm -rf "${WINEPREFIX}" rm -rf "${WINEPREFIX}"
else 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 fi
# remove the launcher # remove the launcher
gawk -i inplace -vLine="${game//\\/\\\\}" '!index($0,Line)' "$configFile" gawk -i inplace -vLine="${game//\\/\\\\}" '!index($0,Line)' "$configFile"
@ -728,6 +729,7 @@ gameList=(
"BG Scorpion Solitaire" "BG Scorpion Solitaire"
"BG Sudoku" "BG Sudoku"
"BG Uno" "BG Uno"
"BG Yahtzee"
"Bloodshed" "Bloodshed"
"Bombercats" "Bombercats"
#"Breed Memorial" #"Breed Memorial"
@ -1028,6 +1030,14 @@ case "${game}" in
wine "${cache}/${bgInstaller}" /silent wine "${cache}/${bgInstaller}" /silent
add_launcher "c:\Program Files\Games\UnoB\UnoB.exe" 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") "Bloodshed")
export winVer="win7" export winVer="win7"
install_wine_bottle speechsdk install_wine_bottle speechsdk