Files
ClassHelper/packages/desktop-client/electron-builder.yml
T

47 lines
1.5 KiB
YAML
Raw Normal View History

appId: com.classhelper.desktop
productName: 班级小助手
copyright: Copyright © 2026 Class Helper
directories:
output: release
buildResources: build
# 注意:这里**不要**加 afterPack 去改 appOutDir 的完整性标签。
# 归档内部的载荷标签不会被还原(装到正常位置拿到的是默认 Medium 文件),
# 而在打包前把 appOutDir 改成 Medium 会让 7za(自身带 Low 标签、进程被降到 Low)
# 因"不能向上读"而无法生成归档。交付物的标签统一在 scripts/dist-win.mjs 收尾时修正。
# 渲染进程产物已由 Vite 打包、主进程/preload 已由 esbuild 打包,
# 运行时不需要任何 node_modules(electron 模块由 Electron 运行时提供)。
files:
- dist/**/*
- package.json
- '!node_modules/**/*'
- '!**/*.map'
asar: true
# 没有原生模块,跳过 rebuild,避免不必要的 node-gyp 依赖
npmRebuild: false
compression: normal
removePackageScripts: true
win:
target:
- target: nsis
arch: [x64]
- target: portable
arch: [x64]
# 未提供 build/icon.ico 时使用 Electron 默认图标
artifactName: ${productName}-${version}-${arch}.${ext}
nsis:
oneClick: false
perMachine: false
allowToChangeInstallationDirectory: true
createDesktopShortcut: true
createStartMenuShortcut: true
shortcutName: 班级小助手
artifactName: ${productName}-${version}-${arch}-setup.${ext}
portable:
artifactName: ${productName}-${version}-${arch}-portable.${ext}