From d8825acdf94abf8e04d93d7b20fcc747dbf400e4 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 7 Oct 2020 11:14:34 -0400 Subject: [PATCH] Added qjoypad autolaunching with game specific profiles. --- audiogame-manager.sh | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index c27bbb8..1d46f97 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -37,16 +37,21 @@ checklist() { else errorList+=("Critical: Wine is not installed. You will not be able to play any games.") fi + if command -v winetricks &> /dev/null ; then + echo "Winetricks is installed." + else + errorList+=("Critical: Winetricks is not installed. This means wine cannot be configured, dependancies cannot be installed, and only self-voicing games have any chance of working.") + fi if command -v wget &> /dev/null ; then echo "Wget is installed." else errorList+=("Critical: Wget is not installed. You will not be able to install any games.") fi - for i in cabextract unzip xz ; do + for i in 7z cabextract unzip xz ; do if command -v $i &> /dev/null ; then echo "${i^} is installed." else - errorList+=("Critical: ${i^} is not installed. You will not be able to install most games.") + errorList+=("Critical: ${i^} is not installed. You will not be able to install some games or their components.") fi done if command -v ocrdesktop &> /dev/null ; then @@ -225,6 +230,15 @@ game_launcher() { # kill any previous existing wineservers for this prefix in case they didn't shut down properly. WINEPREFIX="${HOME}/.local/wine/${game%|*}" wineserver -k # launch the game + if command -v qjoypad &> /dev/null ; then + mkdir -p ~/.qjoypad3 + touch "${HOME}/.qjoypad3/${game%|*}.lyt" + if pgrep qjoypad &> /dev/null ; then + qjoypad -T "${game%|*}" 2> /dev/null + else + qjoypad -T "${game%|*}" 2> /dev/null & + fi + fi WINEPREFIX="${HOME}/.local/wine/${game%|*}" wine start /d "${winePath}" "$wineExec" fi exit 0 @@ -298,6 +312,8 @@ unset manualInstall # Use menu friendly names. gameList=( "Adrian's Doom" + "Adventurers At C" + "AudioDisc" "Battle Zone" "Bloodshed" "Crazy Party" @@ -370,6 +386,19 @@ case "${game}" in download "http://www.samtupy.com/games/bloodshed.exe" cp "${cache}/bloodshed.exe" "$WINEPREFIX/drive_c/Program Files/" ;; + "Adventurers At C") + install_wine_bottle speechsdk + download "http://www.vgstorm.com/aac/aac.zip" "https://www.agarchive.net/games/vg/adventure%20at%20c%20stages.7z" + unzip -d "$WINEPREFIX/drive_c/Program Files/aac" "${cache}/aac.zip" + 7z e -o"$WINEPREFIX/drive_c/Program Files/aac/stages" "${cache}/adventure at c stages.7z" + add_launcher "c:\Program Files\aac\aac.exe" + ;; + "AudioDisc") + install_wine_bottle + download "https://agarchive.net/games/other/audiodisc.zip" + unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/audiodisc.zip" + add_launcher "c:\Program Files\audiodisc\disco.exe" + ;; "Crazy Party") export winVer="win7" install_wine_bottle speechsdk