Repository navigation
Conversation
Contributor
|
我记得之前都是OK的,是哪个提交引入的回归? |
dizicheng
force-pushed
the
fix/wow64-tsf-registration
branch
from
November 9, 2026 11:40
49b6c54 to
f1e2e84
Compare
…tration - Explicitly resolve System32 and SysWOW64 directory paths instead of relying on fragile implicit filesystem redirection. - Avoid spawning child processes (ShellExecuteEx/regsvr32) while Wow64DisableWow64FsRedirection is active, adhering to MSDN guidelines. - Provide absolute executable paths for regsvr32.exe based on target bitness (via Sysnative for 64-bit registration from WOW64, and SysWOW64 for 32-bit). - Fixes rime#1831 (and related rime#1716) where 32-bit applications fail to load Weasel and show as disabled.
dizicheng
force-pushed
the
fix/wow64-tsf-registration
branch
from
November 9, 2026 11:43
f1e2e84 to
467e4a1
Compare
Author
在提交 是哪个提交导致了现象的显现?
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On 64-bit Windows,
WeaselSetup.exeruns as a 32-bit (WOW64) process. In previous versions, 32-bit applications (such as 32-bit WPS Office, TianRuo OCR, and 32-bit games) frequently fail to load Weasel, resulting in a disabled IME status (circle with a slash icon) and inability to input Chinese (fixes #1831, relates to #1716).Root Causes
install_ime_fileanduninstall_ime_filerelied on a single destination path (C:\Windows\system32\weasel.dll) and implicit filesystem redirection to copy files toSysWOW64andSystem32. During upgrades or reinstallation, 32-bitweasel.dllinSysWOW64could be removed without being properly restored.install_ime_file,func(register_text_service) was invoked whileWow64DisableWow64FsRedirectionwas active. Microsoft MSDN explicitly warns:regsvr32.exe& unusedis_wow64parameter:register_text_serviceacceptedbool is_wow64but completely ignored it in its implementation, launchingregsvr32.exewithout an absolute path. Consequently, 32-bit and 64-bit registrations could not be reliably dispatched to their respective bitness utilities.Solution (Minimal Diff)
install_ime_fileanduninstall_ime_file, explicitly resolveGetSystemWow64DirectoryWon 64-bit systems to ensure 32-bitweasel.dllis consistently copied to and deleted fromSysWOW64.install_ime_file, callWow64RevertWow64FsRedirectionimmediately after file copying completes, ensuringShellExecuteExWis never executed while redirection is disabled.regsvr32.exepaths: Utilize the existingis_wow64parameter inregister_text_service:%windir%\Sysnative\regsvr32.exe(accessible from 32-bit WOW64 process) or System32 fallback.%windir%\SysWOW64\regsvr32.exe.%windir%\System32\regsvr32.exe.Verification
et.exe/wps.exe): 32-bitweasel.dllis correctly registered inWOW6432Node, loaded by 32-bit host processes, and Chinese input functions as expected.