generated from yingpengsha/electron-vite-quick-start
-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.config.js
66 lines (65 loc) · 1.55 KB
/
build.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
/**
* @type {import('electron-builder').CliOptions}
* {@link https://www.electron.build/configuration/configuration}
*/
const builder = require("electron-builder");
const options = {
targets: builder.Platform.WINDOWS.createTarget(),
config: {
productName: "Hime Display",
directories: {
output: "build",
},
files: ["dist/renderer/**/*", "dist/main/**/*"],
// asar: false,
dmg: {
background: "public/background/background.tiff",
window: {
width: 540,
height: 380,
},
contents: [
{
x: 410,
y: 230,
type: "link",
path: "/Applications",
},
{
x: 130,
y: 230,
type: "file",
},
],
},
mac: {
icon: "public/icons/icon.png",
extendInfo: {
// 现在的macOS应用想要访问摄像机等权限必须在此声明,i18n我是没本事做到这儿来了,因此就用英文了
NSCameraUsageDescription:
"Face mesh and holistic capturing need to access to your camera",
"com.apple.security.device.camera": true,
},
},
nsis: {
oneClick: false,
allowElevation: true,
allowToChangeInstallationDirectory: true,
createDesktopShortcut: true,
createStartMenuShortcut: false,
},
win: {
icon: "public/icons/icon.png",
target: [
{
target: "nsis",
arch: ["x64"],
},
],
},
// linux: {
// icon: "public/icons",
// },
},
};
module.exports = options;