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