Merged to master.

This commit is contained in:
Storm Dragon 2020-12-06 12:47:43 -05:00
commit 61cf058921
2 changed files with 6 additions and 6 deletions

View File

@ -10,7 +10,7 @@ update() {
return return
fi fi
# make sure the site can be reached # make sure the site can be reached
ping -c1 https://stormgames.wolfe.casa &> /dev/null || return ping -c1 stormgames.wolfe.casa &> /dev/null || return
if [[ "$(wget --quiet -O - https://stormgames.wolfe.casa/downloads/audiogame-manager | sha256sum | cut -d ' ' -f1)" == "$(sha256sum "${filePath}" | cut -d ' ' -f1)" ]]; then if [[ "$(wget --quiet -O - https://stormgames.wolfe.casa/downloads/audiogame-manager | sha256sum | cut -d ' ' -f1)" == "$(sha256sum "${filePath}" | cut -d ' ' -f1)" ]]; then
return return
fi fi

View File

@ -100,11 +100,11 @@ set_voice() {
local tmp="$1" local tmp="$1"
local fullVoice local fullVoice
local counter=0 local counter=0
for x in ${voiceList[@]} ; do for x in "${voiceList[@]}" ; do
[ "$x" = "$tmp" ] && break [ "$x" = "$tmp" ] && break
counter=$(( $counter + 1 )) counter=$(( $counter + 1 ))
done done
fullVoice=${voiceListFullName[$counter]} fullVoice="${voiceListFullName[$counter]}"
wineserver -k # If we don't do this it's likely wine will overwrite our reverted change or even clobber the registry key entirely wineserver -k # If we don't do this it's likely wine will overwrite our reverted change or even clobber the registry key entirely
# Remove any existing rate change for voices # Remove any existing rate change for voices
sed -i '/"DefaultTTSRate"=dword:/d' "${WINEPREFIX}/user.reg" sed -i '/"DefaultTTSRate"=dword:/d' "${WINEPREFIX}/user.reg"
@ -116,11 +116,11 @@ test_voice() {
local tmp="$1" local tmp="$1"
local fullVoice local fullVoice
local counter=0 local counter=0
for x in ${voiceList[@]} ; do for x in "${voiceList[@]}" ; do
[ "$x" = "$tmp" ] && break [ "$x" = "$tmp" ] && break
counter=$(( $counter + 1 )) counter=$(( $counter + 1 ))
done done
fullVoice=${voiceListFullName[$counter]} fullVoice="${voiceListFullName[$counter]}"
wineserver -k # If we don't do this it's likely wine will overwrite our reverted change or even clobber the registry key entirely wineserver -k # If we don't do this it's likely wine will overwrite our reverted change or even clobber the registry key entirely
sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Tokens\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"/g' "${WINEPREFIX}/user.reg" sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Tokens\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"/g' "${WINEPREFIX}/user.reg"
cat << "EOF" > /tmp/speak.vbs cat << "EOF" > /tmp/speak.vbs
@ -151,7 +151,7 @@ echo "voiceListFullName: ${voiceListFullName[@]}"
#exit 1 #exit 1
exit=1 exit=1
while [[ $exit -ne 0 ]] ; do while [[ $exit -ne 0 ]] ; do
voice="$(menulist ${voiceList[@]})" voice="$(menulist "${voiceList[@]}")"
case $? in case $? in
0) 0)