fix(macos): 添加 macOS 签名与本地网络权限配置#5
Open
lucaszhongsj wants to merge 1 commit into
Open
Conversation
macOS LaunchServices 限制未签名(ad-hoc)构建的本地网络 socket, 导致从 Finder 启动时 PS5 发现报 No route to host。 本改动不修复 ad-hoc 构建本身,仅为 Developer ID 签名 + 公证发布 提供配置:启用 hardenedRuntime、entitlements、 NSLocalNetworkUsageDescription,并给出 notarize 占位。 维护者配置 CSC_LINK 及 APPLE_ID 相关环境变量后即可产出正常构建。
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.
问题
macOS 上从 Finder / Dock 启动 PeaSyo4Desk 时,PS5 本地网络发现失败,报错:
Discovery send failed: No route to host (os error 65)
根因
macOS LaunchServices 对未签名(ad-hoc)的 App 施加本地网络 socket 运行时限制。直接
exec二进制(终端启动)可绕过,但双击 /open启动会触发该限制。本 PR 的说明
本改动不会修复 ad-hoc 构建本身,只是为官方 Developer ID 签名 + 公证(notarize)的正式发布铺平道路。
改动
electron-builder.yml:启用hardenedRuntime、指定entitlements、添加NSLocalNetworkUsageDescription,并给出notarize占位resources/entitlements.mac.plist:声明 Electron hardened runtime 权限及network.client/network.server本地验证
无
CSC_LINK时构建产物仍为adhoc,linker-signed(无runtime标志),App 可正常启动,不会破坏现有未签名发布流程。维护者在 CI 配置
CSC_LINK、CSC_KEY_PASSWORD及APPLE_ID/APPLE_APP_SPECIFIC_PASSWORD/TEAM_ID后,即可产出可从 Finder 正常启动的签名构建。