From 43d733343d93ed93e5ea69f8f9ba3cab64699fc1 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 5 Oct 2022 18:51:21 -0400 Subject: [PATCH] Some fixes to installers, and now use the translator for bk3 if you don't have the dictionary file. --- audiogame-manager.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index f94f3e5..654c7ea 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -783,11 +783,17 @@ game_launcher() { "${0%/*}/speech/clipboard_translator.sh" play_sr.exe & fi if [[ "$game" =~ bokurano-daibouken-3 ]]; then - pgrep -u "$USER" nvda2speechd &> /dev/null || ${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd & dictPath="$(winepath "${winePath}")" if [[ -r "${cache}/bk3-dict.dat" ]] && [[ ! -r "${dictPath}/dict.dat" ]]; then cp "${cache}/bk3-dict.dat" "${dictPath}/dict.dat" fi + if [[ -r "${dictPath}/dict.dat" ]]; then + pgrep -u "$USER" nvda2speechd &> /dev/null || ${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd & + fi + if [[ ! -r "${dictPath}/dict.dat" ]]; then + find "${WINEPREFIX}/drive_c/nyanchangame/bk3" -type f -name 'nvdaControllerClient.dll' -exec rm -v "{}" \; + "${0%/*}/speech/clipboard_translator.sh" play.exe & + fi fi if [[ "$game" =~ sequence-storm ]]; then [[ -x ~/.SequenceStormReader ]] && ~/.SequenceStormReader & @@ -1639,7 +1645,7 @@ case "${game}" in dictFile="$i" fi done - if [[ "${#i}" -ge 3 ]] && [[ ! -r "${cache}/bk3-dict.dat" ]]; then + if [[ "${#dictFile}" -ge 3 ]] && [[ ! -r "${cache}/bk3-dict.dat" ]]; then dialog --backtitle "Audiogame manager" --yesno "Possible English translation file found at $dictFile. Would you like to use it for BK3?" -1 -1 --stdout && cp -v "$dictFile" "${cache}/bk3-dict.dat" fi export bottle="nyanchan"