Skip to content

Fix macOS entrypoint repair wrappers - #156

Closed
twodogegg wants to merge 1 commit into
BigPizzaV3:mainfrom
twodogegg:fix-macos-entrypoint-repair
Closed

Fix macOS entrypoint repair wrappers#156
twodogegg wants to merge 1 commit into
BigPizzaV3:mainfrom
twodogegg:fix-macos-entrypoint-repair

Conversation

@twodogegg

Copy link
Copy Markdown

Summary

Fix macOS entrypoint repair so it does not overwrite installed .app executables with broken shell wrappers.

Why

I reproduced this on macOS with the v1.1.1 DMG. After using the manager repair entrypoint action:

  • /Applications/Codex++.app/Contents/MacOS/CodexPlusPlus was replaced by a shell script that executes itself, so launching Codex++ from Alfred/Finder reports that the app is not responding.
  • /Applications/Codex++ 管理工具.app/Contents/MacOS/CodexPlusPlusManager was replaced by a wrapper pointing to codex-plus-plus-manager, but that lowercase binary does not exist inside the app bundle.
  • The repaired plist referenced codex-plus-plus.png, while the DMG app bundle ships codex-plus-plus.icns, causing launcher/search UIs to show a missing icon.

Changes

  • Track both the app bundle executable path and the source target path in the macOS install plan.
  • Avoid writing a wrapper when the target is already the installed app bundle executable.
  • Fail clearly if an installed app executable is missing and no source binary is available instead of creating a recursive wrapper.
  • Resolve the manager app binary path from .app bundles using CodexPlusPlusManager, matching the packaged filename.
  • Use the shipped codex-plus-plus.icns in repaired app bundles.
  • Add regression tests for self-wrapping and lowercase manager wrapper paths.

Testing

  • cargo fmt --check
  • cargo test -p codex-plus-core --test installers

Note: cargo test -p codex-plus-core still has an unrelated existing failure on macOS in wrapper_dir_uses_roaming_codex_plus_plus because it expects Windows backslashes in a Windows-style path constructed on macOS.

@BigPizzaV3

Copy link
Copy Markdown
Owner

啥问题 简单说一下

@twodogegg

Copy link
Copy Markdown
Author

啥问题 简单说一下
mac os ,第一次运行 codex ++ 的时候可以打开 codex 桌面端,后来过不久打开再打开以后 codex ++ ,显示的图标是一个占位的空图标。然后就启动不了 codex ++了。 我就让codex cli修复了这个问题。

@BigPizzaV3

Copy link
Copy Markdown
Owner

Codex++ maintainer review note

当前 main 下这个 PR 仍存在 merge conflict,暂时不能合并。请先 rebase 到最新 main 并解决冲突;更新后我们会重新跑针对性测试再复审。

This PR currently conflicts with main, so it is not mergeable yet. Please rebase onto the latest main and resolve the conflicts, then we can review and test it again.

@BigPizzaV3

Copy link
Copy Markdown
Owner

当前 已改为在 macOS bundle 中复制并校验 sidecar 二进制,再由稳定入口脚本启动,相关 bundle/重命名问题也经 、、 等后续修复。此 PR 基于旧的 wrapper 写入模型,除图标部分外已被替代;图标问题由范围更小的 #1696 单独跟踪。现关闭本 PR。感谢贡献。

@BigPizzaV3 BigPizzaV3 closed this Aug 26, 2026
@BigPizzaV3

Copy link
Copy Markdown
Owner

补充完整关闭依据:当前 main 已改为在 macOS bundle 中复制并校验 sidecar 二进制,再由稳定入口脚本启动,相关 bundle/重命名问题也经 1ba0f711eb628e307aae9 等后续修复。此 PR 基于旧 wrapper 写入模型,除图标部分外已被替代;图标问题由范围更小的 #1696 单独跟踪。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants