From 615dd39033b6034c4d576815706ff4849916de5c Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Fri, 21 Jan 2022 23:08:59 -0500 Subject: [PATCH] new flag, -n, which skips installing RHVoice for people who don't want to use it. Also, RHVoice should not longer reinstall in bottles that already have it. --- audiogame-manager.sh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index fa10beb..b8fcc6b 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -510,6 +510,21 @@ winetricks() { ${cache}/winetricks "$@" } +install_rhvoice() { + if [[ -d "$HOME/.local/wine/${bottle}/drive_c/Program Files/Olga Yakovleva/" ]]; then + return + fi + if [[ "$norh" == "true" ]]; then + return + fi + download "https://rhvoice.eu-central-1.linodeobjects.com/RHVoice-voice-English-Bdl-v4.1.9-setup.exe" + winetricks -q win8 + echo "Installing RHVoice..." + wine "${cache}/RHVoice-voice-English-Bdl-v4.1.9-setup.exe" & + sleep 20 + wineserver -k +} + install_wine_bottle() { # 32 bit installations work best and are the default here, if you need to override it, do it in the game specific installation steps. export WINEARCH="${WINEARCH:-win32}" @@ -540,12 +555,7 @@ install_wine_bottle() { wine msiexec /i z:"$monoPath" /quiet wine msiexec /i z:"$geckoPath" /quiet if [[ "${*}" =~ speechsdk ]]; then - download "https://rhvoice.eu-central-1.linodeobjects.com/RHVoice-voice-English-Bdl-v4.1.9-setup.exe" - winetricks -q win8 - echo "Installing RHVoice..." - wine "${cache}/RHVoice-voice-English-Bdl-v4.1.9-setup.exe" & - sleep 20 - wineserver -k + install_rhvoice fi winetricks -q $@ ${winVer:-winxp} ${winetricksSettings}; } | dialog --progressbox "Installing wine bottle, please wait..." -1 -1 else @@ -1029,6 +1039,7 @@ declare -A command=( [L]="Display license information." [l:]="Launch given game without interactive audiogame-manager menu specified by its wine bottle." [N]="No cache, delete the installer after it has been extracted." + [n]="No RHVoice, do not install RHVoice when the game is installed." [P]="Print a list of packages required by audiogame-manager." [R]="Redownload. Removes old versions of packages from cache before installing." [r]="Remove a game. This will delete all game data." @@ -1055,6 +1066,7 @@ while getopts "${args}" i ; do L) license;; l) game_launcher "${OPTARG}";; N) noCache="true";; + n) norh="true";; P) checklist quiet;; R) redownload="true";; r) game_removal;;