audiogame-manager/audiogame-manager.sh

1279 lines
53 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
2020-12-16 17:16:16 -05:00
license() {
cat << EOF
■The contents of this file are subject to the Common Public Attribution
License Version 1.0 (the ■License■); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
https://opensource.org/licenses/CPAL-1.0. The License is based on the Mozilla Public License Version
1.1 but Sections 14 and 15 have been added to cover use of software over a
computer network and provide for limited attribution for the Original
Developer. In addition, Exhibit A has been modified to be consistent with
Exhibit B.
Software distributed under the License is distributed on an ■AS IS■ basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is audiogame manager.
The Original Developer is not the Initial Developer and is . If
left blank, the Original Developer is the Initial Developer.
The Initial Developer of the Original Code is Billy "Storm Dragon" Wolfe. All portions of
the code written by Billy Wolfe are Copyright (c) 2020. All Rights
Reserved.
Contributor Michael Taboada.
Contributor Jeremiah Ticket.
Attribution Copyright Notice: Audiogame manager copyright 2020 Storm Dragon. All rights reserved.
Attribution Phrase (not exceeding 10 words): A Stormux project
Attribution URL: https://stormgames.wolfe.casa
Graphic Image as provided in the Covered Code, if any.
Display of Attribution Information is required in Larger
Works which are defined in the CPAL as a work which combines Covered Code
or portions thereof with code not governed by the terms of the CPAL.
EOF
}
2020-08-27 15:42:24 -04:00
2020-09-29 22:07:26 -04:00
# Dialog accessibility
export DIALOGOPTS='--no-lines --visit-items'
2020-09-20 17:42:42 -04:00
# Automatic update function
update() {
local filePath="$(command -v ${0})"
if file "${filePath}" | grep -q 'Bourne-Again shell script' ; then
2020-09-20 17:42:42 -04:00
return
fi
# make sure the site can be reached
2020-12-06 12:46:30 -05:00
ping -c1 stormgames.wolfe.casa &> /dev/null || return
2020-12-17 01:06:57 -05:00
if [[ "$(uname)" == "Darwin" ]]; then
2020-12-17 09:11:49 -05:00
local downloadFile="audiogame-manager.mac"
2020-12-17 01:06:57 -05:00
else
local downloadFile="audiogame-manager"
fi
if [[ "$(wget --quiet -O - https://stormgames.wolfe.casa/downloads/${downloadFile} | sha256sum | cut -d ' ' -f1)" == "$(sha256sum "${filePath}" | cut -d ' ' -f1)" ]]; then
2020-09-20 17:42:42 -04:00
return
fi
echo "There is a new version of ${0##*/} available."
echo "Do you want to update now?"
read -r continue
if [[ "${continue,,}" =~ ^y|ye|yes$ ]]; then
if [[ -w "$0" ]]; then
2020-12-17 01:06:57 -05:00
wget --quiet -O "${filePath}" "https://stormgames.wolfe.casa/downloads/${downloadFile}"
2020-09-20 17:42:42 -04:00
else
2020-12-17 01:06:57 -05:00
sudo wget --quiet -O "${filePath}" "https://stormgames.wolfe.casa/downloads/${downloadFile}"
2020-09-20 17:42:42 -04:00
fi
echo "${0##*/} has been updated. Please launch the program again to use the latest version."
exit 0
fi
}
2020-08-27 15:42:24 -04:00
2020-12-11 21:46:50 -05:00
# Function to open urls across OS.
open_url() {
if [[ "$(uname)" == "Darwin" ]]; then
open "${*}"
else
xdg-open "${*}"
fi
}
2020-11-16 16:57:16 -05:00
# Create the clipboard reading function for Sequence Storm
write_sequence_storm_reader() {
if -e ~/.SequenceStormReader ]]; then
return
fi
# Here-document start
cat << "EOF" > ~/.SequenceStormReader
#!/usr/bin/env bash
# Wait for the game to be launched
while ! pgrep -u "$USER" ^SequenceStorm &> /dev/null ; do
sleep 0.05
done
2020-11-16 16:57:16 -05:00
export DISPLAY=:0
unset cliptext
socketFile="$(find /tmp -maxdepth 1 -name "orca-*.sock")"
while pgrep -u "$USER" ^SequenceStorm &> /dev/null ; do
if [[ "$(uname)" == "Darwin" ]]; then
tmp="$(pbpaste 2> /dev/null)"
else
tmp="$(xclip -selection clipboard -o 2> /dev/null)"
fi
tmp="${tmp//%/ percent }"
2020-11-16 16:57:16 -05:00
if [ "$tmp" != "$cliptext" ] ; then
cliptext="$tmp"
if [[ "${cliptext,,}" =~ key|load|private|says|terminal ]]; then
if [[ "$(uname)" == "Darwin" ]]; then
say -v alex -r 300 "$cliptext"
else
if [[ -w "${socketFile}" ]]; then
echo "<#APPEND#>$cliptext" | socat - UNIX-CLIENT:"${socketFile}"
else
spd-say -w -r 50 -- "$cliptext"
fi
fi
else
if [[ "$(uname)" == "Darwin" ]]; then
say -v alex -r 300 "$cliptext"
else
if [[ -w "${socketFile}" ]]; then
echo "$cliptext" | socat - UNIX-CLIENT:"${socketFile}"
else
spd-say -r 50 -- "$cliptext"
fi
fi
fi
2020-11-16 16:57:16 -05:00
fi
sleep 0.05
done
2020-11-16 16:57:16 -05:00
exit 0
EOF
# Here-document end
chmod 755 ~/.SequenceStormReader
}
2020-08-27 15:42:24 -04:00
# Wine configuration section
checklist() {
declare -a errorList
echo "Checking your system..."
echo
if command -v wine &> /dev/null ; then
echo "Wine is installed."
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
2020-10-27 10:24:52 -04:00
if command -v dialog &> /dev/null ; then
echo "Dialog is installed."
else
errorList+=("Critical: Dialog is not installed. You will not be able to install, launch, or remove any games.")
fi
for i in 7z cabextract unzip xz ; do
2020-09-04 18:45:45 -04:00
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 some games or their components.")
2020-09-04 18:45:45 -04:00
fi
done
if command -v gawk &> /dev/null ; then
echo "Gawk is installed."
else
errorList+=("Warning: gawk is not installed. Game removal with -r will not work.")
fi
if command -v ocrdesktop &> /dev/null ; then
echo "Ocrdesktop is installed."
else
errorList+=("Warning: ocrdesktop is not installed. It can help if the installer gets stuck to figure out what is happening.")
fi
2021-02-15 12:44:16 -05:00
if command -v qjoypad &> /dev/null ; then
echo "Qjoypad is installed."
else
errorList+=("Warning: qjoypad is not installed. Qjoypad allows you to play keyboard only games with a gamepad.")
fi
if command -v unix2dos &> /dev/null ; then
echo "Dos2unix is installed."
else
errorList+=("Warning: unix2dos is not installed. Some games need a configuration file in dos format before they will run.")
fi
if [[ -d /usr/share/wine/gecko/ ]]; then
echo "Found wine gecko."
else
errorList+=("Warning: Wine gecko not found, some games may not work.")
fi
if [[ -d /usr/share/wine/mono/ ]]; then
echo "Found wine mono."
else
errorList+=("Warning: Wine mono not found, some games may not work.")
fi
2020-11-16 16:57:16 -05:00
if command -v xclip &> /dev/null ; then
echo "Xclip is installed."
else
2020-11-20 12:37:54 -05:00
errorList+=("Warning: Xclip is not installed. Some games may not speak or register properly.")
2020-11-16 16:57:16 -05:00
fi
2020-10-08 10:42:47 -04:00
if command -v xdotool &> /dev/null ; then
echo "Xdotool is installed."
else
errorList+=("Warning: Xdotool is not installed. Some installlers may not work or may need manual intervention.")
fi
# Show the results
if [[ ${#errorList[@]} -eq 0 ]]; then
echo "No problems found, you are good to go."
exit 0
fi
echo "Errors detected, here is a list along with the severity."
echo "Note that errors marked critical mean that you will not be able to install and play games until they are resolved."
for i in "${errorList[@]}" ; do
echo "$i"
done
exit 0
}
2020-12-16 23:28:38 -05:00
clear_cache() {
local answer
if [[ ! -d "${cache}" ]]; then
echo "No cache found at ${cache}."
return
fi
while ! [[ "${answer,,}" =~ ^yes$|^no$ ]]; do
echo "This will delete all contents of ${cache}. Are you sure you want to continue?"
echo "Please type yes or no."
echo
read -r answer
done
if [[ "$answer" == "no" ]]; then
return
fi
# All safety checks done. Delete the cache.
rm -rfv "${cache}"
echo "Cache deleted."
}
download() {
local source=($@)
for i in "${source[@]}" ; do
local dest="${i##*/}"
dest="${dest//%20/ }"
# Skip if the item is in cache.
test -e "${cache}/${dest}" && continue
2020-12-31 12:54:01 -05:00
if ! wget -4 -O "${cache}/${dest}" "${i}" ; then
echo "Could not download \"$i\"..."
exit 1
fi
done
}
2020-09-05 00:26:29 -04:00
help() {
2020-12-16 17:16:16 -05:00
echo "${0##*/}"
echo "Released under the terms of the Common Public Attribution License Version 1.0"
echo -e "This is a Stormux project: https://stormux.org\n"
2020-09-05 00:26:29 -04:00
echo -e "Usage:\n"
echo "With no arguments, open the game launcher."
for i in "${!command[@]}" ; do
2020-12-12 12:10:13 -05:00
echo "-${i/:/ <parameter>}: ${command[${i}]}"
2020-09-05 00:26:29 -04:00
done | sort
exit 0
}
2020-08-27 15:42:24 -04:00
install_wine_bottle() {
# 32 bit installations work best and are the default here, if you need to override it, do it in the game specific installation steps.
export WINEARCH="${WINEARCH:-win32}"
2020-08-27 15:42:24 -04:00
local bottle="${game,,}"
bottle="${bottle//[[:space:]]/-}"
if [[ -d "$HOME/.local/wine/${bottle}" ]]; then
echo "$HOME/.local/wine/${bottle} exists. Please remove it before running this installer."
exit 1
fi
2020-08-27 15:42:24 -04:00
mkdir -p "$HOME/.local/wine/${bottle}"
export WINEPREFIX="$HOME/.local/wine/${bottle}"
# Arguments to the function are dependancies to be installed.
(DISPLAY="" wineboot -u
# Get location of mono and gecko.
monoPath="$(find /usr/share/wine/mono -name "wine-mono*x86.msi")"
geckoPath="$(find /usr/share/wine/gecko -name "wine-gecko*x86.msi")"
if [[ -z "$monoPath" ]]; then
download 'http://dl.winehq.org/wine/wine-mono/6.0.0/wine-mono-6.0.0-x86.msi'
monoPath="${cache}/wine-mono-6.0.0-x86.msi"
fi
if [[ -z "$geckoPath" ]]; then
download 'http://dl.winehq.org/wine/wine-gecko/2.40/wine_gecko-2.40-x86.msi'
geckoPath="${cache}/wine_gecko-2.40-x86.msi"
fi
wine msiexec /i z:"$monoPath" /quiet
wine msiexec /i z:"$geckoPath" /quiet
2020-08-27 15:42:24 -04:00
winetricks -q $@ ${winVer:-winxp} ${winetricksSettings}) | dialog --progressbox "Installing wine bottle, please wait..." -1 -1
}
# Install games
game_installer() {
mapfile -t installedGames < <(sed '/^$/d' "${configFile}" 2> /dev/null | cut -d '|' -f3)
2020-08-27 15:42:24 -04:00
# Create the menu of installed games
declare -a menuList
for i in "${gameList[@]}" ; do
local menuItem="$i"
for j in "${installedGames[@]}" ; do
if [[ "$j" == "$menuItem" ]]; then
unset menuItem
fi
done
if [[ -n "$menuItem" ]]; then
menuList+=("$menuItem" "$menuItem")
fi
done
if [[ ${#menuList[@]} -eq 0 ]]; then
echo "All games are already installed."
exit 0
fi
2021-02-19 12:58:11 -05:00
menuList+=("Donate" "Donate")
menuList+=("Become a Patron" "Become a Patron")
2020-08-27 15:42:24 -04:00
game="$(dialog --backtitle "Audio Game Installer" \
--clear \
--no-tags \
--menu "Please select a game to install" 0 0 0 "${menuList[@]}" --stdout)"
}
2020-09-04 23:32:26 -04:00
# remove games
game_removal() {
mapfile -t lines < <(sed '/^$/d' "${configFile}" 2> /dev/null)
if [[ ${#lines} -eq 0 ]]; then
echo "No games found."
exit 0
fi
# Create the menu of installed games
declare -a menuList
for i in "${lines[@]}" ; do
menuList+=("${i%|*}" "${i##*|}")
done
2021-02-19 12:58:11 -05:00
menuList+=("Donate" "Donate")
2020-09-04 23:32:26 -04:00
menuList+=("Become a Patron" "Become a Patron")
local game="$(dialog --backtitle "Audio Game Removal" \
--clear \
--no-tags \
--menu "Please select a game to delete" 0 0 0 "${menuList[@]}" --stdout)"
if [[ ${#game} -gt 0 ]]; then
2021-02-19 12:58:11 -05:00
if [[ "$game" == "Donate" ]]; then
open_url "https://ko-fi.com/stormux"
2020-09-04 23:32:26 -04:00
exit 0
fi
if [[ "$game" == "Become a Patron" ]]; then
2020-12-11 21:46:50 -05:00
open_url "https://patreon.com/stormux"
2020-09-04 23:32:26 -04:00
exit 0
fi
local winePath="${game#*|}"
winePath="${winePath%\\*.exe}"
local wineExec="${game#*|}"
wineExec="${wineExec%|*}"
wineExec="${wineExec##*\\}"
# kill any previous existing wineservers for this prefix in case they didn't shut down properly.
WINEPREFIX="${HOME}/.local/wine/${game%|*}" wineserver -k
# remove the game
rm -rf "${HOME}/.local/wine/${game%|*}"
# remove the launcher
gawk -i inplace -vLine="${game//\\/\\\\}" '!index($0,Line)' "$configFile"
2020-09-05 15:02:33 -04:00
echo "The selected game has been deleted."
2020-09-04 23:32:26 -04:00
fi
exit 0
}
# kill games that are stuck
kill_game() {
mapfile -t lines < <(sed '/^$/d' "${configFile}" 2> /dev/null)
if [[ ${#lines} -eq 0 ]]; then
echo "No games found."
exit 0
fi
# Create the menu of installed games
declare -a menuList
for i in "${lines[@]}" ; do
menuList+=("${i%|*}" "${i##*|}")
done
2021-02-19 12:58:11 -05:00
menuList+=("Donate" "Donate")
menuList+=("Become a Patron" "Become a Patron")
local game="$(dialog --backtitle "Audio Game Killer" \
--clear \
--no-tags \
--menu "Please select a game to force stop" 0 0 0 "${menuList[@]}" --stdout)"
if [[ ${#game} -gt 0 ]]; then
2021-02-19 12:58:11 -05:00
if [[ "$game" == "Donate" ]]; then
open_url "https://ko-fi.com/stormux"
exit 0
fi
if [[ "$game" == "Become a Patron" ]]; then
open_url "https://patreon.com/stormux"
exit 0
fi
local winePath="${game#*|}"
winePath="${winePath%\\*.exe}"
local wineExec="${game#*|}"
wineExec="${wineExec%|*}"
wineExec="${wineExec##*\\}"
# kill the wine server.
WINEPREFIX="${HOME}/.local/wine/${game%|*}" wineserver -k
echo "The selected game has been stopped."
fi
exit 0
}
2020-08-27 15:42:24 -04:00
# launch games that are installed
game_launcher() {
mapfile -t lines < <(sed '/^$/d' "${configFile}" 2> /dev/null)
2020-08-27 15:42:24 -04:00
if [[ ${#lines} -eq 0 ]]; then
echo "Install some games first."
exit 0
fi
if [[ $# -eq 0 ]]; then
# Create the menu of installed games
declare -a menuList
for i in "${lines[@]}" ; do
menuList+=("${i%|*}" "${i##*|}")
done
2021-02-19 12:58:11 -05:00
menuList+=("Donate" "Donate")
menuList+=("Become a Patron" "Become a Patron")
local game="$(dialog --backtitle "Audio Game Launcher" \
--clear \
--no-tags \
--menu "Please select a game to play" 0 0 0 "${menuList[@]}" --stdout)"
else
local game="$(grep "^${1}|" "${configFile}" 2> /dev/null)"
game="${game%|*}"
if [[ -z "$game" ]]; then
echo "Game $1 not found."
exit 1
fi
fi
2020-08-27 15:42:24 -04:00
if [[ ${#game} -gt 0 ]]; then
2021-02-19 12:58:11 -05:00
if [[ "$game" == "Donate" ]]; then
open_url "https://ko-fi.com/stormux"
exit 0
fi
if [[ "$game" == "Become a Patron" ]]; then
2020-12-11 21:46:50 -05:00
open_url "https://patreon.com/stormux"
exit 0
fi
2020-11-16 16:57:16 -05:00
# for games that require custom scripts before launch
if [[ "$game" =~ sequence-storm ]]; then
[[ -x ~/.SequenceStormReader ]] && ~/.SequenceStormReader &
fi
2020-08-27 15:42:24 -04:00
local winePath="${game#*|}"
winePath="${winePath%\\*.exe}"
local wineExec="${game#*|}"
wineExec="${wineExec%|*}"
wineExec="${wineExec##*\\}"
# 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
export WINEPREFIX="${HOME}/.local/wine/${game%|*}"
if [[ -d "${WINEPREFIX}/drive_c/windows/syswow64" ]]; then
wine64 start /realtime /d "${winePath}" "$wineExec"
else
wine start /realtime /d "${winePath}" "$wineExec"
fi
2020-08-27 15:42:24 -04:00
fi
exit 0
}
# main script
#functions
add_launcher() {
local launchSettings="${game,,}"
launchSettings="${launchSettings//[[:space:]]/-}|${1}|${game}"
if ! grep -F -q -x "${launchSettings}" "${configFile}" 2> /dev/null ; then
echo "${launchSettings}" >> "${configFile}"
sort -o "${configFile}" "${configFile}"
# Remove .lnk files because they don't work.
find ~/Desktop -type f -iname '*.lnk' -exec bash -c '
for f ; do
mimeType="$(file -b "$f")"
mimeType="${mimeType%%,*}"
if [[ "$mimeType" == "MS Windows shortcut" ]]; then
rm -v "$f"
fi
done' _ {} +
if [[ "${noCache}" == "true" ]]; then
rm -f "${cache}/${1##*\\}"
fi
2020-08-27 15:42:24 -04:00
fi
}
2020-09-20 17:42:42 -04:00
# Check for updates
update
# 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
cache="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/cache"
configFile="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/games.conf"
mkdir -p "${cache}"
mkdir -p "${configFile%/*}"
2020-08-27 15:42:24 -04:00
# Turn off debug messages
export WINEDEBUG="-all"
# During installation, you can set winVer to the versions available.
# To set winetricks arguments, such as virtual desktop, set the winetricksSettings variable.
# Example: winetricksSettings="vd=1024x768"
# Files are cached unless -N no cache is set.
unset noCache
# Manual installation is not default, make sure it's unset
unset manualInstall
2020-08-27 15:42:24 -04:00
# The list of games available for installation.
# Use menu friendly names.
gameList=(
2020-11-07 13:02:20 -05:00
"A Hero's Call"
"Adrian's Doom"
"Adventurers At C"
"AudioDisc"
2021-01-18 15:13:46 -05:00
"Battle of the Hunter"
"Battle Zone"
2020-08-27 21:27:10 -04:00
"Bloodshed"
"Castaways"
"Castaways 2"
#"Chopper Challenge"
2020-11-16 14:40:34 -05:00
"Christmas WhoopAss"
"Crazy Party"
2020-12-13 12:21:33 -05:00
"Crazy Tennis"
2020-11-19 18:03:29 -05:00
"Death on the Road"
2021-01-15 18:05:06 -05:00
"Deathmatch"
2020-12-30 23:22:28 -05:00
"Duck Hunt"
"Easter Quest"
2020-12-06 12:33:42 -05:00
#"Entombed"
2021-01-10 12:46:26 -05:00
#"Eurofly"
2021-02-15 16:00:37 -05:00
"Extant"
2020-11-26 21:04:04 -05:00
"Fantasy Story II"
#"Fartman"
2020-10-08 10:42:47 -04:00
"Finger Panic"
2020-10-05 03:51:17 -04:00
"Fuck That Bird"
"GMA Tank Commander"
2020-11-20 12:39:12 -05:00
"Hunter"
"Judgement Day"
2020-08-27 15:42:24 -04:00
"Kitchensinc Games"
2020-11-16 14:40:34 -05:00
"Kringle Crash"
2021-01-10 12:46:26 -05:00
#"Light Battles"
2020-08-30 22:26:53 -04:00
"Light Cars"
2020-09-04 22:25:00 -04:00
"Lockpick"
"Lone Wolf"
2020-10-09 13:33:37 -04:00
"Manamon"
2020-10-09 20:53:45 -04:00
"Manamon 2"
2021-01-10 12:46:26 -05:00
#"MudSplat French"
"MudSplat English"
2021-01-10 12:46:26 -05:00
#"MudSplat Swedish"
2020-11-05 10:38:49 -05:00
"Oh Shit!"
2020-12-16 19:18:01 -05:00
"Pacman Talks"
"Palace Punch Up"
2020-10-18 09:20:22 -04:00
"Paladin of the Sky"
2021-01-15 18:38:45 -05:00
"Park Boss"
"Perilous Hearts"
2020-10-06 14:59:04 -04:00
"Pontes Kickups!"
2020-11-05 11:31:54 -05:00
"Q9"
2020-11-20 12:37:54 -05:00
"Rhythm Rage"
2020-12-16 14:45:14 -05:00
#"River raiders"
2020-11-05 19:47:01 -05:00
"RS Games"
2020-10-06 14:59:04 -04:00
"Run For Your Life"
2021-01-10 12:46:26 -05:00
#"Sammy Center"
2020-11-16 14:40:34 -05:00
"Sequence Storm"
"Shades of Doom"
2021-01-10 12:46:26 -05:00
#"Silver Dollar"
"Slender Lost Vision"
2021-02-17 10:50:11 -05:00
"Sonic Zoom"
2020-08-27 15:42:24 -04:00
"Super Egg Hunt"
2020-08-31 15:51:29 -04:00
"Super Liam"
2020-12-30 23:22:28 -05:00
#"Super Mario Bros"
"Survive the Wild"
2020-09-05 15:02:33 -04:00
"Swamp"
"Technoshock"
2020-08-27 15:42:24 -04:00
"The Blind Swordsman"
2020-12-17 09:35:54 -05:00
#"The Gate"
"The Great Toy Robbery"
#"Three D velocity"
2020-08-27 15:42:24 -04:00
"Top Speed 3"
"Triple Triad"
2021-01-15 18:05:06 -05:00
"Tube Sim"
2020-11-05 11:31:54 -05:00
"Undead Assault"
2021-01-04 08:36:24 -05:00
"VIP Mud"
2021-01-10 12:46:26 -05:00
#"World of War"
2020-08-27 15:42:24 -04:00
)
# With no arguments, open the game launcher.
if [[ $# -eq 0 ]]; then
game_launcher
fi
# Array of command line arguments
2020-09-05 00:26:29 -04:00
declare -A command=(
[c]="Check your system for necessary components."
2020-12-16 23:28:38 -05:00
[C]="Clear the cache. All game installers will be deleted."
2020-12-16 17:16:16 -05:00
[d]="Debug mode, wine will be much more verbose when games are launched with this flag."
2020-09-05 00:26:29 -04:00
[h]="This help screen."
[i]="Install games."
[I:]="Noninteractive game installation."
[k]="Kill a running game that is stuck."
2020-12-16 17:16:16 -05:00
[L]="Display license information."
[l:]="Launch given game without interactive audiogame-manager menu specified by its wine bottle."
[N]="No cache, delete the installer after it has been extracted."
2020-09-05 00:26:29 -04:00
[r]="Remove a game. This will delete all game data."
2020-08-27 15:42:24 -04:00
)
2020-09-05 00:26:29 -04:00
# Convert the keys of the associative array to a format usable by getopts
args="${!command[*]}"
args="${args//[[:space:]]/}"
while getopts "${args}" i ; do
2020-08-27 15:42:24 -04:00
case "$i" in
c) checklist;;
2020-12-16 23:28:38 -05:00
C) clear_cache;;
2020-12-12 16:14:48 -05:00
d)
unset WINEDEBUG
game_launcher
;;
2020-09-05 00:26:29 -04:00
h) help;;
i) game_installer;;
I)
game="${OPTARG}"
break;;
k) kill_game;;
2020-12-16 17:16:16 -05:00
L) license;;
l) game_launcher "${OPTARG}";;
N) noCache="true";;
2020-09-04 23:32:26 -04:00
r) game_removal;;
2020-08-27 15:42:24 -04:00
esac
done
# Install game based on the selection above.
case "${game}" in
2020-11-07 13:02:20 -05:00
"A Hero's Call")
export winVer="win7"
2020-11-20 01:05:04 -05:00
install_wine_bottle dotnet40 xna31 speechsdk corefonts
2020-11-07 13:02:20 -05:00
download "http://files.OutOfSightGames.com/files/a-heros-call.zip" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll"
unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/a-heros-call.zip"
find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \;
add_launcher "c:\Program Files\a-heros-call\A Hero's Call.exe"
;;
"Adrian's Doom")
install_wine_bottle speechsdk
download "https://agarchive.net/games/mt/adrian's%20doom.exe"
wine "${cache}/adrian's doom.exe" /silent
add_launcher "c:\Program Files\Two Caring Citizens\Adrian's Doom!\adrian.exe"
;;
2020-10-25 12:55:26 -04:00
"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"
;;
2021-01-18 15:13:46 -05:00
"Battle of the Hunter")
export winVer="win7"
install_wine_bottle speechsdk
download "https://tunmi13.dev/projects/bth.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files/$game" "${cache}/bth.zip"
find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \;
add_launcher "c:\Program Files\\${game}/bth.exe"
;;
"Battle Zone")
export winVer="win7"
install_wine_bottle speechsdk
download "https://www.agarchive.net/games/gameMadnessInteractive/battle%20zone%2013.5%20setup.exe"
wine "${cache}/battle zone 13.5 setup.exe" /silent
add_launcher "c:\Program Files\Battle Zone\ss.exe"
rm -fv "${WINEPREFIX}/drive_c/Program Files/Battle Zone/nvdaControllerClient32.dll"
;;
2020-08-27 21:27:10 -04:00
"Bloodshed")
2020-10-25 12:55:26 -04:00
export winVer="win7"
2020-08-27 21:27:10 -04:00
install_wine_bottle speechsdk
download "http://www.samtupy.com/games/bloodshed.exe"
cp "${cache}/bloodshed.exe" "$WINEPREFIX/drive_c/Program Files/"
add_launcher "c:\Program Files\bloodshed.exe"
2020-08-27 21:27:10 -04:00
;;
"Castaways")
export winVer="win7"
install_wine_bottle vb6run dx8vb speechsdk
download "https://www.kaldobsky.com/audiogames/castaways.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files/castaways" "${cache}/castaways.zip"
wine "c:\Program Files\castaways\Checkup.exe" /verysilent
add_launcher "c:\Program Files\castaways\Castaways.exe"
;;
"Castaways 2")
export winVer="win7"
install_wine_bottle vb6run dx8vb speechsdk
download "http://www.kaldobsky.com/audiogames/castaways2beta.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files/castaways" "${cache}/castaways2beta.zip"
wine "c:\Program Files\castaways\Checkup.exe" /verysilent
add_launcher "c:\Program Files\castaways\Castaways2.exe"
;;
"Chopper Challenge")
# Freezes at menu
2020-12-16 14:45:14 -05:00
install_wine_bottle vb6run dx8vb speechsdk
download "https://www.agarchive.net/games/XSight/chopper%20challenge%20setup.exe"
2020-12-16 14:45:14 -05:00
wine "${cache}/chopper challenge setup.exe" /silent &
xdotool sleep 5 key y 2> /dev/null
wineserver -w
echo "$USER|n/a" >> "$WINEPREFIX/drive_c/Program Files/x-sight interactive/chopper challenge/config.dat"
add_launcher "c:\Program Files\x-sight interactive\chopper challenge\Chopper.exe"
;;
2020-11-16 14:40:34 -05:00
"Christmas WhoopAss")
install_wine_bottle vb6run dx8vb
download "https://www.agarchive.net/games/draconis/christmas%20whoopass%20setup.exe"
wine "${cache}/christmas whoopass setup.exe" /sp- /silent
2020-11-16 14:40:34 -05:00
add_launcher "c:\Program Files\Draconis Entertainment\Christmas Whoop Ass\wa.exe"
;;
"Crazy Party")
export winVer="win7"
install_wine_bottle speechsdk
download "http://pragmapragma.free.fr/crazy-party/Crazy-Party-beta75.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/Crazy-Party-beta75.zip"
add_launcher "c:\Program Files\Crazy-Party-beta75\Crazy Party.exe"
rm -f "${WINEPREFIX}/drive_c/Program Files/Crazy-Party-beta75/nvdaControllerClient32.dll"
;;
2020-12-13 12:21:33 -05:00
"Crazy Tennis")
install_wine_bottle speechsdk
download "https://www.agarchive.net/games/VIP/crazy%20tennis%20setup.exe"
wine "${cache}/crazy tennis setup.exe" /sp- /silent
2020-12-13 12:21:33 -05:00
add_launcher "c:\Program Files\Crazytennis\crazytennis.exe"
;;
2020-11-19 18:03:29 -05:00
"Death on the Road")
export winVer="win7"
install_wine_bottle
download "http://oriolgomez.com/games/road_en.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files/death on the road" "${cache}/road_en.zip"
add_launcher "c:\Program Files\death on the road/game.exe"
;;
2021-01-15 18:05:06 -05:00
"Deathmatch")
export winVer="win7"
export winetricksSettings="vd=1024x768"
install_wine_bottle quartz speechsdk
download "https://www.agarchive.net/games/realitySoftware/death%20match%20project%20alpha%20setup.exe"
wine "${cache}/death match project alpha setup.exe" /silent
add_launcher "c:\Program Files\reality software\death match project alpha\dm1.exe"
;;
2020-12-30 23:22:28 -05:00
"Duck Hunt")
install_wine_bottle vb6run dx8vb speechsdk
download "http://files.l-works.net/dhsetup.exe"
wine "${cache}/dhsetup.exe" /silent
add_launcher "c:\Program Files\Lworks\Duck Hunt\duckhunt.exe"
;;
"Easter Quest")
install_wine_bottle
download "https://agarchive.net/games/mt/easter%20quest%20setup.exe"
wine "${cache}/easter quest setup.exe" /silent
add_launcher "c:\Program Files\MTGames\Easter Quest\easter.exe"
;;
2020-10-06 14:59:04 -04:00
"Entombed")
2020-10-18 20:33:10 -04:00
export winVer="win7"
#install_wine_bottle dotnet35 msvcrt40 speechsdk
install_wine_bottle speechsdk msvcrt40 dotnet48 xna40
download "http://blind-games.com/newentombed/EntombedSetup.exe"
2020-10-06 14:59:04 -04:00
wine "${cache}/EntombedSetup.exe" /silent
add_launcher "c:\Program Files\Entombed\Entombed.exe"
2020-10-06 14:59:04 -04:00
;;
"Eurofly")
export winVer="win7"
2021-01-03 21:15:13 -05:00
export winetricksSettings="vd=1024x768"
install_wine_bottle speechsdk
download "http://www.stefankiss.sk/programy/eurofly/Launcher_1.2.zip" "http://www.stefankiss.sk/programy/eurofly/Eurofly_2_ful_setup.exe"
wine "${cache}/Eurofly_2_ful_setup.exe" /silent
2021-01-03 21:15:13 -05:00
unzip -d "$WINEPREFIX/drive_c/Eurofly" "${cache}/Launcher_1.2.zip"
add_launcher "c:\Eurofly\launcher.exe"
;;
2021-02-15 16:00:37 -05:00
"Extant")
install_wine_bottle speechsdk
download "https://agarchive.net/games/other/extant.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files/extant" "${cache}/extant.zip"
add_launcher "c:\Program Files\extant\Extant.exe"
;;
2020-11-26 21:04:04 -05:00
"Fantasy Story II")
export winVer="win10"
install_wine_bottle speechsdk
download "https://stormgames.wolfe.casa/downloads/FS2_2.2_Windows_x86.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/FS2_2.2_Windows_x86.zip"
2020-11-26 21:10:00 -05:00
add_launcher "c:\Program Files\FS2_2.2_Windows_x86\FantasyStory2.exe"
2020-11-26 21:04:04 -05:00
;;
"Fartman")
install_wine_bottle dx8vb vb6run
download "http://www.agarchive.net/games/bpc/fartman.exe"
wine "${cache}/fartman.exe" /silent
#add_launcher "c:\Program Files\"
;;
2020-10-08 10:42:47 -04:00
"Finger Panic")
install_wine_bottle dx8vb vb6run
download "http://www.agarchive.net/games/bsc/FingerPanicSetup.exe"
wine "${cache}/FingerPanicSetup.exe" /sp- /silent
2020-10-08 10:42:47 -04:00
add_launcher "c:\Program Files\Finger Panic 1.0\FingerPanic.exe"
;;
2020-10-05 03:51:17 -04:00
"Fuck That Bird")
export winVer="win7"
install_wine_bottle
download "http://oriolgomez.com/games/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"
;;
"GMA Tank Commander")
install_wine_bottle vb6run dx8vb speechsdk
download "http://www.gmagames.com/gtc120.exe"
wine "${cache}/gtc120.exe" /silent &
xdotool sleep 10 key --clearmodifiers alt+y 2> /dev/null
xdotool sleep 15 type --clearmodifiers --delay 100 "${USER^}" 2> /dev/null
xdotool key --clearmodifiers Tab 2> /dev/null
xdotool sleep 10 type --clearmodifiers --delay 100 "${HOSTNAME^}" 2> /dev/null
xdotool key --clearmodifiers Tab 2> /dev/null
xdotool sleep 10 type --clearmodifiers --delay 100 "na@na.na" 2> /dev/null
xdotool key --clearmodifiers Tab 2> /dev/null
xdotool sleep 10 type --clearmodifiers --delay 100 "uuuuuuu" 2> /dev/null
xdotool key --clearmodifiers Tab 2> /dev/null
xdotool key --clearmodifiers Return 2> /dev/null
xdotool sleep 10 key --clearmodifiers Return 2> /dev/null
wineserver -w
echo "To accurately set your information, edit the file:"
echo "${WINEPREFIX}/drive_c/Program\ Files/GMA\ Tank\ Commander/config.dat"
echo "The default country is US. The fields are:"
echo -e "\"Firstname Lastname\"\n\"Email address\"\n\"Country code\""
add_launcher "c:\Program Files\GMA Tank Commander\gtc.exe"
;;
2020-11-20 12:39:12 -05:00
"Hunter")
install_wine_bottle vb6run dx8vb
# FIXME: Hacky, but it works. Install dotnet35 by itself so it actually doesn't hang.
winetricks -q dotnet35
wineserver -k # Damn you, dotnet.
download "http://www.agarchive.net/games/bsc/HunterSetup.exe" "https://www.agarchive.net/games/bsc/BSC%20unlock%20code%20generator.7z"
2020-11-20 19:04:27 -05:00
wine "${cache}/HunterSetup.exe" /silent &
2020-11-20 19:48:08 -05:00
xdotool sleep 10 key --clearmodifiers alt+y 2> /dev/null
2020-11-20 19:04:27 -05:00
wineserver -w
2020-11-20 12:39:12 -05:00
mkdir -p "$WINEPREFIX/drive_c/Program Files/bsc-key-generator"
7z e -o"$WINEPREFIX/drive_c/Program Files/bsc-key-generator" "${cache}/BSC unlock code generator.7z"
echo "$USER"$'\n'"$(hostname)"$'\n'"none"$'\n'"US" > "$WINEPREFIX/drive_c/Program Files/Hunter/config.dat"
test command -v unix2dos &> /dev/null && unix2dos "$WINEPREFIX/drive_c/Program Files/Hunter/config.dat" || echo "Warning! You do not have unix2dos or dos2unix installed, Hunter may not work!"
if command -v xclip &> /dev/null && command -v xdotool &> /dev/null ; then
wine "c:\Program Files\Hunter\HunterRegistration.exe" &
xdotool sleep 10 key Return sleep 2 key Return sleep 2 key Alt+n
sleep 1
regcode="$(xclip -selection clipboard -o)"
xdotool sleep 1 key Shift+Tab sleep 1 key Return
# FIXME: Kind of hacky, but let's make sure it actually exitted.
sleep 5
wineserver -k
wine "c:\Program Files\bsc-key-generator\BlindsoftwareUnlockCodeGenerator.exe" &
xdotool sleep 10 key Return sleep 2 type hu
xdotool sleep 1 key Tab sleep 1 type $regcode
xdotool sleep 1 key Tab sleep 1 key Return
sleep 2
regcode="$(xclip -selection clipboard -o)" # Might as well reuse the variable.
# FIXME: Kind of hacky, but let's make sure it actually exitted since I can't find a good way to exit this program.
sleep 5
wineserver -k
wine "c:\Program Files\Hunter\HunterRegistration.exe" &
echo "$regcode" | xclip -selection clipboard
xdotool sleep 10 key Return sleep 2 key Shift+Tab sleep 1 key Shift+Tab sleep 1 key Return
# FIXME: Kind of hacky, but let's make sure it actually exitted.
sleep 5
wineserver -k
else
echo "Warning: You need xclip and xdotool for this installer to finish the registration process, however, you don't have them. Either remove the program, install the stated tools, and reinstall it, or go on your own. Caveat Emptor, go to jail, do not pass go, do not collect audiogame rewards and all that stuff."
fi
add_launcher "c:\Program Files\Hunter\HunterRun.exe"
;;
2020-11-16 14:40:34 -05:00
"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"
;;
"Judgement Day")
install_wine_bottle vb6run dx8vb quartz
download "http://files.l-works.net/judgmentdayfullsetup.exe"
wine "${cache}/judgmentdayfullsetup.exe" /silent
cat << EOF > /tmp/judgementday.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\VB and VBA Program Settings\judgmentday\config]
"name"="$USER"
EOF
wine regedit /s /tmp/judgementday.reg
rm /tmp/judgementday.reg
add_launcher "c:\Program Files\Lworks\Judgment Day\judgmentday.exe"
;;
2020-08-27 15:42:24 -04:00
"Kitchensinc Games")
2020-09-04 18:45:45 -04:00
install_wine_bottle vb6run speechsdk dx8vb
download "https://stormgames.wolfe.casa/downloads/kitchen.tar.xz"
2020-09-04 18:45:45 -04:00
echo "Extracting files..."
tar xf "${cache}/kitchen.tar.xz" -C "$WINEPREFIX/drive_c/Program Files/"
2020-08-27 15:42:24 -04:00
add_launcher "c:\Program Files\Kitchen's Sink\gamemenu.exe"
;;
"Light Battles")
export winVer="win7"
install_wine_bottle speechsdk
download "https://prometheus-enterprises.com/games/CoL.exe"
7z e -o"$WINEPREFIX/drive_c/Program Files/Light Battles" "${cache}/CoL.exe"
rm -fv "${WINEPREFIX}/drive_c/Program Files/Light Battles/nvdaControllerClient.dll"
add_launcher "c:\Program Files\Light Battles\battles.exe"
;;
2020-08-30 22:26:53 -04:00
"Light Cars")
install_wine_bottle dx8vb vb6run
download "https://www.agarchive.net/games/lighttech/light%20cars%20setup.exe"
wine "${cache}/light cars setup.exe" &
2020-12-31 12:54:01 -05:00
xdotool sleep 10 key --clearmodifiers alt+n sleep 1 key --clearmodifiers alt+a key --clearmodifiers space sleep 1 key --clearmodifiers alt+n sleep 1 key --clearmodifiers alt+n sleep 1 key --clearmodifiers alt+i sleep 30 key --clearmodifiers Tab sleep 1 key --clearmodifiers Return 2> /dev/null
wineserver -w
echo -e "${USER} ${HOST}\nna@na.na\nUS" > ~/.local/wine/light-cars/drive_c/Program\ Files/Lighttech\ Interactive/Light\ Cars/config.dat
unix2dos ~/.local/wine/light-cars/drive_c/Program\ Files/Lighttech\ Interactive/Light\ Cars/config.dat
2020-08-30 22:26:53 -04:00
add_launcher "c:\Program Files\Lighttech Interactive\Light Cars\lightCars.exe"
;;
2020-09-04 22:25:00 -04:00
"Lockpick")
install_wine_bottle vb6run dx8vb
download "http://files.l-works.net/lockpicksetup.exe"
wine "${cache}/lockpicksetup.exe" /silent
2020-09-04 22:25:00 -04:00
add_launcher "c:\Program Files\lWorks\Lockpick\lockpick.exe"
;;
"Lone Wolf")
install_wine_bottle vb6run dx8vb speechsdk
download "http://www.gmagames.com/lw350.exe"
wine "${cache}/lw350.exe" /silent &
xdotool sleep 10 key --clearmodifiers alt+y 2> /dev/null
xdotool sleep 10 type --clearmodifiers --delay 100 "$USER" 2> /dev/null
xdotool key --clearmodifiers Tab 2> /dev/null
xdotool type --clearmodifiers --delay 100 "$HOSTNAME" 2> /dev/null
xdotool key --clearmodifiers Tab 2> /dev/null
xdotool type --clearmodifiers --delay 100 "na@na.na" 2> /dev/null
xdotool key --clearmodifiers Tab 2> /dev/null
xdotool type --clearmodifiers --delay 100 "uuuuuu" 2> /dev/null
xdotool key --clearmodifiers Tab 2> /dev/null
xdotool key --clearmodifiers Return 2> /dev/null
wineserver -w
add_launcher "c:\Program Files\Lone Wolf\lw.exe"
;;
2020-10-09 13:33:37 -04:00
"Manamon")
export winVer="win7"
install_wine_bottle speechsdk
download "https://www.vgstorm.com/manamon/manamon_installer.exe"
wine "${cache}/manamon_installer.exe" /silent
add_launcher "c:\Program Files\VGStorm.com\Manamon\rpg.exe"
;;
2020-10-09 20:53:45 -04:00
"Manamon 2")
export winVer="win7"
install_wine_bottle speechsdk
download "http://www.vgstorm.com/manamon2/manamon2_installer.exe"
wine "${cache}/manamon2_installer.exe" /silent
add_launcher "c:\Program Files\VGStorm.com\Manamon 2\rpg.exe"
;;
"MudSplat English")
a="a"
f="f"
i="i"
n="n"
;&
"MudSplat French")
# Variables may be already set for English installation, so make sure not to overwrite them.
a="${a:-a}"
f="${f:-t}"
i="${i:-i}"
n="${n:-s}"
;&
"MudSplat Swedish")
# Variables may be already set for French installation, so make sure not to overwrite them.
a="${a:-a}"
f="${f:-f}"
i="${i:-i}"
n="${n:-n}"
install_wine_bottle
download "https://www.agarchive.net/games/other/Mudsplat-install.exe"
wine "${cache}/Mudsplat-install.exe" &
# Select the language.
xdotool sleep 10 type --clearmodifiers ${game:9:1} 2> /dev/null
xdotool sleep 1 key --clearmodifiers Return sleep 1 key alt+${n} sleep 1 key alt+${a} sleep 1 key alt+${n} sleep 1 key space sleep 1 key alt+${n} sleep 1 key alt+${n} sleep 1 key alt+${i} sleep 10 key space sleep 1 key alt+${f} 2> /dev/null
wineserver -w
mudsplatLauncher="$(find "$WINEPREFIX/drive_c/Program Files/TiM/MudSplat" -name 'mudsplat-*.exe')"
mudsplatLauncher="${mudsplatLauncher##*/}"
add_launcher "c:\Program Files\TiM\MudSplat\\${mudsplatLauncher}"
;;
2020-11-05 10:38:49 -05:00
"Oh Shit!")
export winVer="win7"
install_wine_bottle speechsdk
download "http://samtupy.com/stevend/oh_shit.zip" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll"
unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/oh_shit.zip"
find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \;
2020-11-05 10:38:49 -05:00
add_launcher "c:\Program Files\oh_shit\OhShit.exe"
;;
2020-12-16 19:18:01 -05:00
"Pacman Talks")
install_wine_bottle
2020-12-16 19:18:01 -05:00
download "http://www.gmagames.com/pmt101.exe"
wine "${cache}/pmt101.exe" /sp- /silent &
2020-12-16 19:18:01 -05:00
add_launcher "c:\Program Files\Pacman Talks\pmt.exe"
;;
"Palace Punch Up")
install_wine_bottle speechsdk
download "https://www.agarchive.net/games/blastbay/palace%20punch-up%20setup.exe"
wine "${cache}/palace punch-up setup.exe" /silent
add_launcher "c:\Program Files\Palace Punch-up\palace.exe"
;;
2020-10-18 09:20:22 -04:00
"Paladin of the Sky")
export winVer="win7"
install_wine_bottle speechsdk
download "http://www.vgstorm.com/cod/pots/paladin_installer.exe"
wine "${cache}/paladin_installer.exe" /silent
add_launcher "c:\Program Files\VGStorm.com\Paladin of the Sky\game.exe"
;;
2021-01-15 18:38:45 -05:00
"Park Boss")
export winVer="win7"
install_wine_bottle speechsdk
download "http://www.ndadamson.com/downloads/Park%20Boss%201.01%20setup.exe"
wine "${cache}/Park Boss 1.01 setup.exe" /silent &
xdotool sleep 10 key --clearmodifiers Return sleep 1 key alt+n sleep 1 key alt+a sleep 1 key alt+i sleep 10 key alt+f 2> /dev/null
wineserver -w
add_launcher "c:\Program Files\NASoft\ParkBoss\pbMain.exe"
;;
"Perilous Hearts")
install_wine_bottle speechsdk
download "https://www.agarchive.net/games/blastbay/perilous%20hearts%20concept%20demo.exe"
wine "${cache}/perilous hearts concept demo.exe" /silent
add_launcher "c:\Program Files\Perilous Hearts Concept Demo\perilous_hearts.exe"
;;
2020-10-26 19:04:21 -04:00
"Q9")
install_wine_bottle
download "http://www.blastbay.com/q9_english_installer.exe"
wine "${cache}/q9_english_installer.exe" /silent
add_launcher "c:\Program Files\Q9 Action Game\q9.exe"
;;
2020-11-20 12:37:54 -05:00
"Rhythm Rage")
export winVer="win7"
install_wine_bottle speechsdk
download "http://oriolgomez.com/games/rr_en.zip" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll"
unzip -d "$WINEPREFIX/drive_c/Program Files/rhythm rage" "${cache}/rr_en.zip"
find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \;
add_launcher "c:\Program Files\rhythm rage/game.exe"
;;
2020-12-16 14:45:14 -05:00
"River Raiders")
# Choppy sound under water.
install_wine_bottle
download "https://www.agarchive.net/games/XSight/River%20Raiders%201.3.5.exe"
wine "$cache/River Raiders 1.3.5.exe" /silent &
xdotool sleep 5 type y 2> /dev/null
xdotool sleep 1 key --clearmodifiers alt+n sleep 2 key alt+n sleep 2 key alt+n sleep 2 key alt+i sleep 5 key alt+f 2> /dev/null
add_launcher "c:\Program Files\River Raiders\raid.exe"
;;
2020-11-05 19:47:01 -05:00
"RS Games")
export winVer="win7"
install_wine_bottle speechsdk
2020-11-25 12:19:02 -05:00
download "http://rsgames.org/rsdownloads/rsgclient/rsgames-client-setup-2.01.exe" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll"
2020-11-05 19:47:01 -05:00
wine "${cache}/rsgames-client-setup-2.01.exe" /silent
find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \;
2020-11-05 19:47:01 -05:00
add_launcher "c:\Program Files\RS Games Client\rsg.exe"
;;
2020-10-06 14:59:04 -04:00
"Run For Your Life")
export winVer="win7"
install_wine_bottle
download "http://oriolgomez.com/games/rfyl_en.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files/run for your life" "${cache}/rfyl_en.zip"
2020-10-25 12:55:26 -04:00
add_launcher "c:\Program Files\run for your life\game.exe"
2020-10-06 14:59:04 -04:00
;;
2021-01-10 12:46:26 -05:00
"Sammy Center")
export winVer="win7"
install_wine_bottle speechsdk
download "http://www.samtupy.com/games/SCSetup.exe" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll"
wine "${cache}/SCSetup.exe" /silent
find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \;
add_launcher "c:\Program Files\Sam Tupy\SammyCenter\SammyCenter.exe"
;;
2020-11-16 14:40:34 -05:00
"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"
2020-11-16 16:57:16 -05:00
write_sequence_storm_reader
2020-11-16 14:40:34 -05:00
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")
2020-11-10 18:01:51 -05:00
export winVer="win7"
2020-11-20 01:05:04 -05:00
install_wine_bottle vb6run dx8vb speechsdk
download "http://www.gmagames.com/sod20022.exe"
wine "${cache}/sod20022.exe" /silent
add_launcher "c:\Program Files\Shades of Doom 2.0\sod.exe"
;;
2020-12-29 06:04:19 -05:00
"Silver Dollar")
export winVer="win7"
install_wine_bottle speechsdk
download "http://download.dracoent.com/Windows/SilverDollarSetup.exe"
wine "${cache}/SilverDollarSetup.exe" /silent
add_launcher "c:\Program Files\Draconis Entertainment\Silver Dollar\SilverDollarGui.exe"
;;
"Slender Lost Vision")
export winVer="win7"
install_wine_bottle
download "https://www.iamtalon.me/games/slender.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/slender.zip"
add_launcher "c:\Program Files\slender\slender.exe"
2021-02-17 10:50:11 -05:00
;;
"Sonic Zoom")
export winVer="win7"
install_wine_bottle speechsdk
download "http://wwwx.cs.unc.edu/Research/assist/et/projects/SonicZoom/soniczoom11.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/soniczoom11.zip"
add_launcher "c:\Program Files\Sonic Zoom\SonicZoom.exe"
;;
2020-08-27 15:42:24 -04:00
"Super Egg Hunt")
install_wine_bottle
download "http://files.l-works.net/superegghuntsetup.exe"
wine "${cache}/superegghuntsetup.exe" /silent
2020-08-27 15:42:24 -04:00
add_launcher "c:\Program Files\Lworks\super egg hunt\superegghunt.exe"
;;
2020-08-31 15:51:29 -04:00
"Super Liam")
install_wine_bottle vb6run dx8vb
download "http://files.l-works.net/superliamsetup.exe"
wine "${cache}/superliamsetup.exe" /silent
2020-08-31 15:51:29 -04:00
add_launcher "c:\Program Files\lWorks\Super Liam\sl.exe"
;;
2020-12-25 16:16:55 -05:00
"Super Mario Bros")
export winVer="win7"
install_wine_bottle speechsdk
download "https://www.agarchive.net/games/jeqoconGames/super%20mario%20bros.7z"
7z e -o"$WINEPREFIX/drive_c/Program Files/Super Mario Bros" "${cache}/super mario bros.7z"
add_launcher "c:\Program Files\Super Mario Bros\Mario.exe"
;;
"Survive the Wild")
export winVer="win7"
install_wine_bottle speechsdk
download "http://www.samtupy.com/games/stw.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files/Survive the Wild" "${cache}/stw.zip"
rm -fv "${HOME}/.local/wine/survive-the-wild/drive_c/Program Files/Survive the Wild/nvdaControllerClient32.dll"
add_launcher "c:\Program Files\Survive the Wild\stw.exe"
;;
2020-09-05 15:02:33 -04:00
"Swamp")
2020-11-05 10:38:49 -05:00
export winVer="win7"
2021-01-03 21:15:13 -05:00
export winetricksSettings="vd=1024x768"
2020-09-05 15:02:33 -04:00
install_wine_bottle vb6run dx8vb quartz speechsdk corefonts
download "https://kaldobsky.com/audiogames/SwampPart1.zip" "https://kaldobsky.com/audiogames/SwampPart2.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/SwampPart1.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/SwampPart2.zip"
2020-09-05 15:02:33 -04:00
# make sure the latest version is installed.
if wget -O "${cache}/SwampPatch.zip" "https://www.kaldobsky.com/audiogames/SwampPatch.zip" ; then
unzip -o -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/SwampPatch.zip"
fi
2020-09-05 15:02:33 -04:00
wine cmd.exe /c 'cd /d c:\Program Files\swamp && Windows32bit.bat'
add_launcher "c:\Program Files\swamp\Swamp.exe"
;;
"Technoshock")
install_wine_bottle
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" "${cache}/technoshock_140b_en.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/technoshock_140b_en_update.zip"
wine "$WINEPREFIX/drive_c/Program Files/setup_eng.exe" /silent
wineserver -w
wine "$WINEPREFIX/drive_c/Program Files/setup_eng_update_pack.exe" /silent
add_launcher "c:\Program Files\Tiflocomp Games\Technoshock\ts.exe"
;;
2020-08-27 15:42:24 -04:00
"The Blind Swordsman")
install_wine_bottle
download "https://www.agarchive.net/games/other/the%20blind%20swordsmanPC.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/the blind swordsmanPC.zip"
2020-08-27 15:42:24 -04:00
add_launcher "c:\Program Files\TheBlindSwordsman.exe"
;;
"The Gate")
export winVer="win7"
install_wine_bottle
download "http://www.vgstorm.com/the_gate_installer.exe"
wine "${cache}/the_gate_installer.exe" /silent
add_launcher "c:\Program Files\VGStorm.com\The Gate\gate.exe"
;;
"The Great Toy Robbery")
export winVer="win7"
2020-11-11 12:44:27 -05:00
install_wine_bottle speechsdk
download "http://files.l-works.net/tgtrsetup_2.04.exe" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll"
wine "${cache}/tgtrsetup_2.04.exe" /silent
find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \;
add_launcher "c:\Program Files\Lworks\The Great Toy Robbery\tgtr.exe"
;;
"Three D velocity")
export winVer="win10"
install_wine_bottle speechsdk
download "https://github.com/munawarb/Three-D-Velocity-Binaries/archive/master.zip" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll"
unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/master.zip"
find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \;
add_launcher "c:\Program Files\Three-D-Velocity-Binaries-master\tdv.exe"
2020-08-31 15:51:29 -04:00
;;
2020-08-27 15:42:24 -04:00
"Top Speed 3")
install_wine_bottle directplay
download "https://github.com/PlayingintheDark/TopSpeed/releases/download/h/Tspeed_3.0.3.exe"
wine "${cache}/Tspeed_3.0.3.exe" /silent
2020-08-27 15:42:24 -04:00
add_launcher "c:\Program Files\Playing in the dark\Top Speed 3\TopSpeed.exe"
;;
"Triple Triad")
export winVer="win7"
2020-12-17 01:06:57 -05:00
install_wine_bottle vb6run dx8vb speechsdk
download "https://www.kaldobsky.com/audiogames/tripletriad.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files/Triple Triad" "${cache}/tripletriad.zip"
wine "c:\Program Files\Triple Triad\Checkup.exe" /verysilent
add_launcher "c:\Program Files\Triple Triad\TripleTriad.exe"
;;
2021-01-15 18:05:06 -05:00
"Tube Sim")
export winVer="win7"
2021-01-15 18:38:45 -05:00
install_wine_bottle speechsdk
2021-01-15 18:05:06 -05:00
download "http://www.ndadamson.com/downloads/TubeSim1_1_Install.exe"
wine "${cache}/TubeSim1_1_Install.exe" /silent &
xdotool sleep 10 key --clearmodifiers Return sleep 1 key alt+n sleep 1 key alt+a sleep 1 key alt+i sleep 10 key alt+f 2> /dev/null
wineserver -w
add_launcher "c:\Program Files\NASoft\TubeSim\tsMain.exe"
;;
2020-11-05 11:31:54 -05:00
"Undead Assault")
export winVer="win7"
install_wine_bottle speechsdk
download "http://undead-assault.com/static/files/public/undead_assault.zip" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll"
unzip -d "$WINEPREFIX/drive_c/Program Files/undead_assault" "${cache}/undead_assault.zip"
find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \;
2020-11-05 11:31:54 -05:00
add_launcher "c:\Program Files\undead_assault\Undead Assault.exe"
;;
2021-01-04 08:36:24 -05:00
"VIP Mud")
export winVer="win7"
install_wine_bottle vb6run dx8vb speechsdk
download "http://gmagames.com/vipmud20016.exe"
wine "${cache}/vipmud20016.exe" /silent
mkdir -p "${HOME}/.local/wine/vip-mud/drive_c/users/${USER}/Documents/VIP Mud"
add_launcher "c:\Program Files\VIPMud 2.0\vipmud2.exe"
echo
echo "When you first launch VIP Mud You will be presented with several inaccessible dialogs."
echo "To bypass these dialogs, press alt+o, then press enter until speech starts."
echo "To be sure that each new dialog has had time to complete, wait a second between each press of enter."
2021-01-04 12:31:18 -05:00
echo "In each subsequent launch, you will need to hit enter a couple times before it starts speaking."
2021-01-04 08:36:24 -05:00
;;
2020-12-25 16:16:55 -05:00
"World of War")
export winVer="win7"
install_wine_bottle speechsdk
download "https://www.agarchive.net/games/nyanchan/world%20of%20war%20English.7z"
7z e -o"$WINEPREFIX/drive_c/Program Files/World of War" "${cache}/world of war English.7z"
#add_launcher "c:\Program Files\"
;;
2021-02-19 12:58:11 -05:00
"Donate")
open_url "https://ko-fi.com/stormux"
;;
2020-09-01 18:29:07 -04:00
"Become a Patron")
2020-12-11 21:46:50 -05:00
open_url "https://patreon.com/stormux"
;;
2020-08-27 15:42:24 -04:00
*)
[[ -n "${game}" ]] && echo "Game \"${game}\" not found."
exit 1
2020-08-27 15:42:24 -04:00
;;
esac
exit 0