-s flag added to skip dll replacements because the cthulhu plus wine-access setup no longer needs it.

This commit is contained in:
Storm Dragon committed 2026-10-17 16:33:09 -04:00
1 parent d5b688314c
commit 7709ec83d8
3 files changed
+44

No files matched your search

+1
View File
@@ -142,6 +142,7 @@ help() {
echo "noqjoypad=\"true\" # Do not launch qjoypad."
echo "norh=\"true\" # Do not install RHVoice."
echo "redownload=\"true\" # Redownload sources, do not use the version stored in cache."
echo "skipDllReplace=\"true\" # Skip automatic NVDA controller DLL replacement when launching games."
echo "voiceName=\"voicename\" # Select the voice to be installed (default Bdl)."
echo "defaultVoice=\"voicename\" # Select the default voice to use for the bottle, e.g. MSMike or RHVoice."
echo "defaultRate=\"Default voice rate for the bottle, default 7, may not work in all games. Values 1-9 or A."
+14
View File
@@ -19,6 +19,20 @@ Select from a list of games to install.
With no arguments, the list of installed games will be displayed. In all the menus, both installer and launcher, use the up and down arrow keys to find the game you want. Press enter on the game to perform the action. For more detailed help, try the -h flag.
Use `./audiogame-manager.sh -s` to open the launcher without automatically
replacing NVDA controller DLLs with the nvda2speechd versions. This also works
with launch options, for example `./audiogame-manager.sh -s -l bottle-name`.
Uppercase `-S` remains the speech-rate option.
To skip replacement on every launch, add `skipDllReplace="true"` to
`${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/settings.conf`.
Replacement is also skipped when `wine-access.exe` is running under the current
user, regardless of which screen reader started it. Wine Access starts on demand,
so use the flag or setting when it has not started yet. These controls leave
already-replaced DLLs as they are and apply to launch-time changes; individual
game installers and update scripts still install their speech support, including
Tolk DLLs, as before.
## Language and Keyboard
+29
View File
@@ -600,6 +600,9 @@ custom_launch_parameters() {
if [[ ! -d "${dictPath}/dict" ]]; then
cp "${cache}/bk3-dict.dat" "${dictPath}/dict.dat"
fi
fi
if ! should_skip_dll_replace; then
if [[ -r "${cache}/bk3-dict.dat" ]]; then
if [[ -r "${cache}/nvdaControllerClient32.dll" ]]; then
cp "${cache}/nvdaControllerClient32.dll" "${dataDir}/nvdaControllerClient32.dll"
fi
@@ -607,6 +610,7 @@ custom_launch_parameters() {
rm -f "${dataDir}/nvdaControllerClient32.dll"
find "${WINEPREFIX}/drive_c/nyanchangame/bk3" -type f -name 'nvdaControllerClient.dll' -exec rm -v "{}" \;
fi
fi
# DLL replacement now handled by update_nvda_dlls()
if [[ ! -d "${dictPath}/dict" ]]; then
"${scriptDir}/speech/clipboard_translator.sh" "play.exe" bokurano-daibouken3 &
@@ -697,8 +701,17 @@ create_game_array() {
done
}
should_skip_dll_replace() {
[[ "${skipDllReplace:-false}" == "true" ]] ||
pgrep -u "$UID" -x 'wine-access[.]exe' &> /dev/null
}
# Update NVDA controller client DLLs in wine bottles
update_nvda_dlls() {
if should_skip_dll_replace; then
log_msg "Skipping NVDA DLL replacement (skipDllReplace enabled or Wine Access running)."
return 0
fi
# Ensure we have the replacement DLLs
# shellcheck source=.includes/functions.sh
source "${scriptDir}/.includes/functions.sh"
@@ -1001,6 +1014,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."
[S:]="Speech rate. Requires -V voice name, the default is 7. Values 0-9 or A."
[s]="Skip automatic NVDA controller DLL replacement when launching games."
[t]="Total games. Show how many games are currently available."
[v:]="Select the voice to be installed, default is Bdl. Options are alan, bdl, clb, or slt."
[V:]="Select the default voice for a bottle."
@@ -1009,6 +1023,15 @@ declare -A command=(
# Convert the keys of the associative array to a format usable by getopts
args="${!command[*]}"
args="${args//[[:space:]]/}"
# Read this modifier before options such as -l dispatch the launcher immediately.
# Use getopts so -s inside another option's argument is not treated as a flag.
savedOptind="$OPTIND"
while getopts ":${args}" i; do
case "$i" in
s) skipDllReplace="true";;
esac
done
OPTIND="$savedOptind"
while getopts "${args}" i ; do
case "$i" in
c) "${scriptDir}/.includes/checkup.sh";;
@@ -1051,6 +1074,12 @@ while getopts "${args}" i ; do
# shellcheck disable=SC2034
defaultRate="${OPTARG}"
;;
s)
skipDllReplace="true"
if [[ $# -eq 1 ]]; then
game_launcher
fi
;;
t)
gameCount=$(find "${scriptDir}/.install" -type f -iname "*.sh" | wc -l)
agm_infobox "Linux Game Manager" "Linux Game Manager" "There are currently ${gameCount} games available."