Merge branch 'testing' in preparation for binary release.

This commit is contained in:
Storm Dragon 2021-06-02 21:27:26 -04:00
commit 7b57f8c8d2
4 changed files with 267 additions and 10 deletions

View File

@ -310,6 +310,12 @@ echo "Loading documentation, please wait..."
local gamePath="$(winepath -u "$2" 2> /dev/null)"
gamePath="${gamePath%/*}"
local gameDoc="$(find "$gamePath" -type f -iname 'user_manual.html' -or -iname 'user_manual.htm' | head -1)"
# Game name specific docs, add the name to the for loop.
if [[ -z "$gameDoc" ]]; then
for i in "troopanum.txt" ; do
gameDoc="$(find "$gamePath" -type f -iname "$i" -or -iname 'manual.htm' | head -1)"
done
fi
if [[ -z "$gameDoc" ]]; then
gameDoc="$(find "$gamePath" -type f -iname 'manual.html' -or -iname 'manual.htm' | head -1)"
fi
@ -622,10 +628,12 @@ gameList=(
"Beatstar Pro"
"Bloodshed"
"Bombercats"
"Breed Memorial"
"Castaways"
"Castaways 2"
#"Chopper Challenge"
"Christmas WhoopAss"
"Constant Battle"
"Copter Mission"
"Crazy Party"
"Crazy Tennis"
@ -642,7 +650,7 @@ gameList=(
"Finger Panic"
"Fuck That Bird"
"GMA Tank Commander"
#"Golden Crayon"
"Golden Crayon"
"Hammer of Glory"
"Hunter"
"Insect Therapy"
@ -672,6 +680,7 @@ gameList=(
"RS Games"
"Run For Your Life"
#"Sammy Center"
"Scrolling Battles"
"Sequence Storm"
#"Shades of Doom 1.2"
"Shades of Doom"
@ -692,6 +701,7 @@ gameList=(
"Top Speed 2"
"Top Speed 3"
"Triple Triad"
"Troopanum2"
"Tube Sim"
"Undead Assault"
"Villains From Beyond"
@ -822,6 +832,14 @@ case "${game}" in
find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \;
add_launcher "c:\Program Files\bomvercats\game.exe"
;;
"Breed Memorial")
export winVer="win7"
install_wine_bottle corefonts speechsdk
download "https://hirotaka2014.sakura.ne.jp/mh0406/game/breed_memorial.zip" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll"
unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/breed_memorial.zip"
#find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \;
add_launcher "c:\Program Files\Breed memorial\Breed memorial\breed memorial.exe"
;;
"Castaways")
export winVer="win7"
install_wine_bottle vb6run dx8vb speechsdk
@ -848,6 +866,13 @@ case "${game}" in
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"
;;
"Constant Battle")
export winVer="win7"
install_wine_bottle speechsdk
download "https://renovagames.com/bc/BC-Setup.exe"
wine "${cache}/BC-Setup.exe" /silent
#add_launcher "c:\Program Files\"
;;
"Christmas WhoopAss")
install_wine_bottle vb6run dx8vb
download "https://www.agarchive.net/games/draconis/christmas%20whoopass%20setup.exe"
@ -1005,11 +1030,11 @@ case "${game}" in
download "http://www.agarchive.net/games/bsc/HunterSetup.exe" "https://www.agarchive.net/games/bsc/BSC%20unlock%20code%20generator.7z"
wine "${cache}/HunterSetup.exe" /silent &
xdotool sleep 10 key --clearmodifiers alt+y 2> /dev/null
wineserver -w
sleep 30 && wineserver -k # Sometimes the installer finishes but the wineserver has more processes that don't exit, so we can't depend on wineserver -w.
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!"
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
@ -1020,7 +1045,7 @@ case "${game}" in
sleep 5
wineserver -k
wine "c:\Program Files\bsc-key-generator\BlindsoftwareUnlockCodeGenerator.exe" &
xdotool sleep 10 key Return sleep 2 type hu
xdotool sleep 10 key Return sleep 2 type h
xdotool sleep 1 key Tab sleep 1 type $regcode
xdotool sleep 1 key Tab sleep 1 key Return
sleep 2
@ -1254,6 +1279,14 @@ EOF
find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \;
add_launcher "c:\Program Files\Sam Tupy\SammyCenter\SammyCenter.exe"
;;
"Scrolling Battles")
export winVer="win7"
install_wine_bottle speechsdk
download "http://games.ims-productions.com/SBYW/SBYW.zip" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll"
unzip -d "$WINEPREFIX/drive_c/Program Files/scrolling battles" "${cache}/SBYW.zip"
find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \;
add_launcher "c:\Program Files\scrolling battles\SBYW.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
@ -1412,6 +1445,49 @@ EOF
wine "c:\Program Files\Triple Triad\Checkup.exe" /verysilent
add_launcher "c:\Program Files\Triple Triad\TripleTriad.exe"
;;
"Troopanum2")
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 "https://www.agarchive.net/games/bsc/Troopanum2Setup.exe" "https://www.agarchive.net/games/bsc/BSC%20unlock%20code%20generator.7z"
wine "${cache}/Troopanum2Setup.exe" /silent &
xdotool sleep 10 key --clearmodifiers alt+y 2> /dev/null
sleep 30 && wineserver -k # Sometimes the installer finishes but the wineserver has more processes that don't exit, so we can't depend on wineserver -w.
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/Troopanum 2.0/config.dat"
command -v unix2dos &> /dev/null && unix2dos "$WINEPREFIX/drive_c/Program Files/Troopanum 2.0/config.dat" || echo "Warning! You do not have unix2dos or dos2unix installed, Troopanum 2.0 may not work!"
if command -v xclip &> /dev/null && command -v xdotool &> /dev/null ; then
wine "c:\Program Files\Troopanum 2.0\register.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 t
xdotool sleep 1 type t
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\Troopanum 2.0\register.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\Troopanum 2.0\troop.exe"
;;
"Tube Sim")
export winVer="win7"
install_wine_bottle speechsdk

