Merged to master.

This commit is contained in:
Storm Dragon 2020-11-17 17:17:59 -05:00
parent 881498ea47
commit 609edfe111

View File

@ -26,6 +26,42 @@ update() {
fi fi
} }
# Create the clipboard reading function for Sequence Storm
write_sequence_storm_reader() {
if -e ~/.SequenceStormReader ]]; then
return
fi
# Here-document start
cat << "EOF" > ~/.SequenceStormReader
#! /bin/bash
# Wait for the game to be launched
while ! pgrep -u $USER ^SequenceStorm &> /dev/null ; do
sleep 0.05
done
export DISPLAY=:0
unset cliptext
while pgrep -u $USER ^SequenceStorm &> /dev/null ; do
tmp="$(xclip -selection clipboard -o 2> /dev/null)"
tmp="${tmp//%/ percent }"
if [ "$tmp" != "$cliptext" ] ; then
cliptext="$tmp"
if [[ "${cliptext,,}" =~ key|load|private|says|terminal ]]; then
spd-say -w -r 50 -- "$cliptext"
else
spd-say -r 50 -- "$cliptext"
fi
fi
sleep 0.05
done
exit 0
EOF
# Here-document end
chmod 755 ~/.SequenceStormReader
}
# Wine configuration section # Wine configuration section
checklist() { checklist() {
@ -79,6 +115,11 @@ checklist() {
else else
errorList+=("Warning: Wine mono not found, some games may not work.") errorList+=("Warning: Wine mono not found, some games may not work.")
fi fi
if command -v xclip &> /dev/null ; then
echo "Xclip is installed."
else
errorList+=("Warning: Xclip is not installed. Some games may not speak.")
fi
if command -v xdotool &> /dev/null ; then if command -v xdotool &> /dev/null ; then
echo "Xdotool is installed." echo "Xdotool is installed."
else else
@ -233,6 +274,10 @@ game_launcher() {
xdg-open "https://patreon.com/stormux" xdg-open "https://patreon.com/stormux"
exit 0 exit 0
fi fi
# for games that require custom scripts before launch
if [[ "$game" =~ sequence-storm ]]; then
[[ -x ~/.SequenceStormReader ]] && ~/.SequenceStormReader &
fi
local winePath="${game#*|}" local winePath="${game#*|}"
winePath="${winePath%\\*.exe}" winePath="${winePath%\\*.exe}"
local wineExec="${game#*|}" local wineExec="${game#*|}"
@ -328,12 +373,14 @@ gameList=(
"AudioDisc" "AudioDisc"
"Battle Zone" "Battle Zone"
"Bloodshed" "Bloodshed"
"Christmas WhoopAss"
"Crazy Party" "Crazy Party"
"Easter Quest" "Easter Quest"
#"Entombed" #"Entombed"
"Finger Panic" "Finger Panic"
"Fuck That Bird" "Fuck That Bird"
"Kitchensinc Games" "Kitchensinc Games"
"Kringle Crash"
"Light Cars" "Light Cars"
"Lockpick" "Lockpick"
"Manamon" "Manamon"
@ -345,6 +392,7 @@ gameList=(
"Revenge of the Undead" "Revenge of the Undead"
"RS Games" "RS Games"
"Run For Your Life" "Run For Your Life"
"Sequence Storm"
"Shades of Doom" "Shades of Doom"
"Super Egg Hunt" "Super Egg Hunt"
"Super Liam" "Super Liam"
@ -429,6 +477,16 @@ case "${game}" in
cp "${cache}/bloodshed.exe" "$WINEPREFIX/drive_c/Program Files/" cp "${cache}/bloodshed.exe" "$WINEPREFIX/drive_c/Program Files/"
add_launcher "c:\Program Files\bloodshed.exe" add_launcher "c:\Program Files\bloodshed.exe"
;; ;;
"Christmas WhoopAss")
install_wine_bottle vb6run dx8vb
download "https://www.agarchive.net/games/draconis/christmas%20whoopass%20setup.exe"
if command -v xdotools &> /dev/null ; then
wine "${cache}/christmas whoopass setup.exe" /silent | xdotool sleep 10 key alt+y --clearmodifiers
else
wine "${cache}/christmas whoopass setup.exe" /silent
fi
add_launcher "c:\Program Files\Draconis Entertainment\Christmas Whoop Ass\wa.exe"
;;
"Crazy Party") "Crazy Party")
export winVer="win7" export winVer="win7"
install_wine_bottle speechsdk install_wine_bottle speechsdk
@ -468,6 +526,12 @@ case "${game}" in
unzip -d "$WINEPREFIX/drive_c/Program Files/fuck that bird" "${cache}/bird_en.zip" unzip -d "$WINEPREFIX/drive_c/Program Files/fuck that bird" "${cache}/bird_en.zip"
add_launcher "c:\Program Files\fuck that bird/game.exe" add_launcher "c:\Program Files\fuck that bird/game.exe"
;; ;;
"Kringle Crash")
install_wine_bottle
download "https://www.agarchive.net/games/blastbay/kringle%20crash%20setup.exe"
wine "${cache}/kringle crash setup.exe" /silent
add_launcher "c:\Program Files\Kringle Crash\kringlecrash.exe"
;;
"Kitchensinc Games") "Kitchensinc Games")
install_wine_bottle vb6run speechsdk dx8vb install_wine_bottle vb6run speechsdk dx8vb
download "https://stormgames.wolfe.casa/downloads/kitchen.tar.xz" download "https://stormgames.wolfe.casa/downloads/kitchen.tar.xz"
@ -560,6 +624,23 @@ case "${game}" in
unzip -d "$WINEPREFIX/drive_c/Program Files/run for your life" "${cache}/rfyl_en.zip" unzip -d "$WINEPREFIX/drive_c/Program Files/run for your life" "${cache}/rfyl_en.zip"
add_launcher "c:\Program Files\run for your life\game.exe" add_launcher "c:\Program Files\run for your life\game.exe"
;; ;;
"Sequence Storm")
read -p "Make sure sequence-storm-win64.zip is available in either your Downloads or Desktop directory and press enter to continue." continue
for i in ~/Downloads ~/Desktop ; do
find $i -type f -name 'sequence-storm-win64.zip' -exec cp -v {} "${cache}/" \;
done
if [[ ! -f "${cache}/sequence-storm-win64.zip" ]]; then
echo "couldn't find sequence-storm-win64.zip. Please download the file and try again."
exit 1
fi
export WINEARCH=win64
export winVer="win10"
install_wine_bottle
unzip -d "$WINEPREFIX/drive_c/Program Files/sequence-storm" "${cache}/sequence-storm-win64.zip"
write_sequence_storm_reader
wget -O "$WINEPREFIX/drive_c/Program Files/sequence-storm/settings.json" "https://stormgames.wolfe.casa/downloads/sequencestorm-settings.json"
add_launcher "c:\Program Files\sequence-storm\SequenceStorm.exe"
;;
"Shades of Doom") "Shades of Doom")
export winVer="win7" export winVer="win7"
install_wine_bottle speechsdk vb6run dx8vb install_wine_bottle speechsdk vb6run dx8vb