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
| {
| "name": "demo",
| "version": "0.0.1",
| "build": {
| // electron-builder配置
| //项目名 这也是生成的exe文件的前缀名
| "productName": "xxxx",
| //包名
| "appId": "xxxxx",
| //版权 信息
| "copyright": "xxxx",
| // "store" | "normal"| "maximum" 打包压缩情况(store 相对较快),store 39749kb, maximum 39186kb
| "compression": "store",
| "directories": {
| // 输出文件夹
| "output": "build"
| },
| // asar打包
| "asar": false,
| "extraResources": {
| // 拷贝dll等静态文件到指定位置
| "from": "./extraResources/",
| "to": "extraResources"
| },
| "mac": {
| "target": [
| "dmg",
| "zip"
| ]
| },
| "win": {
| //图标路径
| "icon": "build/icons/icon.ico",
| "target": [
| {
| "target": [
| "nsis",
| "zip"
| ],
| "arch": [
| "ia32"
| ]
| }
| ]
| },
| "nsis": {
| // 一键安装
| "oneClick": false,
| //注册表名字,不推荐修改
| "guid": "xxxx",
| // 是否开启安装时权限限制(此电脑或当前用户)
| "perMachine": true,
| // 允许请求提升。 如果为false,则用户必须使用提升的权限重新启动安装程序。 "allowToChangeInstallationDirectory": true,
| // 允许修改安装目录
| "allowElevation": true,
| // 安装图标
| "installerIcon": "./build/icons/aaa.ico",
| //卸载图标
| "uninstallerIcon": "./build/icons/bbb.ico",
| // 安装时头部图标
| "installerHeaderIcon": "./build/icons/aaa.ico",
| // 创建桌面图标
| "createDesktopShortcut": true,
| // 创建开始菜单图标
| "createStartMenuShortcut": true,
| // 图标名称
| "shortcutName": "xxxx"
| }
| }
| }
|
|