客户端pkg包安装前必须关闭已打开的应用

This commit is contained in:
kuaifan 2022-01-07 10:55:34 +08:00
parent 8e2b2947ae
commit 674c5a11c1
3 changed files with 4 additions and 2 deletions

1
electron/build.js vendored
View File

@ -136,6 +136,7 @@ function start(data, publish) {
econfig.build.appId = data.id;
econfig.build.artifactName = getDomain(data.url) + "-v${version}-${os}-${arch}.${ext}";
econfig.build.nsis.artifactName = getDomain(data.url) + "-v${version}-${os}-${arch}.${ext}";
econfig.build.pkg.mustClose = [data.id];
fs.writeFileSync(packageFile, JSON.stringify(econfig, null, 2), 'utf8');
// build
child_process.spawnSync("npm", ["run", data.platform + (publish === true ? "-publish" : "")], {stdio: "inherit", cwd: "electron"});

View File

@ -1,6 +1,6 @@
{
"name": "DooTask",
"version": "0.5.51",
"version": "0.5.52",
"description": "DooTask is task management system.",
"main": "main.js",
"license": "MIT",
@ -79,6 +79,7 @@
},
"pkg": {
"installLocation": "/Applications",
"mustClose": [],
"allowAnywhere": true,
"allowCurrentUserHome": true,
"allowRootDirectory": true,

View File

@ -1,6 +1,6 @@
{
"name": "DooTask",
"version": "0.5.51",
"version": "0.5.52",
"description": "DooTask is task management system.",
"scripts": {
"start": "./cmd dev",