# FFAI Agent Desktop 打包配置（PR11.6）
#
# 默认产物：macOS .dmg（arm64 + x64）/ Windows .exe NSIS。
# codesign / notarize 走环境变量驱动，CI/本地都不在 PR 内硬写凭据：
#   - macOS：APPLE_ID / APPLE_APP_SPECIFIC_PASSWORD / APPLE_TEAM_ID
#   - Windows：CSC_LINK / CSC_KEY_PASSWORD
# 凭据缺失时 electron-builder 自动跳过签名（仅 dev / 内部分发用），不阻断 build。
#
# 详见 https://www.electron.build/configuration/configuration

appId: com.faradayfuture.ffai.agent
productName: FFAI Agent
copyright: Copyright © 2026 Faraday Future
artifactName: "${productName}-${version}-${arch}.${ext}"

directories:
  output: out
  buildResources: build

files:
  - "dist/**/*"
  - "locales/**/*"
  - "assets/**/*"
  - "package.json"
  - "!node_modules/**/*.md"
  - "!node_modules/**/*.map"
  - "!**/.DS_Store"

asar: true

# macOS
mac:
  category: public.app-category.productivity
  target:
    - target: dmg
      arch: [arm64, x64]
  icon: build/icon.icns        # PR11.6 占位：icon 资产由设计同步前补
  hardenedRuntime: true
  gatekeeperAssess: false
  entitlements: build/entitlements.mac.plist
  entitlementsInherit: build/entitlements.mac.plist
  # notarize 由 electron-builder 在 env 齐全时自动跑（@electron/notarize）

dmg:
  contents:
    - x: 130
      y: 220
    - x: 410
      y: 220
      type: link
      path: /Applications

# Windows
win:
  target:
    - target: nsis
      arch: [x64, arm64]
  icon: build/icon.ico         # PR11.6 占位

nsis:
  oneClick: false
  allowToChangeInstallationDirectory: true
  perMachine: false

# 自动更新：PR11 不接 autoUpdater；Phase 2 后续 PR 引入 electron-updater + S3/own server
publish: null