View File

@ -0,0 +1,50 @@
#!/usr/bin/env bash
#
# âe contents of this file are subject to the Common Public Attribution
# License Version 1.0 (the âcenseâ 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 â ISâasis,
# 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.
pushd ~/.local/wine/golden-crayon/drive_c/Program\ Files/golden_crayon/
unzip golden_crayon.zip
rm -r libs/
mv golden_crayon/* .
find ~/.local/wine/golden-crayon/ -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \;
rmdir golden_crayon/
popd
exit 0

122
speech/install_cepstral.sh Executable file
View File

@ -0,0 +1,122 @@
#!/usr/bin/env bash
# This script installs Cepstral voices for use with the audiogame-manager
# To purchase a license for a voice you like, visit https://cepstral.com
# This script is released under the terms of the WTFPL: http://wtfpl.net
# Installer files are saved to ~/Downloads
# Dialog accessibility
export DIALOGOPTS='--no-lines --visit-items'
# Turn off debug messages
export WINEDEBUG="-all"
# Make sure display is set in case installed from console.
export DISPLAY="${DISPLAY:-:0}"
# Version number, to easily keep script up-to-date.
version="6.2.3.801"
# Msi or exe? Some are different.
msiexe="exe"
# Beginning part of url, for making things easier.
prefix="https://www.cepstral.com/downloads/installers/windows/"
register() {
local v="$1"
company="$(dialog --clear --inputbox "Company name (leave empty if none)" -1 -1 --stdout)" || exit $?
customer="$(dialog --clear --inputbox "Customer name" -1 -1 --stdout)" || exit $?
key="$(dialog --clear --inputbox "License key" -1 -1 --stdout)" || exit $?
eval "wine \"c:\\Program Files\\Cepstral\\bin\\swift.exe\" --reg-voice --voice-name \"$v\" --customer-name \"$customer\" --company-name \"$company\" --license-key \"$key\""
exit 0
}
action="install"
declare -a voices=(
"Allison"
"Allison"
"Amy"
"Amy"
"Belle"
"Belle"
"Callie"
"Callie"
"Charlie"
"Charlie"
"Dallas"
"Dallas"
"Damien"
"Damien"
"David"
"David"
"Diane"
"Diane"
"Duchess"
"Duchess"
"Duncan"
"Duncan"
"Emily"
"Emily"
"Linda"
"Linda"
"Robin"
"Robin"
"Shouty"
"Shouty"
"Walter"
"Walter"
"Whispery"
"Whispery"
"William"
"William"
)
# Get the desired wine bottle
declare -a bottle
for i in $(find ~/.local/wine/ -maxdepth 1 -type d -not -name 'wine' | sort) ; do
bottle+=("$i" "${i##*/}")
done
export WINEPREFIX="$(dialog --backtitle "Use the up and down arrow keys to find the option you want, then press enter to select it." \
--clear \
--no-tags \
--menu "Select A Wine Bottle" 0 0 0 "${bottle[@]}" --stdout)"
if [[ -z "${WINEPREFIX}" ]]; then
exit 0
fi
if [[ "$1" == "-r" || "$1" == "--register" ]]; then
action="register"
fi
voice="$(dialog --backtitle "Use the up and down arrow keys to find the option you want, then press enter to select it." \
--clear \
--no-tags \
--menu "Select A voice to $action" 0 0 0 "${voices[@]}" --stdout)"
if [[ "$action" == "register" ]]; then
register $voice
fi
# make sure the ~/Downloads directory exists.
mkdir -p ~/Downloads
if ! [[ -e ~/Downloads/Cepstral_${voice}_windows_${version}.${msiexe} ]]; then
wget -P ~/Downloads/ "${prefix}Cepstral_${voice}_windows_${version}.${msiexe}" | dialog --progressbox "Downloading voice..." -1 -1
fi
# Get the install command.
cmd="wine"
[ "$msiexe" = "msi" ] && cmd="${cmd} msiexec /i"
cmd="${cmd} ~/Downloads/Cepstral_${voice}_windows_${version}.${msiexe}"
[ "$msiexe" = "msi" ] && cmd="${cmd} /q"
# Install the voice
(eval "$cmd" &
[ "$msiexe" = "exe" ] && xdotool sleep 20 key --delay 75 alt+n key --delay 75 alt+a key --delay 75 alt+n key --delay 75 alt+o key --delay 75 alt+i sleep 20 key --delay 75 alt+f
wineserver -w) | dialog --progressbox "installing voice..." -1 -1
# Make voices louder.
find "${WINEPREFIX}/drive_c/Program Files/Cepstral/voices" -type d -not -name voices -exec bash -c 'for d ; do echo "GAIN 2.5" > "$d/default.sfx";done' _ {} \;
exit 0

