-
Notifications
You must be signed in to change notification settings - Fork 5
/
pack.js
74 lines (71 loc) · 1.65 KB
/
pack.js
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
console.time("build-time");
const builder = require("electron-builder");
const options = {
productName: "MultiZen Browser",
appId: "com.imbacorp.multizen",
artifactName: "MultiZen-Browser_${arch}_${os}.${ext}",
compression: "normal", // "store” | “normal” | "maximum". - For testing builds, use 'store' to reduce build time significantly.
removePackageScripts: true,
nodeGypRebuild: false,
buildDependenciesFromSource: false,
directories: {
output: ".output",
},
extraFiles: [
{
from: "resources",
to: "resources",
},
],
files: ["out/**/*"],
dmg: {
contents: [
{
x: 410,
y: 150,
type: "link",
path: "/Applications",
},
{
x: 130,
y: 150,
type: "file",
},
],
},
mac: {
icon: "resources/icons/icon.png",
},
win: {
icon: "resources/icons/icon.png",
target: [
{
target: "nsis",
arch: ["x64"],
},
],
},
linux: {
icon: "resources/icons",
category: "Network;WebBrowser;",
target: [
{
target: "deb",
arch: ["x64"],
},
],
},
};
builder
.build({
config: options,
})
.then((result) => {
if (result.length) {
console.log("output:", JSON.stringify(result));
}
console.timeEnd("build-time");
})
.catch((error) => {
console.error(error);
});