forked from openimsdk/openim-electron-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelectron-builder.json5
94 lines (94 loc) · 2.46 KB
/
electron-builder.json5
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
/**
* @see https://www.electron.build/configuration/configuration
*/
{
appId: "io.opencorp.desktop.base",
productName: "OpenCorp-Base",
asar: true,
asarUnpack: ["**/*.node"],
extends: null,
directories: {
output: "release/Base/${version}",
},
files: [
"dist",
"!dist/*.wasm",
"dist-electron",
"!node_modules/rxjs/**/*",
"!node_modules/koffi/src/**/*",
"!node_modules/koffi/build/**/*",
"!node_modules/koffi/vendor/**/*",
"!node_modules/@openim/wasm-client-sdk/assets/**/*",
"!node_modules/@openim/electron-client-sdk/assets/**/*",
],
extraResources: [
{
from: "extraResources",
to: "extraResources",
},
{
from: "node_modules/rxjs",
to: "app.asar.unpacked/node_modules/rxjs",
},
],
mac: {
artifactName: "${productName}_${version}_${arch}.${ext}",
target: ["dmg"],
icon: "./dist/icons/mac_icon.png",
extraResources: [
{
from: "node_modules/@openim/electron-client-sdk/assets/mac_${arch}/",
to: "app.asar.unpacked/node_modules/@openim/electron-client-sdk/assets/mac_${arch}",
},
{
from: "node_modules/koffi/build/koffi/darwin_${arch}/",
to: "koffi/darwin_${arch}",
},
],
},
win: {
target: [
{
target: "nsis",
},
],
artifactName: "${productName}_${version}.${ext}",
icon: "./dist/icons/icon.ico",
extraResources: [
{
from: "node_modules/@openim/electron-client-sdk/assets/win_${arch}/",
to: "app.asar.unpacked/node_modules/@openim/electron-client-sdk/assets/win_${arch}",
},
{
from: "node_modules/koffi/build/koffi/win32_${arch}/",
to: "koffi/win32_${arch}",
},
],
},
linux: {
icon: "./dist/icons/icon.png",
target: "deb",
maintainer: "opencorp-base",
artifactName: "${productName}_${version}_${arch}.${ext}",
extraResources: [
{
from: "node_modules/@openim/electron-client-sdk/assets/linux_${arch}/",
to: "app.asar.unpacked/node_modules/@openim/electron-client-sdk/assets/linux_${arch}",
},
{
from: "node_modules/koffi/build/koffi/linux_${arch}/",
to: "koffi/linux_${arch}",
},
],
},
nsis: {
oneClick: false,
perMachine: true,
allowElevation: true,
allowToChangeInstallationDirectory: true,
createDesktopShortcut: true,
createStartMenuShortcut: true,
deleteAppDataOnUninstall: true,
shortcutName: "OpenCorp-Base",
}
}