修复 macOS app 入口和启动失败状态提示#369
Open
0xC3B6 wants to merge 1 commit into
Open
Conversation
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.
变更说明
本 PR 修复 Rust 版本在 macOS 安装/修复入口时的两个问题:
.app可执行文件的问题之前在生成 macOS app bundle 入口时,某些已安装路径下会把真实 Mach-O 可执行文件覆盖成启动脚本,导致安装后的
Codex++.app或Codex++ 管理工具.app可能出现无法正常启动的问题。本次调整了 macOS app bundle 的目标路径判断和 companion binary 路径解析,确保安装/修复入口时保留真实可执行文件,不再把自身覆盖成脚本。
之前如果 Codex++ 静默启动阶段失败,例如查询 CDP targets 失败,用户侧可能只看到 Codex++ 没有响应,不容易知道失败原因。
现在 launcher 在启动/注入失败时会自动打开
Codex++ 管理工具,并直接进入状态页,方便用户查看最近一次启动失败信息。实现细节
MacosAppBundle增加目标可执行文件路径记录,用于判断当前写入目标是否就是真实 app executable。Codex++.app和Codex++ 管理工具.app能正确互相定位。--show-status。showStatus,前端根据该参数默认打开状态页。验证
cargo test -p codex-plus-core --test installers(11 passed)cargo test -p codex-plus-launcher(6 passed)cargo test -p codex-plus-manager --lib startup_options(5 passed)npm --prefix apps/codex-plus-manager run checkgit diff --checkcargo fmt --check -p codex-plus-core -p codex-plus-launcher -p codex-plus-manager备注
本地验证中重新打包并安装 macOS app 后,确认:
/Applications/Codex++.app/Contents/MacOS/CodexPlusPlus仍为 Mach-O 可执行文件/Applications/Codex++ 管理工具.app/Contents/MacOS/CodexPlusPlusManager仍为 Mach-O 可执行文件