根因:afterPack 中使用 codesign --force --deep -s - 签名,但 --deep 标志 不可靠,无法保证正确的签名顺序,导致 Electron 内嵌的 helper apps、 frameworks、.node 原生模块未被正确签名,ShipIt 在 kSecCSStrictValidate 严格校验时失败。 修复方案: - scripts/after-pack.js: 移除 Step 4 的 --deep 签名 - scripts/after-sign.js (新增): afterSign 钩子中从内到外逐个签名: 1. 所有 .node/.dylib/.so 原生二进制 2. 所有 .framework 目录 3. 所有 Electron Helper .app 4. 主 .app bundle 签名完成后执行 codesign --verify --strict 验证 - electron-builder.yml: 添加 afterSign 钩子引用 使用 afterSign 而非 afterPack 的原因:afterSign 在 electron-builder 自身 签名步骤之后执行(CSC_IDENTITY_AUTO_DISCOVERY=false 时为 no-op),确保 ad-hoc 签名是创建 DMG/ZIP 产物前的最后一步,不会被后续处理覆盖或失效。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
85 lines
1.8 KiB
YAML
85 lines
1.8 KiB
YAML
appId: com.codepilot.app
|
|
productName: CodePilot
|
|
publish:
|
|
provider: github
|
|
owner: op7418
|
|
repo: CodePilot
|
|
directories:
|
|
output: release
|
|
files:
|
|
- dist-electron/**/*
|
|
- "!node_modules"
|
|
- "!src"
|
|
- "!electron"
|
|
- "!.next"
|
|
- "!build"
|
|
- "!scripts"
|
|
- "!docs"
|
|
- "!release"
|
|
- "!data"
|
|
extraResources:
|
|
- from: .next/standalone/
|
|
to: standalone/
|
|
filter:
|
|
- "**/*"
|
|
- "!node_modules"
|
|
- "!release"
|
|
- from: .next/standalone/node_modules/
|
|
to: standalone/node_modules/
|
|
filter: ["**/*"]
|
|
- from: .next/standalone/.next/
|
|
to: standalone/.next/
|
|
filter: ["**/*"]
|
|
- from: .next/static/
|
|
to: standalone/.next/static/
|
|
filter: ["**/*"]
|
|
- from: public/
|
|
to: standalone/public/
|
|
filter: ["**/*"]
|
|
- from: build/
|
|
to: .
|
|
filter: ["icon.*"]
|
|
afterPack: scripts/after-pack.js
|
|
afterSign: scripts/after-sign.js
|
|
asarUnpack:
|
|
- "**/*.node"
|
|
- "**/better-sqlite3/**"
|
|
mac:
|
|
icon: build/icon.icns
|
|
category: public.app-category.developer-tools
|
|
artifactName: "${productName}-${version}-${arch}.${ext}"
|
|
target:
|
|
- target: dmg
|
|
arch: [x64, arm64]
|
|
- target: zip
|
|
arch: [x64, arm64]
|
|
win:
|
|
icon: build/icon.ico
|
|
target:
|
|
- target: nsis
|
|
arch: [x64, arm64]
|
|
nsis:
|
|
oneClick: false
|
|
perMachine: false
|
|
allowToChangeInstallationDirectory: false
|
|
createDesktopShortcut: true
|
|
createStartMenuShortcut: true
|
|
deleteAppDataOnUninstall: false
|
|
linux:
|
|
icon: build/icon.png
|
|
category: Development
|
|
artifactName: "${productName}-${version}-${arch}.${ext}"
|
|
desktop:
|
|
entry:
|
|
Name: CodePilot
|
|
Comment: A native desktop GUI for Claude Code
|
|
Categories: Development;IDE;
|
|
StartupWMClass: codepilot
|
|
target:
|
|
- target: AppImage
|
|
arch: [x64, arm64]
|
|
- target: deb
|
|
arch: [x64, arm64]
|
|
- target: rpm
|
|
arch: [x64, arm64]
|