-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelectron-builder.js
More file actions
80 lines (75 loc) · 1.55 KB
/
electron-builder.js
File metadata and controls
80 lines (75 loc) · 1.55 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
let config = {
appId: "com.jackarrington.droplet",
productName: "Droplet",
copyright: "Copyright © 2022 Jack Arrington",
directories: {
app: ".",
output: "dist",
buildResources: "build_res"
},
files: [
"package.json",
"public/**/*",
"node_modules"
],
dmg: {
background: null,
backgroundColor: "#ffffff",
window: {
width: "400",
height: "300"
},
contents: [
{
x: 100,
y: 100
},
{
x: 300,
y: 100,
type: "link",
path: "/Applications"
}
]
},
mac: {
target: "dmg",
category: "public.app-category.productivity",
},
win: {
target: "nsis"
},
linux: {
target: "AppImage",
category: "Office"
},
fileAssociations: [{
ext: "drop",
name: "Droplet",
description: "Droplet file",
role: "Editor",
icon: "build_res/drop.icns"
}]
};
// When building a snapshot for testing, we don't need to
// include signing and notarizing, as that takes an annoying
// amount of time.
if (process.env.SNAPSHOT !== "true") {
console.log("\n💧Droplet: packaging RELEASE version...\n");
config = {
...config,
// Signing
mac: {
...config.mac,
hardenedRuntime: true,
entitlements: "build_res/entitlements.mac.plist",
entitlementsInherit: "build_res/entitlements.mac.plist",
gatekeeperAssess: false
},
// Notarizing
afterSign: "scripts/notarize.js",
}
} else {
console.log("\n💧Droplet: packaging SNAPSHOT version...\n");
}
module.exports = config;