Files
ChatLab/apps/desktop/electron-builder.yml
T
digua b12c07dc32 refactor: extract Electron shell to apps/desktop/
Move Electron-specific code (main, preload, shared) and configs
(electron.vite, electron-builder) into apps/desktop/ to prepare
for multi-platform support (Web Browser standalone).

- Create apps/desktop/ with dedicated package.json and tsconfig
- Split Electron deps (electron, electron-updater, better-sqlite3,
  etc.) from shared frontend deps in root package.json
- Declare better-sqlite3 and @node-rs/jieba in packages/node-runtime
- Add stream-json to packages/parser where it belongs
- Update all path aliases (@electron/* → apps/desktop/*) in tsconfig,
  vite configs, and relative imports in preload/main
- Keep slim root tsconfig.node.json as shared base for packages
- Update CI/CD release workflow for new directory layout
- Fix pre-existing type errors (pi-ai Model generic, SQLLabTab
  LLMChatStreamChunk, filter.test.ts empty methods)
2026-05-19 00:31:00 +08:00

86 lines
2.4 KiB
YAML

# 应用程序的唯一标识符
appId: com.chatlab.fun
# 应用程序的产品名称
productName: ChatLab
# 发布配置
publish:
provider: github
owner: ChatLab
repo: ChatLab
# 构建资源所在的目录
directories:
buildResources: build
# 包含在最终应用程序构建中的文件列表
files:
- out/**/*
- '!**/.vscode/*'
- '!electron.vite.config.{js,ts,mjs,cjs}'
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,CHANGELOG.md,README.md}'
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
- '!{tsconfig.json,tsconfig.node.json}'
# jieba 词库文件已改为启动时远程下载,无需打包内置
- '!node_modules/@node-rs/jieba/dict.txt'
- '!node_modules/@node-rs/jieba/idf.txt'
- '!node_modules/@node-rs/jieba/dict.js'
- '!node_modules/@node-rs/jieba/dict.d.ts'
# 哪些文件将不会被压缩,而是解压到构建目录
asarUnpack:
- resources/**
# Windows 平台配置
win:
executableName: ChatLab
target: nsis
# NSIS 安装器配置
nsis:
oneClick: false
artifactName: ChatLab-${version}-setup.${ext}
shortcutName: ${productName}
uninstallDisplayName: ${productName}
createDesktopShortcut: always
allowElevation: true
allowToChangeInstallationDirectory: true
installerIcon: build/icon.ico
uninstallerIcon: build/icon.ico
include: installer-dpi.nsh
differentialPackage: false
# macOS 平台配置
mac:
entitlementsInherit: build/entitlements.mac.plist
entitlements: build/entitlements.mac.plist
# 代码签名 - Hardened Runtime 是公证的必要条件
hardenedRuntime: true
gatekeeperAssess: false
# 公证配置 - v26 自动检测环境变量进行公证,无需额外配置
extendInfo:
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
target:
# 架构由 CI 通过 --x64/--arm64 指定,避免在单个 job 里同时打双架构
- target: dmg
- target: zip
artifactName: ChatLab-${version}-${arch}.${ext}
# macOS 平台的 DMG 配置
dmg:
artifactName: ChatLab-${version}-${arch}.${ext}
# Linux 平台配置
linux:
executableName: chatlab
icon: build/icon.png
target:
- AppImage
- deb
- tar.gz
category: Utility
# AppImage 配置
appImage:
artifactName: ChatLab-${version}.${ext}
# 是否在构建之前重新编译原生模块
npmRebuild: true