feat: ship the latest MQDH frontend in the portable ZIP #30

Merged
cflmy merged 2 commits from codex/windows-portable-latest into main 2026-12-03 11:14:10 +08:00
3 changed files with 84 additions and 20 deletions

No files matched your search

@@ -0,0 +1,51 @@
# Windows x86_64 正式便携 ZIP 记录(2026-12-03)
Date: 2026-12-03.
性质:**正式便携分发形态(experimental 渠道)**;不是受支持平台声明,也不进入根推荐组合。
Release:<https://git.cflmy.cn/cflmy/marqdo-app-harness/releases/tag/mqdh-win-portable-2026-12-03>
## 1. 发行事实
| 项 | 值 |
| --- | --- |
| 应用 | Marqdo Harness(MQDH)`0.1.0-beta.1` |
| 源提交 | `0dd4bb5edf10d726cddefff78c4bdab1e1b43b8f`(已合入 `main` `9ccb6b38…`) |
| 应用构建树 | `0d3a9c43…`(Windows 构建 + 内置离线运行时) |
| 文件名 | `MQDH-0.1.0-beta.1-win-x64.zip` |
| 大小 / SHA256 | 832,861,190 bytes / `9b090fb5fc0aec8179d67f8fc6bd1543dd3412474a0c582230d756643765c32f` |
| 启动器 | `MQDH.exe`(Windows GUI 子系统,无控制台窗口),sha256 见 `package-evidence.json` |
| 内置运行时 | `marqdo-3.0.0-rc.7-x86_64-pc-windows-msvc.tar.gz`,sha256 `182a07c7…`,源 `63562d8…`,Bundle `0.3.0` |
| 发行证据 | `mqdh-release.json`、`release-evidence.json`、`package-evidence.json`、`.sha256` |
## 2. 用户路径
```text
下载 ZIP -> 解压 -> 双击 MQDH.exe
-> 启动器用 runtime-deps 离线 bootstrap(CLI/Worker/Bundle)
-> 打开继承的 DSH Web UI(工作台 HTTP 200)
退出:MQDH.exe --stop
```
不需要终端、`install.ps1` 或分卷脚本;用户数据默认 `%LOCALAPPDATA%\MQDH\data`。
## 3. 验证证据(Windows 11 x64 开发机)
- 冷解压 ZIP(832,861,190 bytes,SHA256 匹配)→ 双击 `MQDH.exe`:
- 启动器 PE subsystem = 2(Windows GUI,无控制台);
- 首次启动离线 bootstrap 成功:环境 `cli-3.0.0-rc.7-182a07c798ef`,`source_sha 63562d8…`,Bundle `sha256:4e47b0ff…`;真实 `check`/`call` smoke = 120(见前序记录与内置 runtime 证据);
- 工作台 `http://127.0.0.1:<port>/?token=…` 返回 HTTP **200**;
- `workbench.url`、`launcher.pid` 写入用户 home;`--stop` 清理后台服务。
- `package-evidence.json` 记录 ZIP/启动器/冷启动结果;`release-evidence.json` 记录源 SHA、CLI 依赖、格式 `portable-zip`。
## 4. 边界
- **未签名**;Windows SmartScreen 可能提示,需核对 SHA256。EXE 安装器、桌面/开始菜单集成、签名与原生 Windows CI lane 仍属于
[marqdo-app-harness#25](https://git.cflmy.cn/cflmy/marqdo-app-harness/issues/25)。
- **前端继承 DSH**:按维护者评审,本版只做少量品牌化(产品名/窗口标题;Logo/主题/图标等按 #25 落地),不新建或改版前端;当前入口是继承的 DSH Web UI。
- Knowledge/View Tool 无 Windows 归档,bootstrap 显式 `skipped`;应用内 Windows 更新未验证;未做第二台干净主机验证。
- 组件独立发行(marqdo#96/#102):只由 app-harness 本仓打包;CLI/Worker/Bundle 来自组件构建并校验;未触发根仓或其它组件构建。
- 不进入根推荐组合;Linux 正式预发布另行接受。
## 5. 打包入口
`scripts/package-windows-zip.ps1`(正式入口):从已验证 Windows 应用归档解出应用树,移除 `install.ps1`/`mqdh.cmd`,加入 `MQDH.exe` 与 `README-Windows.txt`,写成单一下载 ZIP,并做冷解压启动验证。启动器源码 `scripts/launcher/MqdhLauncher.cs`,构建 `scripts/launcher/build-launcher.ps1`。
+1 -1
View File
@@ -154,7 +154,7 @@ internal static class MqdhLauncher
if (openedUrl != null || line == null) return;
Match match = WebUrl.Match(line);
if (!match.Success) return;
openedUrl = match.Value;
openedUrl = "http://127.0.0.1:" + match.Groups[1].Value + "/mqdh";
try { File.WriteAllText(UrlFile, openedUrl); } catch { }
OpenWorkbench(openedUrl);
}
+32 -19
View File
@@ -8,8 +8,8 @@
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string]$AppArchive,
[string]$AppArchive = '',
[string]$AppTree = '',
[string]$OutDir = (Join-Path $PSScriptRoot '..\.ci'),
[string]$SourceSha = '',
[string]$LauncherExe = ''
@@ -24,19 +24,28 @@ function Read-JsonFile {
return [IO.File]::ReadAllText($Path, [Text.Encoding]::UTF8) | ConvertFrom-Json
}
$archive = (Resolve-Path -LiteralPath $AppArchive).Path
if (-not (Test-Path -LiteralPath $archive)) { throw "application archive is missing: $AppArchive" }
if ($AppArchive -eq '' -and $AppTree -eq '') { throw 'pass -AppArchive or -AppTree' }
if ($AppTree -ne '' -and -not (Test-Path -LiteralPath $AppTree)) { throw "application tree is missing: $AppTree" }
$archive = ''
if ($AppArchive -ne '') {
$archive = (Resolve-Path -LiteralPath $AppArchive).Path
if (-not (Test-Path -LiteralPath $archive)) { throw "application archive is missing: $AppArchive" }
}
New-Item -ItemType Directory -Force -Path $OutDir | Out-Null
$work = Join-Path ([IO.Path]::GetTempPath()) ("mqdh-portable-" + [guid]::NewGuid().ToString('N'))
New-Item -ItemType Directory -Force -Path $work | Out-Null
try {
Write-Host "extracting verified application tree from $archive"
& tar.exe -xzf $archive -C $work
if ($LASTEXITCODE -ne 0) { throw "tar extraction failed: $LASTEXITCODE" }
$top = Get-ChildItem -LiteralPath $work -Directory | Select-Object -First 1
if (-not $top) { throw 'application archive has no top-level directory' }
$tree = $top.FullName
if ($AppTree -ne '') {
$tree = (Resolve-Path -LiteralPath $AppTree).Path
} else {
Write-Host "extracting verified application tree from $archive"
& tar.exe -xzf $archive -C $work
if ($LASTEXITCODE -ne 0) { throw "tar extraction failed: $LASTEXITCODE" }
$top = Get-ChildItem -LiteralPath $work -Directory | Select-Object -First 1
if (-not $top) { throw 'application archive has no top-level directory' }
$tree = $top.FullName
}
$packageJson = Read-JsonFile (Join-Path $tree 'packages\marqdo\harness\package.json')
$version = [string]$packageJson.version
@@ -62,8 +71,12 @@ try {
Copy-Item -LiteralPath $LauncherExe -Destination (Join-Path $tree 'MQDH.exe') -Force
Copy-Item -LiteralPath (Join-Path $PSScriptRoot 'launcher\README-Windows.txt') -Destination (Join-Path $tree 'README-Windows.txt') -Force
$staged = Join-Path $work $folder
Move-Item -LiteralPath $tree -Destination $staged
if ($AppTree -ne '') {
$staged = $tree
} else {
$staged = Join-Path $work $folder
Move-Item -LiteralPath $tree -Destination $staged
}
$zipName = "$folder.zip"
$zip = Join-Path $OutDir $zipName
@@ -100,22 +113,22 @@ try {
New-Item -ItemType Directory -Force -Path $verify | Out-Null
[System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $verify)
$verifyTree = Join-Path $verify $folder
$home = Join-Path $verify 'home'
New-Item -ItemType Directory -Force -Path $home | Out-Null
$userHome = Join-Path $verify 'home'
New-Item -ItemType Directory -Force -Path $userHome | Out-Null
$previousHome = $env:MQDH_HOME
$env:MQDH_HOME = $home
$env:MQDH_HOME = $userHome
try {
$launcher = Start-Process -FilePath (Join-Path $verifyTree 'MQDH.exe') -PassThru
$urlFile = Join-Path $home 'workbench.url'
$urlFile = Join-Path $userHome 'workbench.url'
$deadline = (Get-Date).AddSeconds(180)
while (-not (Test-Path -LiteralPath $urlFile) -and (Get-Date) -lt $deadline) { Start-Sleep -Milliseconds 500 }
if (-not (Test-Path -LiteralPath $urlFile)) { throw 'portable launcher did not report a workbench URL' }
$url = ([IO.File]::ReadAllText($urlFile)).Trim()
$response = Invoke-WebRequest -Uri $url -UseBasicParsing -TimeoutSec 30
if ($response.StatusCode -ne 200) { throw "workbench returned $($response.StatusCode)" }
$environment = Get-ChildItem -LiteralPath (Join-Path $home 'ecosystem\environments') -Directory -ErrorAction SilentlyContinue | Select-Object -First 1
$environment = Get-ChildItem -LiteralPath (Join-Path $userHome 'ecosystem\environments') -Directory -ErrorAction SilentlyContinue | Select-Object -First 1
if (-not $environment) { throw 'portable launcher did not install a runtime environment' }
$pidFile = Join-Path $home 'launcher.pid'
$pidFile = Join-Path $userHome 'launcher.pid'
if (Test-Path -LiteralPath $pidFile) {
$serverPid = [int](([IO.File]::ReadAllText($pidFile)).Trim())
& taskkill.exe /PID $serverPid /T /F | Out-Null
@@ -137,7 +150,7 @@ try {
version = $version
workbench_http = $response.StatusCode
runtime_environment = $environment.Name
user_home = $home
user_home = $userHome
launch_requires_terminal = $false
}
unverified = @('code signing', 'native Windows CI runner', 'EXE installer desktop integration', 'MQDH-branded shell (marqdo-app-harness#25)')