Added qjoypad autolaunching with game specific profiles.

This commit is contained in:
Storm Dragon 2020-10-07 11:14:34 -04:00
parent bbe004dc36
commit d8825acdf9

View File

@ -37,16 +37,21 @@ checklist() {
else else
errorList+=("Critical: Wine is not installed. You will not be able to play any games.") errorList+=("Critical: Wine is not installed. You will not be able to play any games.")
fi 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 if command -v wget &> /dev/null ; then
echo "Wget is installed." echo "Wget is installed."
else else
errorList+=("Critical: Wget is not installed. You will not be able to install any games.") errorList+=("Critical: Wget is not installed. You will not be able to install any games.")
fi fi
for i in cabextract unzip xz ; do for i in 7z cabextract unzip xz ; do
if command -v $i &> /dev/null ; then if command -v $i &> /dev/null ; then
echo "${i^} is installed." echo "${i^} is installed."
else 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 fi
done done
if command -v ocrdesktop &> /dev/null ; then 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. # kill any previous existing wineservers for this prefix in case they didn't shut down properly.
WINEPREFIX="${HOME}/.local/wine/${game%|*}" wineserver -k WINEPREFIX="${HOME}/.local/wine/${game%|*}" wineserver -k
# launch the game # 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" WINEPREFIX="${HOME}/.local/wine/${game%|*}" wine start /d "${winePath}" "$wineExec"
fi fi
exit 0 exit 0
@ -298,6 +312,8 @@ unset manualInstall
# Use menu friendly names. # Use menu friendly names.
gameList=( gameList=(
"Adrian's Doom" "Adrian's Doom"
"Adventurers At C"
"AudioDisc"
"Battle Zone" "Battle Zone"
"Bloodshed" "Bloodshed"
"Crazy Party" "Crazy Party"
@ -370,6 +386,19 @@ case "${game}" in
download "http://www.samtupy.com/games/bloodshed.exe" download "http://www.samtupy.com/games/bloodshed.exe"
cp "${cache}/bloodshed.exe" "$WINEPREFIX/drive_c/Program Files/" 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") "Crazy Party")
export winVer="win7" export winVer="win7"
install_wine_bottle speechsdk install_wine_bottle speechsdk