first add
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# SSH Client Pro - Windows 打包脚本
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host " SSH Client Pro - Windows 打包脚本" -ForegroundColor Cyan
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# 设置环境变量
|
||||
$env:GENERATE_SOURCEMAP = "false"
|
||||
$env:CI = "false"
|
||||
|
||||
Write-Host "[1/3] 正在构建React应用..." -ForegroundColor Yellow
|
||||
npm run build 2>&1 | Tee-Object -FilePath "build-log.txt"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "React构建失败!请查看 build-log.txt" -ForegroundColor Red
|
||||
Read-Host "按回车键退出"
|
||||
exit 1
|
||||
}
|
||||
Write-Host "React构建完成!" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "[2/3] 正在打包Electron应用..." -ForegroundColor Yellow
|
||||
npm run build:electron 2>&1 | Tee-Object -FilePath "electron-build-log.txt"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Electron打包失败!请查看 electron-build-log.txt" -ForegroundColor Red
|
||||
Read-Host "按回车键退出"
|
||||
exit 1
|
||||
}
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "========================================" -ForegroundColor Green
|
||||
Write-Host " 打包完成!" -ForegroundColor Green
|
||||
Write-Host " 输出目录: dist/" -ForegroundColor Green
|
||||
Write-Host "========================================" -ForegroundColor Green
|
||||
Read-Host "按回车键退出"
|
||||
Reference in New Issue
Block a user