feat: 添加跨平台打包支持(Linux .deb)、Docker 构建脚本及项目官网

- electron/builder.js: 修复 Linux 平台 npm 命令、增加 .deb 安装包支持
- electron/main.js: 按平台动态设置保存对话框默认扩展名
- package.json: 添加 Linux deb 打包目标
- 新增 Dockerfile 用于 Linux 交叉构建
- 新增 build-linux-docker.ps1 / build-linux.sh 构建脚本
- 新增 site/ 项目官网页面
- .gitignore: 全面忽略二进制文件
- 新增 GitHub Actions CI 工作流
This commit is contained in:
gmh01
2026-07-23 19:26:26 +08:00
parent 2f3ec636e0
commit 95116e2338
9 changed files with 636 additions and 5 deletions

View File

@@ -94,7 +94,8 @@ async function startPack(projectPath, outputPath, onProgress) {
onProgress({ stage: 'install', message: '安装依赖 (首次较慢)...', percent: 50 })
try {
execSync('npm.cmd install --production', {
const npmCmd = process.platform === 'win32' ? 'npm.cmd' : 'npm'
execSync(`${npmCmd} install --production`, {
cwd: tempDir,
stdio: 'pipe',
timeout: 300000
@@ -155,7 +156,7 @@ async function startPack(projectPath, outputPath, onProgress) {
let installerPath = null
if (fs.existsSync(distDir)) {
const files = fs.readdirSync(distDir)
.filter(f => f.endsWith('.exe') || f.endsWith('.dmg') || f.endsWith('.AppImage'))
.filter(f => f.endsWith('.exe') || f.endsWith('.dmg') || f.endsWith('.AppImage') || f.endsWith('.deb'))
.sort((a, b) => fs.statSync(path.join(distDir, b)).mtimeMs - fs.statSync(path.join(distDir, a)).mtimeMs)
if (files.length > 0) {
installerPath = path.join(distDir, files[0])