forked from bawangxx/XZVoice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
62 lines (60 loc) · 2.2 KB
/
vue.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
const Daili = require("./src/daili/config");
const nshPath = Daili.nshPath;
const appName = Daili.softName;
const proName = Daili.proName;
const ext = process.platform == 'darwin' ? '' : '.exe';
module.exports = {
pluginOptions: {
electronBuilder: {
nodeIntegration: true, //开启渲染进程使用node模块
externals: ["sequelize","keyv"],
experimentalNativeDepCheck: true,
builderOptions: {// elctronbuilder设置
publish: ['github'],
appId: `com.xzsoft.${proName}`,
productName: `${appName}`,
asar: true, // 是否使用asar打包
extraResources: [
{ from: "./src/appsrc", to: "./", }, //相当于打包之后应用目录下的resource目录
// { from: "./node_modules/ffmpeg-static/ffmpeg.exe", to: "./", }
{ from: `./node_modules/ffmpeg-static/ffmpeg${ext}`, to: "./", }
],
appx: {
identityName: "117159ADCB705.AI",
publisher: "CN=F28873AD-2D3D-4AE9-9EA0-2A4DBFE7D41B",
publisherDisplayName: "小智软件",
applicationId: `com.xzsoft.${proName}`,
languages: "zh-CN"
},
win: {
target: [
{
target: "nsis", //nsis appx
arch: ["x64"], // "ia32" x64
},
],
},
nsis: {
include: nshPath, //自定义nsis脚本
oneClick: false, // 是否一键安装
perMachine: true, //安装是否总是针对所有用户
allowElevation: true, // 允许请求提升。 如果为false,则用户必须使用提升的权限重新启动安装程序。
allowToChangeInstallationDirectory: true, // 允许修改安装目录
createDesktopShortcut: true, // 创建桌面图标
createStartMenuShortcut: true, // 创建开始菜单图标
shortcutName: `${appName}`, //将用于所有快捷方式的名称。默认为应用程序名称
uninstallDisplayName: `${appName}`, //卸载程序在控制面板中显示名称。
artifactName: `${appName}-Windows版.exe`
},
mac: {
target: "dmg",
identity: null //构建的时候是否签名,解决未签名的警告
},
dmg: {
title: `${appName}`, //生成DMG的标题,将在挂载时显示(卷名)
artifactName: `${appName}-Mac版.dmg`, //工程文件名
}
},
},
},
};