Merge pull request #87 from gclm/dev-gclm-85

feat: 新增mac打包为dmg
feat: 给rubick 配置一个专门的应用目录
This commit is contained in:
Starry North 2022-02-12 13:55:40 +08:00 committed by GitHub
commit d379c58082
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -1,7 +1,14 @@
import path from "path";
import fs from "fs";
export default (): string => { export default (): string => {
let localDataFile: any = process.env.HOME; let localDataFile: any = process.env.HOME;
if (!localDataFile) { if (!localDataFile) {
localDataFile = process.env.LOCALAPPDATA; localDataFile = process.env.LOCALAPPDATA;
} }
return localDataFile; const rubickPath = path.join(localDataFile, "rubick")
if (!fs.existsSync(rubickPath)) {
fs.mkdirSync(rubickPath);
}
return rubickPath;
}; };

View File

@ -51,7 +51,10 @@ module.exports = {
}, },
mac: { mac: {
icon: "public/icons/icon.icns", icon: "public/icons/icon.icns",
target: "pkg", target: [
"dmg",
"pkg"
],
extendInfo: { extendInfo: {
LSUIElement: 1, LSUIElement: 1,
}, },