Skip to content

Commit

Permalink
客户端pkg包安装前必须关闭已打开的应用
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Jan 7, 2022
1 parent 8e2b294 commit 674c5a1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions electron/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"});
Expand Down
3 changes: 2 additions & 1 deletion electron/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -79,6 +79,7 @@
},
"pkg": {
"installLocation": "/Applications",
"mustClose": [],
"allowAnywhere": true,
"allowCurrentUserHome": true,
"allowRootDirectory": true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "DooTask",
"version": "0.5.51",
"version": "0.5.52",
"description": "DooTask is task management system.",
"scripts": {
"start": "./cmd dev",
Expand Down

0 comments on commit 674c5a1

Please sign in to comment.