-
-
Notifications
You must be signed in to change notification settings - Fork 241
/
electron-builder.config.js
58 lines (56 loc) · 1.79 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
/**
* @type {import('electron-builder').Configuration}
* @see https://www.electron.build/configuration/configuration
*/
const baseConfig = {
asar: true,
asarUnpack: ["**/node_modules/sharp/**/*", "**/node_modules/@img/**/*"],
productName: "Ueli",
directories: {
output: "release",
buildResources: "build",
},
files: ["dist-main/index.js", "dist-preload/index.js", "dist-renderer/**/*", "assets/**/*"],
extraMetadata: {
version: process.env.VITE_APP_VERSION,
},
};
/**
* @type {Record<NodeJS.Platform, import('electron-builder').Configuration>}
*/
const platformSpecificConfig = {
darwin: {
...baseConfig,
afterPack: "./build/macos/codeSign.mjs",
mac: {
category: "public.app-category.utilities",
icon: "assets/Build/app-icon-dark.png",
target: [{ target: "dmg" }, { target: "zip" }],
},
},
win32: {
...baseConfig,
appx: {
applicationId: "OliverSchwendener.Ueli",
backgroundColor: "#1F1F1F",
displayName: "Ueli",
identityName: "1915OliverSchwendener.Ueli",
publisher: "CN=AD6BF16D-50E3-4FD4-B769-78A606AFF75E",
publisherDisplayName: "Oliver Schwendener",
languages: ["en-US", "de-CH"],
},
win: {
icon: "assets/Build/app-icon-dark-transparent.png",
target: [{ target: "msi" }, { target: "nsis" }, { target: "zip" }, { target: "appx" }],
},
},
linux: {
...baseConfig,
linux: {
icon: "assets/Build/app-icon-dark.png",
category: "Utility",
target: [{ target: "AppImage" }, { target: "deb" }, { target: "zip" }],
},
},
};
module.exports = platformSpecificConfig[process.platform];