calibration-pc/electron-builder.yml

77 lines
3.4 KiB
YAML

# 应用程序的唯一标识符
appId: gy.calibration.pc
# 应用程序的名称
productName: 谷云校表产测
# 定义构建资源和输出文件的目录
directories:
buildResources: build
# 定义要包含或排除在构建输出中的文件
files:
- '!**/.vscode/*' # 排除VSCode配置文件
- '!**/.cursor/*' # 排除cursor配置文件
- '!**/.idea/*' # 排除idea配置文件
- '!src/*' # 排除源代码目录
- '!**/*.log' # 排除日志文件
- '!electron.vite.config.{js,ts,mjs,cjs}' # 排除Electron构建配置文件
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}' # 排除开发和文档文件
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml,*.zip,app.log}' # 排除环境和包管理配置文件
# 定义需要解压的asar文件
asarUnpack:
- resources/** # 解压资源目录下的所有文件
# 针对Windows平台的配置
win:
icon: resources/icon.png # 应用程序图标的路径
# 针对NSIS安装程序的配置
nsis:
artifactName: ${productName}-${version}-setup.${ext} # 安装程序的文件名格式
shortcutName: ${productName} # 快捷方式的名称
uninstallDisplayName: ${productName} # 卸载程序显示的名称
createDesktopShortcut: always # 总是在桌面创建快捷方式
allowToChangeInstallationDirectory: true # 允许用户选择安装目录
oneClick: false # 设置为非一键安装
installerIcon: resources/icon.ico # 安装程序的图标
uninstallerIcon: resources/icon.ico # 卸载程序的图标
installerHeader: resources/icon.png # 安装程序头部的图像
installerHeaderIcon: resources/icon.png # 安装程序头部图标的路径
# 针对macOS平台的配置
mac:
entitlementsInherit: build/entitlements.mac.plist # 继承权限配置文件
extendInfo: # 添加macOS应用的元数据
- NSCameraUsageDescription: Application requests access to the device's camera. # 摄像头使用权限描述
- NSMicrophoneUsageDescription: Application requests access to the device's microphone. # 麦克风使用权限描述
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder. # 文档夹使用权限描述
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder. # 下载夹使用权限描述
notarize: false # 是否进行苹果的公证
icon: resources/icon.png # 应用程序的图标路径
identity: null # 签名身份
# 针对dmg安装包的配置
dmg:
artifactName: ${name}-${version}.${ext} # dmg文件的命名格式
# 针对Linux平台的配置
linux:
target: # 目标包类型
- AppImage
- snap
- deb
maintainer: GuyunDevelopment # 维护者信息
category: Utility # 应用程序类别
icon: resources/icon.png # 应用程序图标路径
# 针对AppImage包的配置
appImage:
artifactName: ${name}-${version}.${ext} # AppImage文件的命名格式
# 是否在npm安装时重建asar包
npmRebuild: false
# 配置自动更新的信息
publish:
provider: generic # 更新服务提供者
url: https://example.com/auto-updates # 更新信息的URL
# provider: github # 更新服务提供者
# owner: fanhuayishiy # GitHub用户名
# repo: mygit1 # GitHub仓库名称
# token: ${env:GITHUB_TOKEN}
# releaseType: release
# 配置Electron下载的镜像地址
electronDownload:
mirror: https://npmmirror.com/mirrors/electron/ # Electron下载的镜像地址