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
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