Some fixes to installers, and now use the translator for bk3 if you don't have the dictionary file.

This commit is contained in:
Storm Dragon 2022-10-05 18:51:21 -04:00
parent 59d3742733
commit 43d733343d

View File

@ -783,11 +783,17 @@ game_launcher() {
"${0%/*}/speech/clipboard_translator.sh" play_sr.exe & "${0%/*}/speech/clipboard_translator.sh" play_sr.exe &
fi fi
if [[ "$game" =~ bokurano-daibouken-3 ]]; then if [[ "$game" =~ bokurano-daibouken-3 ]]; then
pgrep -u "$USER" nvda2speechd &> /dev/null || ${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd &
dictPath="$(winepath "${winePath}")" dictPath="$(winepath "${winePath}")"
if [[ -r "${cache}/bk3-dict.dat" ]] && [[ ! -r "${dictPath}/dict.dat" ]]; then if [[ -r "${cache}/bk3-dict.dat" ]] && [[ ! -r "${dictPath}/dict.dat" ]]; then
cp "${cache}/bk3-dict.dat" "${dictPath}/dict.dat" cp "${cache}/bk3-dict.dat" "${dictPath}/dict.dat"
fi 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 fi
if [[ "$game" =~ sequence-storm ]]; then if [[ "$game" =~ sequence-storm ]]; then
[[ -x ~/.SequenceStormReader ]] && ~/.SequenceStormReader & [[ -x ~/.SequenceStormReader ]] && ~/.SequenceStormReader &
@ -1639,7 +1645,7 @@ case "${game}" in
dictFile="$i" dictFile="$i"
fi fi
done 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" 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 fi
export bottle="nyanchan" export bottle="nyanchan"