-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathelectron-builder.yml
More file actions
130 lines (116 loc) · 3.56 KB
/
electron-builder.yml
File metadata and controls
130 lines (116 loc) · 3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# 应用唯一标识符 (采用反向域名格式)
appId: com.qzonephoto.app
# 产品名称 (显示在界面/安装包中的名称)
productName: Qzone Photo
# 构建资源配置
directories:
buildResources: build # 指定构建资源目录(图标等)
# 包含/排除文件规则
files:
- '!**/.vscode/*'
- '!**/.git/**'
- '!src/**'
- '!**/*.{map,local}'
- '!**/*.config.{js,ts,mjs,cjs}'
- '!**/test/**'
- '!**/mock/**'
- '!.{editorconfig,npmrc,prettierrc*,eslintrc*}'
- '!{README.md,CHANGELOG.md,LICENSE}'
- '!{pnpm-lock.yaml,yarn.lock,package-lock.json}'
- '!dev-app-update.yml'
- '!.release-it.json'
- '!jsconfig.json'
- '!tailwind.config.js'
- '!**/*.{iml,hprof,orig}'
- '!.idea'
- '!.vscode'
- '!.github'
# ASAR解压配置(指定不需要压缩的文件)
asarUnpack:
- resources/** # 保持resources目录未压缩
- out/preload/** # 保持preload脚本未压缩,确保IPC通信正常
# 签名后钩子(用于苹果公证等操作,脚本内部会检查平台)
afterSign: build/afterSign.js
# 打包后钩子(自定义处理打包文件)
afterPack: build/afterPack.js
# Windows平台配置
win:
icon: build/icons/icon.ico
executableName: QzonePhoto # 生成的可执行文件名称,不支持环境变量
target:
- target: nsis
arch:
- x64
- ia32
nsis:
artifactName: QzonePhoto-${version}-${os}-${arch}-setup.${ext} # 安装包命名格式
shortcutName: ${productName} # 快捷方式名称
uninstallDisplayName: ${productName} # 卸载程序显示名称
createDesktopShortcut: always # 始终创建桌面快捷方式
oneClick: false # 禁用一键安装
allowElevation: true # 允许权限提升
allowToChangeInstallationDirectory: true # 允许修改安装目录
runAfterFinish: true # 安装完成后自动运行
perMachine: false # false = 当前用户安装,true = 所有用户
deleteAppDataOnUninstall: false # 卸载时不删除用户数据
# Linux平台配置
linux:
icon: build/icons
target:
- target: AppImage
arch: [x64]
- target: deb
arch: [x64]
maintainer: github.com/11273
category: Utility
synopsis: QzonePhoto - 相册管理工具
description: 一个简单易用的相册管理工具
# macOS平台配置
mac:
icon: build/icons/icon.icns
# 添加类别
category: public.app-category.utilities
# 权限配置文件
entitlementsInherit: build/entitlements.mac.plist
extendInfo:
NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
# 签名配置
# 无 Apple Developer 证书时 electron-builder 会完全跳过签名;由 build/afterPack.js
# 里统一做递归 ad-hoc 重签,避免 macOS 14+ 因 Team ID 不一致导致启动崩溃。
hardenedRuntime: false
gatekeeperAssess: false
notarize: false
artifactName: QzonePhoto-${version}-${os}-${arch}.${ext}
target:
- target: zip
arch: [x64, arm64]
- target: dmg
arch: [x64, arm64]
# macOS DMG配置
dmg:
artifactName: QzonePhoto-${version}-${os}-${arch}.${ext} # DMG包命名格式
format: UDZO
# AppImage配置
appImage:
artifactName: QzonePhoto-${version}-${os}-${arch}.${ext} # 命名格式
synopsis: QzonePhoto
category: Utility
# DEB包配置
deb:
artifactName: QzonePhoto-${version}-linux-${arch}.${ext}
depends:
- libgtk-3-0
- libnotify4
- libnss3
- libxss1
- libxtst6
- xdg-utils
- libatspi2.0-0
- libuuid1
- libsecret-1-0
category: utils
priority: optional
releaseInfo:
releaseNotesFile: RELEASE_NOTES.md
# 禁止自动重建原生模块
npmRebuild: false