-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathelectron-builder.yml
More file actions
executable file
·158 lines (146 loc) · 4.6 KB
/
electron-builder.yml
File metadata and controls
executable file
·158 lines (146 loc) · 4.6 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# see config at https://www.electron.build/configuration
appId: com.github.zyfun
productName: zyfun
copyright: Copyright © 2023 zyfun Inc.
electronLanguages:
- zh-CN
- zh-TW
- en-US
- zh_CN # for macOS
- zh_TW # for macOS
- en # for macOS
directories:
buildResources: build
protocols:
- name: zyfun
schemes:
- zy
files:
- '**/*'
# Exclusion IDE
- '!**/{.vscode,.idea,.cursor,.codebuddy,.trae,.qwen,.gemini,.claude}/*'
- '!**/{.editorconfig,.jekyll-metadata}'
# Exclusion build and configuration files
- '!electron.vite.config.{js,ts,mjs,cjs}'
- '!dev-app-update.yml'
- '!**/{tsconfig.json,tsconfig.tsbuildinfo,tsconfig.node.json,tsconfig.web.json}'
# Exclusion code quality and formatting tool configurations
- '!**/{.eslintignore,.eslintrc.js,.eslintrc.json,.eslintrc.cjs,.eslintcache,root.eslint.config.js,eslint.config.js,.eslint.config.mjs}'
- '!**/{.prettierignore,.prettierrc.yaml,.prettierrc.yml,.prettierrc.js}'
- '!**/{.stylelintignore,stylelint.config.js,.stylelintrc.yaml,.stylelintrc.yml}'
- '!commitlintrc.{json,yml,yaml,js,cjs,mjs,ts,mts,cts}'
- '!commitlint.config.{js,cjs,mjs,ts,mts,cts}'
# Exclusion package managers
- '!{.nvmrc,.npmrc,pnpm-lock.yaml,yarn.lock,package-lock.json}'
- '!{.yarnclean,.yarnrc.yml}'
# Exclusion environment variable files
- '!{.env,.env.*}'
# Exclusion source code/documentation/design
- '!src'
- '!script'
- '!scripts'
- '!docs'
- '!packages'
- '!patches'
- '!design/*.sketch'
# Exclusion python
- '!**/.venv'
- '!**/venv'
- '!**/__pycache__'
- '!**/*.pyc'
- '!**/uv.lock'
# Exclusion version control
- '!**/{.git.gitignore,.gitattributes,.git-blame-ignore-revs,.hg,.svn,CVS,RCS,SCCS,}'
- '!**/.DS_Store'
- '!._*'
# Exclusion tests/examples
- '!**/{test,tests,__tests__,powered-test,coverage}/**'
- '!**/{example,examples}/**'
- '!**/*.{spec,test}.{js,jsx,ts,tsx}'
# Exclusion native build files
- '!**/node_modules/**/*.cpp'
- '!**/node_modules/node-addon-api/**'
- '!**/node_modules/prebuild-install/**'
- '!**/*.{h,iobj,ipdb,tlog,recipe,vcxproj,vcxproj.filters,Makefile,*.Makefile}' # filter .node build files
# Exclusion others
- '!.swc'
- '!.bin'
- '!**/*.min.*.map'
- '!**/*.d.ts'
- '!*.log'
- '!**/{LICENSE,LICENSE.txt,ThirdPartyNotices.txt,NOTICE.txt,README.md,RELEASE.md,CHANGELOG.md}'
- '!node_modules/rollup-plugin-visualizer'
asar: true
asarUnpack:
- resources/**
win:
artifactName: ${productName}-${os}-${version}-${arch}-setup.${ext}
executableName: zyfun
icon: build/icon.ico
# signAndEditExecutable: false
signtoolOptions:
sign: scripts/win-sign.js
target:
- target: nsis
# - target: portable
verifyUpdateCodeSignature: false
nsis:
allowToChangeInstallationDirectory: true
artifactName: ${productName}-${os}-${version}-${arch}-setup.${ext}
buildUniversalInstaller: false
createDesktopShortcut: always
differentialPackage: false
include: build/nsis-installer.nsh
oneClick: false
shortcutName: ${productName}
uninstallDisplayName: ${productName}
portable:
artifactName: ${productName}-${os}-${version}-${arch}-portable.${ext}
buildUniversalInstaller: false
mac:
artifactName: ${productName}-${os}-${version}-${arch}.${ext}
category: public.app-category.video
entitlementsInherit: build/entitlements.mac.plist
executableName: zyfun
extendInfo:
- 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.
icon: build/icon.icns
notarize: false
target:
- target: dmg
- target: zip
dmg:
writeUpdateInfo: false
linux:
artifactName: ${productName}-${os}-${version}-${arch}.${ext}
category: Video;AudioVideo
desktop:
entry:
Name: zyfun
StartupWMClass: zyfun
executableName: zyfun
icon: build/icon.icns
maintainer: zyfun
mimeTypes:
- x-scheme-handler/zy
target:
- target: AppImage
- target: deb
- target: rpm
rpm:
# Workaround for electron build issue on rpm package:
# https://github.com/electron/forge/issues/3594
fpm: ['--rpm-rpmbuild-define=_build_id_links none']
publish:
provider: github
owner: 'Hiram-Wong'
repo: 'zyfun'
electronDownload:
mirror: https://npmmirror.com/mirrors/electron/
beforePack: scripts/before-pack.js
afterPack: scripts/after-pack.js
afterSign: scripts/notarize.js
artifactBuildCompleted: scripts/artifact-build-completed.js