Repository navigation
fix(resources): 兼容 Windows/Linux 的打包资源目录 - #319
Merged
helsome merged 1 commit intoOct 13, 2026
Merged
Conversation
4 tasks done
helsome
approved these changes
Oct 13, 2026
helsome
left a comment
Owner
There was a problem hiding this comment.
目录名完整匹配且忽略大小写的修复正确,仍保留 FINAGENT_PACKAGED 门禁,没有扩大到新的资源加载机制。已核对 #318 认领与测试:作者提供 Windows/Bun/Electron 版本、focused 7/0、shared 1122/0、全部 typecheck,并附真实 Electron main-process smoke 的脚本和红→绿结果;对本次路径判定足够,不要求安装包全链路或截图。当前没有 head 的 PR Actions run,批准依据为代码审查及上述作者报告,不声称 CI 已通过。
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.
改动说明
Windows / Linux 的 Electron 资源目录是小写
resources,原定位器只认Resources,导致打包模式错误回退到源码路径,技能目录、Pi cwd 和扩展入口随之错误。改为比较最后一个路径段的完整名称(忽略大小写),保持
FINAGENT_PACKAGED=1门禁。回归覆盖两种资源目录名、技能及两个扩展的打包路径、开发环境门禁,并拒绝NotResources这样的后缀误匹配。关联 Issue
Closes #318
测试报告
环境
a6da0059ecafe4426c9a841ec59215655ebcabd1实际执行命令与结果
真实 Electron main-process smoke:用 Bun 将基线/修复后的定位器分别打成 CJS,然后以 Electron 运行以下脚本。使用真实
process.resourcesPath,只模拟 Folio 根据app.isPackaged设置的 flag。resource-smoke.cjs(可复现)
已知失败 / Baseline
最终检查无失败。未运行完整安装包 E2E,未验证实际扩展加载。macOS / Linux 路径仅由单元测试及 electron-builder 源码核对,真实 Electron smoke 在 Windows 执行。
UI 截图
Scope / 后续
仅改资源定位器及其测试,不修改打包配置、IPC、扩展实现或 UI。独立基于上游 main,与 PR #317 无提交或文件依赖。Codex 在用户授权下准备改动与验证。