forked from cflmy/deepseek-harness
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88f7ce06d4 | ||
|
|
0dd4bb5edf | ||
|
|
46cf3ec691 |
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`。
|
||||
@@ -6,14 +6,14 @@ using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
/// <summary>
|
||||
/// MQDH desktop launcher: installs the bundled runtime on first start, serves
|
||||
/// the Marqdo workbench on loopback, then opens it in an app window. Runs
|
||||
/// without a console window; <c>--stop</c> terminates the background server.
|
||||
/// MQDH desktop launcher: installs the bundled offline runtime on first start,
|
||||
/// serves the inherited DSH Web UI on loopback, and opens it in an app window.
|
||||
/// Runs without a console window; <c>--stop</c> terminates the background server.
|
||||
/// </summary>
|
||||
internal static class MqdhLauncher
|
||||
{
|
||||
private const string Title = "MQDH";
|
||||
private const int WaitForServerMs = 90000;
|
||||
private const int WaitForServerMs = 120000;
|
||||
private static readonly Regex WebUrl = new Regex(@"http://127\.0\.0\.1:(\d+)/\?token=([A-Za-z0-9_\-]+)", RegexOptions.Compiled);
|
||||
private static string openedUrl = null;
|
||||
|
||||
@@ -57,12 +57,13 @@ internal static class MqdhLauncher
|
||||
Directory.CreateDirectory(HomeDir);
|
||||
Log(DateTime.Now.ToString("o") + " launcher failed: " + error);
|
||||
MessageBox.Show(
|
||||
"MQDH 鍚姩澶辫触锛? + error.Message + Environment.NewLine + Environment.NewLine + "鏃ュ織锛? + LogFile,
|
||||
"MQDH failed to start." + Environment.NewLine + Environment.NewLine + error.Message +
|
||||
Environment.NewLine + Environment.NewLine + "Log: " + LogFile,
|
||||
Title, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Nothing else can be surfaced without a window.
|
||||
// No window can be shown if even the log cannot be written.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,8 +97,8 @@ internal static class MqdhLauncher
|
||||
|
||||
string node = Path.Combine(Root, "runtime", "node.exe");
|
||||
string script = Path.Combine(Root, "scripts", "mqdh.mjs");
|
||||
if (!File.Exists(node)) throw new FileNotFoundException("鍐呯疆 Node 杩愯鏃剁己澶?, node);
|
||||
if (!File.Exists(script)) throw new FileNotFoundException("MQDH 鍚姩鑴氭湰缂哄け", script);
|
||||
if (!File.Exists(node)) throw new FileNotFoundException("bundled Node runtime is missing", node);
|
||||
if (!File.Exists(script)) throw new FileNotFoundException("MQDH launcher script is missing", script);
|
||||
|
||||
string runtimeDeps = Path.Combine(Root, "runtime-deps");
|
||||
if (Directory.Exists(runtimeDeps) && string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MQDH_BOOTSTRAP_OFFLINE")))
|
||||
@@ -111,7 +112,11 @@ internal static class MqdhLauncher
|
||||
}
|
||||
|
||||
Bootstrap(node, script);
|
||||
StartServer(node, script);
|
||||
}
|
||||
|
||||
private static void StartServer(string node, string script)
|
||||
{
|
||||
ProcessStartInfo start = new ProcessStartInfo();
|
||||
start.FileName = node;
|
||||
start.Arguments = "\"" + script + "\" --no-open --port 0";
|
||||
@@ -123,7 +128,7 @@ internal static class MqdhLauncher
|
||||
start.RedirectStandardError = true;
|
||||
|
||||
Process child = Process.Start(start);
|
||||
if (child == null) throw new InvalidOperationException("鏃犳硶鍚姩鍐呯疆杩愯鏃?);
|
||||
if (child == null) throw new InvalidOperationException("could not start the bundled runtime");
|
||||
File.WriteAllText(PidFile, child.Id.ToString());
|
||||
|
||||
child.OutputDataReceived += delegate(object sender, DataReceivedEventArgs data)
|
||||
@@ -138,13 +143,10 @@ internal static class MqdhLauncher
|
||||
DateTime deadline = DateTime.UtcNow.AddMilliseconds(WaitForServerMs);
|
||||
while (openedUrl == null && DateTime.UtcNow < deadline)
|
||||
{
|
||||
if (child.HasExited) throw new InvalidOperationException("MQDH 鏈嶅姟鎻愬墠閫€鍑猴紝閫€鍑虹爜 " + child.ExitCode + "銆傝鏌ョ湅鏃ュ織锛? + LogFile);
|
||||
if (child.HasExited) throw new InvalidOperationException("MQDH exited before the workbench was ready (exit code " + child.ExitCode + "). Log: " + LogFile);
|
||||
Thread.Sleep(150);
|
||||
}
|
||||
if (openedUrl == null)
|
||||
{
|
||||
throw new TimeoutException("绛夊緟 MQDH 宸ヤ綔鍙板氨缁秴鏃躲€傝鏌ョ湅鏃ュ織锛? + LogFile);
|
||||
}
|
||||
if (openedUrl == null) throw new TimeoutException("timed out waiting for the MQDH workbench. Log: " + LogFile);
|
||||
}
|
||||
|
||||
private static void TryCaptured(string line)
|
||||
@@ -152,10 +154,9 @@ internal static class MqdhLauncher
|
||||
if (openedUrl != null || line == null) return;
|
||||
Match match = WebUrl.Match(line);
|
||||
if (!match.Success) return;
|
||||
string url = match.Value;
|
||||
openedUrl = url;
|
||||
try { File.WriteAllText(UrlFile, url); } catch { }
|
||||
OpenWorkbench(url);
|
||||
openedUrl = match.Value;
|
||||
try { File.WriteAllText(UrlFile, openedUrl); } catch { }
|
||||
OpenWorkbench(openedUrl);
|
||||
}
|
||||
|
||||
private static string ReadSavedUrl()
|
||||
@@ -170,7 +171,7 @@ internal static class MqdhLauncher
|
||||
}
|
||||
catch
|
||||
{
|
||||
// A missing or stale URL falls through to a restart.
|
||||
// A missing or stale URL falls through to a server restart.
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -179,7 +180,7 @@ internal static class MqdhLauncher
|
||||
{
|
||||
if (string.IsNullOrEmpty(url))
|
||||
{
|
||||
throw new InvalidOperationException("MQDH 宸ヤ綔鍙板湴鍧€涓嶅彲鐢紝璇疯繍琛?MQDH.exe --stop 鍚庨噸璇曘€?);
|
||||
throw new InvalidOperationException("the MQDH workbench URL is unavailable; run MQDH.exe --stop and retry");
|
||||
}
|
||||
string edge = FindEdge();
|
||||
if (edge != null)
|
||||
@@ -197,11 +198,12 @@ internal static class MqdhLauncher
|
||||
|
||||
private static string FindEdge()
|
||||
{
|
||||
foreach (string baseDir in new string[]
|
||||
string[] bases = new string[]
|
||||
{
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86),
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
|
||||
})
|
||||
};
|
||||
foreach (string baseDir in bases)
|
||||
{
|
||||
string candidate = Path.Combine(baseDir, "Microsoft", "Edge", "Application", "msedge.exe");
|
||||
if (File.Exists(candidate)) return candidate;
|
||||
@@ -222,20 +224,20 @@ internal static class MqdhLauncher
|
||||
start.RedirectStandardError = true;
|
||||
|
||||
Process child = Process.Start(start);
|
||||
if (child == null) throw new InvalidOperationException("鏃犳硶鍒濆鍖?MQDH 杩愯鏃?);
|
||||
if (child == null) throw new InvalidOperationException("could not start the MQDH runtime installer");
|
||||
string output = child.StandardOutput.ReadToEnd();
|
||||
string error = child.StandardError.ReadToEnd();
|
||||
if (!child.WaitForExit(300000))
|
||||
{
|
||||
try { child.Kill(); } catch { }
|
||||
throw new TimeoutException("MQDH 杩愯鏃跺垵濮嬪寲瓒呮椂");
|
||||
throw new TimeoutException("timed out installing the MQDH runtime");
|
||||
}
|
||||
Log(DateTime.Now.ToString("o") + " bootstrap exit=" + child.ExitCode);
|
||||
if (!string.IsNullOrEmpty(output)) Log(output);
|
||||
if (!string.IsNullOrEmpty(error)) Log(error);
|
||||
if (child.ExitCode != 0)
|
||||
{
|
||||
throw new InvalidOperationException("MQDH 杩愯鏃跺垵濮嬪寲澶辫触锛岄€€鍑虹爜 " + child.ExitCode + "銆傝鏌ョ湅鏃ュ織锛? + LogFile);
|
||||
throw new InvalidOperationException("the MQDH runtime installer failed with exit code " + child.ExitCode + ". Log: " + LogFile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,7 +252,7 @@ internal static class MqdhLauncher
|
||||
int pid;
|
||||
if (!Running(out pid))
|
||||
{
|
||||
MessageBox.Show("MQDH 褰撳墠娌℃湁杩愯銆?, Title, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
MessageBox.Show("MQDH is not running.", Title, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
try
|
||||
@@ -267,6 +269,6 @@ internal static class MqdhLauncher
|
||||
try { File.Delete(PidFile); } catch { }
|
||||
try { File.Delete(UrlFile); } catch { }
|
||||
}
|
||||
MessageBox.Show("MQDH 宸查€€鍑恒€?, Title, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
MessageBox.Show("MQDH stopped.", Title, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
@@ -12,23 +12,12 @@ param(
|
||||
[string]$AppArchive,
|
||||
[string]$OutDir = (Join-Path $PSScriptRoot '..\.ci'),
|
||||
[string]$SourceSha = '',
|
||||
[string]$LauncherExe = '',
|
||||
[string]$ZipTool = ''
|
||||
[string]$LauncherExe = ''
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version Latest
|
||||
|
||||
function Find-7z {
|
||||
param([string]$Configured)
|
||||
if ($Configured -ne '' -and (Test-Path -LiteralPath $Configured)) { return (Resolve-Path -LiteralPath $Configured).Path }
|
||||
$command = Get-Command '7z.exe' -ErrorAction SilentlyContinue
|
||||
if ($command) { return $command.Source }
|
||||
foreach ($candidate in @('C:\Program Files\7-Zip\7z.exe', 'C:\Program Files (x86)\7-Zip\7z.exe')) {
|
||||
if (Test-Path -LiteralPath $candidate) { return $candidate }
|
||||
}
|
||||
throw '7z.exe not found; install 7-Zip or pass -ZipTool'
|
||||
}
|
||||
|
||||
function Read-JsonFile {
|
||||
param([string]$Path)
|
||||
@@ -79,10 +68,22 @@ try {
|
||||
$zipName = "$folder.zip"
|
||||
$zip = Join-Path $OutDir $zipName
|
||||
Remove-Item -LiteralPath $zip -Force -ErrorAction SilentlyContinue
|
||||
$sevenZip = Find-7z $ZipTool
|
||||
Write-Host "creating $zipName"
|
||||
& $sevenZip a -tzip -mx=5 $zip $folder
|
||||
if ($LASTEXITCODE -ne 0) { throw "zip creation failed: $LASTEXITCODE" }
|
||||
Add-Type -AssemblyName System.IO.Compression
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
$zipStream = [IO.File]::Create($zip)
|
||||
try {
|
||||
$archive = New-Object System.IO.Compression.ZipArchive($zipStream, [System.IO.Compression.ZipArchiveMode]::Create, $false)
|
||||
try {
|
||||
foreach ($file in Get-ChildItem -LiteralPath $staged -Recurse -File -Force) {
|
||||
$relative = $file.FullName.Substring($staged.Length + 1).Replace('\', '/')
|
||||
$entry = $archive.CreateEntry("$folder/$relative", [System.IO.Compression.CompressionLevel]::Fastest)
|
||||
$entryStream = $entry.Open()
|
||||
$input = [IO.File]::OpenRead($file.FullName)
|
||||
try { $input.CopyTo($entryStream) } finally { $input.Dispose(); $entryStream.Dispose() }
|
||||
}
|
||||
} finally { $archive.Dispose() }
|
||||
} finally { $zipStream.Dispose() }
|
||||
$zipHash = (Get-FileHash -LiteralPath $zip -Algorithm SHA256).Hash.ToLower()
|
||||
$sidecar = "$zip.sha256"
|
||||
[IO.File]::WriteAllText($sidecar, "$zipHash $zipName`n", (New-Object Text.UTF8Encoding($false)))
|
||||
@@ -97,25 +98,24 @@ try {
|
||||
# workbench answers. This exercises the actual portable user path.
|
||||
$verify = Join-Path $work 'verify'
|
||||
New-Item -ItemType Directory -Force -Path $verify | Out-Null
|
||||
& $sevenZip x $zip -o"$verify" -y | Out-Null
|
||||
if ($LASTEXITCODE -ne 0) { throw "zip extraction failed: $LASTEXITCODE" }
|
||||
[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 +137,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)')
|
||||
|
||||
Reference in new issue
Block a user