forked from xushengfeng/eSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelectron-builder.config.js
114 lines (113 loc) · 2.96 KB
/
electron-builder.config.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
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
var arch = (process.env["npm_config_arch"] || process.env["M_ARCH"] || process.arch) == "arm64" ? ["arm64"] : ["x64"];
/**
* @type import("electron-builder").Configuration
*/
let build = {
appId: "com.esearch.app",
executableName: "e-search",
directories: {
output: "build",
},
compression: "maximum",
icon: "./assets/logo",
electronDownload: {
mirror: "https://npmmirror.com/mirrors/electron/",
},
npmRebuild: false,
fileAssociations: [
{
ext: "svg",
mimeType: "image/svg+xml",
role: "Editor",
},
{
ext: "png",
mimeType: "image/png",
role: "Editor",
},
{
ext: "jpg",
mimeType: "image/jpeg",
role: "Editor",
},
],
asar: false,
artifactName: "${productName}-${version}-${platform}-" + arch[0] + ".${ext}",
beforePack: "./before_pack.js",
linux: {
category: "Utility",
target: ["tar.gz", "deb", "rpm", "AppImage"],
files: [
"!.vscode",
"!.github",
"!assets/logo/icon.icns",
"!assets/logo/icon.ico",
"!src",
"!node_modules/onnxruntime-node/bin/napi-v3/win32",
"!node_modules/onnxruntime-node/bin/napi-v3/darwin",
"!node_modules/onnxruntime-web",
],
},
deb: {
depends: ["ffmpeg"],
},
rpm: {
depends: ["ffmpeg"],
},
mac: {
files: [
"!lib/gtk-open-with",
"!lib/kde-open-with",
"!.vscode",
"!.github",
"!assets/logo/1024x1024.png",
"!assets/logo/512x512.png",
"!assets/logo/icon.ico",
"!src",
"!node_modules/onnxruntime-node/bin/napi-v3/win32",
"!node_modules/onnxruntime-node/bin/napi-v3/linux",
"!node_modules/onnxruntime-web",
],
target: [
{
target: "dmg",
arch: arch,
},
{
target: "zip",
arch: arch,
},
],
},
win: {
icon: "./assets/logo/icon.ico",
target: [
{
target: "nsis",
arch: arch,
},
{
target: "zip",
arch: arch,
},
],
files: [
"!lib/gtk-open-with",
"!lib/kde-open-with",
"!.vscode",
"!.github",
"!assets/logo/icon.icns",
"!assets/logo/1024x1024.png",
"!assets/logo/512x512.png",
"!src",
"!node_modules/onnxruntime-node/bin/napi-v3/linux",
"!node_modules/onnxruntime-node/bin/napi-v3/darwin",
"!node_modules/onnxruntime-web",
],
},
nsis: {
oneClick: false,
allowToChangeInstallationDirectory: true,
},
};
module.exports = build;