Files
nl-admin-view/apps/desktop/electron-builder.yml
李琦 318aeab092
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
AI代码生成工具、个人中心
2026-08-13 19:04:28 +08:00

77 lines
2.9 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# electron-builder 打包配置Windows + macOS 双平台)
#
# 签名/公证完全由环境变量驱动,本文件不写死任何证书:
# - 配置了 CSC_LINK + CSC_KEY_PASSWORD或 mac 钥匙串里有 Developer ID 证书)→ 自动签名;
# 没配置则 electron-builder 自动跳过签名,只告警不报错(出未签名包)
# - APPLE_ID + APPLE_APP_SPECIFIC_PASSWORD + APPLE_TEAM_ID 三者齐全 → 自动公证;缺任一则跳过
# - 未签名 mac 包首次打开需右键「打开」,自动更新由 updater.ts 降级为手动下载引导
#
# 注意mac 包必须在 macOS 机器上构建(不支持从 Windows 交叉编译),命令同一条 pnpm build:desktop
# 必须与 src/main/config.ts 的 APP_ID 一致Windows 通知 AUMID 对齐)
appId: com.nladmin.desktop
productName: Nl Admin
directories:
output: release
buildResources: resources
# 只打 electron-vite 产物:运行时依赖已全部打进 out/asar 里无需 node_modules
files:
- out/**
extraResources:
# web-antd 生产 dist → resources/webapp:// 协议的静态根;不进 asar为后续渲染层热替换留路
- from: ../web-antd/dist
to: web
# 应用图标供运行时使用(托盘 / 通知 / 窗口图标)
- from: resources/icon.png
to: icon.png
asar: true
# dependencies 为空(依赖全部打进 out/),跳过原生依赖重建
npmRebuild: false
# 产物名不带空格,避免更新托管 URL 转义问题
artifactName: nl-admin-desktop-${version}-${os}-${arch}.${ext}
win:
# 提供 ≥512px 的 pngelectron-builder 自动转 .ico
icon: resources/icon.png
target:
- target: nsis
arch:
- x64
nsis:
# 非一键安装:允许用户选择安装目录
oneClick: false
allowToChangeInstallationDirectory: true
# 开始菜单快捷方式是 Windows 通知AUMID生效的前提必须保留
createDesktopShortcut: always
createStartMenuShortcut: true
shortcutName: Nl Admin
mac:
# 同一张 png 自动转 .icns
icon: resources/icon.png
category: public.app-category.business
# 公证的前置要求;配合基础 entitlements无摄像头/麦克风,本项目无音视频)
hardenedRuntime: true
gatekeeperAssess: false
entitlements: resources/entitlements.mac.plist
entitlementsInherit: resources/entitlements.mac.plist
target:
# zip 是 mac 自动更新latest-mac.yml的必需格式dmg 用于人工分发安装
- target: dmg
arch:
- x64
- arm64
- target: zip
arch:
- x64
- arm64
dmg:
# dmg 容器本身不签名zip 内的 .app 已按环境变量策略签名),减少无证书时的干扰告警
sign: false
publish:
# generic 静态托管:目录里放 latest.yml / latest-mac.yml / 安装包 / blockmap 即可
# TODO(待确认):与 src/main/config.ts 的 UPDATE_URL 保持一致
provider: generic
url: https://updates.example.com/nl-desktop/