1 {
 2   "name": "demo",
 3   "version": "0.0.1",
 4   "build": {  // electron-builder配置
 5     "productName":"xxxx",//项目名 这也是生成的exe文件的前缀名
 6     "appId": "xxxxx",//包名  
 7     "copyright":"xxxx",//版权  信息
 8     "compression": "store", // "store" | "normal"| "maximum" 打包压缩情况(store 相对较快),store 39749kb, maximum 39186kb
 9     "directories": {
10         "output": "build" // 输出文件夹
11     }, 
12     "asar": false, // asar打包
13     "extraResources":  { // 拷贝dll等静态文件到指定位置
14         "from": "./extraResources/",
15         "to": "extraResources"
16     },
17     "win": {  
18        "icon": "build/icons/icon.ico",//图标路径
19         "target": [
20           {
21             "target": "nsis",
22             "arch": [
23               "ia32"
24             ]
25           }
26         ]
27     },
28     "nsis": {
29         "oneClick": false, // 一键安装
30         "guid": "xxxx", //注册表名字,不推荐修改
31         "perMachine": true, // 是否开启安装时权限限制(此电脑或当前用户)
32         "allowElevation": true, // 允许请求提升。 如果为false,则用户必须使用提升的权限重新启动安装程序。
33         "allowToChangeInstallationDirectory": true, // 允许修改安装目录
34         "installerIcon": "./build/icons/aaa.ico", // 安装图标
35         "uninstallerIcon": "./build/icons/bbb.ico", //卸载图标
36         "installerHeaderIcon": "./build/icons/aaa.ico", // 安装时头部图标
37         "createDesktopShortcut": true, // 创建桌面图标
38         "createStartMenuShortcut": true, // 创建开始菜单图标
39         "shortcutName": "xxxx" // 图标名称
40     }
41   }
42 }

参考链接:

https://www.cnblogs.com/mrwh/p/12961446.html

posted on 2021-01-31 12:05  W1N9s  阅读(1047)  评论(0编辑  收藏  举报