From dbbe419ffb9b00af10c9d62fdb16fa3be5233631 Mon Sep 17 00:00:00 2001 From: millionart Date: Tue, 5 May 2026 18:49:36 +0800 Subject: [PATCH] fix: handle nsis ime installer edge cases --- .../app/src-tauri/nsis/openless-ime-hooks.nsh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/openless-all/app/src-tauri/nsis/openless-ime-hooks.nsh b/openless-all/app/src-tauri/nsis/openless-ime-hooks.nsh index 18cbc038..24b7629b 100644 --- a/openless-all/app/src-tauri/nsis/openless-ime-hooks.nsh +++ b/openless-all/app/src-tauri/nsis/openless-ime-hooks.nsh @@ -20,7 +20,11 @@ !macro OPENLESS_IME_REGISTER_X86 DetailPrint "Registering OpenLess x86 TSF IME" - ExecWait '"$WINDIR\SysWOW64\regsvr32.exe" /s "$INSTDIR\windows-ime\x86\OpenLessIme.dll"' $0 + ${If} ${RunningX64} + ExecWait '"$WINDIR\SysWOW64\regsvr32.exe" /s "$INSTDIR\windows-ime\x86\OpenLessIme.dll"' $0 + ${Else} + ExecWait '"$WINDIR\System32\regsvr32.exe" /s "$INSTDIR\windows-ime\x86\OpenLessIme.dll"' $0 + ${EndIf} !insertmacro OPENLESS_IME_ABORT_IF_FAILED $0 "x86 registration" !macroend @@ -39,7 +43,11 @@ !macro OPENLESS_IME_UNREGISTER_X86 DetailPrint "Unregistering OpenLess x86 TSF IME" - ExecWait '"$WINDIR\SysWOW64\regsvr32.exe" /s /u "$INSTDIR\windows-ime\x86\OpenLessIme.dll"' $0 + ${If} ${RunningX64} + ExecWait '"$WINDIR\SysWOW64\regsvr32.exe" /s /u "$INSTDIR\windows-ime\x86\OpenLessIme.dll"' $0 + ${Else} + ExecWait '"$WINDIR\System32\regsvr32.exe" /s /u "$INSTDIR\windows-ime\x86\OpenLessIme.dll"' $0 + ${EndIf} DetailPrint "OpenLess x86 TSF IME unregister exit code $0" !macroend