feat: 支持win打包

This commit is contained in:
mingyuansi
2026-06-10 14:16:46 +08:00
parent bb289f5438
commit 68312c6137
17 changed files with 2360 additions and 17 deletions

30
scripts/pack-win.bat Normal file
View File

@@ -0,0 +1,30 @@
@echo off
chcp 65001 >nul
echo 🔧 设置 Electron 镜像源...
echo.
REM 设置 Electron 镜像环境变量
set ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/
set ELECTRON_BUILDER_BINARIES_MIRROR=https://npmmirror.com/mirrors/electron-builder-binaries/
set ELECTRON_CUSTOM_DIR={{ version }}
set ELECTRON_CUSTOM_FILENAME={{ filename }}
echo ✅ 环境变量已设置:
echo ELECTRON_MIRROR: %ELECTRON_MIRROR%
echo ELECTRON_BUILDER_BINARIES_MIRROR: %ELECTRON_BUILDER_BINARIES_MIRROR%
echo.
echo 🚀 开始打包 Windows 版本...
echo.
call npm run pack:win
if %ERRORLEVEL% EQU 0 (
echo.
echo ✅ 打包成功!
) else (
echo.
echo ❌ 打包失败,请检查错误信息
)
pause