From cecf26f039305797b99ce6d6d382f46e0d408b65 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 6 Sep 2020 14:38:16 -0400 Subject: [PATCH] New download function added to make it easier to get the installation files. Two new games added. --- audiogame-manager.sh | 73 ++++++++++++++++++++++++++++++++------------ 1 file changed, 53 insertions(+), 20 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 12547fb..5fb4332 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -57,6 +57,18 @@ checklist() { exit 0 } +download() { + local source=($@) + for i in "${source[@]}" ; do + local dest="${i##*/}" + dest="${dest//%20/ }" + if ! wget -O "$WINEPREFIX/drive_c/Program Files/${dest}" "${i}" ; then + echo "Could not download game." + exit 1 + fi + done +} + help() { echo -e "Usage:\n" echo "With no arguments, open the game launcher." @@ -229,6 +241,10 @@ automate_installer() { wineserver -w } +# If display isn't set assume we are launching from console and an X environment is running using display :0 +if [[ -z "$DISPLAY" ]]; then + export DISPLAY=":0" +fi # Settings file configFile="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/games.conf" mkdir -p "${configFile%/*}" @@ -245,8 +261,10 @@ unset manualInstall # The list of games available for installation. # Use menu friendly names. gameList=( + "Adrian's Doom" "Battle Zone" "Bloodshed" + "Easter Quest" "Kitchensinc Games" "Light Cars" "Lockpick" @@ -291,23 +309,37 @@ done # Install game based on the selection above. case "${game}" in + "Adrian's Doom") + install_wine_bottle speechsdk + download "https://agarchive.net/games/mt/adrian's%20doom.exe" + wine "$WINEPREFIX/drive_c/Program Files/adrian's doom.exe" /silent + add_launcher "c:\Program Files\Two Caring Citizens\Adrian's Doom!\adrian.exe" + rm -f "$WINEPREFIX/drive_c/Program Files/adrian's doom.exe" + ;; "Battle Zone") # Speech not working through sapi. export winVer="win7" install_wine_bottle speechsdk - wget -O "$WINEPREFIX/drive_c/Program Files/battle zone 13.5 setup.exe" "https://www.agarchive.net/games/gameMadnessInteractive/battle%20zone%2013.5%20setup.exe" + download "https://www.agarchive.net/games/gameMadnessInteractive/battle%20zone%2013.5%20setup.exe" wine "$WINEPREFIX/drive_c/Program Files/battle zone 13.5 setup.exe" /silent add_launcher "c:\Program Files\Battle Zone\ss.exe" rm -f "$WINEPREFIX/drive_c/Program Files/battle zone 13.5 setup.exe" ;; "Bloodshed") install_wine_bottle speechsdk - wget -O "$WINEPREFIX/drive_c/Program Files/bloodshed.exe" "http://www.samtupy.com/games/bloodshed.exe" + download "http://www.samtupy.com/games/bloodshed.exe" add_launcher "c:\Program Files\bloodshed.exe" ;; + "Easter Quest") + install_wine_bottle + download "https://agarchive.net/games/mt/easter%20quest%20setup.exe" + wine "$WINEPREFIX/drive_c/Program Files/easter quest setup.exe" /silent + add_launcher "c:\Program Files\MTGames\Easter Quest\easter.exe" + rm -f "$WINEPREFIX/drive_c/Program Files/easter quest setup.exe" + ;; "Kitchensinc Games") install_wine_bottle vb6run speechsdk dx8vb - wget -O "$WINEPREFIX/drive_c/Program Files/Kitchen.tar.xz" "https://stormgames.wolfe.casa/downloads/kitchen.tar.xz" + download "https://stormgames.wolfe.casa/downloads/kitchen.tar.xz" echo "Extracting files..." tar xf "$WINEPREFIX/drive_c/Program Files/Kitchen.tar.xz" -C "$WINEPREFIX/drive_c/Program Files/" add_launcher "c:\Program Files\Kitchen's Sink\gamemenu.exe" @@ -315,7 +347,7 @@ case "${game}" in ;; "Light Cars") install_wine_bottle dx8vb vb6run - wget -O "$WINEPREFIX/drive_c/Program Files/light cars setup.exe" "https://www.agarchive.net/games/lighttech/light%20cars%20setup.exe" + download "https://www.agarchive.net/games/lighttech/light%20cars%20setup.exe" if [[ -n "$manualInstall" ]]; then wine "$WINEPREFIX/drive_c/Program Files/light cars setup.exe" else @@ -329,28 +361,28 @@ case "${game}" in ;; "Lockpick") install_wine_bottle vb6run dx8vb - wget -O "$WINEPREFIX/drive_c/Program Files/lockpicksetup.exe" "http://files.l-works.net/lockpicksetup.exe" + wget "http://files.l-works.net/lockpicksetup.exe" wine "$WINEPREFIX/drive_c/Program Files/lockpicksetup.exe" /silent add_launcher "c:\Program Files\lWorks\Lockpick\lockpick.exe" rm -f "$WINEPREFIX/drive_c/Program Files/lockpicksetup.exe" ;; "Shades of Doom") install_wine_bottle vcrun6 - wget -O "$WINEPREFIX/drive_c/Program Files/sod20022.exe" "http://www.gmagames.com/sod20022.exe" + download "http://www.gmagames.com/sod20022.exe" wine "$WINEPREFIX/drive_c/Program Files/sod20022.exe" /silent add_launcher "c:\Program Files\Shades of Doom 2.0\sod.exe" rm -f "$WINEPREFIX/drive_c/Program Files/sod20022.exe" ;; "Super Egg Hunt") install_wine_bottle - wget -O "$WINEPREFIX/drive_c/Program Files/superegghuntsetup.exe" "http://files.l-works.net/superegghuntsetup.exe" + download "http://files.l-works.net/superegghuntsetup.exe" wine "$WINEPREFIX/drive_c/Program Files/superegghuntsetup.exe" /silent add_launcher "c:\Program Files\Lworks\super egg hunt\superegghunt.exe" rm -f "$WINEPREFIX/drive_c/Program Files/superegghuntsetup.exe" ;; "Super Liam") install_wine_bottle vb6run dx8vb - wget -O "$WINEPREFIX/drive_c/Program Files/superliamsetup.exe" "http://files.l-works.net/superliamsetup.exe" + download "http://files.l-works.net/superliamsetup.exe" wine "$WINEPREFIX/drive_c/Program Files/superliamsetup.exe" /silent add_launcher "c:\Program Files\lWorks\Super Liam\sl.exe" rm -f "$WINEPREFIX/drive_c/Program Files/superliam.exe" @@ -358,27 +390,27 @@ case "${game}" in "Swamp") winetricksSettings="vd=1024x768" install_wine_bottle vb6run dx8vb quartz speechsdk corefonts - wget -O "$WINEPREFIX/drive_c/Program Files/Swamp.zip" "https://kaldobsky.com/audiogames/Swamp.zip" - unzip -d "$WINEPREFIX/drive_c/Program Files/swamp" "$WINEPREFIX/drive_c/Program Files/Swamp.zip" + download "https://kaldobsky.com/audiogames/SwampPart1.zip" "https://kaldobsky.com/audiogames/SwampPart2.zip" + unzip -d "$WINEPREFIX/drive_c/Program Files/swamp" "$WINEPREFIX/drive_c/Program Files/SwampPart1.zip" + unzip -d "$WINEPREFIX/drive_c/Program Files/swamp" "$WINEPREFIX/drive_c/Program Files/SwampPart2.zip" # make sure the latest version is installed. - if wget -O "$WINEPREFIX/drive_c/Program Files/SwampPatch.zip" "https://www.kaldobsky.com/audiogames/SwampPatch.zip" ; then - unzip -o -d "$WINEPREFIX/drive_c/Program Files/swamp" "$WINEPREFIX/drive_c/Program Files/SwampPatch.zip" - fi + #if wget -O "$WINEPREFIX/drive_c/Program Files/SwampPatch.zip" "https://www.kaldobsky.com/audiogames/SwampPatch.zip" ; then + #unzip -o -d "$WINEPREFIX/drive_c/Program Files/swamp" "$WINEPREFIX/drive_c/Program Files/SwampPatch.zip" + #fi wine cmd.exe /c 'cd /d c:\Program Files\swamp && Windows32bit.bat' rm -f "$WINEPREFIX/drive_c/Program Files/Swamp.zip" add_launcher "c:\Program Files\swamp\Swamp.exe" ;; "The Blind Swordsman") install_wine_bottle - wget -O "$WINEPREFIX/drive_c/Program Files/theblindswordsmanPC.zip" "http://www.evildogserver.com/theblindswordsman/theblindswordsmanPC.zip" + download "http://www.evildogserver.com/theblindswordsman/theblindswordsmanPC.zip" unzip -d "$WINEPREFIX/drive_c/Program Files" "$WINEPREFIX/drive_c/Program Files/theblindswordsmanPC.zip" rm -f "$WINEPREFIX/drive_c/Program Files/theblindswordsmanPC.zip" add_launcher "c:\Program Files\TheBlindSwordsman.exe" ;; "Technoshock") install_wine_bottle - wget -O "$WINEPREFIX/drive_c/Program Files/technoshock_140b_en.zip" "http://tiflocomp.ru/download/games/technoshock_140b_en.zip" - wget -O "$WINEPREFIX/drive_c/Program Files/technoshock_140b_en_update.zip" "http://tiflocomp.ru/download/games/technoshock140b_en_update.zip" + download "http://tiflocomp.ru/download/games/technoshock_140b_en.zip" "http://tiflocomp.ru/download/games/technoshock140b_en_update.zip" unzip -d "$WINEPREFIX/drive_c/Program Files" "$WINEPREFIX/drive_c/Program Files/technoshock_140b_en.zip" unzip -d "$WINEPREFIX/drive_c/Program Files" "$WINEPREFIX/drive_c/Program Files/technoshock_140b_en_update.zip" wine "$WINEPREFIX/drive_c/Program Files/setup_eng.exe" /silent @@ -389,22 +421,23 @@ case "${game}" in ;; "Top Speed 3") install_wine_bottle directplay - wget -O "$WINEPREFIX/drive_c/Program Files/Tspeed_3.0.3.exe" "https://github.com/PlayingintheDark/TopSpeed/releases/download/h/Tspeed_3.0.3.exe" + download "https://github.com/PlayingintheDark/TopSpeed/releases/download/h/Tspeed_3.0.3.exe" wine "$WINEPREFIX/drive_c/Program Files/Tspeed_3.0.3.exe" /silent add_launcher "c:\Program Files\Playing in the dark\Top Speed 3\TopSpeed.exe" rm -f "$WINEPREFIX/drive_c/Program Files/Tspeed_3.0.3.exe" ;; "Q9") install_wine_bottle - wget -O "$WINEPREFIX/drive_c/Program Files/q9_english_installer.exe" "http://www.blastbay.com/q9_english_installer.exe" + download "http://www.blastbay.com/q9_english_installer.exe" wine "$WINEPREFIX/drive_c/Program Files/q9_english_installer.exe" /silent add_launcher "c:\Program Files\Q9 Action Game\q9.exe" rm -f "$WINEPREFIX/drive_c/Program Files/q9_english_installer.exe" ;; "RS Games") # Does not speak with sapi. + export winetricksSettings="vd=1024x768" install_wine_bottle speechsdk vcrun6 - wget -O "$WINEPREFIX/drive_c/Program Files/rsgames-client-setup-2.01.exe" "http://rsgames.org/rsdownloads/rsgclient/rsgames-client-setup-2.01.exe" + download "http://rsgames.org/rsdownloads/rsgclient/rsgames-client-setup-2.01.exe" wine "$WINEPREFIX/drive_c/Program Files/rsgames-client-setup-2.01.exe" /silent add_launcher "c:\Program Files\RS Games Client\rsg.exe" rm -f "$WINEPREFIX/drive_c/Program Files/rsgames-client-setup-2.01.exe" @@ -412,7 +445,7 @@ case "${game}" in "Undead Assault") # Does not speak with sapi. install_wine_bottle speechsdk vcrun6sp6 - wget -O "$WINEPREFIX/drive_c/Program Files/undead_assault.zip" "http://undead-assault.com/static/files/public/undead_assault.zip" + download "http://undead-assault.com/static/files/public/undead_assault.zip" unzip -d "$WINEPREFIX/drive_c/Program Files" "$WINEPREFIX/drive_c/Program Files/undead_assault.zip" rm -f "$WINEPREFIX/drive_c/Program Files/undead_assault.zip" add_launcher "c:\Program Files\Undead Assault.exe"