-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathelectron-builder.config.js
More file actions
89 lines (81 loc) · 2.19 KB
/
electron-builder.config.js
File metadata and controls
89 lines (81 loc) · 2.19 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
/**
* Electron Builder Configuration
* https://www.electron.build/configuration/configuration
*/
module.exports = {
appId: 'com.resgrid.unit',
productName: 'Resgrid Unit',
copyright: 'Copyright © 2024 Resgrid',
directories: {
output: 'electron-dist',
buildResources: 'assets',
},
files: ['dist/**/*', 'electron/**/*', '!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}', '!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}', '!**/node_modules/.bin'],
// macOS configuration
mac: {
category: 'public.app-category.productivity',
target: [
{ target: 'dmg', arch: ['x64', 'arm64'] },
{ target: 'zip', arch: ['x64', 'arm64'] },
],
icon: 'assets/icon.png',
hardenedRuntime: true,
gatekeeperAssess: false,
entitlements: 'electron/entitlements.mac.plist',
entitlementsInherit: 'electron/entitlements.mac.plist',
darkModeSupport: true,
},
dmg: {
contents: [
{ x: 130, y: 220 },
{ x: 410, y: 220, type: 'link', path: '/Applications' },
],
window: {
width: 540,
height: 380,
},
},
// Windows configuration
win: {
target: [
{ target: 'nsis', arch: ['x64'] },
{ target: 'portable', arch: ['x64'] },
],
icon: 'assets/icon.ico',
},
nsis: {
oneClick: false,
allowToChangeInstallationDirectory: true,
installerIcon: 'assets/icon.ico',
uninstallerIcon: 'assets/icon.ico',
installerHeaderIcon: 'assets/icon.ico',
createDesktopShortcut: true,
createStartMenuShortcut: true,
shortcutName: 'Resgrid Unit',
license: 'LICENSE',
},
// Linux configuration
linux: {
target: [
{ target: 'AppImage', arch: ['x64'] },
{ target: 'deb', arch: ['x64'] },
{ target: 'rpm', arch: ['x64'] },
],
category: 'Office',
icon: 'assets/icon.png',
maintainer: 'Resgrid <team@resgrid.com>',
vendor: 'Resgrid',
desktop: {
entry: {
Name: 'Resgrid Unit',
Comment: 'Resgrid Unit Management Application',
Category: 'Office;Utility;',
StartupWMClass: 'resgrid-unit',
},
},
},
// Extra metadata
extraMetadata: {
main: 'electron/main.js',
},
};