chore(release-prep): 清理 #268/#279 双 NSIS 方案残留#280
Conversation
main 上 #268 (millionart/codex/register-windows-ime-nsis-installer) 与 #279 (本人) 都修了 NSIS 注册 TSF DLL,merge #279 时未手动解决冲突,导致: 1. tauri.conf.json 出现两个 windows.nsis block(line 92-95 和 105-108), serde_json 用最后写入的覆盖前面,结果 #268 的 nsis/openless-ime-hooks.nsh 被丢弃,实际生效的是 #279 的 installer.nsh。 2. #279 的 bundle.resources 把 dll 多打一份到 $INSTDIR\tsf-ime\,与 #268 PREINSTALL File 直接装到 $INSTDIR\windows-ime\ 并存。 3. installer.nsh 与 openless-ime-payload/ 残留为死代码。 #268 方案更稳:x64 注册带 Sysnative + DisableX64FSRedirection 双保险,有 POSTUNINSTALL 清理 hook,有测试覆盖(4a7a1b6b/test、933e014a/test),且 不污染 MSI(不用 bundle.resources,避免 dll 重复)。 清理: - 删除 tauri.conf.json 重复 nsis block,保留 nsis/openless-ime-hooks.nsh - 删除 bundle.resources(#268 不需要) - 删除死文件 installer.nsh - 删除死目录 openless-ime-payload/ release-tauri.yml 里"复制 dll 到 openless-ime-payload"步骤、build-mac.sh 与 Linux build 的 --config '{"bundle":{"resources":{}}}' override 暂留 — 没有 bundle.resources 后这些是 noop,不会破坏 build;当前 token 没有 workflow scope,等下一次有需求再清。
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7799b5e0d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "OpenLessImeDllX64Component", | ||
| "OpenLessImeDllX86Component" | ||
| ] | ||
| }, | ||
| "nsis": { | ||
| "installMode": "perMachine", | ||
| "installerHooks": "installer.nsh" | ||
| } |
There was a problem hiding this comment.
Preserve a path for GNU Windows bundling
This removal makes the documented scripts/windows-build-gnu.ps1 path switch from the self-contained installer.nsh/payload setup to nsis/openless-ime-hooks.nsh; that hook embeds File "$%OPENLESS_IME_DLL_X64%" and _X86, but the GNU script still reaches npm run tauri build -- --target x86_64-pc-windows-gnu --bundles msi nsis without building those DLLs or exporting either env var. In that context the NSIS compile fails before the script can produce the advertised Windows GNU bundle artifacts, so this cleanup needs either a GNU-script env setup or a separate fallback before dropping the old hook.
Useful? React with 👍 / 👎.
完整审查 CI 流程后发现两类问题: 1. windows-build-gnu.ps1 不 build OpenLessIme.dll 也不 export OPENLESS_IME_DLL_X64 / _X86 env,但 NSIS hook (nsis/openless-ime-hooks.nsh) PREINSTALL 用 File "$%OPENLESS_IME_DLL_X64%" / _X86 引用 dll, makensis 编译时 env 为空 → File 路径无效 → NSIS bundle 失败。 补 IME dll 双平台 (x64 / Win32) build + Set-Item Env:。 (Codex PR #280 P2 review) 2. build-mac.sh 之前为绕过 bundle.resources 占位 dll 加的 --config '{"bundle":{"resources":{}}}' override, PR #280 已删除 bundle.resources,此 override 退化为 noop,删除让命令更干净。 release-tauri.yml 还有 2 处同源遗留("复制 dll 到 openless-ime-payload" 死步骤、Linux build 同样的 noop override)需要 workflow scope 才能动, 留待下一个 PR。
|
完整 CI 审查后追加 commit `3414e1ff`,修两件事: 1. P2 修复(@codex 提的)`windows-build-gnu.ps1` 在 `--bundles msi nsis` 之前不 build IME dll、不 export `OPENLESS_IME_DLL_X64` / `_X86`,让 `nsis/openless-ime-hooks.nsh` 的 PREINSTALL `File "$%OPENLESS_IME_DLL_X64%"` 在 makensis 编译时拿不到路径 → NSIS bundle 失败。补 x64 / Win32 双平台 build + `Set-Item Env:`,跟 `release-tauri.yml` 同款做法。 2. 清理 `build-mac.sh` 的 noop override之前为兼容 `bundle.resources` 0 字节占位 dll 加的 `--config '{"bundle":{"resources":{}}}'`,本 PR 删除 `bundle.resources` 后这个 override 是空操作(empty merge),删了让命令更干净。 后续遗留(需 workflow scope,留下个 PR)
CI 其他文件审查结论
|
|
To use Codex here, create an environment for this repo. |
PR Reviewer Guide 🔍(Review updated until commit 3414e1f)Here are some key observations to aid the review process:
|
|
Persistent review updated to latest commit 3414e1f |
|
@codex 这次 P2 是误报 — 我在 commit 3414e1f(你 review 的那个 commit)里已经修了。同一个 commit 里同时包含:
`git show 3414e1f -- openless-all/app/scripts/windows-build-gnu.ps1` 可以看到那段加在 dev artifact 复制之后、`npm run tauri build -- --bundles msi nsis` 之前的循环。 |
|
To use Codex here, create an environment for this repo. |
User description
背景
main 上 #268 (millionart/codex) 和 #279 (本人) 修同一个 bug(NSIS 注册 TSF DLL)。merge #279 时没手动解决冲突,导致 `tauri.conf.json` 出现两个 `windows.nsis` block——后者覆盖前者,#268 的更优实现被废,#279 的 installer.nsh 被激活;并留下了死文件、死代码、死目录。
现况快照
选哪个保留?
保留 #268:
清理
`release-tauri.yml` 里"复制 dll 到 openless-ime-payload"步骤、`build-mac.sh` 与 Linux build step 的 `--config '{"bundle":{"resources":{}}}'` override 在没有 bundle.resources 后退化为 noop,不会破坏 build;当前 token 缺 workflow scope,下次再清。
Test plan
PR Type
Bug fix, Enhancement
Description
Build IME DLLs during Windows release
Wire NSIS to packaged IME hooks
Remove stale installer hook and payload mapping
Simplify mac packaging resource handling
Diagram Walkthrough
File Walkthrough
windows-build-gnu.ps1
Build and export IME DLL pathsopenless-all/app/scripts/windows-build-gnu.ps1
OpenLessIme.dllfor bothx64andWin32.build-mac.sh
Simplify mac Tauri build argumentsopenless-all/app/scripts/build-mac.sh
bundle.resourcesoverride fromtauri build.tauri.conf.json
Consolidate NSIS and bundle settingsopenless-all/app/src-tauri/tauri.conf.json
bundle.resourcesIME DLL mappings.perMachineinstalls.nsis/openless-ime-hooks.nsh.installer.nsh
Remove obsolete NSIS installer hookopenless-all/app/src-tauri/installer.nsh
regsvr32register and unregister flow.