Files
mail-hub/scripts/package_windows.ps1
T
hz4th_coder 6c1225f588 MailHub v1.0.0: 跨平台邮箱客户端(纯 Dart IMAP/SMTP/MIME 协议栈)
- 登录: QQ/163/126/189/搜狐/Gmail/Outlook/Yahoo/iCloud/企业邮/自定义, 自动识别+测试连接
- 收信: IMAP 多文件夹同步/未读/星标/搜索(本地+服务器)
- 读信: HTML渲染/CID内嵌图/原文查看/附件下载
- 写信: 收件人/抄送/密送/附件/富文本/草稿/回复转发
- 存储: SQLite + 系统安全存储(DPAPI/Keychain/Keystore)
- 测试: 单元测试 + Mock IMAP/SMTP 服务器集成测试(23项全过)
- 可迁移: Windows/Android/iOS/macOS/Linux 一套代码
2026-08-18 01:10:11 +08:00

28 lines
961 B
PowerShell

# Windows 打包脚本:构建 release exe 并复制到 dist/
# 用法: powershell -ExecutionPolicy Bypass -File scripts/package_windows.ps1
$ErrorActionPreference = "Stop"
Write-Host "=== MailHub Windows 打包 ===" -ForegroundColor Cyan
# 1. 构建
Write-Host "[1/3] flutter build windows --release ..."
flutter build windows --release
if ($LASTEXITCODE -ne 0) { throw "构建失败" }
# 2. 收集产物
$src = "build\windows\x64\runner\Release"
$dist = "dist\windows"
if (Test-Path $dist) { Remove-Item $dist -Recurse -Force }
New-Item -ItemType Directory -Path $dist -Force | Out-Null
Copy-Item "$src\*" $dist -Recurse -Force
# 3. 打 zip
$zip = "dist\MailHub-windows-x64.zip"
if (Test-Path $zip) { Remove-Item $zip -Force }
Compress-Archive -Path "$dist\*" -DestinationPath $zip
Write-Host "[2/3] 完成: $dist" -ForegroundColor Green
Write-Host "[3/3] 压缩包: $zip" -ForegroundColor Green
Write-Host "=== 打包完成 ===" -ForegroundColor Cyan