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.

This commit is contained in:
Storm Dragon 2022-08-22 18:42:58 -04:00
parent 5e23d06a5c
commit a04e04a206

View File

@ -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