From 422ca3036712536f9822fbd3571a44bcff07ced7 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 20 Aug 2022 23:51:12 -0400 Subject: [PATCH 01/21] First pass at adding nvda2speech for 64 bit games. Probably bugs, so watch out. --- audiogame-manager.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index cae1290..0a198a1 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -563,8 +563,12 @@ install_wine_bottle() { wine msiexec /i z:"$monoPath" /quiet wine msiexec /i z:"$geckoPath" /quiet if [[ "${*}" =~ speechsdk ]] || [[ "${WINEARCH}" == "win64" ]]; then + download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd" install_rhvoice fi + if [[ "${WINEARCH}" == "win64" ]] && [[ ! -f "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd" ]]; then + cp "${cache}/nvda2speechd" "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd" + fi winetricks -q $@ ${winVer:-winxp} ${winetricksSettings}; } | dialog --progressbox "Installing wine bottle, please wait..." -1 -1 } @@ -783,6 +787,7 @@ game_launcher() { exit 0 fi if [[ -d "${WINEPREFIX}/drive_c/windows/syswow64" ]]; then + pgrep -u "$USER" nvda2speechd &> /dev/null || ${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd & wine64 start /realtime /d "${winePath}" "$wineExec" else wine start /d "${winePath}" "$wineExec" /realtime @@ -1629,6 +1634,7 @@ case "${game}" in ;; "Code Dungeon") get_installer "codedungeon-win-64.zip" "https://stealcase.itch.io/codedungeon" + download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" export WINEARCH=win64 export winVer="win8" install_wine_bottle @@ -1636,6 +1642,7 @@ case "${game}" in # Weird work around to get keyboard working. winetricks -q usetakefocus=y winetricks -q usetakefocus=n + find "${WINEPREFIX}" -type f -name 'nvdaControllerClient.dll' -exec cp -v "${cache}/nvdaControllerClient64.dll" "{}" \; add_launcher "c:\Program Files\code-dungeon\Code Dungeon.exe" ;; "Copter Mission") From b10ff24c1eb34a4f325146468fcacdaa8f9e3ac8 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 21 Aug 2022 00:10:48 -0400 Subject: [PATCH 02/21] Make nvda2speechd executable. --- audiogame-manager.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 0a198a1..a655055 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -568,6 +568,7 @@ install_wine_bottle() { fi if [[ "${WINEARCH}" == "win64" ]] && [[ ! -f "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd" ]]; then cp "${cache}/nvda2speechd" "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd" + chmod +x "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd" fi winetricks -q $@ ${winVer:-winxp} ${winetricksSettings}; } | dialog --progressbox "Installing wine bottle, please wait..." -1 -1 } From 731ce3445b664c26abb6f51dbc82a56ebe92a00e Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 21 Aug 2022 00:32:41 -0400 Subject: [PATCH 03/21] Fixed a bug that was copying the wrong dll. --- audiogame-manager.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index a655055..3d280ab 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -1643,7 +1643,7 @@ case "${game}" in # Weird work around to get keyboard working. winetricks -q usetakefocus=y winetricks -q usetakefocus=n - find "${WINEPREFIX}" -type f -name 'nvdaControllerClient.dll' -exec cp -v "${cache}/nvdaControllerClient64.dll" "{}" \; + find "${WINEPREFIX}" -type f -name 'nvdaControllerClient.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; add_launcher "c:\Program Files\code-dungeon\Code Dungeon.exe" ;; "Copter Mission") From 69ed0666eaebae468a8c56a2e94d527af58b6efc Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 21 Aug 2022 01:01:16 -0400 Subject: [PATCH 04/21] Game shooter added. --- audiogame-manager.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 3d280ab..80e8242 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -1003,7 +1003,7 @@ gameList=( "Shades of Doom" "Silver Dollar" "Slender Lost Vision" - #"Shooter" + "Shooter" "Sonic the Hedgehog" "Sonic Zoom" #"Space Defender" @@ -2339,10 +2339,9 @@ EOF export WINEARCH=win64 export winVer="win7" install_wine_bottle - download "http://masonasons.me/softs/Shooter.zip" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient64.dll" + download "http://masonasons.me/softs/Shooter.zip" unzip -d "$WINEPREFIX/drive_c/Program Files/shooter" "${cache}/Shooter.zip" - find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \; - find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvdaControllerClient64.dll" "{}" \; + find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; add_launcher "c:\Program Files\shooter\shooter.exe" ;; "Sonic the Hedgehog") From f38cc92d4ff5f4c42af1ec131399eaa1e5816b16 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 21 Aug 2022 01:39:12 -0400 Subject: [PATCH 05/21] No longer install RHVoice by default on 64 bit installations, only if speechsdk is requested. --- audiogame-manager.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 80e8242..976496a 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -562,10 +562,12 @@ install_wine_bottle() { { DISPLAY="" wineboot -u wine msiexec /i z:"$monoPath" /quiet wine msiexec /i z:"$geckoPath" /quiet - if [[ "${*}" =~ speechsdk ]] || [[ "${WINEARCH}" == "win64" ]]; then - download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd" + if [[ "${*}" =~ speechsdk ]]; then install_rhvoice fi + if [[ "${WINEARCH}" == "win64" ]]; then + download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd" + fi if [[ "${WINEARCH}" == "win64" ]] && [[ ! -f "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd" ]]; then cp "${cache}/nvda2speechd" "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd" chmod +x "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd" From eda9b9e324c849e542fa83da6362a5f8e7582b30 Mon Sep 17 00:00:00 2001 From: Michael Taboada Date: Sat, 20 Aug 2022 23:10:51 -0700 Subject: [PATCH 06/21] Fix crime hunter, and blind drive --- audiogame-manager.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 976496a..c83520f 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -920,7 +920,7 @@ gameList=( "BG Word Target" "BG Word Yahtzee" "BG Yahtzee" - #"Blind Drive" + "Blind Drive" "Bloodshed" "Bombercats" #"Breed Memorial" @@ -1177,9 +1177,10 @@ case "${game}" in add_launcher "c:\Program Files\Battle Zone\ss.exe" ;; "Beatstar Pro") + # Sapi is broken on win64 for now, and this game doesn't support nvda it seems. export WINEARCH=win64 export winVer="win7" - install_wine_bottle sapi mf + install_wine_bottle mf download "https://oriolgomez.com/games/beat_windows.zip" unzip -d "$WINEPREFIX/drive_c/Program Files/Beatstar Pro" "${cache}/beat_windows.zip" add_launcher "c:\Program Files\Beatstar Pro\beatstar.exe" @@ -1546,13 +1547,15 @@ case "${game}" in ;; "Blind Drive") get_installer "Blind Drive 1.1.112.00i-win64.zip" "https://lofipeople.itch.io/blind-drive" + download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" export WINEARCH=win64 export winVer="win8" - install_wine_bottle sapi + install_wine_bottle unzip -d "$WINEPREFIX/drive_c/Program Files/blind-drive" "${cache}/Blind Drive 1.1.112.00i-win64.zip" # Weird work around to get keyboard working. winetricks -q usetakefocus=y winetricks -q usetakefocus=n + find "${WINEPREFIX}" -type f -name 'nvdaControllerClient.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; add_launcher "c:\Program Files\blind-drive\Blind Drive.exe" ;; "Bloodshed") @@ -1673,10 +1676,10 @@ case "${game}" in "Crime Hunter") export WINEARCH=win64 export winVer="win7" - install_wine_bottle sapi - download "http://masonasons.me/softs/CH2.0Win.zip" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient64.dll" + install_wine_bottle + download "http://masonasons.me/softs/CH2.0Win.zip" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" unzip -d "$WINEPREFIX/drive_c/Program Files/crime-hunter" "${cache}/CH2.0Win.zip" - find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvdaControllerClient64.dll" "{}" \; + find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; add_launcher "c:\Program Files\crime-hunter\ch.exe" ;; "Danger on the Wheel") From 15c73e8377a428aa2a028e3427b31903cf0e2ee0 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 21 Aug 2022 12:22:13 -0400 Subject: [PATCH 07/21] Updated Laser Breakout to use the new nvda2speechd dll, but it still doesn't speak, so commented out for now. --- audiogame-manager.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index c83520f..858d5f7 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -760,6 +760,9 @@ game_launcher() { fi fi # for games that require custom scripts before launch or custom launch parameters + if [[ "$game" =~ laser-breakout ]]; then + pgrep -u "$USER" nvda2speechd &> /dev/null || ${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd & + fi if [[ "$game" =~ sequence-storm ]]; then [[ -x ~/.SequenceStormReader ]] && ~/.SequenceStormReader & fi @@ -1995,12 +1998,12 @@ EOF "Laser Breakout") export bottle="nyanchan" export winVer="win7" - install_wine_bottle speechsdk - download "http://www.nyanchangames.com/softs/lsSetup.exe" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll" + install_wine_bottle + download "http://www.nyanchangames.com/softs/lsSetup.exe" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd32.dll" wine "${cache}/lsSetup.exe" & xdotool sleep 10 key Return wineserver -w - find "${WINEPREFIX}" -type f -name "nvdaControllerClient.dll" -exec rm -fv "{}" \; + find "${WINEPREFIX}" -type f -name 'nvdaControllerClient.dll' -exec cp -v "${cache}/nvda2speechd32.dll" "{}" \; add_launcher "c:\nyanchangame\laser breakout\play.exe" ;; "Light Battles") From 5e23d06a5c2e731315b0dbccf84b551da54aecfc Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Mon, 22 Aug 2022 14:41:40 -0400 Subject: [PATCH 08/21] Fixed a really dumb bug in the Shooter installer that caused it to not speak. Lol everyone pretend you didn't see this. --- audiogame-manager.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 858d5f7..6512ecd 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -2347,7 +2347,7 @@ EOF export WINEARCH=win64 export winVer="win7" install_wine_bottle - download "http://masonasons.me/softs/Shooter.zip" + download "http://masonasons.me/softs/Shooter.zip" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" unzip -d "$WINEPREFIX/drive_c/Program Files/shooter" "${cache}/Shooter.zip" find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; add_launcher "c:\Program Files\shooter\shooter.exe" From a04e04a206d3450cbc5f1627eb372b90e622bf6f Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Mon, 22 Aug 2022 18:42:58 -0400 Subject: [PATCH 09/21] You now have the option of installing Alan, Bdl, Clb, or Slt when installing a game. The -v should be specified with the desired voice along with the -i flag. It is also possible to set the desired default voice in settings.conf if you have one. The default voice is Bdl, so if that's the one you like best, there's no need to do anything. --- audiogame-manager.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 6512ecd..608a423 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -434,6 +434,7 @@ help() { echo "noCache=\"true\" # Do not keep downloaded items in the cache." echo "norh=\"true\" # Do not install RHVoice." echo "redownload=\"true\" # Redownload sources, do not use the version stored in cache." + echo "rhvoice=\"voicename\" # Select the voice to be installed (default Bdl)." echo "winedebug=\"flag(s)\" # Set wine debug flags, useful for development." exit 0 } @@ -526,10 +527,23 @@ install_rhvoice() { if [[ "$norh" == "true" ]]; then return fi - download "https://rhvoice.eu-central-1.linodeobjects.com/RHVoice-voice-English-Bdl-v4.1.2007.13-setup.exe" + declare -A RHVoice=( + [alan]="https://rhvoice.eu-central-1.linodeobjects.com/RHVoice-voice-English-Alan-v4.0.2008.15-setup.exe" + [bdl]="https://rhvoice.eu-central-1.linodeobjects.com/RHVoice-voice-English-Bdl-v4.1.2008.15-setup.exe" + [clb]="https://rhvoice.eu-central-1.linodeobjects.com/RHVoice-voice-English-Clb-v4.0.2008.15-setup.exe" + [slt]="https://rhvoice.eu-central-1.linodeobjects.com/RHVoice-voice-English-Slt-v4.0.2008.15-setup.exe" + ) + voiceName="${voiceName:-bdl}" + voiceName="${voiceName,,}" + if [[ "${RHVoice[${voiceName}]}" == "" ]]; then + echo "Invalid RHVoice name specified, defaulting to Bdl." + voiceName="bdl" + fi + local voiceFile="${RHVoice[${voiceName}]##*/}" + download "${RHVoice[${voiceName}]}" winetricks -q win8 - echo "Installing RHVoice..." - wine "${cache}/RHVoice-voice-English-Bdl-v4.1.2007.13-setup.exe" & + echo "Installing RHVoice ${voiceName^}..." + wine "${cache}/${voiceFile}" & sleep 20 wineserver -k } @@ -1073,6 +1087,7 @@ declare -A command=( [R]="Redownload. Removes old versions of packages from cache before installing." [r]="Remove a game. This will delete all game data." [t]="Total games. Show how many games are currently available." + [v:]="Select the voice to be installed, default is Bdl." ) # Convert the keys of the associative array to a format usable by getopts @@ -1105,6 +1120,7 @@ while getopts "${args}" i ; do --infobox "There are currently ${#gameList[@]} games available." -1 -1 exit 0 ;; + v) voiceName="${OPTARG}";; esac done From f523b51327221a18ceb9ad1eece388e2e535351b Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 23 Aug 2022 00:20:12 -0400 Subject: [PATCH 10/21] Added game Dragon Pong but it is commented out because it doesn't yet work. --- audiogame-manager.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 608a423..71339ac 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -958,6 +958,7 @@ gameList=( "Death on the Road" "Deathmatch" "Dog Who Hates Toast" + #"Dragon Pong" "Duck Hunt" "DynaMan" "Easter Quest" @@ -1747,6 +1748,12 @@ case "${game}" in add_launcher "c:\Program Files\dogwhohatestoast\DogwhoHatesToast.exe" echo "Note: Dog who Hates Toast installed. Once you start the game, you must press tab until you hear sapi on to get speech." >&2 ;; + "Dragon Pong") + install_wine_bottle vb6run dx8vb speechsdk + download "https://www.iamtalon.me/games/dragonpong.zip" + unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/dragonpong.zip" + add_launcher "c:\Program Files\dragonpong\DragonPong.exe" + ;; "Duck Hunt") export bottle="l-works" install_wine_bottle vb6run dx8vb speechsdk From 4db6eae6a0753ade2c93af29b0540ab4ca81cecb Mon Sep 17 00:00:00 2001 From: Michael Taboada Date: Tue, 23 Aug 2022 09:56:20 -0700 Subject: [PATCH 11/21] Clean up set-voice script --- speech/set-voice.sh | 48 +++++++++++++++------------------------------ 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/speech/set-voice.sh b/speech/set-voice.sh index 70ce062..03e12a7 100755 --- a/speech/set-voice.sh +++ b/speech/set-voice.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Set Voice -# Set the default wine voice based on installed options. +# Set the default wine voice ba$sed on installed options. # Rate can be specified as a numeric argument to this script, 1 through 9. # The default rate is 7 @@ -8,7 +8,7 @@ # ■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 +# https://opensource.org/licenses/CPAL-1.0. The License is ba$sed 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 @@ -44,6 +44,13 @@ #--code-- +# Set a variable to make mac compatibility easier... +sed="sed" +grep="grep" +if [[ "$(uname)" == "Darwin" ]]; then + sed="gsed" + grep="ggrep" +fi # Settings to improve accessibility of dialog. export DIALOGOPTS='--insecure --no-lines --visit-items' # Turn off debug messages @@ -116,11 +123,7 @@ menulist() { restore_voice() { if [[ $doRestore -eq 0 ]]; then wineserver -k # If we don't do this it's likely wine will overwrite our reverted change or even clobber the registry key entirely - if [[ "$(uname)" == "Darwin" ]]; then - gsed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="'"${oldVoice//\\/\\\\}"'"/g' "${WINEPREFIX}/user.reg" - else - sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="'"${oldVoice//\\/\\\\}"'"/g' "${WINEPREFIX}/user.reg" - fi + $sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="'"${oldVoice//\\/\\\\}"'"/g' "${WINEPREFIX}/user.reg" fi } @@ -134,16 +137,10 @@ set_voice() { counter=$(( $counter + 1 )) done fullVoice="${voiceListFullName[$counter]}" - fullVoice="${fullVoice/RHVoice/RHVoice\\\\bdl}" wineserver -k # If we don't do this it's likely wine will overwrite our reverted change or even clobber the registry key entirely # Remove any existing rate change for voices - if [[ "$(uname)" == "Darwin" ]]; then - gsed -i '/"DefaultTTSRate"=dword:/d' "${WINEPREFIX}/user.reg" - gsed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"\n"DefaultTTSRate"=dword:0000000'${2:-7}'/g' "${WINEPREFIX}/user.reg" - else - sed -i '/"DefaultTTSRate"=dword:/d' "${WINEPREFIX}/user.reg" - sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"\n"DefaultTTSRate"=dword:0000000'${2:-7}'/g' "${WINEPREFIX}/user.reg" - fi + $sed -i '/"DefaultTTSRate"=dword:/d' "${WINEPREFIX}/user.reg" + $sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"\n"DefaultTTSRate"=dword:0000000'${2:-7}'/g' "${WINEPREFIX}/user.reg" } test_voice() { @@ -156,13 +153,8 @@ test_voice() { counter=$(( $counter + 1 )) done fullVoice="${voiceListFullName[$counter]}" - fullVoice="${fullVoice/RHVoice/RHVoice\\\\bdl}" wineserver -k # If we don't do this it's likely wine will overwrite our reverted change or even clobber the registry key entirely - if [[ "$(uname)" == "Darwin" ]]; then - gsed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"/g' "${WINEPREFIX}/user.reg" - else - sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"/g' "${WINEPREFIX}/user.reg" - fi +$sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"/g' "${WINEPREFIX}/user.reg" cat << "EOF" > /tmp/speak.vbs dim speechobject set speechobject=createobject("sapi.spvoice") @@ -186,21 +178,13 @@ wine cscript "z:\tmp\speak.vbs" # Create an array of available voices. ifs="$IFS" IFS=$'\n' -if [[ "$(uname)" == "Darwin" ]]; then - voiceListFullName=($(ggrep -P '\[Software\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^\\]+\].*' "${WINEPREFIX}/system.reg" | sed -E -e 's/\[([^]]+)\].*/\1/g')) -else - voiceListFullName=($(grep -P '\[Software\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^\\]+\].*' "${WINEPREFIX}/system.reg" | sed -E -e 's/\[([^]]+)\].*/\1/g')) -fi +voiceListFullName=($($grep -P '\[Software\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^\\]+\].*' "${WINEPREFIX}/system.reg" | $sed -E -e 's/\[([^]]+)\].*/\1/g')) IFS="$ifs" voiceList=() for x in "${voiceListFullName[@]}" ; do - voiceList+=("$(echo "$x" | rev | cut -d\\ -f1 | rev)") + voiceList+=("$(echo "$x" | $sed -E -e 's/Software\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\(.+)/\1/g')") done -if [[ "$(uname)" == "Darwin" ]]; then - oldVoice="$(ggrep -P '"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"' "${WINEPREFIX}/user.reg" | sed -E -e 's/"DefaultTokenId"="([^"]+)"/\1/g')" -else - oldVoice="$(grep -P '"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"' "${WINEPREFIX}/user.reg" | sed -E -e 's/"DefaultTokenId"="([^"]+)"/\1/g')" -fi +oldVoice="$($grep -P '"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"' "${WINEPREFIX}/user.reg" | $sed -E -e 's/"DefaultTokenId"="([^"]+)"/\1/g')" exit=1 while [[ $exit -ne 0 ]] ; do voice="$(menulist "${voiceList[@]}")" From 963a4156472a1109d8188444ac87bd0312ad5b76 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 23 Aug 2022 13:19:52 -0400 Subject: [PATCH 12/21] set-voice.sh now correctly detects the RHVoice that is installed and sets it instead of just using bdl. --- speech/set-voice.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/speech/set-voice.sh b/speech/set-voice.sh index 03e12a7..bd60d08 100755 --- a/speech/set-voice.sh +++ b/speech/set-voice.sh @@ -51,6 +51,8 @@ if [[ "$(uname)" == "Darwin" ]]; then sed="gsed" grep="ggrep" fi +export grep +export sed # Settings to improve accessibility of dialog. export DIALOGOPTS='--insecure --no-lines --visit-items' # Turn off debug messages @@ -136,7 +138,10 @@ set_voice() { [ "$x" = "$tmp" ] && break counter=$(( $counter + 1 )) done + local RHVoiceName="$(find "${WINEPREFIX}/drive_c/ProgramData/Olga Yakovleva/RHVoice/data/voices/" -maxdepth 1 -type d)" + RHVoiceName="${RHVoiceName##*/}" fullVoice="${voiceListFullName[$counter]}" + fullVoice="${fullVoice/RHVoice/RHVoice\\\\${RHVoiceName}}" wineserver -k # If we don't do this it's likely wine will overwrite our reverted change or even clobber the registry key entirely # Remove any existing rate change for voices $sed -i '/"DefaultTTSRate"=dword:/d' "${WINEPREFIX}/user.reg" @@ -152,7 +157,10 @@ test_voice() { [ "$x" = "$tmp" ] && break counter=$(( $counter + 1 )) done + local RHVoiceName="$(find "${WINEPREFIX}/drive_c/ProgramData/Olga Yakovleva/RHVoice/data/voices/" -maxdepth 1 -type d)" + RHVoiceName="${RHVoiceName##*/}" fullVoice="${voiceListFullName[$counter]}" + fullVoice="${fullVoice/RHVoice/RHVoice\\\\${RHVoiceName}}" wineserver -k # If we don't do this it's likely wine will overwrite our reverted change or even clobber the registry key entirely $sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"/g' "${WINEPREFIX}/user.reg" cat << "EOF" > /tmp/speak.vbs @@ -182,7 +190,7 @@ voiceListFullName=($($grep -P '\[Software\\\\(Wow6432Node\\\\|)Microsoft\\\\Spee IFS="$ifs" voiceList=() for x in "${voiceListFullName[@]}" ; do - voiceList+=("$(echo "$x" | $sed -E -e 's/Software\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\(.+)/\1/g')") + voiceList+=("$(echo "$x" | $sed -E -e 's/Software\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\(.+)/\3/g')") done oldVoice="$($grep -P '"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"' "${WINEPREFIX}/user.reg" | $sed -E -e 's/"DefaultTokenId"="([^"]+)"/\1/g')" exit=1 From 97d8315880e1268446dd8174e9e5db71528cff62 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 24 Aug 2022 01:33:15 -0400 Subject: [PATCH 13/21] Added Wolf Games Launcher but it is commented for now because not working yet. --- audiogame-manager.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 71339ac..d72b19b 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -1021,9 +1021,9 @@ gameList=( "Sequence Storm" #"Shades of Doom 1.2" "Shades of Doom" + "Shooter" "Silver Dollar" "Slender Lost Vision" - "Shooter" "Sonic the Hedgehog" "Sonic Zoom" #"Space Defender" @@ -1053,6 +1053,7 @@ gameList=( "VIP Mud" "Warsim" "Windows Attack" + #"Wolf Games Launcher" #"World of War" ) @@ -2662,6 +2663,15 @@ EOF cp "${cache}/WA.exe" "$WINEPREFIX/drive_c/Program Files/" add_launcher "c:\Program Files\WA.exe" ;; + "Wolf Games Launcher") + download "https://sightlesswolf.com/wg-release.zip" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" + export WINEARCH=win64 + export winVer="win7" + install_wine_bottle + unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/wg-release.zip" + find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; + add_launcher "c:\Program Files\wg-release\WolfGames.exe" + ;; "World of War") export winVer="win7" install_wine_bottle speechsdk From ededeeadf4e73d036943e07264d8b7179ac89a2b Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 24 Aug 2022 12:08:16 -0400 Subject: [PATCH 14/21] set-voice.sh now provides a message if there are no voices listed. This can happen for example if the game uses the nvda2speechd dll. --- speech/set-voice.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/speech/set-voice.sh b/speech/set-voice.sh index bd60d08..593c8da 100755 --- a/speech/set-voice.sh +++ b/speech/set-voice.sh @@ -194,6 +194,10 @@ for x in "${voiceListFullName[@]}" ; do done oldVoice="$($grep -P '"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"' "${WINEPREFIX}/user.reg" | $sed -E -e 's/"DefaultTokenId"="([^"]+)"/\1/g')" exit=1 +if [[ "${voiceList[@]}" -eq 0 ]]; then +dialog --msgbox "No voices found." -1 -1 +exit 1 +fi while [[ $exit -ne 0 ]] ; do voice="$(menulist "${voiceList[@]}")" From 70cec92593a4b882faf442fbe61be480d3892d4c Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 25 Aug 2022 00:28:18 -0400 Subject: [PATCH 15/21] Fixed a bug that would cause AGM to fail to download the nvda2speechd server if the first game installed was a 64 bit game. --- audiogame-manager.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index d72b19b..0a985f3 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -503,8 +503,6 @@ winetricks() { echo "1" > "${XDG_CACHE_HOME:-$HOME/.cache}/winetricks/track_usage" fi # Download or update agm's copy of winetricks - winetricksPath="${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager" - mkdir -p "${winetricksPath}" if [[ ! -e "${winetricksPath}/winetricks" ]]; then checkWinetricksUpdate="true" download "https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks" @@ -853,6 +851,10 @@ cache="${XDG_CACHE_HOME:-$HOME/.cache}/audiogame-manager" configFile="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/games.conf" mkdir -p "${cache}" mkdir -p "${configFile%/*}" +# Create the path for AGM's helper programs. +# Originally this was only winetricks, thus the name, and I'm too lazy to change it now. +winetricksPath="${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager" +mkdir -p "${winetricksPath}" # Load any arguments from settings.conf file if [[ -r "${configFile%/*}/settings.conf" ]]; then source "${configFile%/*}/settings.conf" From 0f1ab0d958cef709592123fdbbdbbf14879abf81 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 27 Aug 2022 23:45:22 -0400 Subject: [PATCH 16/21] Changed RS Games to use the nvda2speech dll so that it uses speech-dispatcher now. I get the feeling I may have to revert this though because it does chop stuff sometimes. --- audiogame-manager.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 0a985f3..33b323a 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -786,6 +786,9 @@ game_launcher() { wine "$winePath\\$wineExec" exit 0 fi + if [[ "$game" =~ rs-games ]]; then + pgrep -u "$USER" nvda2speechd &> /dev/null || ${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd & + fi if [[ "$game" =~ screaming-strike-2 ]]; then pushd "$(winepath "$winePath")" wine "$wineExec" @@ -964,6 +967,7 @@ gameList=( "Duck Hunt" "DynaMan" "Easter Quest" + #"Endless Runner" "Entombed" "ESP Pinball Classic" "ESP Pinball Extreme" @@ -1781,6 +1785,13 @@ case "${game}" in wine "${cache}/easter quest setup.exe" /silent add_launcher "c:\Program Files\MTGames\Easter Quest\easter.exe" ;; + "Endless Runner") + install_wine_bottle speechsdk + download "http://www.masonasons.me/softs/EndlessRunner.7z" + 7z e -y -o"$WINEPREFIX/drive_c/Program Files/Endless Hunter" "${cache}/EndlessRunner.7z" -prunner + find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; + add_launcher "c:\Program Files\Endless Hunter\runner.exe" + ;; "Entombed") export winVer="win7" install_wine_bottle speechsdk msvcrt40 gdiplus ie7 wmp11 mf @@ -2279,9 +2290,9 @@ EOF "RS Games") export winVer="win7" install_wine_bottle speechsdk - download "http://rsgames.org/rsdownloads/rsgclient/rsgames-client-setup-2.01.exe" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll" + download "http://rsgames.org/rsdownloads/rsgclient/rsgames-client-setup-2.01.exe" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd32.dll" wine "${cache}/rsgames-client-setup-2.01.exe" /silent - find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \; + find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvda2speechd32.dll" "{}" \; add_launcher "c:\Program Files\RS Games Client\rsg.exe" ;; "Run For Your Life") From 4709ec1eac3119050047c8a8716bb08d35bca30f Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 28 Aug 2022 02:44:21 -0400 Subject: [PATCH 17/21] Fixed bug in path. --- audiogame-manager.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 33b323a..119d8c9 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -1788,9 +1788,9 @@ case "${game}" in "Endless Runner") install_wine_bottle speechsdk download "http://www.masonasons.me/softs/EndlessRunner.7z" - 7z e -y -o"$WINEPREFIX/drive_c/Program Files/Endless Hunter" "${cache}/EndlessRunner.7z" -prunner + 7z e -y -o"$WINEPREFIX/drive_c/Program Files/Endless Runner" "${cache}/EndlessRunner.7z" -prunner find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; - add_launcher "c:\Program Files\Endless Hunter\runner.exe" + add_launcher "c:\Program Files\Endless Runner\runner.exe" ;; "Entombed") export winVer="win7" From fd254e9f969857ca27b2451e186ee16282f5d916 Mon Sep 17 00:00:00 2001 From: Michael Taboada Date: Tue, 13 Sep 2022 11:28:10 -0700 Subject: [PATCH 18/21] Fix river raiders install, still very crackly under water so still disabled --- audiogame-manager.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 119d8c9..b548651 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -2283,6 +2283,7 @@ EOF download "https://www.agarchive.net/games/XSight/River%20Raiders%201.3.5.exe" wine "$cache/River Raiders 1.3.5.exe" & xdotool sleep 5 type y 2> /dev/null + xdotool sleep 1 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 wineserver -w add_launcher "c:\Program Files\River Raiders\raid.exe" From 84c25f5262f084d21693f6c7d24bebb768c10bc8 Mon Sep 17 00:00:00 2001 From: stormdragon2976 Date: Wed, 14 Sep 2022 14:52:46 -0400 Subject: [PATCH 19/21] Added ole32 to vipmud installation. --- audiogame-manager.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index b548651..77f7479 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -2652,7 +2652,7 @@ EOF ;; "VIP Mud") export winVer="win7" - install_wine_bottle vb6run dx8vb speechsdk + install_wine_bottle vb6run dx8vb speechsdk ole32 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" From 703b3394cbf8e7ee022a0b6c7b151b58001a1eb8 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 14 Sep 2022 23:34:45 -0400 Subject: [PATCH 20/21] The little minigame "Windows Attack" appears to have vanished, so removed it from AGM. --- audiogame-manager.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 77f7479..993a52d 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -1058,7 +1058,6 @@ gameList=( "Villains From Beyond" "VIP Mud" "Warsim" - "Windows Attack" #"Wolf Games Launcher" #"World of War" ) @@ -2670,13 +2669,6 @@ EOF unzip -d "$WINEPREFIX/drive_c/Program Files/Warsim/" "${cache}/Warsim Full Game.zip" add_launcher "c:\Program Files\Warsim\Warsim.exe" ;; - "Windows Attack") - get_installer "WA.exe" "https://drive.google.com/file/d/1BwKGLP37m-Z6nyKdo8LwmU9J1CEqfMb_/view?usp=drivesdk" - export winVer="win7" - install_wine_bottle speechsdk - cp "${cache}/WA.exe" "$WINEPREFIX/drive_c/Program Files/" - add_launcher "c:\Program Files\WA.exe" - ;; "Wolf Games Launcher") download "https://sightlesswolf.com/wg-release.zip" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" export WINEARCH=win64 From 2ed9370d67a34ed0ff6a229c9bed0c672ba2426d Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Mon, 19 Sep 2022 11:12:51 -0400 Subject: [PATCH 21/21] Removed Future life, it appears to no longer have an installer. --- audiogame-manager.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 993a52d..2bd6f87 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -977,7 +977,6 @@ gameList=( #"Fartman" "Finger Panic" "Fuck That Bird" - "Future Life" "GMA Tank Commander" "Grizzly Gulch" "Hammer of Glory" @@ -1891,15 +1890,6 @@ case "${game}" in unzip -d "$WINEPREFIX/drive_c/Program Files/fuck that bird" "${cache}/bird_en.zip" add_launcher "c:\Program Files\fuck that bird\game.exe" ;; - "Future Life") - export winVer="win7" - install_wine_bottle speechsdk - get_installer "Future Life.zip" "https://www.mediafire.com/file/phkzxtqjaw6nao9/Future" - unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/Future Life.zip" - chmod +w "$WINEPREFIX/drive_c/Program Files/Future Life" - find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; - add_launcher "c:\Program Files\Future Life\future_life.exe" - ;; "GMA Tank Commander") install_wine_bottle vb6run dx8vb speechsdk download "http://www.gmagames.com/gtc120.exe"