Repository navigation
Expand file tree
/
Copy pathelectron-builder.cjs
More file actions
27 lines (27 loc) · 1.85 KB
/
Copy pathelectron-builder.cjs
File metadata and controls
27 lines (27 loc) · 1.85 KB
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
/** v26 configuration. Credentials are optional; macOS CI uses complete ad-hoc signatures without a certificate. */
const repository = "koabula/xiaowang";
const homepage = repository ? `${process.env.GITHUB_SERVER_URL || "https://github.com"}/${repository}` : undefined;
module.exports = {
appId: "com.xiaowang.assistant",
productName: "小王同学",
executableName: "xiaowang",
directories: { output: "release", buildResources: "desktop/build" },
files: ["desktop/dist/**/*", "package.json", "!**/*.map"],
asar: true,
npmRebuild: false,
artifactName: "XiaoWang-${version}-${os}-${arch}.${ext}",
mac: {
target: ["dmg", "zip"], category: "public.app-category.productivity",
icon: "desktop/icon.png", hardenedRuntime: true,
identity: process.env.CSC_LINK ? undefined : "-",
entitlements: process.env.CSC_LINK ? "desktop/build/entitlements.mac.plist" : "desktop/build/entitlements.mac-adhoc.plist",
entitlementsInherit: process.env.CSC_LINK ? "desktop/build/entitlements.mac.plist" : "desktop/build/entitlements.mac-adhoc.plist",
notarize: Boolean(process.env.APPLE_ID && process.env.APPLE_APP_SPECIFIC_PASSWORD && process.env.APPLE_TEAM_ID),
extendInfo: { NSMicrophoneUsageDescription: "小王同学需要使用麦克风与你实时语音交流。XiaoWang uses your microphone for voice conversations." },
},
win: { target: ["nsis"], icon: "desktop/icon.png" },
nsis: { oneClick: false, perMachine: false, allowToChangeInstallationDirectory: true, createDesktopShortcut: true, createStartMenuShortcut: true },
linux: { target: ["AppImage", "deb"], category: "Education", icon: "desktop/icon.png", maintainer: "XiaoWang contributors" },
publish: { provider: "github", owner: "koabula", repo: "xiaowang", releaseType: "release" },
...(homepage ? { extraMetadata: { homepage, repository: { type: "git", url: `${homepage}.git` } } } : {}),
};