From b115e3759f62e7236e8c0657bd2c4ae2f27015d1 Mon Sep 17 00:00:00 2001 From: stormdragon2976 Date: Fri, 23 Dec 2022 02:12:34 -0500 Subject: [PATCH] Moving toward sandboxed wine installations. This means set-voice.sh needs to create and run its script inside the wine directory. --- speech/set-voice.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/speech/set-voice.sh b/speech/set-voice.sh index 9043f46..41d9fde 100755 --- a/speech/set-voice.sh +++ b/speech/set-voice.sh @@ -163,12 +163,12 @@ test_voice() { fullVoice="${fullVoice/RHVoice/RHVoice\\\\${RHVoiceName}}" 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\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"/g' "${WINEPREFIX}/user.reg" - cat << "EOF" > /tmp/speak.vbs + cat << "EOF" > "${bottle}/drive_c/windows/temp/speak.vbs" dim speechobject set speechobject=createobject("sapi.spvoice") speechobject.speak "This is a test of your chosen voice. It contains multiple sentences and punctuation, and is designed to give a full representation of this voices qualities." EOF - wine cscript "z:\tmp\speak.vbs" + wine cscript "c:\windows\temp\speak.vbs" } # Handle voice restore, but only if voice changed @@ -176,12 +176,12 @@ doRestore=1 trap restore_voice SIGINT # In case the user hasn't run a game using sapi in this prefix yet, let's try to initialize all the registry keys properly. -cat << "EOF" > /tmp/speak.vbs +cat << "EOF" > "${bottle}/drive_c/windows/temp/speak.vbs" dim speechobject set speechobject=createobject("sapi.spvoice") speechobject.speak "" EOF -wine cscript "z:\tmp\speak.vbs" +wine cscript "c:\windows\temp\speak.vbs" # Create an array of available voices. ifs="$IFS"