diff --git a/audiogame-manager.sh b/audiogame-manager.sh index d051a81..a6f2b65 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -54,6 +54,9 @@ check_news() { local newsFile="https://stormgames.wolfe.casa/media/agm.ogg" local newsPath="${configFile%/*.conf}/.news" local newsTag="$(curl --connect-timeout 5 -sI "$newsFile" | grep -i '^etag: "' | cut -d '"' -f2)" + if [[ -z "${newsTag}" ]]; then + return + fi local newsOldTag="$(cat "$newsPath" 2> /dev/null)" if [[ "$newsTag" != "$newsOldTag" ]]; then dialog --yes-label 'Play' \ @@ -461,14 +464,19 @@ install_wine_bottle() { winetricks -q $@ ${winVer:-winxp} ${winetricksSettings}; } | dialog --progressbox "Installing wine bottle, please wait..." -1 -1 else # This is in a brace list to pipe through dialog. - download https://nashcentral.duckdns.org/projects/wine.tar.gz + download "https://nashcentral.duckdns.org/projects/wine.tar.gz" { tar xf "${cache}/wine.tar.gz" -C "${HOME}/.local/wine/" mv "${HOME}/.local/wine/.wine/drive_c/users/user" "${HOME}/.local/wine/.wine/drive_c/users/${USER}" mv "${HOME}/.local/wine/.wine/" "${WINEPREFIX}/" wine64 cmd /c exit wine msiexec /i z:"$monoPath" /quiet wine msiexec /i z:"$geckoPath" /quiet - winetricks -q $@ ${winVer:-win7} ${winetricksSettings}; } | dialog --progressbox "Installing wine bottle, please wait..." -1 -1 + if [[ -z "$winVer" ]]; then + download "http://kitchen.kaldobsky.com/ttsgames/SpeechXP.exe" + winetricks -q winxp + wine "${cache}/SpeechXP.exe" /silent + fi + winetricks -q $@ ${winVer:-winxp} ${winetricksSettings}; } | dialog --progressbox "Installing wine bottle, please wait..." -1 -1 fi } @@ -1352,7 +1360,6 @@ case "${game}" in ;; "Bloodshed") export WINEARCH="win64" - export winVer="win7" install_wine_bottle download "http://www.samtupy.com/games/bloodshed.exe" cp "${cache}/bloodshed.exe" "$WINEPREFIX/drive_c/Program Files/" @@ -1923,9 +1930,10 @@ EOF add_launcher "c:\Program Files\Survive the Wild\stw.exe" ;; "Swamp") + export WINEARCH="win64" export winVer="win7" export winetricksSettings="vd=1024x768" - install_wine_bottle vb6run dx8vb quartz speechsdk corefonts + install_wine_bottle dx8vb quartz corefonts vb6run download "https://kaldobsky.com/audiogames/SwampPart1.zip" "https://kaldobsky.com/audiogames/SwampPart2.zip" unzip -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/SwampPart1.zip" unzip -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/SwampPart2.zip" @@ -1933,7 +1941,7 @@ EOF if wget -O "${cache}/SwampPatch.zip" "https://www.kaldobsky.com/audiogames/SwampPatch.zip" ; then unzip -o -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/SwampPatch.zip" fi - wine cmd.exe /c 'cd /d c:\Program Files\swamp && Windows32bit.bat' + wine cmd.exe /c 'cd /d c:\Program Files\swamp && Windows64bit.bat' add_launcher "c:\Program Files\swamp\Swamp.exe" ;; "Technoshock") diff --git a/speech/set-voice.sh b/speech/set-voice.sh index e905526..8a857b6 100755 --- a/speech/set-voice.sh +++ b/speech/set-voice.sh @@ -2,7 +2,8 @@ # Set Voice # Set the default wine voice based on installed options. # Rate can be specified as a numeric argument to this script, 1 through 9. -# The default rate is 7 +# The default rate is 5 +# Note that RHVoice will start chopping ends of words above rate 5 # # â– The contents of this file are subject to the Common Public Attribution @@ -136,14 +137,15 @@ set_voice() { counter=$(( $counter + 1 )) done fullVoice="${voiceListFullName[$counter]}" + fullVoice="${fullVoice/RHVoice/RHVoice\\\\bdl}" 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 if [[ "$(uname)" == "Darwin" ]]; then gsed -i '/"DefaultTTSRate"=dword:/d' "${WINEPREFIX}/user.reg" - gsed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"\n"DefaultTTSRate"=dword:0000000'${2:-7}'/g' "${WINEPREFIX}/user.reg" + gsed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"\n"DefaultTTSRate"=dword:0000000'${2:-5}'/g' "${WINEPREFIX}/user.reg" else sed -i '/"DefaultTTSRate"=dword:/d' "${WINEPREFIX}/user.reg" - sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"\n"DefaultTTSRate"=dword:0000000'${2:-7}'/g' "${WINEPREFIX}/user.reg" + sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"\n"DefaultTTSRate"=dword:0000000'${2:-5}'/g' "${WINEPREFIX}/user.reg" fi } @@ -157,6 +159,7 @@ test_voice() { counter=$(( $counter + 1 )) done fullVoice="${voiceListFullName[$counter]}" + fullVoice="${fullVoice/RHVoice/RHVoice\\\\bdl}" wineserver -k # If we don't do this it's likely wine will overwrite our reverted change or even clobber the registry key entirely if [[ "$(uname)" == "Darwin" ]]; then gsed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"/g' "${WINEPREFIX}/user.reg"