View File

@ -48,11 +48,17 @@
# Settings to improve accessibility of dialog.
export DIALOGOPTS='--insecure --no-lines --visit-items'
# Turn off debug messages
export WINEDEBUG="-all"
# Set DISPLAY, as needed
if [ -z "$DISPLAY" ] ; then
export DISPLAY=:0
fi
# Get the desired wine bottle
declare -a bottle
for i in $(find ~/.local/wine -maxdepth 1 -type d -not -name 'wine' | sort) ; do
for i in $(find ~/.local/wine/ -maxdepth 1 -type d -not -name 'wine' | sort) ; do
bottle+=("$i" "${i##*/}")
done
export WINEPREFIX="$(dialog --backtitle "Use the up and down arrow keys to find the option you want, then press enter to select it." \
@ -64,8 +70,6 @@ if [[ -z "${WINEPREFIX}" ]]; then
exit 0
fi
echo "wineprefix = $WINEPREFIX"
msgbox() {
# Returns: None
# Shows the provided message on the screen with an ok button.
@ -171,6 +175,14 @@ EOF
doRestore=1
trap restore_voice SIGINT
# In case the user hasn't run a game using sapi in this prefix yet, let's try to initialize all the registry keys properly.
cat << "EOF" > /tmp/speak.vbs
dim speechobject
set speechobject=createobject("sapi.spvoice")
speechobject.speak ""
EOF
wine cscript "z:\tmp\speak.vbs"
# Create an array of available voices.
ifs="$IFS"
IFS=$'\n'
@ -189,9 +201,6 @@ if [[ "$(uname)" == "Darwin" ]]; then
else
oldVoice="$(grep -P '"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Tokens\\\\[^"]+"' "${WINEPREFIX}/user.reg" | sed -E -e 's/"DefaultTokenId"="([^"]+)"/\1/g')"
fi
echo "oldVoice: ${oldVoice}"
echo "voiceList: ${voiceList[@]}"
echo "voiceListFullName: ${voiceListFullName[@]}"
#exit 1
exit=1
while [[ $exit -ne 0 ]] ; do