First pass at adding nvda2speech for 64 bit games. Probably bugs, so watch out.

This commit is contained in:
Storm Dragon 2022-08-20 23:51:12 -04:00
parent 6cb5394c72
commit 422ca30367

View File

@ -563,8 +563,12 @@ install_wine_bottle() {
wine msiexec /i z:"$monoPath" /quiet wine msiexec /i z:"$monoPath" /quiet
wine msiexec /i z:"$geckoPath" /quiet wine msiexec /i z:"$geckoPath" /quiet
if [[ "${*}" =~ speechsdk ]] || [[ "${WINEARCH}" == "win64" ]]; then if [[ "${*}" =~ speechsdk ]] || [[ "${WINEARCH}" == "win64" ]]; then
download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd"
install_rhvoice install_rhvoice
fi fi
if [[ "${WINEARCH}" == "win64" ]] && [[ ! -f "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd" ]]; then
cp "${cache}/nvda2speechd" "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd"
fi
winetricks -q $@ ${winVer:-winxp} ${winetricksSettings}; } | dialog --progressbox "Installing wine bottle, please wait..." -1 -1 winetricks -q $@ ${winVer:-winxp} ${winetricksSettings}; } | dialog --progressbox "Installing wine bottle, please wait..." -1 -1
} }
@ -783,6 +787,7 @@ game_launcher() {
exit 0 exit 0
fi fi
if [[ -d "${WINEPREFIX}/drive_c/windows/syswow64" ]]; then if [[ -d "${WINEPREFIX}/drive_c/windows/syswow64" ]]; then
pgrep -u "$USER" nvda2speechd &> /dev/null || ${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd &
wine64 start /realtime /d "${winePath}" "$wineExec" wine64 start /realtime /d "${winePath}" "$wineExec"
else else
wine start /d "${winePath}" "$wineExec" /realtime wine start /d "${winePath}" "$wineExec" /realtime
@ -1629,6 +1634,7 @@ case "${game}" in
;; ;;
"Code Dungeon") "Code Dungeon")
get_installer "codedungeon-win-64.zip" "https://stealcase.itch.io/codedungeon" get_installer "codedungeon-win-64.zip" "https://stealcase.itch.io/codedungeon"
download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll"
export WINEARCH=win64 export WINEARCH=win64
export winVer="win8" export winVer="win8"
install_wine_bottle install_wine_bottle
@ -1636,6 +1642,7 @@ case "${game}" in
# Weird work around to get keyboard working. # Weird work around to get keyboard working.
winetricks -q usetakefocus=y winetricks -q usetakefocus=y
winetricks -q usetakefocus=n winetricks -q usetakefocus=n
find "${WINEPREFIX}" -type f -name 'nvdaControllerClient.dll' -exec cp -v "${cache}/nvdaControllerClient64.dll" "{}" \;
add_launcher "c:\Program Files\code-dungeon\Code Dungeon.exe" add_launcher "c:\Program Files\code-dungeon\Code Dungeon.exe"
;; ;;
"Copter Mission") "Copter Mission")