From a04e04a206d3450cbc5f1627eb372b90e622bf6f Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Mon, 22 Aug 2022 18:42:58 -0400 Subject: [PATCH] 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