Skip to content

fix(macos): 添加 macOS 签名与本地网络权限配置#5

Open
lucaszhongsj wants to merge 1 commit into
Geocld:mainfrom
lucaszhongsj:fix/macos-local-network-launchservices
Open

fix(macos): 添加 macOS 签名与本地网络权限配置#5
lucaszhongsj wants to merge 1 commit into
Geocld:mainfrom
lucaszhongsj:fix/macos-local-network-launchservices

Conversation

@lucaszhongsj

@lucaszhongsj lucaszhongsj commented Jul 4, 2026

Copy link
Copy Markdown

问题

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_LINKCSC_KEY_PASSWORDAPPLE_ID / APPLE_APP_SPECIFIC_PASSWORD / TEAM_ID 后,即可产出可从 Finder 正常启动的签名构建。

macOS LaunchServices 限制未签名(ad-hoc)构建的本地网络 socket,
导致从 Finder 启动时 PS5 发现报 No route to host。

本改动不修复 ad-hoc 构建本身,仅为 Developer ID 签名 + 公证发布
提供配置:启用 hardenedRuntime、entitlements、
NSLocalNetworkUsageDescription,并给出 notarize 占位。

维护者配置 CSC_LINK 及 APPLE_ID 相关环境变量后即可产出正常构建。
@lucaszhongsj lucaszhongsj marked this pull request as ready for review July 4, 2026 05:47
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.

1 participant