From 79f751c5f303e1ce4bcf93c86a162fa436652ad2 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 1 Jul 2021 21:02:36 -0400 Subject: [PATCH] Improved the get_installer function with information about where to obtain the installation file. Added several more BG games. --- audiogame-manager.sh | 61 ++++++++++++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 16 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 48c5fb0..ecd9f9d 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -339,7 +339,18 @@ get_installer() { if [[ -f "${cache}/$1" ]]; then return fi - read -p "Make sure $1 is available in either your Downloads or Desktop directory and press enter to continue." continue + # Create message for dialog. + local message="Make sure $1 is available in either your Downloads or Desktop directory and press enter to continue." + if [[ -n "$2" ]]; then + message+="\n\nThe last good known URL for $game is:" + message+="\n$2" + fi + if echo "$2" | xclip -selection clipboard 2> /dev/null ; then + message+="\n\nThe URL has been copied to the clipboard." + fi + dialog --ok-label "Continue" \ + --backtitle "Audiogame Manager" \ + --msgbox "$message" -1 -1 # Search the Desktop and Downloads directories for the installation file for i in ~/Downloads ~/Desktop ; do find $i -type f -name "$1" -exec cp -v {} "${cache}/" \; @@ -719,6 +730,7 @@ gameList=( "Beatstar Pro" "BG 15 Puzzle" "BG Boggle" + "BG Chess Challenge" "BG Cribbage" "BG Free Cell Solitaire" "BG Hearts" @@ -729,6 +741,7 @@ gameList=( "BG Scorpion Solitaire" "BG Sudoku" "BG Uno" + "BG Word Target" "BG Yahtzee" "Bloodshed" "Bombercats" @@ -937,7 +950,7 @@ case "${game}" in "BG 15 Puzzle") bgInstaller="FPB32Setup10a.exe" export bottle="bg" - get_installer "$bgInstaller" + get_installer "$bgInstaller" "http://www.spoonbillsoftware.com.au/bggames.htm" install_wine_bottle speechsdk wine "${cache}/${bgInstaller}" /silent add_launcher "c:\Program Files\Games\FifteenB\FifteenB.exe" @@ -945,15 +958,23 @@ case "${game}" in "BG Boggle") bgInstaller="BGB32Setup10a.exe" export bottle="bg" - get_installer "$bgInstaller" + get_installer "$bgInstaller" "http://www.spoonbillsoftware.com.au/bggames.htm" install_wine_bottle speechsdk wine "${cache}/${bgInstaller}" /silent add_launcher "c:\Program Files\Games\BoggleB\BoggleB.exe" ;; + "BG Chess Challenge") + bgInstaller="BGC32Setup10d.exe" + export bottle="bg" + get_installer "$bgInstaller" "http://www.spoonbillsoftware.com.au/bggames.htm" + install_wine_bottle speechsdk + wine "${cache}/${bgInstaller}" /silent + add_launcher "c:\Program Files\Games\ChessB\BGChess.exe" + ;; "BG Cribbage") bgInstaller="BGC32Setup12e.exe" export bottle="bg" - get_installer "$bgInstaller" + get_installer "$bgInstaller" "http://www.spoonbillsoftware.com.au/bggames.htm" install_wine_bottle speechsdk wine "${cache}/${bgInstaller}" /silent add_launcher "c:\Program Files\Games\CribbageB\CribbageB.exe" @@ -961,7 +982,7 @@ case "${game}" in "BG Free Cell Solitaire") bgInstaller="BGF32Setup20.exe" export bottle="bg" - get_installer "$bgInstaller" + get_installer "$bgInstaller" "http://www.spoonbillsoftware.com.au/bggames.htm" install_wine_bottle speechsdk wine "${cache}/${bgInstaller}" /silent add_launcher "c:\Program Files\Games\FreecellB\FreecellB.exe" @@ -969,7 +990,7 @@ case "${game}" in "BG Klondike Solitaire") bgInstaller="BGK32Setup10b.exe" export bottle="bg" - get_installer "$bgInstaller" + get_installer "$bgInstaller" "http://www.spoonbillsoftware.com.au/bggames.htm" install_wine_bottle speechsdk wine "${cache}/${bgInstaller}" /silent add_launcher "c:\Program Files\Games\KlondikeB\KlondikeB.exe" @@ -977,7 +998,7 @@ case "${game}" in "BG Hearts") bgInstaller="BGH32Setup10b.exe" export bottle="bg" - get_installer "${bgInstaller}" + get_installer "${bgInstaller}" "http://www.spoonbillsoftware.com.au/bggames.htm" install_wine_bottle speechsdk wine "${cache}/${bgInstaller}" /silent add_launcher "c:\Program Files\Games\HeartsB\HeartsB.exe" @@ -985,7 +1006,7 @@ case "${game}" in "BG LAP") bgInstaller="LAP32Setup10.exe" export bottle="bg" - get_installer "${bgInstaller}" + get_installer "${bgInstaller}" "http://www.spoonbillsoftware.com.au/bggames.htm" install_wine_bottle speechsdk wine "${cache}/${bgInstaller}" /silent add_launcher "c:\Program Files\Games\LAP\LAP.exe" @@ -993,7 +1014,7 @@ case "${game}" in "BG Mine Sweeper") bgInstaller="MSB32Setup10.exe" export bottle="bg" - get_installer "${bgInstaller}" + get_installer "${bgInstaller}" "http://www.spoonbillsoftware.com.au/bggames.htm" install_wine_bottle speechsdk wine "${cache}/${bgInstaller}" /silent add_launcher "c:\Program Files\Games\MinesweeperB\MinesweeperB.exe" @@ -1001,7 +1022,7 @@ case "${game}" in "BG Penguin Solitaire") bgInstaller="BPS32Setup10c.exe" export bottle="bg" - get_installer "$bgInstaller" + get_installer "$bgInstaller" "http://www.spoonbillsoftware.com.au/bggames.htm" install_wine_bottle speechsdk wine "${cache}/${bgInstaller}" /silent add_launcher "c:\Program Files\Games\PenguinB\PenguinB.exe" @@ -1009,7 +1030,7 @@ case "${game}" in "BG Scorpion Solitaire") bgInstaller="BSS32Setup10.exe" export bottle="bg" - get_installer "$bgInstaller" + get_installer "$bgInstaller" "http://www.spoonbillsoftware.com.au/bggames.htm" install_wine_bottle speechsdk wine "${cache}/${bgInstaller}" /silent add_launcher "c:\Program Files\Games\ScorpionB\ScorpionB.exe" @@ -1017,23 +1038,31 @@ case "${game}" in "BG Sudoku") bgInstaller="SDB32Setup10a.exe" export bottle="bg" - get_installer "$bgInstaller" + get_installer "$bgInstaller" "http://www.spoonbillsoftware.com.au/bggames.htm" install_wine_bottle speechsdk wine "${cache}/${bgInstaller}" /silent add_launcher "c:\Program Files\Games\SudokuB\SudokuB.exe" ;; "BG Uno") - bgInstaller="BGU32Setup11a.exe" + bgInstaller="BGU32Setup11a.exe" "http://www.spoonbillsoftware.com.au/bggames.htm" export bottle="bg" get_installer "${bgInstaller}" install_wine_bottle speechsdk wine "${cache}/${bgInstaller}" /silent add_launcher "c:\Program Files\Games\UnoB\UnoB.exe" ;; + "BG Word Target") + bgInstaller="WTB32Setup10a.exe" + export bottle="bg" + get_installer "${bgInstaller}" "http://www.spoonbillsoftware.com.au/bggames.htm" + install_wine_bottle speechsdk + wine "${cache}/${bgInstaller}" /silent + add_launcher "c:\Program Files\Games\WordTargetB\WordTargetB.exe" + ;; "BG Yahtzee") bgInstaller="BGY32Setup10a.exe" export bottle="bg" - get_installer "${bgInstaller}" + get_installer "${bgInstaller}" "http://www.spoonbillsoftware.com.au/bggames.htm" install_wine_bottle speechsdk wine "${cache}/${bgInstaller}" /silent add_launcher "c:\Program Files\Games\yahtzeeB\BGYahtzee.exe" @@ -1539,7 +1568,7 @@ EOF add_launcher "c:\Program Files\scrolling battles\SBYW.exe" ;; "Sequence Storm") - get_installer "sequence-storm-win64.zip" + get_installer "sequence-storm-win64.zip" "https://special-magic-games-llc.itch.io/sequence-storm" export WINEARCH=win64 export winVer="win10" install_wine_bottle @@ -1773,7 +1802,7 @@ EOF echo "In each subsequent launch, you will need to hit enter a couple times before it starts speaking." ;; "Windows Attack") - get_installer "WA.exe" + get_installer "WA.exe" "https://drive.google.com/file/d/1BwKGLP37m-Z6nyKdo8LwmU9J1CEqfMb_/view?usp=drivesdk" export winVer="win7" install_wine_bottle speechsdk cp "${cache}/WA.exe" "$WINEPREFIX/drive_c/Program Files/"