diff --git a/website/avalonia/releaselog/GeneralUpdateAvaloniaReleaselog.md b/website/avalonia/releaselog/GeneralUpdateAvaloniaReleaselog.md
index a9ceb3f..8f69b6f 100644
--- a/website/avalonia/releaselog/GeneralUpdateAvaloniaReleaselog.md
+++ b/website/avalonia/releaselog/GeneralUpdateAvaloniaReleaselog.md
@@ -8,13 +8,13 @@ tags: [log, avalonia]
### 2026-10-03 — `v0.0.1-beta.10`
-- Changed version validation to query the update server using `UpdateServerOptions`; added support for a JSON package endpoint and custom `IUpdatePackageSource` implementations.
-- Added the integrated `PrepareUpdateAsync` workflow and installation-result tracking, including persistent installation records and confirmation events.
-- Added update pre-check callbacks, localized built-in messages, configurable download security and speed smoothing, and HTTP transport retry/resume hardening.
-- Updated the reference documentation, flow guide, and quickstart for this release.
+- 版本校验改为通过 `UpdateServerOptions` 查询更新服务;支持 JSON 包信息接口和自定义 `IUpdatePackageSource`。
+- 新增 `PrepareUpdateAsync` 一体化流程及安装结果跟踪,包括持久化安装记录和确认事件。
+- 新增更新前检查回调、内置消息本地化、下载安全与速度平滑配置,并加固 HTTP 重试和断点续传。
+- 更新组件参考、流程说明与快速入门文档。
### 2026-06-14 — `v0.0.1-beta.9`
-- First public release of `GeneralUpdate.Avalonia.Android`, with version comparison, resumable APK downloads, SHA256 verification, and Package Installer orchestration.
-- Added HMAC, Bearer, API Key, and Basic authentication support.
-- Added the Avalonia Android component reference and quickstart documentation.
+- `GeneralUpdate.Avalonia.Android` 首个公开版本,提供版本比较、APK 断点续传、SHA256 校验及系统安装器调用。
+- 支持 HMAC、Bearer、API Key 和 Basic 认证。
+- 新增 Avalonia Android 组件参考与快速入门文档。
diff --git a/website/docs/quickstart/Beginner cookbook.md b/website/docs/quickstart/Beginner cookbook.md
index 70c5e00..76e86c8 100644
--- a/website/docs/quickstart/Beginner cookbook.md
+++ b/website/docs/quickstart/Beginner cookbook.md
@@ -387,7 +387,7 @@ Use this table to diagnose common issues quickly. Most failures trace back to on
1. [GeneralUpdate.Core](../doc/GeneralUpdate.Core):更新策略、事件通知、静默更新、manifest 极简配置
2. [GeneralUpdate.Differential](../doc/GeneralUpdate.Differential):差分算法、并行处理和 Clean/Dirty
3. [GeneralUpdate.Bowl](../doc/GeneralUpdate.Bowl):崩溃监控、备份和失败恢复
-4. [GeneralUpdate.Tools](./GeneralUpdate.PacketTool):补丁包、Hash、OSS Config、Simulation 的完整操作指南
+4. [GeneralUpdate.Tools](/tools/quickstart/GeneralUpdate.PacketTool):补丁包、Hash、OSS Config、Simulation 的完整操作指南
## 安装目录注意事项
diff --git a/website/docs/quickstart/GeneralUpdate.PacketTool.md b/website/docs/quickstart/GeneralUpdate.PacketTool.md
index a7075c9..22e2586 100644
--- a/website/docs/quickstart/GeneralUpdate.PacketTool.md
+++ b/website/docs/quickstart/GeneralUpdate.PacketTool.md
@@ -1,578 +1,7 @@
---
-sidebar_position: 11
+title: GeneralUpdate.Tools
---
# GeneralUpdate.Tools
-## 这是什么
-
-GeneralUpdate.Tools 是一个基于 Avalonia 12 开发的跨平台桌面工具(Windows / Linux / macOS),用于在软件发布流程中生成和管理补丁包、扩展包、版本清单以及执行本地更新仿真。它不替代你的 CI/CD 系统,而是把”打包、校验、验证”这些重复劳动收敛到一个可视化工具中。
-
-:::info Tools 与 CI/CD 的关系
-Tools 是**桌面 GUI 工具**,适合开发者在本地交互式地生成补丁、验证更新。如果你需要在 CI/CD 流水线中自动化补丁生成,可以直接调用 `GeneralUpdate.Core.Pipeline.DiffPipeline.CleanAsync()` —— GUI 和脚本走的是同一条代码路径。
-:::
-
-仓库地址:[https://github.com/GeneralLibrary/GeneralUpdate.Tools](https://github.com/GeneralLibrary/GeneralUpdate.Tools)
-
-## 下载与运行
-
-### 方式一:从源码运行(推荐开发者)
-
-当前工具基于 .NET 10 构建。确保本机安装了 [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0):
-
-```powershell
-git clone https://github.com/GeneralLibrary/GeneralUpdate.Tools.git
-cd GeneralUpdate.Tools\src
-dotnet run --project GeneralUpdate.Tools.csproj
-```
-
-### 方式二:下载预编译版本
-
-前往 [GeneralUpdate.Tools Releases](https://github.com/GeneralLibrary/GeneralUpdate.Tools/releases) 下载对应平台的可执行文件,直接运行即可。
-
-> Simulation 模块内部会调用 `dotnet publish` 构建测试应用,因此使用仿真功能时必须安装 .NET SDK。Mobile 模块的项目模式(Build & Locate)也会调用 `dotnet publish`,同样需要 .NET SDK。仅运行 Patch / Extension / OSS / Config 模块以及 Mobile 的文件模式则不需要。
-
-## 左侧导航模块
-
-| 模块 | 你提供 | 工具产出 | 下游消费者 |
-|------|--------|----------|------------|
-| **补丁包(Patch)** | 旧版本目录 + 新版本目录 | `{name}.zip`(含 `.patch` 文件、新文件和删除清单) | Server、OSS/CDN、Core Upgrade 进程 |
-| **扩展包(Extension)** | 扩展源目录 + 元数据 | `{name}_{version}.zip`(含 `manifest.json`) | `GeneralUpdate.Extension` 组件 |
-| **OSS 配置(OSS)** | 包名、版本、下载 URL、本地文件(计算 Hash) | 用户选择位置的 `oss_config.json` | OSS 客户端、对象存储发布流程 |
-| **模拟更新(Simulate)** | 旧版本目录 + 补丁 ZIP | 本地更新服务 + 仿真报告 | 发布前质量把关 |
-| **移动端(Mobile)** | APK/AAB 或 MAUI/Avalonia Android `.csproj` | 上传结果 + `mobile_version_{timestamp}.json` | 移动端更新服务端、Avalonia/Maui Android 组件 |
-| **配置生成(Config)** | Client/Upgrade 的 `.csproj` | `generalupdate.manifest.json` + 示例发布目录 | Client/Upgrade 启动引导 |
-| **设置(Settings)** | 上传地址、身份认证、仿真参数、功能开关 | `%APPDATA%/GeneralUpdate.Tools/config.json` | 所有需要自动上传或本地仿真的模块 |
-
-:::tip 关于 SHA256
-SHA256 不作为独立导航页面,而是集成在 **OSS 配置**的“计算”和 **移动端**的元数据分析中。
-:::
-
----
-
-## Patch:生成补丁包
-
-### 解决什么问题
-
-当你发布了一个新版本,用户不想下载整个安装包。Patch 模块比较旧版本目录和新版本目录,只输出变更内容:修改过的文件生成二进制差分 `.patch`,新增文件直接复制,删除的文件写入清单。差分包通常远小于完整发布目录。
-
-### 输入
-
-| 字段 | 必填 | 说明 |
-|------|------|------|
-| Old Directory | ✅ | 用户当前安装的旧版本发布目录,例如 `publish\v1.0.0` |
-| New Directory | ✅ | 准备发布的新版本目录,例如 `publish\v2.0.0` |
-| Package Name | ❌ | 输出 ZIP 文件名(不含 `.zip`),为空时自动生成 `patch_yyyyMMddHHmmss` |
-| Version | ✅ | 目标版本号,格式 `MAJOR.MINOR.PATCH`(如 `2.0.0`)或 `MAJOR.MINOR.PATCH-prerelease+build` |
-| Output Directory | ❌ | ZIP 输出目录,为空时输出到桌面 |
-
-### 工具内部做了什么
-
-1. **加密文件检测**:扫描 old/new 目录中的二进制文件,检测是否存在加壳(如 Themida、VMProtect)或加密签名。被检测到的文件将标记警告——此类文件无法生成有效差分补丁,将以全量文件形式打包。
-2. 校验 old/new 目录存在、version 格式合法。
-3. 创建临时目录 `gupatch_yyyyMMddHHmmss`。
-4. 递归比较 old/new:**修改文件** → 生成 `.patch` 二进制差分;**新增文件** → 直接复制;**删除文件** → 记录 hash 到 `generalupdate.delete.json`。
-5. 将临时目录压缩为 `{PackageName}.zip`。
-6. 删除临时目录,ZIP 保留在 Output Directory。
-
-> **关于加密文件**:加壳工具(Themida、VMProtect 等)、代码混淆或加密的二进制文件,因文件哈希在新旧版本间完全不同,差分算法对其无效。此类文件检测到后将直接以全量形式打包,而不会生成 `.patch` 差分。建议在发布前对原始文件进行去壳/解密处理,以获得最优的补丁体积。
-
-
-:::warning 加密/加壳文件无法差分
-如果你的应用使用了加壳工具(Themida、VMProtect)、代码混淆器或加密二进制文件,**整个文件在新旧版本间会完全不同**,差分算法完全失效,补丁包体积等同于全量文件。如需差分更新,请确保原始发布文件未被加壳或加密。
-:::
-
-底层调用的是 `GeneralUpdate.Core.Pipeline.DiffPipeline.CleanAsync(oldDir, newDir, patchDir)`,和你的 CI 脚本走的是同一条代码路径。
-
-### 输出
-
-```
-{OutputDirectory}/{PackageName}.zip
- ├── changed.dll.patch ← 二进制差分
- ├── new_file.dll ← 新增文件(保持目录结构)
- └── generalupdate.delete.json ← 删除清单
-```
-
-### 下游如何使用
-
-- 把 ZIP 放到 Server 的 `wwwroot/packages/` 目录,更新 `versions.json` 中的 `Url` 和 `Hash`
-- 或上传到 OSS/CDN,把下载链接写入 `oss_config.json`
-- Core Upgrade 进程下载 ZIP 后,`DiffPipeline.DirtyAsync` 根据 `.patch` 和删除清单完成更新
-
----
-
-## Extension:打包扩展
-
-### 解决什么问题
-
-如果你使用 `GeneralUpdate.Extension` 组件管理插件/扩展,每次发布新扩展都需要手动构建标准格式的 ZIP 包并生成 `manifest.json`。Extension 模块把你从手工压缩和手写 JSON 中解放出来。
-
-### 输入
-
-| 字段 | 必填 | 说明 |
-|------|------|------|
-| Name | ✅ | 扩展唯一标识,建议小写+连字符,如 `my-data-exporter` |
-| Version | ✅ | 语义化版本,如 `1.0.0` |
-| Description | ❌ | 扩展功能描述 |
-| Publisher | ❌ | 发布者名称 |
-| License | ❌ | 许可证标识,如 `MIT` |
-| Extension Directory | ✅ | 扩展源文件目录,点击 Pick 选择文件夹 |
-| Export Directory | ❌ | 输出目录,为空时输出到桌面 |
-| Custom Properties | ❌ | 自定义键值对,写入 `manifest.json.customProperties` |
-
-### 工具内部做了什么
-
-1. 校验目录存在、version 格式合法。
-2. 将 Extension Directory 中所有文件打包为 ZIP。
-3. 在 ZIP 根目录写入 `manifest.json`。
-
-### 输出
-
-```
-{ExportDirectory}/{Name}_{Version}.zip
- ├── manifest.json ← 扩展元数据
- ├── bin/
- │ └── MyExtension.dll
- ├── resources/
- └── ...
-```
-
-`manifest.json` 示例:
-
-```json
-{
- "name": "my-data-exporter",
- "version": "1.0.0",
- "description": "Export data to CSV/Excel/JSON",
- "publisher": "MyCompany",
- "license": "MIT",
- "dependencies": "",
- "minHostVersion": "",
- "maxHostVersion": "",
- "isPreRelease": false,
- "platform": { "displayName": "Windows", "value": 1 },
- "format": ".zip",
- "releaseDate": "2026-06-01T00:00:00",
- "customProperties": { "maxConnections": "100" }
-}
-```
-
-### 下游如何使用
-
-- Extension Host 调用 `ExtensionManager.QueryRemoteExtensionsAsync(...)` 获取扩展列表
-- 安装时下载 ZIP,读取 `manifest.json` 进行兼容性检查和依赖解析
-- 详见 [GeneralUpdate.Extension](../doc/GeneralUpdate.Extension)
-
----
-
-## OSS Config:生成 OSS 版本清单
-
-### 解决什么问题
-
-如果你使用 OSS 模式更新(静态文件服务器),你需要维护一个 `versions.json` 或 `oss_config.json`,让客户端知道有哪些版本可以下载。OSS Config 模块帮你整理版本信息并计算 SHA256。
-
-### 输入
-
-| 字段 | 必填 | 说明 |
-|------|------|------|
-| PacketName | ✅ | 更新包名称 |
-| Version | ✅ | 语义化版本号 |
-| Url | ✅ | 客户端可下载补丁包的完整地址 |
-| SHA256 | 推荐 | 选择本地 ZIP 文件后点击 ComputeHash 自动计算 |
-
-### 操作流程
-
-1. 填写 PacketName、Version、Url。
-2. 点击 **ComputeHash**,选择本地补丁 ZIP 文件,自动填入 SHA256。
-3. 点击 **Add To List**,加入列表。
-4. 重复以上步骤添加所有版本。
-5. 点击 **Export**,生成 `oss_config.json`。
-
-### 输出
-
-```json
-[
- {
- "PacketName": "client_1.0.0_to_2.0.0",
- "Hash": "f2c7a8b3...",
- "Version": "2.0.0",
- "Url": "https://cdn.example.com/client_1.0.0_to_2.0.0.zip",
- "ReleaseDate": ""
- }
-]
-```
-
-### 下游如何使用
-
-- 将 `oss_config.json` 上传到 OSS bucket 或静态文件服务器
-- OSS 客户端读取此文件发现可用版本,下载后校验 Hash
-- 详见 [GeneralUpdate.Core](../doc/GeneralUpdate.Core) OSS 更新策略
-
----
-
-## Config:生成启动清单
-
-### 解决什么问题
-
-Client 和 Upgrade 启动时需要知道主程序名、升级程序名、版本号、ProductId、UpdatePath 等信息。Config 模块从 `.csproj` 中自动提取 AssemblyName 和 TargetFramework,帮你生成 `generalupdate.manifest.json`,省去手写和手误。
-
-### 输入
-
-| 字段 | 必填 | 说明 |
-|------|------|------|
-| Client .csproj | ✅ | 主程序的 `.csproj` 文件路径 |
-| Upgrade .csproj | ❌ | 升级程序的 `.csproj` 路径 |
-| ClientVersion | ✅ | 客户端当前版本,如 `1.0.0` |
-| UpgradeClientVersion | ✅ | 升级程序版本,如 `1.0.0` |
-| AppType | ✅ | Client / Upgrade / OssClient / OssUpgrade |
-| ProductId | ✅ | 产品标识 GUID |
-| UpdatePath | ✅ | 升级程序相对主程序的子目录,如 `update/` |
-
-### 操作流程
-
-1. 点击 Browse 选择 Client `.csproj`(必填)和 Upgrade `.csproj`(可选)。
-2. 点击 **Analyze**,工具自动读取 AssemblyName 填入 `MainAppName`、`UpdateAppName`。
-3. 手动填写 Version、AppType、ProductId、UpdatePath。
-4. 点击 **Generate**,在工具运行目录生成 `generalupdate.manifest.json`。
-5. 点击 **Generate Sample**,额外执行 `dotnet publish` 并输出可运行的发布目录。
-
-### 输出
-
-`generalupdate.manifest.json`:
-
-```json
-{
- "mainAppName": "ClientSample.exe",
- "clientVersion": "1.0.0",
- "appType": "Client",
- "updateAppName": "UpgradeSample.exe",
- "upgradeClientVersion": "1.0.0",
- "productId": "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
- "updatePath": "update/"
-}
-```
-
-Generate Sample 额外输出:
-
-```
-{工具运行目录}/sample_output/
- ├── ClientSample.exe ← Client dotnet publish 输出
- ├── generalupdate.manifest.json
- └── update/
- └── UpgradeSample.exe ← Upgrade dotnet publish 输出
-```
-
-### 下游如何使用
-
-- Client 启动时读取 `generalupdate.manifest.json`,配合服务端地址和 AppSecretKey 即可进入更新流程
-- 不需要手写 `Configinfo`,只需用 `GeneralUpdateBootstrap` 读取 manifest
-
----
-
-## Simulation:本地更新仿真
-
-### 解决什么问题
-
-你刚用 Patch 模块生成了补丁包,但不确定这个包在实际更新流程中能不能跑通。Simulation 模块在你本机启动一个临时更新服务,构建 Client/Upgrade 样例,模拟一次完整的“发现版本 → 下载补丁 → 应用更新”闭环,最后输出 PASS/FAIL 报告。
-
-### 前置条件
-
-- 已安装 .NET 10 SDK(或更高版本)
-- `dotnet --version` 可正常执行
-- 本地 5000 端口未被占用(可配置)
-
-### 输入
-
-| 字段 | 必填 | 说明 |
-|------|------|------|
-| Old App Directory | ✅ | 模拟用户当前安装的旧版本目录 |
-| Patch File | ✅ | Patch 模块生成的补丁 ZIP |
-| CurrentVersion | ✅ | 旧版本号(Simulation 内部传给 Client,用于版本校验) |
-| TargetVersion | ✅ | 新版本号(Simulation 内部赋值到补丁 ZIP,写入服务端版本源) |
-| AppType | ✅ | ClientApp = 1 / UpgradeApp = 2 |
-| Platform | ✅ | Windows = 1 / Linux = 2 |
-| AppSecretKey | ✅ | 客户端验证密钥 |
-| ProductId | ✅ | 产品标识 GUID |
-| UpdatePath | ✅ | 升级程序子目录名称,如 `update/` |
-| ServerPort | ❌ | 本地服务端口,默认 5000 |
-
-### 仿真过程
-
-1. **校验**:旧目录存在、Patch ZIP 存在、version 格式合法、.NET SDK 可用。
-2. **发布 Client**:`dotnet publish test_app/Client/ClientSample.csproj` 到 App Directory。
-3. **发布 Upgrade**:`dotnet publish test_app/Upgrade/UpgradeSample.csproj` 到 `UpdatePath` 子目录。
-4. **生成 manifest**:在 App Directory 写入 `generalupdate.manifest.json`。
-5. **准备补丁**:把 Patch ZIP 复制到内部 `.server` 目录,计算 SHA256,写入服务端版本源。
-6. **启动服务**:本地服务监听 `http://localhost:{ServerPort}`,提供 `POST /Upgrade/Verification`、`POST /Upgrade/Report`、`GET /patch/{filename}`。
-7. **运行 Client**:启动 `ClientSample.exe`,传入 `--server-url http://localhost:5000 --app-secret ... --client-version 1.0.0`。
-8. **停止服务**:Client 完成更新或超时后停止服务。
-9. **生成报告**:检查目录文件变化,输出 `simulation_report.md`。
-
-### 输出
-
-```
-{AppDirectory}/simulation_report.md ← 仿真报告(PASS/FAIL + 时间线)
-```
-
-报告包含配置表、PASS/FAIL 结论、Notes 和完整时间线,可以直接贴到发布记录或 CI artifact。
-
----
-
-## Hash:SHA256 校验
-
-### 解决什么问题
-
-补丁包上传到 CDN/OSS 后,必须确保客户端下载到的文件和原始包一致。Hash 功能对本地文件计算 SHA256,输出小写十六进制字符串,你应该把这个值写入版本清单或服务端返回数据。
-
-### 使用方式
-
-在 **OSS Config** 模块中,点击 **ComputeHash**,选择本地 ZIP 文件,自动填入 SHA256 字段。你也可以单独使用这个功能来校验任何文件。
-
----
-
-## Mobile:移动端打包
-
-### 解决什么问题
-
-如果你使用 `GeneralUpdate.Avalonia.Android` 或 `GeneralUpdate.Maui.Android` 组件为 Android 应用提供自动更新能力,每次发布新版本时都需要获取 APK/AAB 文件的元数据(包名、版本号、SHA256 哈希、文件大小),并将其上传到服务端进行版本管理。Mobile 模块把"解析 → 打包 → 上传 → 生成版本记录"这四步收敛到一个界面中。
-
-
-
-支持两种工作模式:
-
-- **文件模式**:直接选择 APK 或 AAB 文件,自动解析 AndroidManifest.xml 提取元数据
-- **项目模式**:选择 `.csproj` 项目文件,自动执行 `dotnet publish` 构建,然后定位产物并解析
-
-### 输入
-
-#### 文件模式
-
-| 字段 | 必填 | 说明 |
-|------|------|------|
-| APK/AAB 文件 | ✅ | 选择 `.apk` 或 `.aab` 文件,工具自动识别格式类型 |
-| Output Directory | ❌ | 版本记录 JSON 输出目录,为空时输出到桌面 |
-| ProductId | ✅ | 产品标识 GUID,用于区分服务端产品线 |
-| Platform | ✅ | 目标平台(默认 Android = 4) |
-| Product Name | ❌ | 产品名称,写入版本记录 |
-| Release Notes | ❌ | 发布说明 |
-| Is Forcibly | ❌ | 是否强制更新 |
-
-#### 项目模式
-
-| 字段 | 必填 | 说明 |
-|------|------|------|
-| `.csproj` 文件 | ✅ | 选择 MAUI 或 Avalonia Android 项目的 `.csproj`,工具自动解析 `ApplicationId`、`ApplicationDisplayVersion`、`ApplicationVersion` |
-| Output Directory | ❌ | 同上 |
-
-### 操作流程
-
-1. **选择模式**:切换 File Mode / Project Mode 开关。
- - **文件模式**:点击 **Select File** 选择 `.apk` 或 `.aab` 文件。
- - **项目模式**:点击 **Select Project** 选择 `.csproj` 文件,然后点击 **Build & Locate** 自动执行 `dotnet publish` 并定位产物。
-2. **Analyze**:点击 Analyze 按钮,工具自动:
- - 识别文件格式(APK / Android App Bundle)
- - 从 AndroidManifest.xml 中提取 `PackageName`、`VersionName`、`VersionCode`
- - 计算 SHA256 哈希和文件大小
-3. **填写上传配置**:确认或编辑自动提取的元数据,填写 ProductId、Product Name 等发布信息。
-4. **Upload**:点击 Upload 上传到服务端,并自动生成版本记录 JSON 文件。
-
-### 工具内部做了什么
-
-1. **格式检测**:通过文件扩展名(`.apk` / `.aab`)和 ZIP 内部结构(`AndroidManifest.xml` 位置)自动识别包格式。
- - APK 检测:打开 ZIP 文件,检查根目录是否存在 `AndroidManifest.xml`。
- - AAB 检测:打开 ZIP 文件,检查是否存在 `base/manifest/AndroidManifest.xml`。
- - 格式未知时(不是 .apk 也不是 .aab)会直接返回 Unknown。
-
-2. **元数据解析**:使用 `AxmlParser` 解析二进制的 AXML(Android Binary XML)格式,从 ZIP 中读取 `AndroidManifest.xml`。解析流程如下:
- - **字符串池提取**:读取 AXML 文件的 Chunk 头,找到类型为 `0x0001` 的 StringPool Chunk,从中解析出所有 UTF-16LE 编码的字符串数组。
- - **属性值提取**:遍历 XML 的 Start Element Chunk(类型 `0x0102`),解析属性块(每个属性 20 字节),通过属性名在字符串池中的索引匹配 `package` 和 `versionName`,再通过 `rawValueIndex` 从字符串池中取出属性值。
- - **versionCode 提取**:versionCode 存储为整型属性(类型 `0x10` = INT_DEC 或 `0x11` = INT_HEX),直接从属性的 `typedValueData` 字段(偏移 +16,4 字节)读取有符号整数。
- - AXML 结构与参考:https://justanapplication.wordpress.com/category/android/android-binary-xml/
-
-3. **SHA256 计算**:对完整文件计算 SHA256 哈希值,输出小写十六进制字符串。
-
-4. **文件大小**:读取文件长度并格式化为人类可读的显示(B / KB / MB / GB)。
-
-5. **项目构建**(仅项目模式):选择 `.csproj` 后会触发:
- - `MobileCsprojParser.Parse()` 解析 `.csproj` 的 XML,提取 `TargetFramework`(支持单 TFM 和多 TFM,多 TFM 时自动选取包含 `-android` 的目标框架)、`ApplicationId`(映射为 PackageName)、`ApplicationDisplayVersion`(映射为 VersionName)、`ApplicationVersion`(映射为 VersionCode)、`UseMaui`(用于识别 MAUI 项目)、`AndroidPackageFormat`、`AssemblyName`。
- - 调用 `dotnet publish "{csprojPath}" -c Release -o "{publishDir}"`。
- - 构建完成后在 `bin/Release/{tfm}/publish/` 目录搜索 `.apk` 或 `.aab` 文件,自动定位构建产物。
- - 项目类型显示:MAUI(`true`)或 Avalonia(没有 UseMaui)。
-
-6. **上传**:通过 HTTP multipart/form-data 将文件上传到服务端。上传表单字段和对应的数据源如下:
-
- | 字段 | 值来源 | 示例 |
- |------|--------|------|
- | `Name` | ProductName(用户填写) | `MyApp` |
- | `Version` | VersionName(自动解析) | `2.0.0` |
- | `Hash` | SHA256(自动计算) | `a1b2c3d4...` |
- | `Format` | 包格式(自动识别) | `.apk` / `.aab` |
- | `Size` | 文件大小(自动计算) | `50000000` |
- | `AppType` | 固定值 `"1"` | `1` |
- | `Platform` | Platform(默认 4=Android) | `4` |
- | `ProductId` | ProductId(用户填写 GUID) | `2d974e2a-...` |
- | `IsForcibly` | 强制更新开关 | `true` / `false` |
-
- 上传服务支持以下配置:
- - **Server URL**:服务端地址
- - **Upload Endpoint**:API 路径,默认 `/Packet/Create`
- - **Timeout**:超时时间(秒)
- - **Retry Count**:失败重试次数(指数退避)
- - **Auth**:认证配置,支持 Basic / Bearer Token / API Key 三种模式(凭据通过 DPAPI 加密存储)
-
-7. **版本记录导出**:上传成功后自动生成 `mobile_version_{timestamp}.json`,包含完整的版本元数据。也可以在不上传的情况下单独点击 **Export Record Only** 导出记录,此时 URL 字段为 `"manual"`。
-
-### 输出
-
-```
-{OutputDirectory}/mobile_version_20260614120000.json
-```
-
-```json
-{
- "name": "MyApp",
- "version": "2.0.0",
- "hash": "a1b2c3d4e5f6...",
- "url": "https://server.example.com/packages/app-v2.0.0.apk",
- "packageName": "com.example.myapp",
- "fileSize": 50000000,
- "format": "apk",
- "platform": 4,
- "productId": "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
- "isForcibly": false,
- "releaseDate": "2026-06-14T12:00:00.0000000Z"
-}
-```
-
-### 下游如何使用
-
-- 将生成的版本记录 JSON 导入或上传到你的更新服务端(如 GeneralSpacestation)
-- 客户端(`GeneralUpdate.Avalonia.Android` 或 `GeneralUpdate.Maui.Android`)从服务端查询版本信息时,返回的数据结构与版本记录的内容对应
-- 客户端下载 APK 后使用 `hash` 字段做 SHA256 完整性校验
-
-### 支持的 AndroidManifest 字段提取
-
-| 清单属性 | 字段名 | 说明 |
-|---------|--------|------|
-| `package` | `PackageName` | 应用包名(唯一标识) |
-| `android:versionName` | `VersionName` | 展示版本号(如 `2.0.0`) |
-| `android:versionCode` | `VersionCode` | 内部版本代码(整数) |
-
----
-
-## Settings:上传与运行参数
-
-设置页集中管理所有模块共用的持久化配置。保存后,配置会写入:
-
-```text
-%APPDATA%\GeneralUpdate.Tools\config.json
-```
-
-Windows 可按 `Win+R` 输入 `%APPDATA%\GeneralUpdate.Tools` 后打开。工具会同时维护 `config.json.backup`;密码、Token 和 API Key 使用系统加密后再写入配置。
-
-### 上传服务器
-
-| 字段 | 默认值 | 说明 |
-|------|--------|------|
-| 服务器地址 | 空 | 必须填写绝对地址,例如 `https://update.example.com` |
-| 上传接口路径 | `/api/v1/packages/upload` | 工具会与服务器地址拼接;可填写相对路径或以 `/` 开头的路径 |
-| 超时时间 | 300 秒 | 单次上传最长等待时间 |
-| 重试次数 | 3 | 失败后最多重试的次数;重试间隔采用指数退避 |
-| 补丁生成后自动上传 | 关闭 | 打开后,Patch 打包成功即调用上传接口 |
-
-上传使用 `multipart/form-data`,文件字段名为 `file`。HTTP 4xx(超时、429 除外)会直接视为拒绝;5xx、超时、网络错误可按重试次数继续尝试。
-
-### 身份认证
-
-| 认证方式 | 工具行为 |
-|----------|----------|
-| None | 不发送认证头 |
-| Basic Auth | 使用用户名、密码生成 `Authorization: Basic ...` |
-| Token | 在 `Authorization` 请求头中发送配置的令牌 |
-| API Key | 将 API Key 放入自定义请求头,默认请求头名为 `X-API-Key` |
-
-配置后建议先点击 **测试连接**。测试会向拼接后的完整地址发送 GET 请求,并根据 HTTP 成功状态判断可用性。
-
-### 仿真与功能开关
-
-- **本地服务器端口**:模拟更新的默认端口为 `5000`。
-- **模拟服务器需要身份认证**:为仿真服务器启用认证选项。
-- **打包前检测加密文件**:控制 Patch 模块是否在打包前扫描可疑文件。
-- **自动校验 SemVer**:保留为全局功能开关;实际模块仍会执行版本格式校验。
-- **显示 JSON 预览**:配置中的 JSON 预览选项。
-
-点击 **保存设置**立即持久化;**恢复默认**会重置上传、认证、仿真和功能开关配置。
-
----
-
-## 推荐发布工作流
-
-### 桌面端更新
-
-这个顺序把 Patch、OSS、Config、Simulation 四个模块串联成一个完整的桌面应用发布流水线:
-
-```
-┌─────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
-│ 发布新旧 │ -> │ Patch │ -> │ OSS/Hash │ -> │ Config │ -> │ Simulation│
-│ 版本目录 │ │ 生成补丁 │ │ 算 Hash │ │ 生成清单 │ │ 本地验证 │
-└─────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
-```
-
-1. **构建发布目录**:在 CI 或本地 `dotnet publish` 得到 old/new 两个目录。
-2. **Patch**:选择 old/new,生成补丁 ZIP。
-3. **OSS Config**:对补丁 ZIP 计算 SHA256,填写下载 URL,导出 `oss_config.json`。(如果使用自建 Server,将相同信息写入 `versions.json`)。
-4. **Config**:选择 Client/Upgrade 的 `.csproj`,生成 `generalupdate.manifest.json`。
-5. **Simulation**:选择旧版本目录和补丁 ZIP,确认 PASS。
-6. **发布上线**:上传补丁 ZIP、OSS 清单到生产环境。
-
-### 移动端更新
-
-使用 Mobile 模块串联移动端 Android 应用发布:
-
-```
-┌────────────┐ ┌──────────┐ ┌──────────┐
-│ 构建 APK/ │ -> │ Mobile │ -> │ 发布上线 │
-│ AAB 产物 │ │ 解析+上传 │ │ 更新服务 │
-└────────────┘ └──────────┘ └──────────┘
-```
-
-1. **构建产物**:在 CI 或本地构建出 `.apk` / `.aab` 文件。
-2. **Mobile**:选择文件或项目,自动解析元数据、计算 SHA256、上传服务端、导出版本记录。
-3. **发布上线**:确认上传成功,客户端通过 `GeneralUpdate.Avalonia.Android` 或 `GeneralUpdate.Maui.Android` 检查更新。
-
----
-
-## 常见问题
-
-| 现象 | 原因与处理 |
-|------|-----------|
-| Version invalid | 使用 `1.0.0`、`2.0.0-beta.1` 格式。不要用 `1.0` 或 `v1.0.0` |
-| Patch 输出为空或极小 | old/new 目录可能选反,或两个目录内容完全一致。确认 old 是用户已安装版本,new 是目标版本 |
-| 找不到 `delete_files.json` | 当前文件名是 `generalupdate.delete.json`,位于 Patch ZIP 根目录 |
-| Simulation 提示找不到 SDK | 安装 .NET 10 SDK 并确保命令行可执行 `dotnet --version` |
-| Simulation 端口冲突 | 修改 `ServerPort` 或释放本地 5000 端口 |
-| 客户端下载后 Hash 校验失败 | 对**最终上传到 CDN/OSS 的文件**重新计算 Hash,检查是否被中间代理重压缩 |
-| Upgrade 进程没有启动 | 检查 `generalupdate.manifest.json` 中 `updateAppName` 和 `updatePath` 是否与发布目录结构一致 |
-| Mobile 分析时提示 "Metadata extraction warning" | AXML 解析未找到预期属性,常见的两种原因:APK 使用资源 ID 引用而非直接文本存储属性值;或 APK 被加固/混淆后 AndroidManifest.xml 结构被修改。可以手动填写 PackageName、VersionName、VersionCode |
-| Mobile 项目模式 Build & Locate 失败 | 确认已安装 .NET SDK 且版本支持目标框架(TFM),检查 `.csproj` 包含 `-android` 目标框架,输出目录 `bin/Release/{tfm}/publish/` 没有被写入保护 |
-| Mobile 项目模式 "Build output not found" | `dotnet publish` 成功执行但未在预期目录找到 `.apk`/`.aab`。检查 `.csproj` 中 `AndroidPackageFormat` 设置是否正确(默认 `aab;apk` 优先产生 APK),以及 TFM 是否自动解析正确 |
-| Mobile 上传失败 | 检查服务端地址和 Endpoint 配置是否正确,确认服务端认证方式(Basic / Bearer / API Key)与工具配置一致,查看工具日志中的 HTTP 状态码和错误消息 |
-| Mobile 上传后客户端更新失败 | 确认服务端返回的版本记录 JSON 中 `Platform` 字段为 `4`(Android),`Format` 字段与客户端期望的 APK/AAB 格式一致 |
-
----
-
-## 关联文档
-
-- [GeneralUpdate.Core](../doc/GeneralUpdate.Core):Client/Upgrade 更新主流程
-- [GeneralUpdate.Differential](../doc/GeneralUpdate.Differential):差分算法 Clean/Dirty 模式
-- [GeneralUpdate.Extension](../doc/GeneralUpdate.Extension):扩展包安装与版本管理
-- [GeneralUpdate.Avalonia.Android](/avalonia/doc/GeneralUpdate.Avalonia.Android):Avalonia Android APK 更新组件
-- [GeneralUpdate.Maui.Android](/maui/doc/GeneralUpdate.Maui.Android):MAUI Android APK 更新组件
-- [入门实战手册](./Beginner%20cookbook):从零跑通完整更新闭环
+Tools 文档已迁移到独立的 [GeneralUpdate.Tools 帮助页面](/tools/quickstart/GeneralUpdate.PacketTool)。
diff --git a/website/docs/releaselog/GeneralUpdateToolsReleaselog.md b/website/docs/releaselog/GeneralUpdateToolsReleaselog.md
index 6dbe8bf..c26ee0d 100644
--- a/website/docs/releaselog/GeneralUpdateToolsReleaselog.md
+++ b/website/docs/releaselog/GeneralUpdateToolsReleaselog.md
@@ -1,45 +1,7 @@
---
title: GeneralUpdate.Tools
-authors: juster
-tags: [log, tools]
---
-# GeneralUpdate.Tools Release Log
+# GeneralUpdate.Tools
-### 2026-06-14 — `v20260614061359`
-
-- Added the Mobile packaging workflow for APK/AAB files and Android projects: metadata extraction, `dotnet publish`, SHA256 calculation, package upload, and version-record export.
-- Added a real-time build and upload result window.
-
-### 2026-06-04 — `v20260604102526`
-
-- Updated the desktop window and navigation experience with a frameless Ursa window style, emoji navigation icons, and text-based theme and language controls.
-
-### 2026-06-03 — `v20260603132551`
-
-- Fixed the release workflow so published artifacts are retained and attached to the GitHub Release.
-
-### 2026-05-21 — `v20260521100654`, `v20260521093859`
-
-- Improved Simulation by reusing cached test-app builds and bundling the test applications with release artifacts.
-- Fixed test-app lookup to use the executable directory rather than the process base directory.
-
-### 2026-05-20 — `v20260520132608`
-
-- Improved the Simulation workflow and removed trimming that caused runtime failures; added native library extraction.
-
-### 2026-02-17 — `v20260217`
-
-- Updated packaging workflow and project configuration.
-
-### 2026-02-16 — `v20260216`
-
-- Refactored the packaging functionality.
-
-### 2026-02-14 — `v20260214`
-
-- Added project configuration extraction and JSON package generation.
-
-### 2026-01-03 — `v20260103`
-
-- Updated the .NET CI workflow.
+请参阅独立的 [GeneralUpdate.Tools Release Log](/tools/releaselog/GeneralUpdateToolsReleaselog)。
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index 952ba17..e3a6cc6 100644
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -82,7 +82,7 @@ const config = {
// 启用英文与中文分词(中文基于 nodejieba)
language: ['en', 'zh'],
// 覆盖所有 docs 实例的路由(默认只索引 "docs")
- docsRouteBasePath: ['docs', 'zip', 'maui', 'avalonia', 'agent-skills', 'spacestation'],
+ docsRouteBasePath: ['docs', 'zip', 'maui', 'avalonia', 'tools', 'agent-skills', 'spacestation'],
// 仅索引 docs(默认),不索引独立页面
indexPages: false,
},
@@ -138,6 +138,23 @@ const config = {
},
},
],
+ // ── GeneralUpdate.Tools 独立 docs 实例(尚未冻结文档版本)─────────
+ [
+ '@docusaurus/plugin-content-docs',
+ {
+ id: 'tools',
+ path: 'tools',
+ routeBasePath: 'tools',
+ sidebarPath: './sidebars.tools.js',
+ editUrl:
+ 'https://github.com/GeneralLibrary/GeneralUpdate-Samples/tree/main/website',
+ versions: {
+ current: {
+ label: 'Current',
+ },
+ },
+ },
+ ],
// ── Agent Skills 独立 docs 实例(暂不版本化)────────────────────
[
'@docusaurus/plugin-content-docs',
@@ -180,7 +197,7 @@ const config = {
items: [
{
// "文档"分组下拉:产品名做分组标题,悬停/点开才显示已发布版本号
- // (隐藏未发布的 Next 子项)。版本列表随 docs:version 自动更新,
+ // (通常隐藏未发布的 Next 子项)。版本列表随 docs:version 自动更新,
// 发布新版无需改导航。见 src/theme/NavbarItem/ProductsVersionsNavbarItem
type: 'custom-productsVersions',
position: 'left',
@@ -191,6 +208,7 @@ const config = {
{ label: 'GeneralZip', docsPluginId: 'generalzip', basePath: '/zip' },
{ label: 'GeneralUpdate.Maui', docsPluginId: 'gumaui', basePath: '/maui' },
{ label: 'GeneralUpdate.Avalonia', docsPluginId: 'guavalonia', basePath: '/avalonia' },
+ { label: 'GeneralUpdate.Tools', docsPluginId: 'tools', basePath: '/tools', showCurrentVersion: true },
],
},
{
diff --git a/website/guavalonia_versioned_docs/version-0.0.1-beta.10/releaselog/GeneralUpdateAvaloniaReleaselog.md b/website/guavalonia_versioned_docs/version-0.0.1-beta.10/releaselog/GeneralUpdateAvaloniaReleaselog.md
new file mode 100644
index 0000000..8f69b6f
--- /dev/null
+++ b/website/guavalonia_versioned_docs/version-0.0.1-beta.10/releaselog/GeneralUpdateAvaloniaReleaselog.md
@@ -0,0 +1,20 @@
+---
+title: GeneralUpdate.Avalonia
+authors: juster
+tags: [log, avalonia]
+---
+
+# GeneralUpdate.Avalonia Release Log
+
+### 2026-10-03 — `v0.0.1-beta.10`
+
+- 版本校验改为通过 `UpdateServerOptions` 查询更新服务;支持 JSON 包信息接口和自定义 `IUpdatePackageSource`。
+- 新增 `PrepareUpdateAsync` 一体化流程及安装结果跟踪,包括持久化安装记录和确认事件。
+- 新增更新前检查回调、内置消息本地化、下载安全与速度平滑配置,并加固 HTTP 重试和断点续传。
+- 更新组件参考、流程说明与快速入门文档。
+
+### 2026-06-14 — `v0.0.1-beta.9`
+
+- `GeneralUpdate.Avalonia.Android` 首个公开版本,提供版本比较、APK 断点续传、SHA256 校验及系统安装器调用。
+- 支持 HMAC、Bearer、API Key 和 Basic 认证。
+- 新增 Avalonia Android 组件参考与快速入门文档。
diff --git a/website/guavalonia_versioned_sidebars/version-0.0.1-beta.10-sidebars.json b/website/guavalonia_versioned_sidebars/version-0.0.1-beta.10-sidebars.json
index 51e20a8..94167ef 100644
--- a/website/guavalonia_versioned_sidebars/version-0.0.1-beta.10-sidebars.json
+++ b/website/guavalonia_versioned_sidebars/version-0.0.1-beta.10-sidebars.json
@@ -2,6 +2,12 @@
"avaloniaSidebar": [
"quickstart/Avalonia Android cookbook",
"doc/GeneralUpdate.Avalonia.Android",
- "doc/Avalonia.Android-flow"
+ "doc/Avalonia.Android-flow",
+ {
+ "type": "category",
+ "label": "Release Log",
+ "collapsed": true,
+ "items": ["releaselog/GeneralUpdateAvaloniaReleaselog"]
+ }
]
}
diff --git a/website/gumaui_versioned_docs/version-0.0.1-beta.3/releaselog/GeneralUpdateMauiReleaselog.md b/website/gumaui_versioned_docs/version-0.0.1-beta.3/releaselog/GeneralUpdateMauiReleaselog.md
new file mode 100644
index 0000000..5de6065
--- /dev/null
+++ b/website/gumaui_versioned_docs/version-0.0.1-beta.3/releaselog/GeneralUpdateMauiReleaselog.md
@@ -0,0 +1,13 @@
+---
+title: GeneralUpdate.Maui
+authors: juster
+tags: [log, maui]
+---
+
+# GeneralUpdate.Maui Release Log
+
+### 2026-06-14 — `v0.0.1-beta.3`
+
+- `GeneralUpdate.Maui.Android` 首个公开版本。
+- 提供 `ValidateAsync` 与 `ExecuteUpdateAsync` 两阶段 API、依赖注入集成、HTTP Range 断点续传及 SHA256 校验。
+- 新增 MAUI Android 组件参考与快速入门文档。
diff --git a/website/gumaui_versioned_sidebars/version-0.0.1-beta.3-sidebars.json b/website/gumaui_versioned_sidebars/version-0.0.1-beta.3-sidebars.json
index 2db3c82..6b4d151 100644
--- a/website/gumaui_versioned_sidebars/version-0.0.1-beta.3-sidebars.json
+++ b/website/gumaui_versioned_sidebars/version-0.0.1-beta.3-sidebars.json
@@ -2,6 +2,12 @@
"mauiSidebar": [
"quickstart/Maui Android cookbook",
"doc/GeneralUpdate.Maui.Android",
- "doc/Maui.Android-flow"
+ "doc/Maui.Android-flow",
+ {
+ "type": "category",
+ "label": "Release Log",
+ "collapsed": true,
+ "items": ["releaselog/GeneralUpdateMauiReleaselog"]
+ }
]
}
diff --git a/website/i18n/en/docusaurus-plugin-content-docs-guavalonia/version-0.0.1-beta.10/releaselog/GeneralUpdateAvaloniaReleaselog.md b/website/i18n/en/docusaurus-plugin-content-docs-guavalonia/version-0.0.1-beta.10/releaselog/GeneralUpdateAvaloniaReleaselog.md
new file mode 100644
index 0000000..a9ceb3f
--- /dev/null
+++ b/website/i18n/en/docusaurus-plugin-content-docs-guavalonia/version-0.0.1-beta.10/releaselog/GeneralUpdateAvaloniaReleaselog.md
@@ -0,0 +1,20 @@
+---
+title: GeneralUpdate.Avalonia
+authors: juster
+tags: [log, avalonia]
+---
+
+# GeneralUpdate.Avalonia Release Log
+
+### 2026-10-03 — `v0.0.1-beta.10`
+
+- Changed version validation to query the update server using `UpdateServerOptions`; added support for a JSON package endpoint and custom `IUpdatePackageSource` implementations.
+- Added the integrated `PrepareUpdateAsync` workflow and installation-result tracking, including persistent installation records and confirmation events.
+- Added update pre-check callbacks, localized built-in messages, configurable download security and speed smoothing, and HTTP transport retry/resume hardening.
+- Updated the reference documentation, flow guide, and quickstart for this release.
+
+### 2026-06-14 — `v0.0.1-beta.9`
+
+- First public release of `GeneralUpdate.Avalonia.Android`, with version comparison, resumable APK downloads, SHA256 verification, and Package Installer orchestration.
+- Added HMAC, Bearer, API Key, and Basic authentication support.
+- Added the Avalonia Android component reference and quickstart documentation.
diff --git a/website/i18n/en/docusaurus-plugin-content-docs-gumaui/version-0.0.1-beta.3/releaselog/GeneralUpdateMauiReleaselog.md b/website/i18n/en/docusaurus-plugin-content-docs-gumaui/version-0.0.1-beta.3/releaselog/GeneralUpdateMauiReleaselog.md
new file mode 100644
index 0000000..4832269
--- /dev/null
+++ b/website/i18n/en/docusaurus-plugin-content-docs-gumaui/version-0.0.1-beta.3/releaselog/GeneralUpdateMauiReleaselog.md
@@ -0,0 +1,13 @@
+---
+title: GeneralUpdate.Maui
+authors: juster
+tags: [log, maui]
+---
+
+# GeneralUpdate.Maui Release Log
+
+### 2026-06-14 — `v0.0.1-beta.3`
+
+- First public release of `GeneralUpdate.Maui.Android`.
+- Added the two-phase `ValidateAsync` and `ExecuteUpdateAsync` API, dependency injection integration, HTTP Range resumable downloads, and SHA256 verification.
+- Added the MAUI Android component reference and quickstart documentation.
diff --git a/website/i18n/en/docusaurus-plugin-content-docs-tools/current/quickstart/GeneralUpdate.PacketTool.md b/website/i18n/en/docusaurus-plugin-content-docs-tools/current/quickstart/GeneralUpdate.PacketTool.md
new file mode 100644
index 0000000..e08b287
--- /dev/null
+++ b/website/i18n/en/docusaurus-plugin-content-docs-tools/current/quickstart/GeneralUpdate.PacketTool.md
@@ -0,0 +1,559 @@
+---
+sidebar_position: 11
+---
+
+# GeneralUpdate.Tools
+
+## What this is
+
+GeneralUpdate.Tools is a cross-platform desktop application built on Avalonia 12 (Windows / Linux / macOS). It helps you generate and manage patch packages, extension packages, version manifests, and run local update simulations as part of your software release workflow. It does not replace your CI/CD system — it consolidates the repetitive tasks of "package, verify, validate" into a single visual tool.
+
+Repository: [https://github.com/GeneralLibrary/GeneralUpdate.Tools](https://github.com/GeneralLibrary/GeneralUpdate.Tools)
+
+## Download & Run
+
+### Option 1: Run from source (recommended for developers)
+
+The tool targets .NET 10. Make sure you have [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) installed:
+
+```powershell
+git clone https://github.com/GeneralLibrary/GeneralUpdate.Tools.git
+cd GeneralUpdate.Tools\src
+dotnet run --project GeneralUpdate.Tools.csproj
+```
+
+### Option 2: Download pre-built binaries
+
+Go to [GeneralUpdate.Tools Releases](https://github.com/GeneralLibrary/GeneralUpdate.Tools/releases) and download the executable for your platform.
+
+> The Simulation module internally runs `dotnet publish` to build test apps, so you need the .NET SDK for that feature. The Mobile module's Project Mode (Build & Locate) also runs `dotnet publish`, which requires the .NET SDK too. Patch / Extension / OSS / Config modules and Mobile's File Mode work without the SDK.
+
+## Sidebar modules
+
+| Module | What you provide | What the tool produces | Downstream consumer |
+|--------|-----------------|----------------------|---------------------|
+| **Patch** | Old and new version directories | `{name}.zip` with `.patch` files, new files, and a deletion manifest | Server, OSS/CDN, Core Upgrade process |
+| **Extension** | Extension source directory and metadata | `{name}_{version}.zip` containing `manifest.json` | `GeneralUpdate.Extension` component |
+| **OSS** | Package name, version, URL, and a local file for hashing | `oss_config.json` at the location you choose | OSS client or object-storage publish flow |
+| **Simulate** | Old application directory and patch ZIP | Local update server and simulation report | Pre-release QA gate |
+| **Mobile** | APK/AAB file or MAUI/Avalonia Android `.csproj` | Upload result and `mobile_version_{timestamp}.json` | Mobile update server and Android clients |
+| **Config** | Client/Upgrade `.csproj` files | `generalupdate.manifest.json` and an optional sample publish directory | Client/Upgrade bootstrap |
+| **Settings** | Upload server, authentication, simulation, and feature options | `%APPDATA%/GeneralUpdate.Tools/config.json` | Modules that upload or run a local simulation |
+
+:::tip SHA256
+SHA256 is not a separate sidebar page. It is available through **OSS Config > Compute** and the **Mobile** metadata workflow.
+:::
+
+---
+
+## Patch: Generate patch packages
+
+### What problem it solves
+
+You shipped a new version, but you don't want users to download the entire install package. The Patch module compares old and new version directories and outputs only what changed: modified files become binary `.patch` diffs, new files are copied directly, and deleted files are recorded in a manifest. The resulting differential package is typically much smaller than the full publish directory.
+
+### Inputs
+
+| Field | Required | Description |
+|-------|----------|-------------|
+| Old Directory | ✅ | The currently installed old version directory, e.g. `publish\v1.0.0` |
+| New Directory | ✅ | The new version directory to release, e.g. `publish\v2.0.0` |
+| Package Name | ❌ | Output ZIP name (without `.zip`); auto-generated as `patch_yyyyMMddHHmmss` if left empty |
+| Version | ✅ | Target version number in `MAJOR.MINOR.PATCH` format (e.g. `2.0.0`) or `MAJOR.MINOR.PATCH-prerelease+build` |
+| Output Directory | ❌ | Where to save the ZIP; defaults to desktop |
+
+### What the tool does internally
+
+1. **Encrypted file detection**: Scans old/new directories for packed executables (e.g. Themida, VMProtect) or encryption signatures. Detected files are flagged with a warning — they cannot produce valid differential patches and will be bundled as full files.
+2. Validates that old/new directories exist and version format is correct.
+3. Creates a temp directory `gupatch_yyyyMMddHHmmss`.
+4. Recursively compares old vs new: **changed files** → generate `.patch` binary diff; **new files** → copy directly; **deleted files** → record hash to `generalupdate.delete.json`.
+5. Compresses the temp directory into `{PackageName}.zip`.
+6. Deletes the temp directory; ZIP remains in Output Directory.
+
+> **About encrypted files**: Packed executables (Themida, VMProtect, etc.), obfuscated code, or encrypted binaries will have completely different hashes between versions, making differential algorithms ineffective. Such files are detected and bundled as full files rather than `.patch` diffs. For optimal patch sizes, unpack/decrypt your binaries before publishing.
+
+Under the hood it calls `GeneralUpdate.Core.Pipeline.DiffPipeline.CleanAsync(oldDir, newDir, patchDir)` — the same code path your CI scripts use.
+
+### Output
+
+```
+{OutputDirectory}/{PackageName}.zip
+ ├── changed.dll.patch ← binary diff
+ ├── new_file.dll ← new file (preserving directory structure)
+ └── generalupdate.delete.json ← deletion manifest
+```
+
+### How downstream consumes it
+
+- Place the ZIP in your Server's `wwwroot/packages/` directory and update `Url` and `Hash` in `versions.json`
+- Or upload to OSS/CDN and record the download URL in `oss_config.json`
+- Core Upgrade downloads the ZIP, then `DiffPipeline.DirtyAsync` applies patches and deletions from the manifest
+
+---
+
+## Extension: Package extensions
+
+### What problem it solves
+
+If you use the `GeneralUpdate.Extension` component to manage plugins/extensions, every extension release requires manually building a standard-format ZIP and generating `manifest.json`. The Extension module saves you from manual compression and hand-written JSON.
+
+### Inputs
+
+| Field | Required | Description |
+|-------|----------|-------------|
+| Name | ✅ | Unique extension identifier (lowercase + hyphens recommended), e.g. `my-data-exporter` |
+| Version | ✅ | Semantic version, e.g. `1.0.0` |
+| Description | ❌ | What the extension does |
+| Publisher | ❌ | Publisher name |
+| License | ❌ | License identifier, e.g. `MIT` |
+| Extension Directory | ✅ | Source directory containing all extension files; click Pick to select |
+| Export Directory | ❌ | Output directory; defaults to desktop |
+| Custom Properties | ❌ | Key-value pairs written to `manifest.json.customProperties` |
+
+### Output
+
+```
+{ExportDirectory}/{Name}_{Version}.zip
+ ├── manifest.json ← extension metadata
+ ├── bin/
+ │ └── MyExtension.dll
+ ├── resources/
+ └── ...
+```
+
+Example `manifest.json`:
+
+```json
+{
+ "name": "my-data-exporter",
+ "version": "1.0.0",
+ "description": "Export data to CSV/Excel/JSON",
+ "publisher": "MyCompany",
+ "license": "MIT",
+ "dependencies": "",
+ "minHostVersion": "",
+ "maxHostVersion": "",
+ "isPreRelease": false,
+ "platform": { "displayName": "Windows", "value": 1 },
+ "format": ".zip",
+ "releaseDate": "2026-06-01T00:00:00",
+ "customProperties": { "maxConnections": "100" }
+}
+```
+
+### How downstream consumes it
+
+- Extension Host calls `ExtensionManager.QueryRemoteExtensionsAsync(...)` to list available extensions
+- On install, downloads the ZIP, reads `manifest.json` for compatibility checks and dependency resolution
+- See [GeneralUpdate.Extension](/docs/doc/GeneralUpdate.Extension) for details
+
+---
+
+## OSS Config: Generate OSS version manifest
+
+### What problem it solves
+
+If you use OSS mode updates (static file server), you need to maintain a `versions.json` or `oss_config.json` so clients can discover available versions. The OSS Config module helps you organize version metadata and compute SHA256 hashes.
+
+### Inputs
+
+| Field | Required | Description |
+|-------|----------|-------------|
+| PacketName | ✅ | Update package name |
+| Version | ✅ | Semantic version number |
+| Url | ✅ | Full download URL clients can use |
+| SHA256 | Recommended | Click ComputeHash and select a local ZIP to auto-fill |
+
+### Workflow
+
+1. Fill in PacketName, Version, Url.
+2. Click **ComputeHash**, select the local patch ZIP, SHA256 auto-fills.
+3. Click **Add To List** to add the entry.
+4. Repeat for all versions.
+5. Click **Export** to generate `oss_config.json`.
+
+### Output
+
+```json
+[
+ {
+ "PacketName": "client_1.0.0_to_2.0.0",
+ "Hash": "f2c7a8b3...",
+ "Version": "2.0.0",
+ "Url": "https://cdn.example.com/client_1.0.0_to_2.0.0.zip",
+ "ReleaseDate": ""
+ }
+]
+```
+
+### How downstream consumes it
+
+- Upload `oss_config.json` to your OSS bucket or static file server
+- OSS client reads this file to discover versions and validates Hash after download
+- See [GeneralUpdate.Core](/docs/doc/GeneralUpdate.Core) OSS update strategy
+
+---
+
+## Config: Generate bootstrap manifest
+
+### What problem it solves
+
+Client and Upgrade need to know the main app name, updater app name, version, ProductId, and UpdatePath at startup. The Config module reads your `.csproj` files to auto-extract AssemblyName and TargetFramework, then generates `generalupdate.manifest.json` — saving you from manual configuration and typos.
+
+### Inputs
+
+| Field | Required | Description |
+|-------|----------|-------------|
+| Client .csproj | ✅ | Path to the main app's `.csproj` file |
+| Upgrade .csproj | ❌ | Path to the updater app's `.csproj` |
+| ClientVersion | ✅ | Current client version, e.g. `1.0.0` |
+| UpgradeClientVersion | ✅ | Updater version, e.g. `1.0.0` |
+| AppType | ✅ | Client / Upgrade / OssClient / OssUpgrade |
+| ProductId | ✅ | Product identifier GUID |
+| UpdatePath | ✅ | Relative subdirectory for Upgrade, e.g. `update/` |
+
+### Workflow
+
+1. Click Browse to select Client `.csproj` (required) and Upgrade `.csproj` (optional).
+2. Click **Analyze** — the tool extracts AssemblyName and fills `MainAppName` / `UpdateAppName`.
+3. Fill in Version, AppType, ProductId, UpdatePath manually.
+4. Click **Generate** to produce `generalupdate.manifest.json` in the tool's run directory.
+5. Click **Generate Sample** to additionally run `dotnet publish` and produce a runnable output directory.
+
+### Output
+
+`generalupdate.manifest.json`:
+
+```json
+{
+ "mainAppName": "ClientSample.exe",
+ "clientVersion": "1.0.0",
+ "appType": "Client",
+ "updateAppName": "UpgradeSample.exe",
+ "upgradeClientVersion": "1.0.0",
+ "productId": "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
+ "updatePath": "update/"
+}
+```
+
+Generate Sample additionally outputs:
+
+```
+{tool-run-dir}/sample_output/
+ ├── ClientSample.exe ← Client dotnet publish output
+ ├── generalupdate.manifest.json
+ └── update/
+ └── UpgradeSample.exe ← Upgrade dotnet publish output
+```
+
+---
+
+## Simulation: Local update dry-run
+
+### What problem it solves
+
+You just used the Patch module to generate a package — but you're not sure it actually works in a real update flow. The Simulation module starts a local update server, builds Client/Upgrade samples, and runs a complete "discover version → download patch → apply update" loop on your machine, then outputs a PASS/FAIL report.
+
+### Prerequisites
+
+- .NET 10 SDK (or newer) installed
+- `dotnet --version` works
+- Local port 5000 available (configurable)
+
+### Inputs
+
+| Field | Required | Description |
+|-------|----------|-------------|
+| Old App Directory | ✅ | The directory simulating the user's currently installed version |
+| Patch File | ✅ | The patch ZIP produced by the Patch module |
+| CurrentVersion | ✅ | Old version number (used by the simulated Client for version check) |
+| TargetVersion | ✅ | New version number (used for the server-side version source) |
+| AppType | ✅ | ClientApp = 1 / UpgradeApp = 2 |
+| Platform | ✅ | Windows = 1 / Linux = 2 |
+| AppSecretKey | ✅ | Client authentication key |
+| ProductId | ✅ | Product identifier GUID |
+| UpdatePath | ✅ | Upgrade subdirectory name, e.g. `update/` |
+| ServerPort | ❌ | Local server port, defaults to 5000 |
+
+### Simulation process
+
+1. **Validate**: old directory exists, patch ZIP exists, version format valid, .NET SDK available.
+2. **Publish Client**: `dotnet publish test_app/Client/ClientSample.csproj` to App Directory.
+3. **Publish Upgrade**: `dotnet publish test_app/Upgrade/UpgradeSample.csproj` to `UpdatePath` subdirectory.
+4. **Generate manifest**: write `generalupdate.manifest.json` in App Directory.
+5. **Prepare patch**: copy patch ZIP to internal `.server` directory, compute SHA256, write server-side version source.
+6. **Start server**: local server listens on `http://localhost:{ServerPort}`, serving `POST /Upgrade/Verification`, `POST /Upgrade/Report`, `GET /patch/{filename}`.
+7. **Run Client**: launch `ClientSample.exe` with `--server-url http://localhost:5000 --app-secret ... --client-version 1.0.0`.
+8. **Stop server**: stop after Client completes or times out.
+9. **Generate report**: inspect directory changes and output `simulation_report.md`.
+
+### Output
+
+```
+{AppDirectory}/simulation_report.md ← simulation report (PASS/FAIL + timeline)
+```
+
+The report includes a config table, PASS/FAIL verdict, notes, and a full timeline — suitable for pasting into release notes or CI artifacts.
+
+---
+
+## Hash: SHA256 verification
+
+### What problem it solves
+
+After uploading a patch package to CDN/OSS, you must ensure clients download the exact same file. The Hash feature computes SHA256 of a local file and outputs a lowercase hex string. You should write this value into your version manifest or server response data.
+
+### How to use
+
+In the **OSS Config** module, click **ComputeHash**, select a local ZIP file, and the SHA256 field auto-fills. You can also use this standalone to verify any file.
+
+---
+
+## Mobile: Mobile packaging
+
+### What problem it solves
+
+If you use `GeneralUpdate.Avalonia.Android` or `GeneralUpdate.Maui.Android` to provide auto-update for your Android apps, each release requires extracting APK/AAB metadata (package name, version, SHA256 hash, file size) and uploading it to the server for version management. The Mobile module consolidates "parse → package → upload → generate version record" into a single interface.
+
+
+
+Supports two modes:
+
+- **File mode**: Select an APK or AAB file directly; the tool automatically parses AndroidManifest.xml to extract metadata.
+- **Project mode**: Select a `.csproj`, automatically runs `dotnet publish`, then locates and parses the build artifact.
+
+### Inputs
+
+#### File mode
+
+| Field | Required | Description |
+|-------|----------|-------------|
+| APK/AAB file | ✅ | Select a `.apk` or `.aab` file; format is auto-detected |
+| Output Directory | ❌ | Version record JSON output directory; defaults to desktop |
+| ProductId | ✅ | Product identifier GUID for server-side product differentiation |
+| Platform | ✅ | Target platform (default Android = 4) |
+| Product Name | ❌ | Product name, written into the version record |
+| Release Notes | ❌ | Release notes |
+| Is Forcibly | ❌ | Force update flag |
+
+#### Project mode
+
+| Field | Required | Description |
+|-------|----------|-------------|
+| `.csproj` file | ✅ | Select a MAUI or Avalonia Android `.csproj`; tool parses `ApplicationId`, `ApplicationDisplayVersion`, `ApplicationVersion` |
+| Output Directory | ❌ | Same as above |
+
+### Workflow
+
+1. **Select mode**: Toggle File Mode / Project Mode switch.
+ - **File mode**: Click **Select File** to choose `.apk` or `.aab`.
+ - **Project mode**: Click **Select Project** to choose a `.csproj`, then click **Build & Locate** to run `dotnet publish` and locate the artifact.
+2. **Analyze**: Click Analyze — the tool automatically:
+ - Detects file format (APK / Android App Bundle)
+ - Extracts `PackageName`, `VersionName`, `VersionCode` from AndroidManifest.xml
+ - Computes SHA256 hash and file size
+3. **Configure upload**: Review or edit the auto-extracted metadata, fill in ProductId, Product Name, etc.
+4. **Upload**: Click Upload to send to the server, automatically generating a version record JSON file.
+
+### What the tool does internally
+
+1. **Format detection**: Identifies package format via file extension (`.apk` / `.aab`) and ZIP internal structure (AndroidManifest.xml location).
+ - APK detection: Opens the ZIP file and checks for `AndroidManifest.xml` at the root.
+ - AAB detection: Opens the ZIP file and checks for `base/manifest/AndroidManifest.xml`.
+ - If the format is neither `.apk` nor `.aab`, the detector returns Unknown.
+
+2. **Metadata parsing**: Uses `AxmlParser` to parse the binary AXML (Android Binary XML) format from the ZIP's `AndroidManifest.xml`. The parsing process works as follows:
+ - **String pool extraction**: Reads AXML chunk headers, locates the StringPool chunk (type `0x0001`), and extracts all UTF-16LE encoded strings.
+ - **Attribute value extraction**: Walks through Start Element chunks (type `0x0102`), parses the attribute block (20 bytes per attribute), matches attribute names by their string pool index to find `package` and `versionName`, then resolves values via `rawValueIndex` from the string pool.
+ - **versionCode extraction**: versionCode is stored as a typed integer attribute (type `0x10` = INT_DEC or `0x11` = INT_HEX), read directly from the `typedValueData` field (offset +16, 4 bytes) as a signed integer.
+ - AXML chunk structure reference: https://justanapplication.wordpress.com/category/android/android-binary-xml/
+
+3. **SHA256 computation**: Computes SHA256 hash of the full file, output as a lowercase hex string.
+
+4. **File size**: Reads file length and formats it for human-readable display (B / KB / MB / GB).
+
+5. **Project build** (Project mode only): Selecting a `.csproj` triggers:
+ - `MobileCsprojParser.Parse()` reads the `.csproj` XML to extract `TargetFramework` (supports single and multi-TFM; auto-selects the one containing `-android`), `ApplicationId` (mapped to PackageName), `ApplicationDisplayVersion` (mapped to VersionName), `ApplicationVersion` (mapped to VersionCode), `UseMaui` (identifies MAUI projects), `AndroidPackageFormat`, and `AssemblyName`.
+ - Runs `dotnet publish "{csprojPath}" -c Release -o "{publishDir}"`.
+ - After build, searches `bin/Release/{tfm}/publish/` for `.apk` or `.aab` files, auto-locating the build artifact.
+ - Project type display: MAUI (`true`) or Avalonia (no UseMaui).
+
+6. **Upload**: Sends the file and form fields via HTTP multipart/form-data. The form fields and their data sources are:
+
+ | Field | Source | Example |
+ |-------|--------|---------|
+ | `Name` | ProductName (user input) | `MyApp` |
+ | `Version` | VersionName (auto-parsed) | `2.0.0` |
+ | `Hash` | SHA256 (auto-computed) | `a1b2c3d4...` |
+ | `Format` | Package format (auto-detected) | `.apk` / `.aab` |
+ | `Size` | File size (auto-computed) | `50000000` |
+ | `AppType` | Fixed value `"1"` | `1` |
+ | `Platform` | Platform field (default 4=Android) | `4` |
+ | `ProductId` | ProductId (user-entered GUID) | `2d974e2a-...` |
+ | `IsForcibly` | Force update toggle | `true` / `false` |
+
+ The upload service supports the following configuration:
+ - **Server URL**: Server base address
+ - **Upload Endpoint**: API path, defaults to `/Packet/Create`
+ - **Timeout**: Timeout in seconds
+ - **Retry Count**: Retry attempts on failure (exponential backoff)
+ - **Auth**: Authentication configuration, supports Basic / Bearer Token / API Key modes (credentials stored encrypted via DPAPI)
+
+7. **Version record export**: After a successful upload, generates `mobile_version_{timestamp}.json` with full version metadata. You can also use **Export Record Only** to generate the record without uploading — the URL field will be `"manual"`.
+
+### Output
+
+```
+{OutputDirectory}/mobile_version_20260614120000.json
+```
+
+```json
+{
+ "name": "MyApp",
+ "version": "2.0.0",
+ "hash": "a1b2c3d4e5f6...",
+ "url": "https://server.example.com/packages/app-v2.0.0.apk",
+ "packageName": "com.example.myapp",
+ "fileSize": 50000000,
+ "format": "apk",
+ "platform": 4,
+ "productId": "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
+ "isForcibly": false,
+ "releaseDate": "2026-06-14T12:00:00.0000000Z"
+}
+```
+
+### How downstream consumes it
+
+- Import or upload the generated version record JSON to your update server (e.g. GeneralSpacestation).
+- When the client (`GeneralUpdate.Avalonia.Android` or `GeneralUpdate.Maui.Android`) queries the server for version info, the returned data structure maps to the version record's fields.
+- The client uses the `hash` field for SHA256 integrity verification after downloading the APK.
+
+### Supported AndroidManifest fields
+
+| Manifest attribute | Field | Description |
+|-------------------|-------|-------------|
+| `package` | `PackageName` | App package name (unique identifier) |
+| `android:versionName` | `VersionName` | Display version (e.g. `2.0.0`) |
+| `android:versionCode` | `VersionCode` | Internal version code (integer) |
+
+---
+
+## Settings: Upload and runtime options
+
+The Settings page stores shared configuration used by upload and simulation workflows:
+
+```text
+%APPDATA%\GeneralUpdate.Tools\config.json
+```
+
+On Windows, open `%APPDATA%\GeneralUpdate.Tools` from `Win+R`. The app keeps a backup at `config.json.backup`. Passwords, bearer tokens, and API keys are protected by the operating-system credential encryption before they are written to the configuration file.
+
+### Upload server
+
+| Field | Default | Description |
+|-------|---------|-------------|
+| Server URL | Empty | An absolute URL such as `https://update.example.com` |
+| Upload endpoint | `/api/v1/packages/upload` | Appended to the server URL |
+| Timeout | 300 seconds | Maximum time to wait for one upload attempt |
+| Retry count | 3 | Number of retries after failure; delays use exponential backoff |
+| Auto-upload after patch generation | Off | Upload the generated ZIP immediately after a successful Patch build |
+
+Uploads use `multipart/form-data`, with the file supplied under the `file` field. HTTP 4xx responses (except timeout and 429) are treated as server rejection; 5xx, timeout, and network errors can be retried.
+
+### Authentication
+
+| Scheme | Behavior |
+|--------|----------|
+| None | No authentication header |
+| Basic Auth | Sends `Authorization: Basic ...` using username and password |
+| Token | Sends the configured token in the `Authorization` request header |
+| API Key | Sends the key in a configurable request header, defaulting to `X-API-Key` |
+
+Use **Test Connection** after saving; it sends a GET request to the configured upload URL and reports whether the response is successful.
+
+### Simulation and feature switches
+
+- **Local server port**: defaults to `5000` for update simulation.
+- **Simulation server requires authentication**: enables authentication for the local simulation server.
+- **Detect encrypted files before packaging**: controls whether Patch scans output for suspicious or packed files.
+- **Validate SemVer automatically**: global option for version-validation behavior; modules still validate required version fields.
+- **Show JSON preview**: the JSON-preview option in the configuration.
+
+**Save Settings** persists immediately. **Reset to Defaults** restores upload, authentication, simulation, and feature options.
+
+---
+
+## Recommended release workflow
+
+### Desktop update
+
+This sequence chains the Patch, OSS, Config, and Simulation modules together for desktop app releases:
+
+```
+┌─────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
+│ Build │ -> │ Patch │ -> │ OSS/Hash │ -> │ Config │ -> │ Simulation│
+│ old & new│ │ generate │ │ compute │ │ generate │ │ verify │
+└─────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
+```
+
+1. **Build release directories**: run `dotnet publish` in CI or locally to get old/new directories.
+2. **Patch**: select old/new, generate patch ZIP.
+3. **OSS Config**: compute SHA256 on the patch ZIP, fill in download URL, export `oss_config.json` (or write the same info to `versions.json` for a self-hosted Server).
+4. **Config**: select Client/Upgrade `.csproj` files, generate `generalupdate.manifest.json`.
+5. **Simulation**: select the old version directory and patch ZIP, confirm PASS.
+6. **Ship**: upload patch ZIP and OSS manifest to production.
+
+### Mobile update
+
+Use the Mobile module for Android app releases:
+
+```
+┌────────────┐ ┌──────────┐ ┌──────────┐
+│ Build APK/ │ -> │ Mobile │ -> │ Ship to │
+│ AAB │ │ parse & │ │ update │
+│ artifact │ │ upload │ │ server │
+└────────────┘ └──────────┘ └──────────┘
+```
+
+1. **Build artifact**: Build `.apk` / `.aab` in CI or locally.
+2. **Mobile**: Select file or project, auto-parse metadata, compute SHA256, upload to server, export version record.
+3. **Ship**: Confirm upload success; clients check for updates via `GeneralUpdate.Avalonia.Android` or `GeneralUpdate.Maui.Android`.
+
+---
+
+## FAQ
+
+| Symptom | Cause & fix |
+|---------|------------|
+| Version invalid | Use `1.0.0` or `2.0.0-beta.1` format. Do not use `1.0` or `v1.0.0` |
+| Patch output empty or tiny | old/new directories may be swapped, or the two are identical. Confirm old is the installed version and new is the target version |
+| Cannot find `delete_files.json` | The current filename is `generalupdate.delete.json`, located in the patch ZIP root |
+| Simulation complains about missing SDK | Install .NET 10 SDK and verify `dotnet --version` works |
+| Simulation port conflict | Change `ServerPort` or free up local port 5000 |
+| Hash mismatch after client download | Re-compute hash on the file that was actually uploaded to CDN/OSS; check for proxy re-compression |
+| Upgrade process doesn't start | Verify `updateAppName` and `updatePath` in `generalupdate.manifest.json` match the publish directory structure |
+| Mobile analysis shows "Metadata extraction warning" | AXML parser could not find the expected attributes. Common causes: the APK uses resource ID references instead of direct string values; or the APK has been packed/obfuscated and the AndroidManifest.xml structure was modified. You can fill in PackageName, VersionName, and VersionCode manually |
+| Mobile Project Mode Build & Locate fails | Verify that the .NET SDK is installed and supports the target framework. Ensure the `.csproj` contains an `-android` target framework. Make sure the output directory `bin/Release/{tfm}/publish/` is not write-protected |
+| Mobile Project Mode "Build output not found" | `dotnet publish` succeeded but no `.apk`/`.aab` was found in the expected directory. Check the `AndroidPackageFormat` setting in `.csproj` (default `aab;apk` produces APK first), and verify that the TFM was resolved correctly |
+| Mobile upload fails | Check that the server URL and endpoint path are configured correctly. Verify the server authentication method (Basic / Bearer / API Key) matches the tool configuration. Review the tool logs for the HTTP status code and error message |
+| Mobile client update fails after upload | Confirm that the version record JSON returned by the server has `Platform` set to `4` (Android), and the `Format` field matches the APK/AAB format the client expects |
+
+---
+
+## Related docs
+
+- [GeneralUpdate.Core](/docs/doc/GeneralUpdate.Core): Client/Upgrade main update flow
+- [GeneralUpdate.Differential](/docs/doc/GeneralUpdate.Differential): Differential algorithm Clean/Dirty modes
+- [GeneralUpdate.Extension](/docs/doc/GeneralUpdate.Extension): Extension install and version management
+- [GeneralUpdate.Avalonia.Android](/avalonia/doc/GeneralUpdate.Avalonia.Android): Avalonia Android APK update component
+- [GeneralUpdate.Maui.Android](/maui/doc/GeneralUpdate.Maui.Android): MAUI Android APK update component
+- [Beginner cookbook](/docs/quickstart/Beginner%20cookbook): Complete end-to-end update walkthrough
diff --git a/website/i18n/en/docusaurus-plugin-content-docs-tools/current/releaselog/GeneralUpdateToolsReleaselog.md b/website/i18n/en/docusaurus-plugin-content-docs-tools/current/releaselog/GeneralUpdateToolsReleaselog.md
new file mode 100644
index 0000000..6dbe8bf
--- /dev/null
+++ b/website/i18n/en/docusaurus-plugin-content-docs-tools/current/releaselog/GeneralUpdateToolsReleaselog.md
@@ -0,0 +1,45 @@
+---
+title: GeneralUpdate.Tools
+authors: juster
+tags: [log, tools]
+---
+
+# GeneralUpdate.Tools Release Log
+
+### 2026-06-14 — `v20260614061359`
+
+- Added the Mobile packaging workflow for APK/AAB files and Android projects: metadata extraction, `dotnet publish`, SHA256 calculation, package upload, and version-record export.
+- Added a real-time build and upload result window.
+
+### 2026-06-04 — `v20260604102526`
+
+- Updated the desktop window and navigation experience with a frameless Ursa window style, emoji navigation icons, and text-based theme and language controls.
+
+### 2026-06-03 — `v20260603132551`
+
+- Fixed the release workflow so published artifacts are retained and attached to the GitHub Release.
+
+### 2026-05-21 — `v20260521100654`, `v20260521093859`
+
+- Improved Simulation by reusing cached test-app builds and bundling the test applications with release artifacts.
+- Fixed test-app lookup to use the executable directory rather than the process base directory.
+
+### 2026-05-20 — `v20260520132608`
+
+- Improved the Simulation workflow and removed trimming that caused runtime failures; added native library extraction.
+
+### 2026-02-17 — `v20260217`
+
+- Updated packaging workflow and project configuration.
+
+### 2026-02-16 — `v20260216`
+
+- Refactored the packaging functionality.
+
+### 2026-02-14 — `v20260214`
+
+- Added project configuration extraction and JSON package generation.
+
+### 2026-01-03 — `v20260103`
+
+- Updated the .NET CI workflow.
diff --git a/website/i18n/en/docusaurus-plugin-content-docs/current/quickstart/Beginner cookbook.md b/website/i18n/en/docusaurus-plugin-content-docs/current/quickstart/Beginner cookbook.md
index 22cc759..3456a8c 100644
--- a/website/i18n/en/docusaurus-plugin-content-docs/current/quickstart/Beginner cookbook.md
+++ b/website/i18n/en/docusaurus-plugin-content-docs/current/quickstart/Beginner cookbook.md
@@ -383,7 +383,7 @@ After this flow works, read these pages in order:
1. [GeneralUpdate.Core](../doc/GeneralUpdate.Core): update strategies, event notifications, silent updates, and manifest-based minimal configuration
2. [GeneralUpdate.Differential](../doc/GeneralUpdate.Differential): differential algorithms, parallel processing, and Clean/Dirty
3. [GeneralUpdate.Bowl](../doc/GeneralUpdate.Bowl): crash monitoring, backup, and failure recovery
-4. [GeneralUpdate.Tools](./GeneralUpdate.PacketTool): complete guides for patches, hashes, OSS config, and simulation
+4. [GeneralUpdate.Tools](/tools/quickstart/GeneralUpdate.PacketTool): complete guides for patches, hashes, OSS config, and simulation
## Installation directory notes
diff --git a/website/i18n/en/docusaurus-plugin-content-docs/current/quickstart/GeneralUpdate.PacketTool.md b/website/i18n/en/docusaurus-plugin-content-docs/current/quickstart/GeneralUpdate.PacketTool.md
index f154433..c3dce4b 100644
--- a/website/i18n/en/docusaurus-plugin-content-docs/current/quickstart/GeneralUpdate.PacketTool.md
+++ b/website/i18n/en/docusaurus-plugin-content-docs/current/quickstart/GeneralUpdate.PacketTool.md
@@ -1,559 +1,7 @@
---
-sidebar_position: 11
+title: GeneralUpdate.Tools
---
# GeneralUpdate.Tools
-## What this is
-
-GeneralUpdate.Tools is a cross-platform desktop application built on Avalonia 12 (Windows / Linux / macOS). It helps you generate and manage patch packages, extension packages, version manifests, and run local update simulations as part of your software release workflow. It does not replace your CI/CD system — it consolidates the repetitive tasks of "package, verify, validate" into a single visual tool.
-
-Repository: [https://github.com/GeneralLibrary/GeneralUpdate.Tools](https://github.com/GeneralLibrary/GeneralUpdate.Tools)
-
-## Download & Run
-
-### Option 1: Run from source (recommended for developers)
-
-The tool targets .NET 10. Make sure you have [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) installed:
-
-```powershell
-git clone https://github.com/GeneralLibrary/GeneralUpdate.Tools.git
-cd GeneralUpdate.Tools\src
-dotnet run --project GeneralUpdate.Tools.csproj
-```
-
-### Option 2: Download pre-built binaries
-
-Go to [GeneralUpdate.Tools Releases](https://github.com/GeneralLibrary/GeneralUpdate.Tools/releases) and download the executable for your platform.
-
-> The Simulation module internally runs `dotnet publish` to build test apps, so you need the .NET SDK for that feature. The Mobile module's Project Mode (Build & Locate) also runs `dotnet publish`, which requires the .NET SDK too. Patch / Extension / OSS / Config modules and Mobile's File Mode work without the SDK.
-
-## Sidebar modules
-
-| Module | What you provide | What the tool produces | Downstream consumer |
-|--------|-----------------|----------------------|---------------------|
-| **Patch** | Old and new version directories | `{name}.zip` with `.patch` files, new files, and a deletion manifest | Server, OSS/CDN, Core Upgrade process |
-| **Extension** | Extension source directory and metadata | `{name}_{version}.zip` containing `manifest.json` | `GeneralUpdate.Extension` component |
-| **OSS** | Package name, version, URL, and a local file for hashing | `oss_config.json` at the location you choose | OSS client or object-storage publish flow |
-| **Simulate** | Old application directory and patch ZIP | Local update server and simulation report | Pre-release QA gate |
-| **Mobile** | APK/AAB file or MAUI/Avalonia Android `.csproj` | Upload result and `mobile_version_{timestamp}.json` | Mobile update server and Android clients |
-| **Config** | Client/Upgrade `.csproj` files | `generalupdate.manifest.json` and an optional sample publish directory | Client/Upgrade bootstrap |
-| **Settings** | Upload server, authentication, simulation, and feature options | `%APPDATA%/GeneralUpdate.Tools/config.json` | Modules that upload or run a local simulation |
-
-:::tip SHA256
-SHA256 is not a separate sidebar page. It is available through **OSS Config > Compute** and the **Mobile** metadata workflow.
-:::
-
----
-
-## Patch: Generate patch packages
-
-### What problem it solves
-
-You shipped a new version, but you don't want users to download the entire install package. The Patch module compares old and new version directories and outputs only what changed: modified files become binary `.patch` diffs, new files are copied directly, and deleted files are recorded in a manifest. The resulting differential package is typically much smaller than the full publish directory.
-
-### Inputs
-
-| Field | Required | Description |
-|-------|----------|-------------|
-| Old Directory | ✅ | The currently installed old version directory, e.g. `publish\v1.0.0` |
-| New Directory | ✅ | The new version directory to release, e.g. `publish\v2.0.0` |
-| Package Name | ❌ | Output ZIP name (without `.zip`); auto-generated as `patch_yyyyMMddHHmmss` if left empty |
-| Version | ✅ | Target version number in `MAJOR.MINOR.PATCH` format (e.g. `2.0.0`) or `MAJOR.MINOR.PATCH-prerelease+build` |
-| Output Directory | ❌ | Where to save the ZIP; defaults to desktop |
-
-### What the tool does internally
-
-1. **Encrypted file detection**: Scans old/new directories for packed executables (e.g. Themida, VMProtect) or encryption signatures. Detected files are flagged with a warning — they cannot produce valid differential patches and will be bundled as full files.
-2. Validates that old/new directories exist and version format is correct.
-3. Creates a temp directory `gupatch_yyyyMMddHHmmss`.
-4. Recursively compares old vs new: **changed files** → generate `.patch` binary diff; **new files** → copy directly; **deleted files** → record hash to `generalupdate.delete.json`.
-5. Compresses the temp directory into `{PackageName}.zip`.
-6. Deletes the temp directory; ZIP remains in Output Directory.
-
-> **About encrypted files**: Packed executables (Themida, VMProtect, etc.), obfuscated code, or encrypted binaries will have completely different hashes between versions, making differential algorithms ineffective. Such files are detected and bundled as full files rather than `.patch` diffs. For optimal patch sizes, unpack/decrypt your binaries before publishing.
-
-Under the hood it calls `GeneralUpdate.Core.Pipeline.DiffPipeline.CleanAsync(oldDir, newDir, patchDir)` — the same code path your CI scripts use.
-
-### Output
-
-```
-{OutputDirectory}/{PackageName}.zip
- ├── changed.dll.patch ← binary diff
- ├── new_file.dll ← new file (preserving directory structure)
- └── generalupdate.delete.json ← deletion manifest
-```
-
-### How downstream consumes it
-
-- Place the ZIP in your Server's `wwwroot/packages/` directory and update `Url` and `Hash` in `versions.json`
-- Or upload to OSS/CDN and record the download URL in `oss_config.json`
-- Core Upgrade downloads the ZIP, then `DiffPipeline.DirtyAsync` applies patches and deletions from the manifest
-
----
-
-## Extension: Package extensions
-
-### What problem it solves
-
-If you use the `GeneralUpdate.Extension` component to manage plugins/extensions, every extension release requires manually building a standard-format ZIP and generating `manifest.json`. The Extension module saves you from manual compression and hand-written JSON.
-
-### Inputs
-
-| Field | Required | Description |
-|-------|----------|-------------|
-| Name | ✅ | Unique extension identifier (lowercase + hyphens recommended), e.g. `my-data-exporter` |
-| Version | ✅ | Semantic version, e.g. `1.0.0` |
-| Description | ❌ | What the extension does |
-| Publisher | ❌ | Publisher name |
-| License | ❌ | License identifier, e.g. `MIT` |
-| Extension Directory | ✅ | Source directory containing all extension files; click Pick to select |
-| Export Directory | ❌ | Output directory; defaults to desktop |
-| Custom Properties | ❌ | Key-value pairs written to `manifest.json.customProperties` |
-
-### Output
-
-```
-{ExportDirectory}/{Name}_{Version}.zip
- ├── manifest.json ← extension metadata
- ├── bin/
- │ └── MyExtension.dll
- ├── resources/
- └── ...
-```
-
-Example `manifest.json`:
-
-```json
-{
- "name": "my-data-exporter",
- "version": "1.0.0",
- "description": "Export data to CSV/Excel/JSON",
- "publisher": "MyCompany",
- "license": "MIT",
- "dependencies": "",
- "minHostVersion": "",
- "maxHostVersion": "",
- "isPreRelease": false,
- "platform": { "displayName": "Windows", "value": 1 },
- "format": ".zip",
- "releaseDate": "2026-06-01T00:00:00",
- "customProperties": { "maxConnections": "100" }
-}
-```
-
-### How downstream consumes it
-
-- Extension Host calls `ExtensionManager.QueryRemoteExtensionsAsync(...)` to list available extensions
-- On install, downloads the ZIP, reads `manifest.json` for compatibility checks and dependency resolution
-- See [GeneralUpdate.Extension](../doc/GeneralUpdate.Extension) for details
-
----
-
-## OSS Config: Generate OSS version manifest
-
-### What problem it solves
-
-If you use OSS mode updates (static file server), you need to maintain a `versions.json` or `oss_config.json` so clients can discover available versions. The OSS Config module helps you organize version metadata and compute SHA256 hashes.
-
-### Inputs
-
-| Field | Required | Description |
-|-------|----------|-------------|
-| PacketName | ✅ | Update package name |
-| Version | ✅ | Semantic version number |
-| Url | ✅ | Full download URL clients can use |
-| SHA256 | Recommended | Click ComputeHash and select a local ZIP to auto-fill |
-
-### Workflow
-
-1. Fill in PacketName, Version, Url.
-2. Click **ComputeHash**, select the local patch ZIP, SHA256 auto-fills.
-3. Click **Add To List** to add the entry.
-4. Repeat for all versions.
-5. Click **Export** to generate `oss_config.json`.
-
-### Output
-
-```json
-[
- {
- "PacketName": "client_1.0.0_to_2.0.0",
- "Hash": "f2c7a8b3...",
- "Version": "2.0.0",
- "Url": "https://cdn.example.com/client_1.0.0_to_2.0.0.zip",
- "ReleaseDate": ""
- }
-]
-```
-
-### How downstream consumes it
-
-- Upload `oss_config.json` to your OSS bucket or static file server
-- OSS client reads this file to discover versions and validates Hash after download
-- See [GeneralUpdate.Core](../doc/GeneralUpdate.Core) OSS update strategy
-
----
-
-## Config: Generate bootstrap manifest
-
-### What problem it solves
-
-Client and Upgrade need to know the main app name, updater app name, version, ProductId, and UpdatePath at startup. The Config module reads your `.csproj` files to auto-extract AssemblyName and TargetFramework, then generates `generalupdate.manifest.json` — saving you from manual configuration and typos.
-
-### Inputs
-
-| Field | Required | Description |
-|-------|----------|-------------|
-| Client .csproj | ✅ | Path to the main app's `.csproj` file |
-| Upgrade .csproj | ❌ | Path to the updater app's `.csproj` |
-| ClientVersion | ✅ | Current client version, e.g. `1.0.0` |
-| UpgradeClientVersion | ✅ | Updater version, e.g. `1.0.0` |
-| AppType | ✅ | Client / Upgrade / OssClient / OssUpgrade |
-| ProductId | ✅ | Product identifier GUID |
-| UpdatePath | ✅ | Relative subdirectory for Upgrade, e.g. `update/` |
-
-### Workflow
-
-1. Click Browse to select Client `.csproj` (required) and Upgrade `.csproj` (optional).
-2. Click **Analyze** — the tool extracts AssemblyName and fills `MainAppName` / `UpdateAppName`.
-3. Fill in Version, AppType, ProductId, UpdatePath manually.
-4. Click **Generate** to produce `generalupdate.manifest.json` in the tool's run directory.
-5. Click **Generate Sample** to additionally run `dotnet publish` and produce a runnable output directory.
-
-### Output
-
-`generalupdate.manifest.json`:
-
-```json
-{
- "mainAppName": "ClientSample.exe",
- "clientVersion": "1.0.0",
- "appType": "Client",
- "updateAppName": "UpgradeSample.exe",
- "upgradeClientVersion": "1.0.0",
- "productId": "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
- "updatePath": "update/"
-}
-```
-
-Generate Sample additionally outputs:
-
-```
-{tool-run-dir}/sample_output/
- ├── ClientSample.exe ← Client dotnet publish output
- ├── generalupdate.manifest.json
- └── update/
- └── UpgradeSample.exe ← Upgrade dotnet publish output
-```
-
----
-
-## Simulation: Local update dry-run
-
-### What problem it solves
-
-You just used the Patch module to generate a package — but you're not sure it actually works in a real update flow. The Simulation module starts a local update server, builds Client/Upgrade samples, and runs a complete "discover version → download patch → apply update" loop on your machine, then outputs a PASS/FAIL report.
-
-### Prerequisites
-
-- .NET 10 SDK (or newer) installed
-- `dotnet --version` works
-- Local port 5000 available (configurable)
-
-### Inputs
-
-| Field | Required | Description |
-|-------|----------|-------------|
-| Old App Directory | ✅ | The directory simulating the user's currently installed version |
-| Patch File | ✅ | The patch ZIP produced by the Patch module |
-| CurrentVersion | ✅ | Old version number (used by the simulated Client for version check) |
-| TargetVersion | ✅ | New version number (used for the server-side version source) |
-| AppType | ✅ | ClientApp = 1 / UpgradeApp = 2 |
-| Platform | ✅ | Windows = 1 / Linux = 2 |
-| AppSecretKey | ✅ | Client authentication key |
-| ProductId | ✅ | Product identifier GUID |
-| UpdatePath | ✅ | Upgrade subdirectory name, e.g. `update/` |
-| ServerPort | ❌ | Local server port, defaults to 5000 |
-
-### Simulation process
-
-1. **Validate**: old directory exists, patch ZIP exists, version format valid, .NET SDK available.
-2. **Publish Client**: `dotnet publish test_app/Client/ClientSample.csproj` to App Directory.
-3. **Publish Upgrade**: `dotnet publish test_app/Upgrade/UpgradeSample.csproj` to `UpdatePath` subdirectory.
-4. **Generate manifest**: write `generalupdate.manifest.json` in App Directory.
-5. **Prepare patch**: copy patch ZIP to internal `.server` directory, compute SHA256, write server-side version source.
-6. **Start server**: local server listens on `http://localhost:{ServerPort}`, serving `POST /Upgrade/Verification`, `POST /Upgrade/Report`, `GET /patch/{filename}`.
-7. **Run Client**: launch `ClientSample.exe` with `--server-url http://localhost:5000 --app-secret ... --client-version 1.0.0`.
-8. **Stop server**: stop after Client completes or times out.
-9. **Generate report**: inspect directory changes and output `simulation_report.md`.
-
-### Output
-
-```
-{AppDirectory}/simulation_report.md ← simulation report (PASS/FAIL + timeline)
-```
-
-The report includes a config table, PASS/FAIL verdict, notes, and a full timeline — suitable for pasting into release notes or CI artifacts.
-
----
-
-## Hash: SHA256 verification
-
-### What problem it solves
-
-After uploading a patch package to CDN/OSS, you must ensure clients download the exact same file. The Hash feature computes SHA256 of a local file and outputs a lowercase hex string. You should write this value into your version manifest or server response data.
-
-### How to use
-
-In the **OSS Config** module, click **ComputeHash**, select a local ZIP file, and the SHA256 field auto-fills. You can also use this standalone to verify any file.
-
----
-
-## Mobile: Mobile packaging
-
-### What problem it solves
-
-If you use `GeneralUpdate.Avalonia.Android` or `GeneralUpdate.Maui.Android` to provide auto-update for your Android apps, each release requires extracting APK/AAB metadata (package name, version, SHA256 hash, file size) and uploading it to the server for version management. The Mobile module consolidates "parse → package → upload → generate version record" into a single interface.
-
-
-
-Supports two modes:
-
-- **File mode**: Select an APK or AAB file directly; the tool automatically parses AndroidManifest.xml to extract metadata.
-- **Project mode**: Select a `.csproj`, automatically runs `dotnet publish`, then locates and parses the build artifact.
-
-### Inputs
-
-#### File mode
-
-| Field | Required | Description |
-|-------|----------|-------------|
-| APK/AAB file | ✅ | Select a `.apk` or `.aab` file; format is auto-detected |
-| Output Directory | ❌ | Version record JSON output directory; defaults to desktop |
-| ProductId | ✅ | Product identifier GUID for server-side product differentiation |
-| Platform | ✅ | Target platform (default Android = 4) |
-| Product Name | ❌ | Product name, written into the version record |
-| Release Notes | ❌ | Release notes |
-| Is Forcibly | ❌ | Force update flag |
-
-#### Project mode
-
-| Field | Required | Description |
-|-------|----------|-------------|
-| `.csproj` file | ✅ | Select a MAUI or Avalonia Android `.csproj`; tool parses `ApplicationId`, `ApplicationDisplayVersion`, `ApplicationVersion` |
-| Output Directory | ❌ | Same as above |
-
-### Workflow
-
-1. **Select mode**: Toggle File Mode / Project Mode switch.
- - **File mode**: Click **Select File** to choose `.apk` or `.aab`.
- - **Project mode**: Click **Select Project** to choose a `.csproj`, then click **Build & Locate** to run `dotnet publish` and locate the artifact.
-2. **Analyze**: Click Analyze — the tool automatically:
- - Detects file format (APK / Android App Bundle)
- - Extracts `PackageName`, `VersionName`, `VersionCode` from AndroidManifest.xml
- - Computes SHA256 hash and file size
-3. **Configure upload**: Review or edit the auto-extracted metadata, fill in ProductId, Product Name, etc.
-4. **Upload**: Click Upload to send to the server, automatically generating a version record JSON file.
-
-### What the tool does internally
-
-1. **Format detection**: Identifies package format via file extension (`.apk` / `.aab`) and ZIP internal structure (AndroidManifest.xml location).
- - APK detection: Opens the ZIP file and checks for `AndroidManifest.xml` at the root.
- - AAB detection: Opens the ZIP file and checks for `base/manifest/AndroidManifest.xml`.
- - If the format is neither `.apk` nor `.aab`, the detector returns Unknown.
-
-2. **Metadata parsing**: Uses `AxmlParser` to parse the binary AXML (Android Binary XML) format from the ZIP's `AndroidManifest.xml`. The parsing process works as follows:
- - **String pool extraction**: Reads AXML chunk headers, locates the StringPool chunk (type `0x0001`), and extracts all UTF-16LE encoded strings.
- - **Attribute value extraction**: Walks through Start Element chunks (type `0x0102`), parses the attribute block (20 bytes per attribute), matches attribute names by their string pool index to find `package` and `versionName`, then resolves values via `rawValueIndex` from the string pool.
- - **versionCode extraction**: versionCode is stored as a typed integer attribute (type `0x10` = INT_DEC or `0x11` = INT_HEX), read directly from the `typedValueData` field (offset +16, 4 bytes) as a signed integer.
- - AXML chunk structure reference: https://justanapplication.wordpress.com/category/android/android-binary-xml/
-
-3. **SHA256 computation**: Computes SHA256 hash of the full file, output as a lowercase hex string.
-
-4. **File size**: Reads file length and formats it for human-readable display (B / KB / MB / GB).
-
-5. **Project build** (Project mode only): Selecting a `.csproj` triggers:
- - `MobileCsprojParser.Parse()` reads the `.csproj` XML to extract `TargetFramework` (supports single and multi-TFM; auto-selects the one containing `-android`), `ApplicationId` (mapped to PackageName), `ApplicationDisplayVersion` (mapped to VersionName), `ApplicationVersion` (mapped to VersionCode), `UseMaui` (identifies MAUI projects), `AndroidPackageFormat`, and `AssemblyName`.
- - Runs `dotnet publish "{csprojPath}" -c Release -o "{publishDir}"`.
- - After build, searches `bin/Release/{tfm}/publish/` for `.apk` or `.aab` files, auto-locating the build artifact.
- - Project type display: MAUI (`true`) or Avalonia (no UseMaui).
-
-6. **Upload**: Sends the file and form fields via HTTP multipart/form-data. The form fields and their data sources are:
-
- | Field | Source | Example |
- |-------|--------|---------|
- | `Name` | ProductName (user input) | `MyApp` |
- | `Version` | VersionName (auto-parsed) | `2.0.0` |
- | `Hash` | SHA256 (auto-computed) | `a1b2c3d4...` |
- | `Format` | Package format (auto-detected) | `.apk` / `.aab` |
- | `Size` | File size (auto-computed) | `50000000` |
- | `AppType` | Fixed value `"1"` | `1` |
- | `Platform` | Platform field (default 4=Android) | `4` |
- | `ProductId` | ProductId (user-entered GUID) | `2d974e2a-...` |
- | `IsForcibly` | Force update toggle | `true` / `false` |
-
- The upload service supports the following configuration:
- - **Server URL**: Server base address
- - **Upload Endpoint**: API path, defaults to `/Packet/Create`
- - **Timeout**: Timeout in seconds
- - **Retry Count**: Retry attempts on failure (exponential backoff)
- - **Auth**: Authentication configuration, supports Basic / Bearer Token / API Key modes (credentials stored encrypted via DPAPI)
-
-7. **Version record export**: After a successful upload, generates `mobile_version_{timestamp}.json` with full version metadata. You can also use **Export Record Only** to generate the record without uploading — the URL field will be `"manual"`.
-
-### Output
-
-```
-{OutputDirectory}/mobile_version_20260614120000.json
-```
-
-```json
-{
- "name": "MyApp",
- "version": "2.0.0",
- "hash": "a1b2c3d4e5f6...",
- "url": "https://server.example.com/packages/app-v2.0.0.apk",
- "packageName": "com.example.myapp",
- "fileSize": 50000000,
- "format": "apk",
- "platform": 4,
- "productId": "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
- "isForcibly": false,
- "releaseDate": "2026-06-14T12:00:00.0000000Z"
-}
-```
-
-### How downstream consumes it
-
-- Import or upload the generated version record JSON to your update server (e.g. GeneralSpacestation).
-- When the client (`GeneralUpdate.Avalonia.Android` or `GeneralUpdate.Maui.Android`) queries the server for version info, the returned data structure maps to the version record's fields.
-- The client uses the `hash` field for SHA256 integrity verification after downloading the APK.
-
-### Supported AndroidManifest fields
-
-| Manifest attribute | Field | Description |
-|-------------------|-------|-------------|
-| `package` | `PackageName` | App package name (unique identifier) |
-| `android:versionName` | `VersionName` | Display version (e.g. `2.0.0`) |
-| `android:versionCode` | `VersionCode` | Internal version code (integer) |
-
----
-
-## Settings: Upload and runtime options
-
-The Settings page stores shared configuration used by upload and simulation workflows:
-
-```text
-%APPDATA%\GeneralUpdate.Tools\config.json
-```
-
-On Windows, open `%APPDATA%\GeneralUpdate.Tools` from `Win+R`. The app keeps a backup at `config.json.backup`. Passwords, bearer tokens, and API keys are protected by the operating-system credential encryption before they are written to the configuration file.
-
-### Upload server
-
-| Field | Default | Description |
-|-------|---------|-------------|
-| Server URL | Empty | An absolute URL such as `https://update.example.com` |
-| Upload endpoint | `/api/v1/packages/upload` | Appended to the server URL |
-| Timeout | 300 seconds | Maximum time to wait for one upload attempt |
-| Retry count | 3 | Number of retries after failure; delays use exponential backoff |
-| Auto-upload after patch generation | Off | Upload the generated ZIP immediately after a successful Patch build |
-
-Uploads use `multipart/form-data`, with the file supplied under the `file` field. HTTP 4xx responses (except timeout and 429) are treated as server rejection; 5xx, timeout, and network errors can be retried.
-
-### Authentication
-
-| Scheme | Behavior |
-|--------|----------|
-| None | No authentication header |
-| Basic Auth | Sends `Authorization: Basic ...` using username and password |
-| Token | Sends the configured token in the `Authorization` request header |
-| API Key | Sends the key in a configurable request header, defaulting to `X-API-Key` |
-
-Use **Test Connection** after saving; it sends a GET request to the configured upload URL and reports whether the response is successful.
-
-### Simulation and feature switches
-
-- **Local server port**: defaults to `5000` for update simulation.
-- **Simulation server requires authentication**: enables authentication for the local simulation server.
-- **Detect encrypted files before packaging**: controls whether Patch scans output for suspicious or packed files.
-- **Validate SemVer automatically**: global option for version-validation behavior; modules still validate required version fields.
-- **Show JSON preview**: the JSON-preview option in the configuration.
-
-**Save Settings** persists immediately. **Reset to Defaults** restores upload, authentication, simulation, and feature options.
-
----
-
-## Recommended release workflow
-
-### Desktop update
-
-This sequence chains the Patch, OSS, Config, and Simulation modules together for desktop app releases:
-
-```
-┌─────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
-│ Build │ -> │ Patch │ -> │ OSS/Hash │ -> │ Config │ -> │ Simulation│
-│ old & new│ │ generate │ │ compute │ │ generate │ │ verify │
-└─────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
-```
-
-1. **Build release directories**: run `dotnet publish` in CI or locally to get old/new directories.
-2. **Patch**: select old/new, generate patch ZIP.
-3. **OSS Config**: compute SHA256 on the patch ZIP, fill in download URL, export `oss_config.json` (or write the same info to `versions.json` for a self-hosted Server).
-4. **Config**: select Client/Upgrade `.csproj` files, generate `generalupdate.manifest.json`.
-5. **Simulation**: select the old version directory and patch ZIP, confirm PASS.
-6. **Ship**: upload patch ZIP and OSS manifest to production.
-
-### Mobile update
-
-Use the Mobile module for Android app releases:
-
-```
-┌────────────┐ ┌──────────┐ ┌──────────┐
-│ Build APK/ │ -> │ Mobile │ -> │ Ship to │
-│ AAB │ │ parse & │ │ update │
-│ artifact │ │ upload │ │ server │
-└────────────┘ └──────────┘ └──────────┘
-```
-
-1. **Build artifact**: Build `.apk` / `.aab` in CI or locally.
-2. **Mobile**: Select file or project, auto-parse metadata, compute SHA256, upload to server, export version record.
-3. **Ship**: Confirm upload success; clients check for updates via `GeneralUpdate.Avalonia.Android` or `GeneralUpdate.Maui.Android`.
-
----
-
-## FAQ
-
-| Symptom | Cause & fix |
-|---------|------------|
-| Version invalid | Use `1.0.0` or `2.0.0-beta.1` format. Do not use `1.0` or `v1.0.0` |
-| Patch output empty or tiny | old/new directories may be swapped, or the two are identical. Confirm old is the installed version and new is the target version |
-| Cannot find `delete_files.json` | The current filename is `generalupdate.delete.json`, located in the patch ZIP root |
-| Simulation complains about missing SDK | Install .NET 10 SDK and verify `dotnet --version` works |
-| Simulation port conflict | Change `ServerPort` or free up local port 5000 |
-| Hash mismatch after client download | Re-compute hash on the file that was actually uploaded to CDN/OSS; check for proxy re-compression |
-| Upgrade process doesn't start | Verify `updateAppName` and `updatePath` in `generalupdate.manifest.json` match the publish directory structure |
-| Mobile analysis shows "Metadata extraction warning" | AXML parser could not find the expected attributes. Common causes: the APK uses resource ID references instead of direct string values; or the APK has been packed/obfuscated and the AndroidManifest.xml structure was modified. You can fill in PackageName, VersionName, and VersionCode manually |
-| Mobile Project Mode Build & Locate fails | Verify that the .NET SDK is installed and supports the target framework. Ensure the `.csproj` contains an `-android` target framework. Make sure the output directory `bin/Release/{tfm}/publish/` is not write-protected |
-| Mobile Project Mode "Build output not found" | `dotnet publish` succeeded but no `.apk`/`.aab` was found in the expected directory. Check the `AndroidPackageFormat` setting in `.csproj` (default `aab;apk` produces APK first), and verify that the TFM was resolved correctly |
-| Mobile upload fails | Check that the server URL and endpoint path are configured correctly. Verify the server authentication method (Basic / Bearer / API Key) matches the tool configuration. Review the tool logs for the HTTP status code and error message |
-| Mobile client update fails after upload | Confirm that the version record JSON returned by the server has `Platform` set to `4` (Android), and the `Format` field matches the APK/AAB format the client expects |
-
----
-
-## Related docs
-
-- [GeneralUpdate.Core](../doc/GeneralUpdate.Core): Client/Upgrade main update flow
-- [GeneralUpdate.Differential](../doc/GeneralUpdate.Differential): Differential algorithm Clean/Dirty modes
-- [GeneralUpdate.Extension](../doc/GeneralUpdate.Extension): Extension install and version management
-- [GeneralUpdate.Avalonia.Android](/avalonia/doc/GeneralUpdate.Avalonia.Android): Avalonia Android APK update component
-- [GeneralUpdate.Maui.Android](/maui/doc/GeneralUpdate.Maui.Android): MAUI Android APK update component
-- [Beginner cookbook](./Beginner%20cookbook): Complete end-to-end update walkthrough
+The Tools guide has moved to the independent [GeneralUpdate.Tools documentation](/tools/quickstart/GeneralUpdate.PacketTool).
diff --git a/website/i18n/en/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateToolsReleaselog.md b/website/i18n/en/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateToolsReleaselog.md
index 6dbe8bf..2514b47 100644
--- a/website/i18n/en/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateToolsReleaselog.md
+++ b/website/i18n/en/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateToolsReleaselog.md
@@ -1,45 +1,7 @@
---
title: GeneralUpdate.Tools
-authors: juster
-tags: [log, tools]
---
-# GeneralUpdate.Tools Release Log
+# GeneralUpdate.Tools
-### 2026-06-14 — `v20260614061359`
-
-- Added the Mobile packaging workflow for APK/AAB files and Android projects: metadata extraction, `dotnet publish`, SHA256 calculation, package upload, and version-record export.
-- Added a real-time build and upload result window.
-
-### 2026-06-04 — `v20260604102526`
-
-- Updated the desktop window and navigation experience with a frameless Ursa window style, emoji navigation icons, and text-based theme and language controls.
-
-### 2026-06-03 — `v20260603132551`
-
-- Fixed the release workflow so published artifacts are retained and attached to the GitHub Release.
-
-### 2026-05-21 — `v20260521100654`, `v20260521093859`
-
-- Improved Simulation by reusing cached test-app builds and bundling the test applications with release artifacts.
-- Fixed test-app lookup to use the executable directory rather than the process base directory.
-
-### 2026-05-20 — `v20260520132608`
-
-- Improved the Simulation workflow and removed trimming that caused runtime failures; added native library extraction.
-
-### 2026-02-17 — `v20260217`
-
-- Updated packaging workflow and project configuration.
-
-### 2026-02-16 — `v20260216`
-
-- Refactored the packaging functionality.
-
-### 2026-02-14 — `v20260214`
-
-- Added project configuration extraction and JSON package generation.
-
-### 2026-01-03 — `v20260103`
-
-- Updated the .NET CI workflow.
+See the independent [GeneralUpdate.Tools Release Log](/tools/releaselog/GeneralUpdateToolsReleaselog).
diff --git a/website/i18n/en/docusaurus-plugin-content-docs/version-10.5.0/quickstart/Beginner cookbook.md b/website/i18n/en/docusaurus-plugin-content-docs/version-10.5.0/quickstart/Beginner cookbook.md
index 22cc759..3456a8c 100644
--- a/website/i18n/en/docusaurus-plugin-content-docs/version-10.5.0/quickstart/Beginner cookbook.md
+++ b/website/i18n/en/docusaurus-plugin-content-docs/version-10.5.0/quickstart/Beginner cookbook.md
@@ -383,7 +383,7 @@ After this flow works, read these pages in order:
1. [GeneralUpdate.Core](../doc/GeneralUpdate.Core): update strategies, event notifications, silent updates, and manifest-based minimal configuration
2. [GeneralUpdate.Differential](../doc/GeneralUpdate.Differential): differential algorithms, parallel processing, and Clean/Dirty
3. [GeneralUpdate.Bowl](../doc/GeneralUpdate.Bowl): crash monitoring, backup, and failure recovery
-4. [GeneralUpdate.Tools](./GeneralUpdate.PacketTool): complete guides for patches, hashes, OSS config, and simulation
+4. [GeneralUpdate.Tools](/tools/quickstart/GeneralUpdate.PacketTool): complete guides for patches, hashes, OSS config, and simulation
## Installation directory notes
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs-tools/current/quickstart/GeneralUpdate.PacketTool.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs-tools/current/quickstart/GeneralUpdate.PacketTool.md
new file mode 100644
index 0000000..93e1a7d
--- /dev/null
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs-tools/current/quickstart/GeneralUpdate.PacketTool.md
@@ -0,0 +1,573 @@
+---
+sidebar_position: 11
+---
+
+# GeneralUpdate.Tools
+
+## 这是什么
+
+GeneralUpdate.Tools 是一个基于 Avalonia 12 开发的跨平台桌面工具(Windows / Linux / macOS),用于在软件发布流程中生成和管理补丁包、扩展包、版本清单以及执行本地更新仿真。它不替代你的 CI/CD 系统,而是把”打包、校验、验证”这些重复劳动收敛到一个可视化工具中。
+
+:::info Tools 与 CI/CD 的关系
+Tools 是**桌面 GUI 工具**,适合开发者在本地交互式地生成补丁、验证更新。如果你需要在 CI/CD 流水线中自动化补丁生成,可以直接调用 `GeneralUpdate.Core.Pipeline.DiffPipeline.CleanAsync()` —— GUI 和脚本走的是同一条代码路径。
+:::
+
+仓库地址:[https://github.com/GeneralLibrary/GeneralUpdate.Tools](https://github.com/GeneralLibrary/GeneralUpdate.Tools)
+
+## 下载与运行
+
+### 方式一:从源码运行(推荐开发者)
+
+当前工具基于 .NET 10 构建。确保本机安装了 [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0):
+
+```powershell
+git clone https://github.com/GeneralLibrary/GeneralUpdate.Tools.git
+cd GeneralUpdate.Tools\src
+dotnet run --project GeneralUpdate.Tools.csproj
+```
+
+### 方式二:下载预编译版本
+
+前往 [GeneralUpdate.Tools Releases](https://github.com/GeneralLibrary/GeneralUpdate.Tools/releases) 下载对应平台的可执行文件,直接运行即可。
+
+> Simulation 模块内部会调用 `dotnet publish` 构建测试应用,因此使用仿真功能时必须安装 .NET SDK。Mobile 模块的项目模式(Build & Locate)也会调用 `dotnet publish`,同样需要 .NET SDK。仅运行 Patch / Extension / OSS / Config 模块以及 Mobile 的文件模式则不需要。
+
+## 左侧导航模块
+
+| 模块 | 你提供 | 工具产出 | 下游消费者 |
+|------|--------|----------|------------|
+| **补丁包(Patch)** | 旧版本目录 + 新版本目录 | `{name}.zip`(含 `.patch` 文件、新文件和删除清单) | Server、OSS/CDN、Core Upgrade 进程 |
+| **扩展包(Extension)** | 扩展源目录 + 元数据 | `{name}_{version}.zip`(含 `manifest.json`) | `GeneralUpdate.Extension` 组件 |
+| **OSS 配置(OSS)** | 包名、版本、下载 URL、本地文件(计算 Hash) | 用户选择位置的 `oss_config.json` | OSS 客户端、对象存储发布流程 |
+| **模拟更新(Simulate)** | 旧版本目录 + 补丁 ZIP | 本地更新服务 + 仿真报告 | 发布前质量把关 |
+| **移动端(Mobile)** | APK/AAB 或 MAUI/Avalonia Android `.csproj` | 上传结果 + `mobile_version_{timestamp}.json` | 移动端更新服务端、Avalonia/Maui Android 组件 |
+| **配置生成(Config)** | Client/Upgrade 的 `.csproj` | `generalupdate.manifest.json` + 示例发布目录 | Client/Upgrade 启动引导 |
+| **设置(Settings)** | 上传地址、身份认证、仿真参数、功能开关 | `%APPDATA%/GeneralUpdate.Tools/config.json` | 所有需要自动上传或本地仿真的模块 |
+
+:::tip 关于 SHA256
+SHA256 不作为独立导航页面,而是集成在 **OSS 配置**的“计算”和 **移动端**的元数据分析中。
+:::
+
+---
+
+## Patch:生成补丁包
+
+### 解决什么问题
+
+当你发布了一个新版本,用户不想下载整个安装包。Patch 模块比较旧版本目录和新版本目录,只输出变更内容:修改过的文件生成二进制差分 `.patch`,新增文件直接复制,删除的文件写入清单。差分包通常远小于完整发布目录。
+
+### 输入
+
+| 字段 | 必填 | 说明 |
+|------|------|------|
+| Old Directory | ✅ | 用户当前安装的旧版本发布目录,例如 `publish\v1.0.0` |
+| New Directory | ✅ | 准备发布的新版本目录,例如 `publish\v2.0.0` |
+| Package Name | ❌ | 输出 ZIP 文件名(不含 `.zip`),为空时自动生成 `patch_yyyyMMddHHmmss` |
+| Version | ✅ | 目标版本号,格式 `MAJOR.MINOR.PATCH`(如 `2.0.0`)或 `MAJOR.MINOR.PATCH-prerelease+build` |
+| Output Directory | ❌ | ZIP 输出目录,为空时输出到桌面 |
+
+### 工具内部做了什么
+
+1. **加密文件检测**:扫描 old/new 目录中的二进制文件,检测是否存在加壳(如 Themida、VMProtect)或加密签名。被检测到的文件将标记警告——此类文件无法生成有效差分补丁,将以全量文件形式打包。
+2. 校验 old/new 目录存在、version 格式合法。
+3. 创建临时目录 `gupatch_yyyyMMddHHmmss`。
+4. 递归比较 old/new:**修改文件** → 生成 `.patch` 二进制差分;**新增文件** → 直接复制;**删除文件** → 记录 hash 到 `generalupdate.delete.json`。
+5. 将临时目录压缩为 `{PackageName}.zip`。
+6. 删除临时目录,ZIP 保留在 Output Directory。
+
+> **关于加密文件**:加壳工具(Themida、VMProtect 等)、代码混淆或加密的二进制文件,因文件哈希在新旧版本间完全不同,差分算法对其无效。此类文件检测到后将直接以全量形式打包,而不会生成 `.patch` 差分。建议在发布前对原始文件进行去壳/解密处理,以获得最优的补丁体积。
+
+底层调用的是 `GeneralUpdate.Core.Pipeline.DiffPipeline.CleanAsync(oldDir, newDir, patchDir)`,和你的 CI 脚本走的是同一条代码路径。
+
+### 输出
+
+```
+{OutputDirectory}/{PackageName}.zip
+ ├── changed.dll.patch ← 二进制差分
+ ├── new_file.dll ← 新增文件(保持目录结构)
+ └── generalupdate.delete.json ← 删除清单
+```
+
+### 下游如何使用
+
+- 把 ZIP 放到 Server 的 `wwwroot/packages/` 目录,更新 `versions.json` 中的 `Url` 和 `Hash`
+- 或上传到 OSS/CDN,把下载链接写入 `oss_config.json`
+- Core Upgrade 进程下载 ZIP 后,`DiffPipeline.DirtyAsync` 根据 `.patch` 和删除清单完成更新
+
+---
+
+## Extension:打包扩展
+
+### 解决什么问题
+
+如果你使用 `GeneralUpdate.Extension` 组件管理插件/扩展,每次发布新扩展都需要手动构建标准格式的 ZIP 包并生成 `manifest.json`。Extension 模块把你从手工压缩和手写 JSON 中解放出来。
+
+### 输入
+
+| 字段 | 必填 | 说明 |
+|------|------|------|
+| Name | ✅ | 扩展唯一标识,建议小写+连字符,如 `my-data-exporter` |
+| Version | ✅ | 语义化版本,如 `1.0.0` |
+| Description | ❌ | 扩展功能描述 |
+| Publisher | ❌ | 发布者名称 |
+| License | ❌ | 许可证标识,如 `MIT` |
+| Extension Directory | ✅ | 扩展源文件目录,点击 Pick 选择文件夹 |
+| Export Directory | ❌ | 输出目录,为空时输出到桌面 |
+| Custom Properties | ❌ | 自定义键值对,写入 `manifest.json.customProperties` |
+
+### 工具内部做了什么
+
+1. 校验目录存在、version 格式合法。
+2. 将 Extension Directory 中所有文件打包为 ZIP。
+3. 在 ZIP 根目录写入 `manifest.json`。
+
+### 输出
+
+```
+{ExportDirectory}/{Name}_{Version}.zip
+ ├── manifest.json ← 扩展元数据
+ ├── bin/
+ │ └── MyExtension.dll
+ ├── resources/
+ └── ...
+```
+
+`manifest.json` 示例:
+
+```json
+{
+ "name": "my-data-exporter",
+ "version": "1.0.0",
+ "description": "Export data to CSV/Excel/JSON",
+ "publisher": "MyCompany",
+ "license": "MIT",
+ "dependencies": "",
+ "minHostVersion": "",
+ "maxHostVersion": "",
+ "isPreRelease": false,
+ "platform": { "displayName": "Windows", "value": 1 },
+ "format": ".zip",
+ "releaseDate": "2026-06-01T00:00:00",
+ "customProperties": { "maxConnections": "100" }
+}
+```
+
+### 下游如何使用
+
+- Extension Host 调用 `ExtensionManager.QueryRemoteExtensionsAsync(...)` 获取扩展列表
+- 安装时下载 ZIP,读取 `manifest.json` 进行兼容性检查和依赖解析
+- 详见 [GeneralUpdate.Extension](/docs/doc/GeneralUpdate.Extension)
+
+---
+
+## OSS Config:生成 OSS 版本清单
+
+### 解决什么问题
+
+如果你使用 OSS 模式更新(静态文件服务器),你需要维护一个 `versions.json` 或 `oss_config.json`,让客户端知道有哪些版本可以下载。OSS Config 模块帮你整理版本信息并计算 SHA256。
+
+### 输入
+
+| 字段 | 必填 | 说明 |
+|------|------|------|
+| PacketName | ✅ | 更新包名称 |
+| Version | ✅ | 语义化版本号 |
+| Url | ✅ | 客户端可下载补丁包的完整地址 |
+| SHA256 | 推荐 | 选择本地 ZIP 文件后点击 ComputeHash 自动计算 |
+
+### 操作流程
+
+1. 填写 PacketName、Version、Url。
+2. 点击 **ComputeHash**,选择本地补丁 ZIP 文件,自动填入 SHA256。
+3. 点击 **Add To List**,加入列表。
+4. 重复以上步骤添加所有版本。
+5. 点击 **Export**,生成 `oss_config.json`。
+
+### 输出
+
+```json
+[
+ {
+ "PacketName": "client_1.0.0_to_2.0.0",
+ "Hash": "f2c7a8b3...",
+ "Version": "2.0.0",
+ "Url": "https://cdn.example.com/client_1.0.0_to_2.0.0.zip",
+ "ReleaseDate": ""
+ }
+]
+```
+
+### 下游如何使用
+
+- 将 `oss_config.json` 上传到 OSS bucket 或静态文件服务器
+- OSS 客户端读取此文件发现可用版本,下载后校验 Hash
+- 详见 [GeneralUpdate.Core](/docs/doc/GeneralUpdate.Core) OSS 更新策略
+
+---
+
+## Config:生成启动清单
+
+### 解决什么问题
+
+Client 和 Upgrade 启动时需要知道主程序名、升级程序名、版本号、ProductId、UpdatePath 等信息。Config 模块从 `.csproj` 中自动提取 AssemblyName 和 TargetFramework,帮你生成 `generalupdate.manifest.json`,省去手写和手误。
+
+### 输入
+
+| 字段 | 必填 | 说明 |
+|------|------|------|
+| Client .csproj | ✅ | 主程序的 `.csproj` 文件路径 |
+| Upgrade .csproj | ❌ | 升级程序的 `.csproj` 路径 |
+| ClientVersion | ✅ | 客户端当前版本,如 `1.0.0` |
+| UpgradeClientVersion | ✅ | 升级程序版本,如 `1.0.0` |
+| AppType | ✅ | Client / Upgrade / OssClient / OssUpgrade |
+| ProductId | ✅ | 产品标识 GUID |
+| UpdatePath | ✅ | 升级程序相对主程序的子目录,如 `update/` |
+
+### 操作流程
+
+1. 点击 Browse 选择 Client `.csproj`(必填)和 Upgrade `.csproj`(可选)。
+2. 点击 **Analyze**,工具自动读取 AssemblyName 填入 `MainAppName`、`UpdateAppName`。
+3. 手动填写 Version、AppType、ProductId、UpdatePath。
+4. 点击 **Generate**,在工具运行目录生成 `generalupdate.manifest.json`。
+5. 点击 **Generate Sample**,额外执行 `dotnet publish` 并输出可运行的发布目录。
+
+### 输出
+
+`generalupdate.manifest.json`:
+
+```json
+{
+ "mainAppName": "ClientSample.exe",
+ "clientVersion": "1.0.0",
+ "appType": "Client",
+ "updateAppName": "UpgradeSample.exe",
+ "upgradeClientVersion": "1.0.0",
+ "productId": "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
+ "updatePath": "update/"
+}
+```
+
+Generate Sample 额外输出:
+
+```
+{工具运行目录}/sample_output/
+ ├── ClientSample.exe ← Client dotnet publish 输出
+ ├── generalupdate.manifest.json
+ └── update/
+ └── UpgradeSample.exe ← Upgrade dotnet publish 输出
+```
+
+### 下游如何使用
+
+- Client 启动时读取 `generalupdate.manifest.json`,配合服务端地址和 AppSecretKey 即可进入更新流程
+- 不需要手写 `Configinfo`,只需用 `GeneralUpdateBootstrap` 读取 manifest
+
+---
+
+## Simulation:本地更新仿真
+
+### 解决什么问题
+
+你刚用 Patch 模块生成了补丁包,但不确定这个包在实际更新流程中能不能跑通。Simulation 模块在你本机启动一个临时更新服务,构建 Client/Upgrade 样例,模拟一次完整的“发现版本 → 下载补丁 → 应用更新”闭环,最后输出 PASS/FAIL 报告。
+
+### 前置条件
+
+- 已安装 .NET 10 SDK(或更高版本)
+- `dotnet --version` 可正常执行
+- 本地 5000 端口未被占用(可配置)
+
+### 输入
+
+| 字段 | 必填 | 说明 |
+|------|------|------|
+| Old App Directory | ✅ | 模拟用户当前安装的旧版本目录 |
+| Patch File | ✅ | Patch 模块生成的补丁 ZIP |
+| CurrentVersion | ✅ | 旧版本号(Simulation 内部传给 Client,用于版本校验) |
+| TargetVersion | ✅ | 新版本号(Simulation 内部赋值到补丁 ZIP,写入服务端版本源) |
+| AppType | ✅ | ClientApp = 1 / UpgradeApp = 2 |
+| Platform | ✅ | Windows = 1 / Linux = 2 |
+| AppSecretKey | ✅ | 客户端验证密钥 |
+| ProductId | ✅ | 产品标识 GUID |
+| UpdatePath | ✅ | 升级程序子目录名称,如 `update/` |
+| ServerPort | ❌ | 本地服务端口,默认 5000 |
+
+### 仿真过程
+
+1. **校验**:旧目录存在、Patch ZIP 存在、version 格式合法、.NET SDK 可用。
+2. **发布 Client**:`dotnet publish test_app/Client/ClientSample.csproj` 到 App Directory。
+3. **发布 Upgrade**:`dotnet publish test_app/Upgrade/UpgradeSample.csproj` 到 `UpdatePath` 子目录。
+4. **生成 manifest**:在 App Directory 写入 `generalupdate.manifest.json`。
+5. **准备补丁**:把 Patch ZIP 复制到内部 `.server` 目录,计算 SHA256,写入服务端版本源。
+6. **启动服务**:本地服务监听 `http://localhost:{ServerPort}`,提供 `POST /Upgrade/Verification`、`POST /Upgrade/Report`、`GET /patch/{filename}`。
+7. **运行 Client**:启动 `ClientSample.exe`,传入 `--server-url http://localhost:5000 --app-secret ... --client-version 1.0.0`。
+8. **停止服务**:Client 完成更新或超时后停止服务。
+9. **生成报告**:检查目录文件变化,输出 `simulation_report.md`。
+
+### 输出
+
+```
+{AppDirectory}/simulation_report.md ← 仿真报告(PASS/FAIL + 时间线)
+```
+
+报告包含配置表、PASS/FAIL 结论、Notes 和完整时间线,可以直接贴到发布记录或 CI artifact。
+
+---
+
+## Hash:SHA256 校验
+
+### 解决什么问题
+
+补丁包上传到 CDN/OSS 后,必须确保客户端下载到的文件和原始包一致。Hash 功能对本地文件计算 SHA256,输出小写十六进制字符串,你应该把这个值写入版本清单或服务端返回数据。
+
+### 使用方式
+
+在 **OSS Config** 模块中,点击 **ComputeHash**,选择本地 ZIP 文件,自动填入 SHA256 字段。你也可以单独使用这个功能来校验任何文件。
+
+---
+
+## Mobile:移动端打包
+
+### 解决什么问题
+
+如果你使用 `GeneralUpdate.Avalonia.Android` 或 `GeneralUpdate.Maui.Android` 组件为 Android 应用提供自动更新能力,每次发布新版本时都需要获取 APK/AAB 文件的元数据(包名、版本号、SHA256 哈希、文件大小),并将其上传到服务端进行版本管理。Mobile 模块把"解析 → 打包 → 上传 → 生成版本记录"这四步收敛到一个界面中。
+
+
+
+支持两种工作模式:
+
+- **文件模式**:直接选择 APK 或 AAB 文件,自动解析 AndroidManifest.xml 提取元数据
+- **项目模式**:选择 `.csproj` 项目文件,自动执行 `dotnet publish` 构建,然后定位产物并解析
+
+### 输入
+
+#### 文件模式
+
+| 字段 | 必填 | 说明 |
+|------|------|------|
+| APK/AAB 文件 | ✅ | 选择 `.apk` 或 `.aab` 文件,工具自动识别格式类型 |
+| Output Directory | ❌ | 版本记录 JSON 输出目录,为空时输出到桌面 |
+| ProductId | ✅ | 产品标识 GUID,用于区分服务端产品线 |
+| Platform | ✅ | 目标平台(默认 Android = 4) |
+| Product Name | ❌ | 产品名称,写入版本记录 |
+| Release Notes | ❌ | 发布说明 |
+| Is Forcibly | ❌ | 是否强制更新 |
+
+#### 项目模式
+
+| 字段 | 必填 | 说明 |
+|------|------|------|
+| `.csproj` 文件 | ✅ | 选择 MAUI 或 Avalonia Android 项目的 `.csproj`,工具自动解析 `ApplicationId`、`ApplicationDisplayVersion`、`ApplicationVersion` |
+| Output Directory | ❌ | 同上 |
+
+### 操作流程
+
+1. **选择模式**:切换 File Mode / Project Mode 开关。
+ - **文件模式**:点击 **Select File** 选择 `.apk` 或 `.aab` 文件。
+ - **项目模式**:点击 **Select Project** 选择 `.csproj` 文件,然后点击 **Build & Locate** 自动执行 `dotnet publish` 并定位产物。
+2. **Analyze**:点击 Analyze 按钮,工具自动:
+ - 识别文件格式(APK / Android App Bundle)
+ - 从 AndroidManifest.xml 中提取 `PackageName`、`VersionName`、`VersionCode`
+ - 计算 SHA256 哈希和文件大小
+3. **填写上传配置**:确认或编辑自动提取的元数据,填写 ProductId、Product Name 等发布信息。
+4. **Upload**:点击 Upload 上传到服务端,并自动生成版本记录 JSON 文件。
+
+### 工具内部做了什么
+
+1. **格式检测**:通过文件扩展名(`.apk` / `.aab`)和 ZIP 内部结构(`AndroidManifest.xml` 位置)自动识别包格式。
+ - APK 检测:打开 ZIP 文件,检查根目录是否存在 `AndroidManifest.xml`。
+ - AAB 检测:打开 ZIP 文件,检查是否存在 `base/manifest/AndroidManifest.xml`。
+ - 格式未知时(不是 .apk 也不是 .aab)会直接返回 Unknown。
+
+2. **元数据解析**:使用 `AxmlParser` 解析二进制的 AXML(Android Binary XML)格式,从 ZIP 中读取 `AndroidManifest.xml`。解析流程如下:
+ - **字符串池提取**:读取 AXML 文件的 Chunk 头,找到类型为 `0x0001` 的 StringPool Chunk,从中解析出所有 UTF-16LE 编码的字符串数组。
+ - **属性值提取**:遍历 XML 的 Start Element Chunk(类型 `0x0102`),解析属性块(每个属性 20 字节),通过属性名在字符串池中的索引匹配 `package` 和 `versionName`,再通过 `rawValueIndex` 从字符串池中取出属性值。
+ - **versionCode 提取**:versionCode 存储为整型属性(类型 `0x10` = INT_DEC 或 `0x11` = INT_HEX),直接从属性的 `typedValueData` 字段(偏移 +16,4 字节)读取有符号整数。
+ - AXML 结构与参考:https://justanapplication.wordpress.com/category/android/android-binary-xml/
+
+3. **SHA256 计算**:对完整文件计算 SHA256 哈希值,输出小写十六进制字符串。
+
+4. **文件大小**:读取文件长度并格式化为人类可读的显示(B / KB / MB / GB)。
+
+5. **项目构建**(仅项目模式):选择 `.csproj` 后会触发:
+ - `MobileCsprojParser.Parse()` 解析 `.csproj` 的 XML,提取 `TargetFramework`(支持单 TFM 和多 TFM,多 TFM 时自动选取包含 `-android` 的目标框架)、`ApplicationId`(映射为 PackageName)、`ApplicationDisplayVersion`(映射为 VersionName)、`ApplicationVersion`(映射为 VersionCode)、`UseMaui`(用于识别 MAUI 项目)、`AndroidPackageFormat`、`AssemblyName`。
+ - 调用 `dotnet publish "{csprojPath}" -c Release -o "{publishDir}"`。
+ - 构建完成后在 `bin/Release/{tfm}/publish/` 目录搜索 `.apk` 或 `.aab` 文件,自动定位构建产物。
+ - 项目类型显示:MAUI(`true`)或 Avalonia(没有 UseMaui)。
+
+6. **上传**:通过 HTTP multipart/form-data 将文件上传到服务端。上传表单字段和对应的数据源如下:
+
+ | 字段 | 值来源 | 示例 |
+ |------|--------|------|
+ | `Name` | ProductName(用户填写) | `MyApp` |
+ | `Version` | VersionName(自动解析) | `2.0.0` |
+ | `Hash` | SHA256(自动计算) | `a1b2c3d4...` |
+ | `Format` | 包格式(自动识别) | `.apk` / `.aab` |
+ | `Size` | 文件大小(自动计算) | `50000000` |
+ | `AppType` | 固定值 `"1"` | `1` |
+ | `Platform` | Platform(默认 4=Android) | `4` |
+ | `ProductId` | ProductId(用户填写 GUID) | `2d974e2a-...` |
+ | `IsForcibly` | 强制更新开关 | `true` / `false` |
+
+ 上传服务支持以下配置:
+ - **Server URL**:服务端地址
+ - **Upload Endpoint**:API 路径,默认 `/Packet/Create`
+ - **Timeout**:超时时间(秒)
+ - **Retry Count**:失败重试次数(指数退避)
+ - **Auth**:认证配置,支持 Basic / Bearer Token / API Key 三种模式(凭据通过 DPAPI 加密存储)
+
+7. **版本记录导出**:上传成功后自动生成 `mobile_version_{timestamp}.json`,包含完整的版本元数据。也可以在不上传的情况下单独点击 **Export Record Only** 导出记录,此时 URL 字段为 `"manual"`。
+
+### 输出
+
+```
+{OutputDirectory}/mobile_version_20260614120000.json
+```
+
+```json
+{
+ "name": "MyApp",
+ "version": "2.0.0",
+ "hash": "a1b2c3d4e5f6...",
+ "url": "https://server.example.com/packages/app-v2.0.0.apk",
+ "packageName": "com.example.myapp",
+ "fileSize": 50000000,
+ "format": "apk",
+ "platform": 4,
+ "productId": "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
+ "isForcibly": false,
+ "releaseDate": "2026-06-14T12:00:00.0000000Z"
+}
+```
+
+### 下游如何使用
+
+- 将生成的版本记录 JSON 导入或上传到你的更新服务端(如 GeneralSpacestation)
+- 客户端(`GeneralUpdate.Avalonia.Android` 或 `GeneralUpdate.Maui.Android`)从服务端查询版本信息时,返回的数据结构与版本记录的内容对应
+- 客户端下载 APK 后使用 `hash` 字段做 SHA256 完整性校验
+
+### 支持的 AndroidManifest 字段提取
+
+| 清单属性 | 字段名 | 说明 |
+|---------|--------|------|
+| `package` | `PackageName` | 应用包名(唯一标识) |
+| `android:versionName` | `VersionName` | 展示版本号(如 `2.0.0`) |
+| `android:versionCode` | `VersionCode` | 内部版本代码(整数) |
+
+---
+
+## Settings:上传与运行参数
+
+设置页集中管理所有模块共用的持久化配置。保存后,配置会写入:
+
+```text
+%APPDATA%\GeneralUpdate.Tools\config.json
+```
+
+Windows 可按 `Win+R` 输入 `%APPDATA%\GeneralUpdate.Tools` 后打开。工具会同时维护 `config.json.backup`;密码、Token 和 API Key 使用系统加密后再写入配置。
+
+### 上传服务器
+
+| 字段 | 默认值 | 说明 |
+|------|--------|------|
+| 服务器地址 | 空 | 必须填写绝对地址,例如 `https://update.example.com` |
+| 上传接口路径 | `/api/v1/packages/upload` | 工具会与服务器地址拼接;可填写相对路径或以 `/` 开头的路径 |
+| 超时时间 | 300 秒 | 单次上传最长等待时间 |
+| 重试次数 | 3 | 失败后最多重试的次数;重试间隔采用指数退避 |
+| 补丁生成后自动上传 | 关闭 | 打开后,Patch 打包成功即调用上传接口 |
+
+上传使用 `multipart/form-data`,文件字段名为 `file`。HTTP 4xx(超时、429 除外)会直接视为拒绝;5xx、超时、网络错误可按重试次数继续尝试。
+
+### 身份认证
+
+| 认证方式 | 工具行为 |
+|----------|----------|
+| None | 不发送认证头 |
+| Basic Auth | 使用用户名、密码生成 `Authorization: Basic ...` |
+| Token | 在 `Authorization` 请求头中发送配置的令牌 |
+| API Key | 将 API Key 放入自定义请求头,默认请求头名为 `X-API-Key` |
+
+配置后建议先点击 **测试连接**。测试会向拼接后的完整地址发送 GET 请求,并根据 HTTP 成功状态判断可用性。
+
+### 仿真与功能开关
+
+- **本地服务器端口**:模拟更新的默认端口为 `5000`。
+- **模拟服务器需要身份认证**:为仿真服务器启用认证选项。
+- **打包前检测加密文件**:控制 Patch 模块是否在打包前扫描可疑文件。
+- **自动校验 SemVer**:保留为全局功能开关;实际模块仍会执行版本格式校验。
+- **显示 JSON 预览**:配置中的 JSON 预览选项。
+
+点击 **保存设置**立即持久化;**恢复默认**会重置上传、认证、仿真和功能开关配置。
+
+---
+
+## 推荐发布工作流
+
+### 桌面端更新
+
+这个顺序把 Patch、OSS、Config、Simulation 四个模块串联成一个完整的桌面应用发布流水线:
+
+```
+┌─────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
+│ 发布新旧 │ -> │ Patch │ -> │ OSS/Hash │ -> │ Config │ -> │ Simulation│
+│ 版本目录 │ │ 生成补丁 │ │ 算 Hash │ │ 生成清单 │ │ 本地验证 │
+└─────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
+```
+
+1. **构建发布目录**:在 CI 或本地 `dotnet publish` 得到 old/new 两个目录。
+2. **Patch**:选择 old/new,生成补丁 ZIP。
+3. **OSS Config**:对补丁 ZIP 计算 SHA256,填写下载 URL,导出 `oss_config.json`。(如果使用自建 Server,将相同信息写入 `versions.json`)。
+4. **Config**:选择 Client/Upgrade 的 `.csproj`,生成 `generalupdate.manifest.json`。
+5. **Simulation**:选择旧版本目录和补丁 ZIP,确认 PASS。
+6. **发布上线**:上传补丁 ZIP、OSS 清单到生产环境。
+
+### 移动端更新
+
+使用 Mobile 模块串联移动端 Android 应用发布:
+
+```
+┌────────────┐ ┌──────────┐ ┌──────────┐
+│ 构建 APK/ │ -> │ Mobile │ -> │ 发布上线 │
+│ AAB 产物 │ │ 解析+上传 │ │ 更新服务 │
+└────────────┘ └──────────┘ └──────────┘
+```
+
+1. **构建产物**:在 CI 或本地构建出 `.apk` / `.aab` 文件。
+2. **Mobile**:选择文件或项目,自动解析元数据、计算 SHA256、上传服务端、导出版本记录。
+3. **发布上线**:确认上传成功,客户端通过 `GeneralUpdate.Avalonia.Android` 或 `GeneralUpdate.Maui.Android` 检查更新。
+
+---
+
+## 常见问题
+
+| 现象 | 原因与处理 |
+|------|-----------|
+| Version invalid | 使用 `1.0.0`、`2.0.0-beta.1` 格式。不要用 `1.0` 或 `v1.0.0` |
+| Patch 输出为空或极小 | old/new 目录可能选反,或两个目录内容完全一致。确认 old 是用户已安装版本,new 是目标版本 |
+| 找不到 `delete_files.json` | 当前文件名是 `generalupdate.delete.json`,位于 Patch ZIP 根目录 |
+| Simulation 提示找不到 SDK | 安装 .NET 10 SDK 并确保命令行可执行 `dotnet --version` |
+| Simulation 端口冲突 | 修改 `ServerPort` 或释放本地 5000 端口 |
+| 客户端下载后 Hash 校验失败 | 对**最终上传到 CDN/OSS 的文件**重新计算 Hash,检查是否被中间代理重压缩 |
+| Upgrade 进程没有启动 | 检查 `generalupdate.manifest.json` 中 `updateAppName` 和 `updatePath` 是否与发布目录结构一致 |
+| Mobile 分析时提示 "Metadata extraction warning" | AXML 解析未找到预期属性,常见的两种原因:APK 使用资源 ID 引用而非直接文本存储属性值;或 APK 被加固/混淆后 AndroidManifest.xml 结构被修改。可以手动填写 PackageName、VersionName、VersionCode |
+| Mobile 项目模式 Build & Locate 失败 | 确认已安装 .NET SDK 且版本支持目标框架(TFM),检查 `.csproj` 包含 `-android` 目标框架,输出目录 `bin/Release/{tfm}/publish/` 没有被写入保护 |
+| Mobile 项目模式 "Build output not found" | `dotnet publish` 成功执行但未在预期目录找到 `.apk`/`.aab`。检查 `.csproj` 中 `AndroidPackageFormat` 设置是否正确(默认 `aab;apk` 优先产生 APK),以及 TFM 是否自动解析正确 |
+| Mobile 上传失败 | 检查服务端地址和 Endpoint 配置是否正确,确认服务端认证方式(Basic / Bearer / API Key)与工具配置一致,查看工具日志中的 HTTP 状态码和错误消息 |
+| Mobile 上传后客户端更新失败 | 确认服务端返回的版本记录 JSON 中 `Platform` 字段为 `4`(Android),`Format` 字段与客户端期望的 APK/AAB 格式一致 |
+
+---
+
+## 关联文档
+
+- [GeneralUpdate.Core](/docs/doc/GeneralUpdate.Core):Client/Upgrade 更新主流程
+- [GeneralUpdate.Differential](/docs/doc/GeneralUpdate.Differential):差分算法 Clean/Dirty 模式
+- [GeneralUpdate.Extension](/docs/doc/GeneralUpdate.Extension):扩展包安装与版本管理
+- [GeneralUpdate.Avalonia.Android](/avalonia/doc/GeneralUpdate.Avalonia.Android):Avalonia Android APK 更新组件
+- [GeneralUpdate.Maui.Android](/maui/doc/GeneralUpdate.Maui.Android):MAUI Android APK 更新组件
+- [入门实战手册](/docs/quickstart/Beginner%20cookbook):从零跑通完整更新闭环
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/quickstart/Beginner cookbook.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/quickstart/Beginner cookbook.md
index e745738..e6552c6 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/quickstart/Beginner cookbook.md
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/quickstart/Beginner cookbook.md
@@ -385,7 +385,7 @@ Client (新版本):
1. [GeneralUpdate.Core](../doc/GeneralUpdate.Core):更新策略、事件通知、静默更新、manifest 极简配置
2. [GeneralUpdate.Differential](../doc/GeneralUpdate.Differential):差分算法、并行处理和 Clean/Dirty
3. [GeneralUpdate.Bowl](../doc/GeneralUpdate.Bowl):崩溃监控、备份和失败恢复
-4. [GeneralUpdate.Tools](./GeneralUpdate.PacketTool):补丁包、Hash、OSS Config、Simulation 的完整操作指南
+4. [GeneralUpdate.Tools](/tools/quickstart/GeneralUpdate.PacketTool):补丁包、Hash、OSS Config、Simulation 的完整操作指南
## 安装目录注意事项
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/quickstart/GeneralUpdate.PacketTool.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/quickstart/GeneralUpdate.PacketTool.md
index dca64c5..22e2586 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/quickstart/GeneralUpdate.PacketTool.md
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/quickstart/GeneralUpdate.PacketTool.md
@@ -1,573 +1,7 @@
---
-sidebar_position: 11
+title: GeneralUpdate.Tools
---
# GeneralUpdate.Tools
-## 这是什么
-
-GeneralUpdate.Tools 是一个基于 Avalonia 12 开发的跨平台桌面工具(Windows / Linux / macOS),用于在软件发布流程中生成和管理补丁包、扩展包、版本清单以及执行本地更新仿真。它不替代你的 CI/CD 系统,而是把”打包、校验、验证”这些重复劳动收敛到一个可视化工具中。
-
-:::info Tools 与 CI/CD 的关系
-Tools 是**桌面 GUI 工具**,适合开发者在本地交互式地生成补丁、验证更新。如果你需要在 CI/CD 流水线中自动化补丁生成,可以直接调用 `GeneralUpdate.Core.Pipeline.DiffPipeline.CleanAsync()` —— GUI 和脚本走的是同一条代码路径。
-:::
-
-仓库地址:[https://github.com/GeneralLibrary/GeneralUpdate.Tools](https://github.com/GeneralLibrary/GeneralUpdate.Tools)
-
-## 下载与运行
-
-### 方式一:从源码运行(推荐开发者)
-
-当前工具基于 .NET 10 构建。确保本机安装了 [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0):
-
-```powershell
-git clone https://github.com/GeneralLibrary/GeneralUpdate.Tools.git
-cd GeneralUpdate.Tools\src
-dotnet run --project GeneralUpdate.Tools.csproj
-```
-
-### 方式二:下载预编译版本
-
-前往 [GeneralUpdate.Tools Releases](https://github.com/GeneralLibrary/GeneralUpdate.Tools/releases) 下载对应平台的可执行文件,直接运行即可。
-
-> Simulation 模块内部会调用 `dotnet publish` 构建测试应用,因此使用仿真功能时必须安装 .NET SDK。Mobile 模块的项目模式(Build & Locate)也会调用 `dotnet publish`,同样需要 .NET SDK。仅运行 Patch / Extension / OSS / Config 模块以及 Mobile 的文件模式则不需要。
-
-## 左侧导航模块
-
-| 模块 | 你提供 | 工具产出 | 下游消费者 |
-|------|--------|----------|------------|
-| **补丁包(Patch)** | 旧版本目录 + 新版本目录 | `{name}.zip`(含 `.patch` 文件、新文件和删除清单) | Server、OSS/CDN、Core Upgrade 进程 |
-| **扩展包(Extension)** | 扩展源目录 + 元数据 | `{name}_{version}.zip`(含 `manifest.json`) | `GeneralUpdate.Extension` 组件 |
-| **OSS 配置(OSS)** | 包名、版本、下载 URL、本地文件(计算 Hash) | 用户选择位置的 `oss_config.json` | OSS 客户端、对象存储发布流程 |
-| **模拟更新(Simulate)** | 旧版本目录 + 补丁 ZIP | 本地更新服务 + 仿真报告 | 发布前质量把关 |
-| **移动端(Mobile)** | APK/AAB 或 MAUI/Avalonia Android `.csproj` | 上传结果 + `mobile_version_{timestamp}.json` | 移动端更新服务端、Avalonia/Maui Android 组件 |
-| **配置生成(Config)** | Client/Upgrade 的 `.csproj` | `generalupdate.manifest.json` + 示例发布目录 | Client/Upgrade 启动引导 |
-| **设置(Settings)** | 上传地址、身份认证、仿真参数、功能开关 | `%APPDATA%/GeneralUpdate.Tools/config.json` | 所有需要自动上传或本地仿真的模块 |
-
-:::tip 关于 SHA256
-SHA256 不作为独立导航页面,而是集成在 **OSS 配置**的“计算”和 **移动端**的元数据分析中。
-:::
-
----
-
-## Patch:生成补丁包
-
-### 解决什么问题
-
-当你发布了一个新版本,用户不想下载整个安装包。Patch 模块比较旧版本目录和新版本目录,只输出变更内容:修改过的文件生成二进制差分 `.patch`,新增文件直接复制,删除的文件写入清单。差分包通常远小于完整发布目录。
-
-### 输入
-
-| 字段 | 必填 | 说明 |
-|------|------|------|
-| Old Directory | ✅ | 用户当前安装的旧版本发布目录,例如 `publish\v1.0.0` |
-| New Directory | ✅ | 准备发布的新版本目录,例如 `publish\v2.0.0` |
-| Package Name | ❌ | 输出 ZIP 文件名(不含 `.zip`),为空时自动生成 `patch_yyyyMMddHHmmss` |
-| Version | ✅ | 目标版本号,格式 `MAJOR.MINOR.PATCH`(如 `2.0.0`)或 `MAJOR.MINOR.PATCH-prerelease+build` |
-| Output Directory | ❌ | ZIP 输出目录,为空时输出到桌面 |
-
-### 工具内部做了什么
-
-1. **加密文件检测**:扫描 old/new 目录中的二进制文件,检测是否存在加壳(如 Themida、VMProtect)或加密签名。被检测到的文件将标记警告——此类文件无法生成有效差分补丁,将以全量文件形式打包。
-2. 校验 old/new 目录存在、version 格式合法。
-3. 创建临时目录 `gupatch_yyyyMMddHHmmss`。
-4. 递归比较 old/new:**修改文件** → 生成 `.patch` 二进制差分;**新增文件** → 直接复制;**删除文件** → 记录 hash 到 `generalupdate.delete.json`。
-5. 将临时目录压缩为 `{PackageName}.zip`。
-6. 删除临时目录,ZIP 保留在 Output Directory。
-
-> **关于加密文件**:加壳工具(Themida、VMProtect 等)、代码混淆或加密的二进制文件,因文件哈希在新旧版本间完全不同,差分算法对其无效。此类文件检测到后将直接以全量形式打包,而不会生成 `.patch` 差分。建议在发布前对原始文件进行去壳/解密处理,以获得最优的补丁体积。
-
-底层调用的是 `GeneralUpdate.Core.Pipeline.DiffPipeline.CleanAsync(oldDir, newDir, patchDir)`,和你的 CI 脚本走的是同一条代码路径。
-
-### 输出
-
-```
-{OutputDirectory}/{PackageName}.zip
- ├── changed.dll.patch ← 二进制差分
- ├── new_file.dll ← 新增文件(保持目录结构)
- └── generalupdate.delete.json ← 删除清单
-```
-
-### 下游如何使用
-
-- 把 ZIP 放到 Server 的 `wwwroot/packages/` 目录,更新 `versions.json` 中的 `Url` 和 `Hash`
-- 或上传到 OSS/CDN,把下载链接写入 `oss_config.json`
-- Core Upgrade 进程下载 ZIP 后,`DiffPipeline.DirtyAsync` 根据 `.patch` 和删除清单完成更新
-
----
-
-## Extension:打包扩展
-
-### 解决什么问题
-
-如果你使用 `GeneralUpdate.Extension` 组件管理插件/扩展,每次发布新扩展都需要手动构建标准格式的 ZIP 包并生成 `manifest.json`。Extension 模块把你从手工压缩和手写 JSON 中解放出来。
-
-### 输入
-
-| 字段 | 必填 | 说明 |
-|------|------|------|
-| Name | ✅ | 扩展唯一标识,建议小写+连字符,如 `my-data-exporter` |
-| Version | ✅ | 语义化版本,如 `1.0.0` |
-| Description | ❌ | 扩展功能描述 |
-| Publisher | ❌ | 发布者名称 |
-| License | ❌ | 许可证标识,如 `MIT` |
-| Extension Directory | ✅ | 扩展源文件目录,点击 Pick 选择文件夹 |
-| Export Directory | ❌ | 输出目录,为空时输出到桌面 |
-| Custom Properties | ❌ | 自定义键值对,写入 `manifest.json.customProperties` |
-
-### 工具内部做了什么
-
-1. 校验目录存在、version 格式合法。
-2. 将 Extension Directory 中所有文件打包为 ZIP。
-3. 在 ZIP 根目录写入 `manifest.json`。
-
-### 输出
-
-```
-{ExportDirectory}/{Name}_{Version}.zip
- ├── manifest.json ← 扩展元数据
- ├── bin/
- │ └── MyExtension.dll
- ├── resources/
- └── ...
-```
-
-`manifest.json` 示例:
-
-```json
-{
- "name": "my-data-exporter",
- "version": "1.0.0",
- "description": "Export data to CSV/Excel/JSON",
- "publisher": "MyCompany",
- "license": "MIT",
- "dependencies": "",
- "minHostVersion": "",
- "maxHostVersion": "",
- "isPreRelease": false,
- "platform": { "displayName": "Windows", "value": 1 },
- "format": ".zip",
- "releaseDate": "2026-06-01T00:00:00",
- "customProperties": { "maxConnections": "100" }
-}
-```
-
-### 下游如何使用
-
-- Extension Host 调用 `ExtensionManager.QueryRemoteExtensionsAsync(...)` 获取扩展列表
-- 安装时下载 ZIP,读取 `manifest.json` 进行兼容性检查和依赖解析
-- 详见 [GeneralUpdate.Extension](../doc/GeneralUpdate.Extension)
-
----
-
-## OSS Config:生成 OSS 版本清单
-
-### 解决什么问题
-
-如果你使用 OSS 模式更新(静态文件服务器),你需要维护一个 `versions.json` 或 `oss_config.json`,让客户端知道有哪些版本可以下载。OSS Config 模块帮你整理版本信息并计算 SHA256。
-
-### 输入
-
-| 字段 | 必填 | 说明 |
-|------|------|------|
-| PacketName | ✅ | 更新包名称 |
-| Version | ✅ | 语义化版本号 |
-| Url | ✅ | 客户端可下载补丁包的完整地址 |
-| SHA256 | 推荐 | 选择本地 ZIP 文件后点击 ComputeHash 自动计算 |
-
-### 操作流程
-
-1. 填写 PacketName、Version、Url。
-2. 点击 **ComputeHash**,选择本地补丁 ZIP 文件,自动填入 SHA256。
-3. 点击 **Add To List**,加入列表。
-4. 重复以上步骤添加所有版本。
-5. 点击 **Export**,生成 `oss_config.json`。
-
-### 输出
-
-```json
-[
- {
- "PacketName": "client_1.0.0_to_2.0.0",
- "Hash": "f2c7a8b3...",
- "Version": "2.0.0",
- "Url": "https://cdn.example.com/client_1.0.0_to_2.0.0.zip",
- "ReleaseDate": ""
- }
-]
-```
-
-### 下游如何使用
-
-- 将 `oss_config.json` 上传到 OSS bucket 或静态文件服务器
-- OSS 客户端读取此文件发现可用版本,下载后校验 Hash
-- 详见 [GeneralUpdate.Core](../doc/GeneralUpdate.Core) OSS 更新策略
-
----
-
-## Config:生成启动清单
-
-### 解决什么问题
-
-Client 和 Upgrade 启动时需要知道主程序名、升级程序名、版本号、ProductId、UpdatePath 等信息。Config 模块从 `.csproj` 中自动提取 AssemblyName 和 TargetFramework,帮你生成 `generalupdate.manifest.json`,省去手写和手误。
-
-### 输入
-
-| 字段 | 必填 | 说明 |
-|------|------|------|
-| Client .csproj | ✅ | 主程序的 `.csproj` 文件路径 |
-| Upgrade .csproj | ❌ | 升级程序的 `.csproj` 路径 |
-| ClientVersion | ✅ | 客户端当前版本,如 `1.0.0` |
-| UpgradeClientVersion | ✅ | 升级程序版本,如 `1.0.0` |
-| AppType | ✅ | Client / Upgrade / OssClient / OssUpgrade |
-| ProductId | ✅ | 产品标识 GUID |
-| UpdatePath | ✅ | 升级程序相对主程序的子目录,如 `update/` |
-
-### 操作流程
-
-1. 点击 Browse 选择 Client `.csproj`(必填)和 Upgrade `.csproj`(可选)。
-2. 点击 **Analyze**,工具自动读取 AssemblyName 填入 `MainAppName`、`UpdateAppName`。
-3. 手动填写 Version、AppType、ProductId、UpdatePath。
-4. 点击 **Generate**,在工具运行目录生成 `generalupdate.manifest.json`。
-5. 点击 **Generate Sample**,额外执行 `dotnet publish` 并输出可运行的发布目录。
-
-### 输出
-
-`generalupdate.manifest.json`:
-
-```json
-{
- "mainAppName": "ClientSample.exe",
- "clientVersion": "1.0.0",
- "appType": "Client",
- "updateAppName": "UpgradeSample.exe",
- "upgradeClientVersion": "1.0.0",
- "productId": "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
- "updatePath": "update/"
-}
-```
-
-Generate Sample 额外输出:
-
-```
-{工具运行目录}/sample_output/
- ├── ClientSample.exe ← Client dotnet publish 输出
- ├── generalupdate.manifest.json
- └── update/
- └── UpgradeSample.exe ← Upgrade dotnet publish 输出
-```
-
-### 下游如何使用
-
-- Client 启动时读取 `generalupdate.manifest.json`,配合服务端地址和 AppSecretKey 即可进入更新流程
-- 不需要手写 `Configinfo`,只需用 `GeneralUpdateBootstrap` 读取 manifest
-
----
-
-## Simulation:本地更新仿真
-
-### 解决什么问题
-
-你刚用 Patch 模块生成了补丁包,但不确定这个包在实际更新流程中能不能跑通。Simulation 模块在你本机启动一个临时更新服务,构建 Client/Upgrade 样例,模拟一次完整的“发现版本 → 下载补丁 → 应用更新”闭环,最后输出 PASS/FAIL 报告。
-
-### 前置条件
-
-- 已安装 .NET 10 SDK(或更高版本)
-- `dotnet --version` 可正常执行
-- 本地 5000 端口未被占用(可配置)
-
-### 输入
-
-| 字段 | 必填 | 说明 |
-|------|------|------|
-| Old App Directory | ✅ | 模拟用户当前安装的旧版本目录 |
-| Patch File | ✅ | Patch 模块生成的补丁 ZIP |
-| CurrentVersion | ✅ | 旧版本号(Simulation 内部传给 Client,用于版本校验) |
-| TargetVersion | ✅ | 新版本号(Simulation 内部赋值到补丁 ZIP,写入服务端版本源) |
-| AppType | ✅ | ClientApp = 1 / UpgradeApp = 2 |
-| Platform | ✅ | Windows = 1 / Linux = 2 |
-| AppSecretKey | ✅ | 客户端验证密钥 |
-| ProductId | ✅ | 产品标识 GUID |
-| UpdatePath | ✅ | 升级程序子目录名称,如 `update/` |
-| ServerPort | ❌ | 本地服务端口,默认 5000 |
-
-### 仿真过程
-
-1. **校验**:旧目录存在、Patch ZIP 存在、version 格式合法、.NET SDK 可用。
-2. **发布 Client**:`dotnet publish test_app/Client/ClientSample.csproj` 到 App Directory。
-3. **发布 Upgrade**:`dotnet publish test_app/Upgrade/UpgradeSample.csproj` 到 `UpdatePath` 子目录。
-4. **生成 manifest**:在 App Directory 写入 `generalupdate.manifest.json`。
-5. **准备补丁**:把 Patch ZIP 复制到内部 `.server` 目录,计算 SHA256,写入服务端版本源。
-6. **启动服务**:本地服务监听 `http://localhost:{ServerPort}`,提供 `POST /Upgrade/Verification`、`POST /Upgrade/Report`、`GET /patch/{filename}`。
-7. **运行 Client**:启动 `ClientSample.exe`,传入 `--server-url http://localhost:5000 --app-secret ... --client-version 1.0.0`。
-8. **停止服务**:Client 完成更新或超时后停止服务。
-9. **生成报告**:检查目录文件变化,输出 `simulation_report.md`。
-
-### 输出
-
-```
-{AppDirectory}/simulation_report.md ← 仿真报告(PASS/FAIL + 时间线)
-```
-
-报告包含配置表、PASS/FAIL 结论、Notes 和完整时间线,可以直接贴到发布记录或 CI artifact。
-
----
-
-## Hash:SHA256 校验
-
-### 解决什么问题
-
-补丁包上传到 CDN/OSS 后,必须确保客户端下载到的文件和原始包一致。Hash 功能对本地文件计算 SHA256,输出小写十六进制字符串,你应该把这个值写入版本清单或服务端返回数据。
-
-### 使用方式
-
-在 **OSS Config** 模块中,点击 **ComputeHash**,选择本地 ZIP 文件,自动填入 SHA256 字段。你也可以单独使用这个功能来校验任何文件。
-
----
-
-## Mobile:移动端打包
-
-### 解决什么问题
-
-如果你使用 `GeneralUpdate.Avalonia.Android` 或 `GeneralUpdate.Maui.Android` 组件为 Android 应用提供自动更新能力,每次发布新版本时都需要获取 APK/AAB 文件的元数据(包名、版本号、SHA256 哈希、文件大小),并将其上传到服务端进行版本管理。Mobile 模块把"解析 → 打包 → 上传 → 生成版本记录"这四步收敛到一个界面中。
-
-
-
-支持两种工作模式:
-
-- **文件模式**:直接选择 APK 或 AAB 文件,自动解析 AndroidManifest.xml 提取元数据
-- **项目模式**:选择 `.csproj` 项目文件,自动执行 `dotnet publish` 构建,然后定位产物并解析
-
-### 输入
-
-#### 文件模式
-
-| 字段 | 必填 | 说明 |
-|------|------|------|
-| APK/AAB 文件 | ✅ | 选择 `.apk` 或 `.aab` 文件,工具自动识别格式类型 |
-| Output Directory | ❌ | 版本记录 JSON 输出目录,为空时输出到桌面 |
-| ProductId | ✅ | 产品标识 GUID,用于区分服务端产品线 |
-| Platform | ✅ | 目标平台(默认 Android = 4) |
-| Product Name | ❌ | 产品名称,写入版本记录 |
-| Release Notes | ❌ | 发布说明 |
-| Is Forcibly | ❌ | 是否强制更新 |
-
-#### 项目模式
-
-| 字段 | 必填 | 说明 |
-|------|------|------|
-| `.csproj` 文件 | ✅ | 选择 MAUI 或 Avalonia Android 项目的 `.csproj`,工具自动解析 `ApplicationId`、`ApplicationDisplayVersion`、`ApplicationVersion` |
-| Output Directory | ❌ | 同上 |
-
-### 操作流程
-
-1. **选择模式**:切换 File Mode / Project Mode 开关。
- - **文件模式**:点击 **Select File** 选择 `.apk` 或 `.aab` 文件。
- - **项目模式**:点击 **Select Project** 选择 `.csproj` 文件,然后点击 **Build & Locate** 自动执行 `dotnet publish` 并定位产物。
-2. **Analyze**:点击 Analyze 按钮,工具自动:
- - 识别文件格式(APK / Android App Bundle)
- - 从 AndroidManifest.xml 中提取 `PackageName`、`VersionName`、`VersionCode`
- - 计算 SHA256 哈希和文件大小
-3. **填写上传配置**:确认或编辑自动提取的元数据,填写 ProductId、Product Name 等发布信息。
-4. **Upload**:点击 Upload 上传到服务端,并自动生成版本记录 JSON 文件。
-
-### 工具内部做了什么
-
-1. **格式检测**:通过文件扩展名(`.apk` / `.aab`)和 ZIP 内部结构(`AndroidManifest.xml` 位置)自动识别包格式。
- - APK 检测:打开 ZIP 文件,检查根目录是否存在 `AndroidManifest.xml`。
- - AAB 检测:打开 ZIP 文件,检查是否存在 `base/manifest/AndroidManifest.xml`。
- - 格式未知时(不是 .apk 也不是 .aab)会直接返回 Unknown。
-
-2. **元数据解析**:使用 `AxmlParser` 解析二进制的 AXML(Android Binary XML)格式,从 ZIP 中读取 `AndroidManifest.xml`。解析流程如下:
- - **字符串池提取**:读取 AXML 文件的 Chunk 头,找到类型为 `0x0001` 的 StringPool Chunk,从中解析出所有 UTF-16LE 编码的字符串数组。
- - **属性值提取**:遍历 XML 的 Start Element Chunk(类型 `0x0102`),解析属性块(每个属性 20 字节),通过属性名在字符串池中的索引匹配 `package` 和 `versionName`,再通过 `rawValueIndex` 从字符串池中取出属性值。
- - **versionCode 提取**:versionCode 存储为整型属性(类型 `0x10` = INT_DEC 或 `0x11` = INT_HEX),直接从属性的 `typedValueData` 字段(偏移 +16,4 字节)读取有符号整数。
- - AXML 结构与参考:https://justanapplication.wordpress.com/category/android/android-binary-xml/
-
-3. **SHA256 计算**:对完整文件计算 SHA256 哈希值,输出小写十六进制字符串。
-
-4. **文件大小**:读取文件长度并格式化为人类可读的显示(B / KB / MB / GB)。
-
-5. **项目构建**(仅项目模式):选择 `.csproj` 后会触发:
- - `MobileCsprojParser.Parse()` 解析 `.csproj` 的 XML,提取 `TargetFramework`(支持单 TFM 和多 TFM,多 TFM 时自动选取包含 `-android` 的目标框架)、`ApplicationId`(映射为 PackageName)、`ApplicationDisplayVersion`(映射为 VersionName)、`ApplicationVersion`(映射为 VersionCode)、`UseMaui`(用于识别 MAUI 项目)、`AndroidPackageFormat`、`AssemblyName`。
- - 调用 `dotnet publish "{csprojPath}" -c Release -o "{publishDir}"`。
- - 构建完成后在 `bin/Release/{tfm}/publish/` 目录搜索 `.apk` 或 `.aab` 文件,自动定位构建产物。
- - 项目类型显示:MAUI(`true`)或 Avalonia(没有 UseMaui)。
-
-6. **上传**:通过 HTTP multipart/form-data 将文件上传到服务端。上传表单字段和对应的数据源如下:
-
- | 字段 | 值来源 | 示例 |
- |------|--------|------|
- | `Name` | ProductName(用户填写) | `MyApp` |
- | `Version` | VersionName(自动解析) | `2.0.0` |
- | `Hash` | SHA256(自动计算) | `a1b2c3d4...` |
- | `Format` | 包格式(自动识别) | `.apk` / `.aab` |
- | `Size` | 文件大小(自动计算) | `50000000` |
- | `AppType` | 固定值 `"1"` | `1` |
- | `Platform` | Platform(默认 4=Android) | `4` |
- | `ProductId` | ProductId(用户填写 GUID) | `2d974e2a-...` |
- | `IsForcibly` | 强制更新开关 | `true` / `false` |
-
- 上传服务支持以下配置:
- - **Server URL**:服务端地址
- - **Upload Endpoint**:API 路径,默认 `/Packet/Create`
- - **Timeout**:超时时间(秒)
- - **Retry Count**:失败重试次数(指数退避)
- - **Auth**:认证配置,支持 Basic / Bearer Token / API Key 三种模式(凭据通过 DPAPI 加密存储)
-
-7. **版本记录导出**:上传成功后自动生成 `mobile_version_{timestamp}.json`,包含完整的版本元数据。也可以在不上传的情况下单独点击 **Export Record Only** 导出记录,此时 URL 字段为 `"manual"`。
-
-### 输出
-
-```
-{OutputDirectory}/mobile_version_20260614120000.json
-```
-
-```json
-{
- "name": "MyApp",
- "version": "2.0.0",
- "hash": "a1b2c3d4e5f6...",
- "url": "https://server.example.com/packages/app-v2.0.0.apk",
- "packageName": "com.example.myapp",
- "fileSize": 50000000,
- "format": "apk",
- "platform": 4,
- "productId": "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
- "isForcibly": false,
- "releaseDate": "2026-06-14T12:00:00.0000000Z"
-}
-```
-
-### 下游如何使用
-
-- 将生成的版本记录 JSON 导入或上传到你的更新服务端(如 GeneralSpacestation)
-- 客户端(`GeneralUpdate.Avalonia.Android` 或 `GeneralUpdate.Maui.Android`)从服务端查询版本信息时,返回的数据结构与版本记录的内容对应
-- 客户端下载 APK 后使用 `hash` 字段做 SHA256 完整性校验
-
-### 支持的 AndroidManifest 字段提取
-
-| 清单属性 | 字段名 | 说明 |
-|---------|--------|------|
-| `package` | `PackageName` | 应用包名(唯一标识) |
-| `android:versionName` | `VersionName` | 展示版本号(如 `2.0.0`) |
-| `android:versionCode` | `VersionCode` | 内部版本代码(整数) |
-
----
-
-## Settings:上传与运行参数
-
-设置页集中管理所有模块共用的持久化配置。保存后,配置会写入:
-
-```text
-%APPDATA%\GeneralUpdate.Tools\config.json
-```
-
-Windows 可按 `Win+R` 输入 `%APPDATA%\GeneralUpdate.Tools` 后打开。工具会同时维护 `config.json.backup`;密码、Token 和 API Key 使用系统加密后再写入配置。
-
-### 上传服务器
-
-| 字段 | 默认值 | 说明 |
-|------|--------|------|
-| 服务器地址 | 空 | 必须填写绝对地址,例如 `https://update.example.com` |
-| 上传接口路径 | `/api/v1/packages/upload` | 工具会与服务器地址拼接;可填写相对路径或以 `/` 开头的路径 |
-| 超时时间 | 300 秒 | 单次上传最长等待时间 |
-| 重试次数 | 3 | 失败后最多重试的次数;重试间隔采用指数退避 |
-| 补丁生成后自动上传 | 关闭 | 打开后,Patch 打包成功即调用上传接口 |
-
-上传使用 `multipart/form-data`,文件字段名为 `file`。HTTP 4xx(超时、429 除外)会直接视为拒绝;5xx、超时、网络错误可按重试次数继续尝试。
-
-### 身份认证
-
-| 认证方式 | 工具行为 |
-|----------|----------|
-| None | 不发送认证头 |
-| Basic Auth | 使用用户名、密码生成 `Authorization: Basic ...` |
-| Token | 在 `Authorization` 请求头中发送配置的令牌 |
-| API Key | 将 API Key 放入自定义请求头,默认请求头名为 `X-API-Key` |
-
-配置后建议先点击 **测试连接**。测试会向拼接后的完整地址发送 GET 请求,并根据 HTTP 成功状态判断可用性。
-
-### 仿真与功能开关
-
-- **本地服务器端口**:模拟更新的默认端口为 `5000`。
-- **模拟服务器需要身份认证**:为仿真服务器启用认证选项。
-- **打包前检测加密文件**:控制 Patch 模块是否在打包前扫描可疑文件。
-- **自动校验 SemVer**:保留为全局功能开关;实际模块仍会执行版本格式校验。
-- **显示 JSON 预览**:配置中的 JSON 预览选项。
-
-点击 **保存设置**立即持久化;**恢复默认**会重置上传、认证、仿真和功能开关配置。
-
----
-
-## 推荐发布工作流
-
-### 桌面端更新
-
-这个顺序把 Patch、OSS、Config、Simulation 四个模块串联成一个完整的桌面应用发布流水线:
-
-```
-┌─────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
-│ 发布新旧 │ -> │ Patch │ -> │ OSS/Hash │ -> │ Config │ -> │ Simulation│
-│ 版本目录 │ │ 生成补丁 │ │ 算 Hash │ │ 生成清单 │ │ 本地验证 │
-└─────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
-```
-
-1. **构建发布目录**:在 CI 或本地 `dotnet publish` 得到 old/new 两个目录。
-2. **Patch**:选择 old/new,生成补丁 ZIP。
-3. **OSS Config**:对补丁 ZIP 计算 SHA256,填写下载 URL,导出 `oss_config.json`。(如果使用自建 Server,将相同信息写入 `versions.json`)。
-4. **Config**:选择 Client/Upgrade 的 `.csproj`,生成 `generalupdate.manifest.json`。
-5. **Simulation**:选择旧版本目录和补丁 ZIP,确认 PASS。
-6. **发布上线**:上传补丁 ZIP、OSS 清单到生产环境。
-
-### 移动端更新
-
-使用 Mobile 模块串联移动端 Android 应用发布:
-
-```
-┌────────────┐ ┌──────────┐ ┌──────────┐
-│ 构建 APK/ │ -> │ Mobile │ -> │ 发布上线 │
-│ AAB 产物 │ │ 解析+上传 │ │ 更新服务 │
-└────────────┘ └──────────┘ └──────────┘
-```
-
-1. **构建产物**:在 CI 或本地构建出 `.apk` / `.aab` 文件。
-2. **Mobile**:选择文件或项目,自动解析元数据、计算 SHA256、上传服务端、导出版本记录。
-3. **发布上线**:确认上传成功,客户端通过 `GeneralUpdate.Avalonia.Android` 或 `GeneralUpdate.Maui.Android` 检查更新。
-
----
-
-## 常见问题
-
-| 现象 | 原因与处理 |
-|------|-----------|
-| Version invalid | 使用 `1.0.0`、`2.0.0-beta.1` 格式。不要用 `1.0` 或 `v1.0.0` |
-| Patch 输出为空或极小 | old/new 目录可能选反,或两个目录内容完全一致。确认 old 是用户已安装版本,new 是目标版本 |
-| 找不到 `delete_files.json` | 当前文件名是 `generalupdate.delete.json`,位于 Patch ZIP 根目录 |
-| Simulation 提示找不到 SDK | 安装 .NET 10 SDK 并确保命令行可执行 `dotnet --version` |
-| Simulation 端口冲突 | 修改 `ServerPort` 或释放本地 5000 端口 |
-| 客户端下载后 Hash 校验失败 | 对**最终上传到 CDN/OSS 的文件**重新计算 Hash,检查是否被中间代理重压缩 |
-| Upgrade 进程没有启动 | 检查 `generalupdate.manifest.json` 中 `updateAppName` 和 `updatePath` 是否与发布目录结构一致 |
-| Mobile 分析时提示 "Metadata extraction warning" | AXML 解析未找到预期属性,常见的两种原因:APK 使用资源 ID 引用而非直接文本存储属性值;或 APK 被加固/混淆后 AndroidManifest.xml 结构被修改。可以手动填写 PackageName、VersionName、VersionCode |
-| Mobile 项目模式 Build & Locate 失败 | 确认已安装 .NET SDK 且版本支持目标框架(TFM),检查 `.csproj` 包含 `-android` 目标框架,输出目录 `bin/Release/{tfm}/publish/` 没有被写入保护 |
-| Mobile 项目模式 "Build output not found" | `dotnet publish` 成功执行但未在预期目录找到 `.apk`/`.aab`。检查 `.csproj` 中 `AndroidPackageFormat` 设置是否正确(默认 `aab;apk` 优先产生 APK),以及 TFM 是否自动解析正确 |
-| Mobile 上传失败 | 检查服务端地址和 Endpoint 配置是否正确,确认服务端认证方式(Basic / Bearer / API Key)与工具配置一致,查看工具日志中的 HTTP 状态码和错误消息 |
-| Mobile 上传后客户端更新失败 | 确认服务端返回的版本记录 JSON 中 `Platform` 字段为 `4`(Android),`Format` 字段与客户端期望的 APK/AAB 格式一致 |
-
----
-
-## 关联文档
-
-- [GeneralUpdate.Core](../doc/GeneralUpdate.Core):Client/Upgrade 更新主流程
-- [GeneralUpdate.Differential](../doc/GeneralUpdate.Differential):差分算法 Clean/Dirty 模式
-- [GeneralUpdate.Extension](../doc/GeneralUpdate.Extension):扩展包安装与版本管理
-- [GeneralUpdate.Avalonia.Android](/avalonia/doc/GeneralUpdate.Avalonia.Android):Avalonia Android APK 更新组件
-- [GeneralUpdate.Maui.Android](/maui/doc/GeneralUpdate.Maui.Android):MAUI Android APK 更新组件
-- [入门实战手册](./Beginner%20cookbook):从零跑通完整更新闭环
+Tools 文档已迁移到独立的 [GeneralUpdate.Tools 帮助页面](/tools/quickstart/GeneralUpdate.PacketTool)。
diff --git a/website/maui/releaselog/GeneralUpdateMauiReleaselog.md b/website/maui/releaselog/GeneralUpdateMauiReleaselog.md
index 4832269..5de6065 100644
--- a/website/maui/releaselog/GeneralUpdateMauiReleaselog.md
+++ b/website/maui/releaselog/GeneralUpdateMauiReleaselog.md
@@ -8,6 +8,6 @@ tags: [log, maui]
### 2026-06-14 — `v0.0.1-beta.3`
-- First public release of `GeneralUpdate.Maui.Android`.
-- Added the two-phase `ValidateAsync` and `ExecuteUpdateAsync` API, dependency injection integration, HTTP Range resumable downloads, and SHA256 verification.
-- Added the MAUI Android component reference and quickstart documentation.
+- `GeneralUpdate.Maui.Android` 首个公开版本。
+- 提供 `ValidateAsync` 与 `ExecuteUpdateAsync` 两阶段 API、依赖注入集成、HTTP Range 断点续传及 SHA256 校验。
+- 新增 MAUI Android 组件参考与快速入门文档。
diff --git a/website/sidebars.js b/website/sidebars.js
index 7d655e7..a8b0143 100644
--- a/website/sidebars.js
+++ b/website/sidebars.js
@@ -21,7 +21,6 @@ const sidebars = {
collapsed: false,
items: [
'quickstart/Beginner cookbook',
- 'quickstart/GeneralUpdate.PacketTool',
],
},
diff --git a/website/sidebars.tools.js b/website/sidebars.tools.js
new file mode 100644
index 0000000..746d151
--- /dev/null
+++ b/website/sidebars.tools.js
@@ -0,0 +1,14 @@
+/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
+const sidebars = {
+ toolsSidebar: [
+ 'quickstart/GeneralUpdate.PacketTool',
+ {
+ type: 'category',
+ label: 'Release Log',
+ collapsed: true,
+ items: ['releaselog/GeneralUpdateToolsReleaselog'],
+ },
+ ],
+};
+
+export default sidebars;
diff --git a/website/src/pages/index.js b/website/src/pages/index.js
index e1dc634..59f3adf 100644
--- a/website/src/pages/index.js
+++ b/website/src/pages/index.js
@@ -74,7 +74,7 @@ function Features() {
icon="🛠️"
title="Update Tools"
description={isEn ? 'Automated patch generation and publishing tools' : '自动化补丁包生成与发布工具'}
- link="/docs/quickstart/GeneralUpdate.PacketTool"
+ link="/tools/quickstart/GeneralUpdate.PacketTool"
/>
version.name !== 'current')
: versions;
return (
@@ -46,6 +46,7 @@ function GroupSection({group, hideCurrentVersion = true, mobile, search, hash, o
const versionDoc =
activeDocContext.alternateDocVersions[version.name] ??
getVersionMainDoc(version);
+ if (!versionDoc) return null;
return (
Simulation 模块内部会调用 `dotnet publish` 构建测试应用,因此使用仿真功能时必须安装 .NET SDK。Mobile 模块的项目模式(Build & Locate)也会调用 `dotnet publish`,同样需要 .NET SDK。仅运行 Patch / Extension / OSS / Config 模块以及 Mobile 的文件模式则不需要。
+
+## 左侧导航模块
+
+| 模块 | 你提供 | 工具产出 | 下游消费者 |
+|------|--------|----------|------------|
+| **补丁包(Patch)** | 旧版本目录 + 新版本目录 | `{name}.zip`(含 `.patch` 文件、新文件和删除清单) | Server、OSS/CDN、Core Upgrade 进程 |
+| **扩展包(Extension)** | 扩展源目录 + 元数据 | `{name}_{version}.zip`(含 `manifest.json`) | `GeneralUpdate.Extension` 组件 |
+| **OSS 配置(OSS)** | 包名、版本、下载 URL、本地文件(计算 Hash) | 用户选择位置的 `oss_config.json` | OSS 客户端、对象存储发布流程 |
+| **模拟更新(Simulate)** | 旧版本目录 + 补丁 ZIP | 本地更新服务 + 仿真报告 | 发布前质量把关 |
+| **移动端(Mobile)** | APK/AAB 或 MAUI/Avalonia Android `.csproj` | 上传结果 + `mobile_version_{timestamp}.json` | 移动端更新服务端、Avalonia/Maui Android 组件 |
+| **配置生成(Config)** | Client/Upgrade 的 `.csproj` | `generalupdate.manifest.json` + 示例发布目录 | Client/Upgrade 启动引导 |
+| **设置(Settings)** | 上传地址、身份认证、仿真参数、功能开关 | `%APPDATA%/GeneralUpdate.Tools/config.json` | 所有需要自动上传或本地仿真的模块 |
+
+:::tip 关于 SHA256
+SHA256 不作为独立导航页面,而是集成在 **OSS 配置**的“计算”和 **移动端**的元数据分析中。
+:::
+
+---
+
+## Patch:生成补丁包
+
+### 解决什么问题
+
+当你发布了一个新版本,用户不想下载整个安装包。Patch 模块比较旧版本目录和新版本目录,只输出变更内容:修改过的文件生成二进制差分 `.patch`,新增文件直接复制,删除的文件写入清单。差分包通常远小于完整发布目录。
+
+### 输入
+
+| 字段 | 必填 | 说明 |
+|------|------|------|
+| Old Directory | ✅ | 用户当前安装的旧版本发布目录,例如 `publish\v1.0.0` |
+| New Directory | ✅ | 准备发布的新版本目录,例如 `publish\v2.0.0` |
+| Package Name | ❌ | 输出 ZIP 文件名(不含 `.zip`),为空时自动生成 `patch_yyyyMMddHHmmss` |
+| Version | ✅ | 目标版本号,格式 `MAJOR.MINOR.PATCH`(如 `2.0.0`)或 `MAJOR.MINOR.PATCH-prerelease+build` |
+| Output Directory | ❌ | ZIP 输出目录,为空时输出到桌面 |
+
+### 工具内部做了什么
+
+1. **加密文件检测**:扫描 old/new 目录中的二进制文件,检测是否存在加壳(如 Themida、VMProtect)或加密签名。被检测到的文件将标记警告——此类文件无法生成有效差分补丁,将以全量文件形式打包。
+2. 校验 old/new 目录存在、version 格式合法。
+3. 创建临时目录 `gupatch_yyyyMMddHHmmss`。
+4. 递归比较 old/new:**修改文件** → 生成 `.patch` 二进制差分;**新增文件** → 直接复制;**删除文件** → 记录 hash 到 `generalupdate.delete.json`。
+5. 将临时目录压缩为 `{PackageName}.zip`。
+6. 删除临时目录,ZIP 保留在 Output Directory。
+
+> **关于加密文件**:加壳工具(Themida、VMProtect 等)、代码混淆或加密的二进制文件,因文件哈希在新旧版本间完全不同,差分算法对其无效。此类文件检测到后将直接以全量形式打包,而不会生成 `.patch` 差分。建议在发布前对原始文件进行去壳/解密处理,以获得最优的补丁体积。
+
+
+:::warning 加密/加壳文件无法差分
+如果你的应用使用了加壳工具(Themida、VMProtect)、代码混淆器或加密二进制文件,**整个文件在新旧版本间会完全不同**,差分算法完全失效,补丁包体积等同于全量文件。如需差分更新,请确保原始发布文件未被加壳或加密。
+:::
+
+底层调用的是 `GeneralUpdate.Core.Pipeline.DiffPipeline.CleanAsync(oldDir, newDir, patchDir)`,和你的 CI 脚本走的是同一条代码路径。
+
+### 输出
+
+```
+{OutputDirectory}/{PackageName}.zip
+ ├── changed.dll.patch ← 二进制差分
+ ├── new_file.dll ← 新增文件(保持目录结构)
+ └── generalupdate.delete.json ← 删除清单
+```
+
+### 下游如何使用
+
+- 把 ZIP 放到 Server 的 `wwwroot/packages/` 目录,更新 `versions.json` 中的 `Url` 和 `Hash`
+- 或上传到 OSS/CDN,把下载链接写入 `oss_config.json`
+- Core Upgrade 进程下载 ZIP 后,`DiffPipeline.DirtyAsync` 根据 `.patch` 和删除清单完成更新
+
+---
+
+## Extension:打包扩展
+
+### 解决什么问题
+
+如果你使用 `GeneralUpdate.Extension` 组件管理插件/扩展,每次发布新扩展都需要手动构建标准格式的 ZIP 包并生成 `manifest.json`。Extension 模块把你从手工压缩和手写 JSON 中解放出来。
+
+### 输入
+
+| 字段 | 必填 | 说明 |
+|------|------|------|
+| Name | ✅ | 扩展唯一标识,建议小写+连字符,如 `my-data-exporter` |
+| Version | ✅ | 语义化版本,如 `1.0.0` |
+| Description | ❌ | 扩展功能描述 |
+| Publisher | ❌ | 发布者名称 |
+| License | ❌ | 许可证标识,如 `MIT` |
+| Extension Directory | ✅ | 扩展源文件目录,点击 Pick 选择文件夹 |
+| Export Directory | ❌ | 输出目录,为空时输出到桌面 |
+| Custom Properties | ❌ | 自定义键值对,写入 `manifest.json.customProperties` |
+
+### 工具内部做了什么
+
+1. 校验目录存在、version 格式合法。
+2. 将 Extension Directory 中所有文件打包为 ZIP。
+3. 在 ZIP 根目录写入 `manifest.json`。
+
+### 输出
+
+```
+{ExportDirectory}/{Name}_{Version}.zip
+ ├── manifest.json ← 扩展元数据
+ ├── bin/
+ │ └── MyExtension.dll
+ ├── resources/
+ └── ...
+```
+
+`manifest.json` 示例:
+
+```json
+{
+ "name": "my-data-exporter",
+ "version": "1.0.0",
+ "description": "Export data to CSV/Excel/JSON",
+ "publisher": "MyCompany",
+ "license": "MIT",
+ "dependencies": "",
+ "minHostVersion": "",
+ "maxHostVersion": "",
+ "isPreRelease": false,
+ "platform": { "displayName": "Windows", "value": 1 },
+ "format": ".zip",
+ "releaseDate": "2026-06-01T00:00:00",
+ "customProperties": { "maxConnections": "100" }
+}
+```
+
+### 下游如何使用
+
+- Extension Host 调用 `ExtensionManager.QueryRemoteExtensionsAsync(...)` 获取扩展列表
+- 安装时下载 ZIP,读取 `manifest.json` 进行兼容性检查和依赖解析
+- 详见 [GeneralUpdate.Extension](/docs/doc/GeneralUpdate.Extension)
+
+---
+
+## OSS Config:生成 OSS 版本清单
+
+### 解决什么问题
+
+如果你使用 OSS 模式更新(静态文件服务器),你需要维护一个 `versions.json` 或 `oss_config.json`,让客户端知道有哪些版本可以下载。OSS Config 模块帮你整理版本信息并计算 SHA256。
+
+### 输入
+
+| 字段 | 必填 | 说明 |
+|------|------|------|
+| PacketName | ✅ | 更新包名称 |
+| Version | ✅ | 语义化版本号 |
+| Url | ✅ | 客户端可下载补丁包的完整地址 |
+| SHA256 | 推荐 | 选择本地 ZIP 文件后点击 ComputeHash 自动计算 |
+
+### 操作流程
+
+1. 填写 PacketName、Version、Url。
+2. 点击 **ComputeHash**,选择本地补丁 ZIP 文件,自动填入 SHA256。
+3. 点击 **Add To List**,加入列表。
+4. 重复以上步骤添加所有版本。
+5. 点击 **Export**,生成 `oss_config.json`。
+
+### 输出
+
+```json
+[
+ {
+ "PacketName": "client_1.0.0_to_2.0.0",
+ "Hash": "f2c7a8b3...",
+ "Version": "2.0.0",
+ "Url": "https://cdn.example.com/client_1.0.0_to_2.0.0.zip",
+ "ReleaseDate": ""
+ }
+]
+```
+
+### 下游如何使用
+
+- 将 `oss_config.json` 上传到 OSS bucket 或静态文件服务器
+- OSS 客户端读取此文件发现可用版本,下载后校验 Hash
+- 详见 [GeneralUpdate.Core](/docs/doc/GeneralUpdate.Core) OSS 更新策略
+
+---
+
+## Config:生成启动清单
+
+### 解决什么问题
+
+Client 和 Upgrade 启动时需要知道主程序名、升级程序名、版本号、ProductId、UpdatePath 等信息。Config 模块从 `.csproj` 中自动提取 AssemblyName 和 TargetFramework,帮你生成 `generalupdate.manifest.json`,省去手写和手误。
+
+### 输入
+
+| 字段 | 必填 | 说明 |
+|------|------|------|
+| Client .csproj | ✅ | 主程序的 `.csproj` 文件路径 |
+| Upgrade .csproj | ❌ | 升级程序的 `.csproj` 路径 |
+| ClientVersion | ✅ | 客户端当前版本,如 `1.0.0` |
+| UpgradeClientVersion | ✅ | 升级程序版本,如 `1.0.0` |
+| AppType | ✅ | Client / Upgrade / OssClient / OssUpgrade |
+| ProductId | ✅ | 产品标识 GUID |
+| UpdatePath | ✅ | 升级程序相对主程序的子目录,如 `update/` |
+
+### 操作流程
+
+1. 点击 Browse 选择 Client `.csproj`(必填)和 Upgrade `.csproj`(可选)。
+2. 点击 **Analyze**,工具自动读取 AssemblyName 填入 `MainAppName`、`UpdateAppName`。
+3. 手动填写 Version、AppType、ProductId、UpdatePath。
+4. 点击 **Generate**,在工具运行目录生成 `generalupdate.manifest.json`。
+5. 点击 **Generate Sample**,额外执行 `dotnet publish` 并输出可运行的发布目录。
+
+### 输出
+
+`generalupdate.manifest.json`:
+
+```json
+{
+ "mainAppName": "ClientSample.exe",
+ "clientVersion": "1.0.0",
+ "appType": "Client",
+ "updateAppName": "UpgradeSample.exe",
+ "upgradeClientVersion": "1.0.0",
+ "productId": "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
+ "updatePath": "update/"
+}
+```
+
+Generate Sample 额外输出:
+
+```
+{工具运行目录}/sample_output/
+ ├── ClientSample.exe ← Client dotnet publish 输出
+ ├── generalupdate.manifest.json
+ └── update/
+ └── UpgradeSample.exe ← Upgrade dotnet publish 输出
+```
+
+### 下游如何使用
+
+- Client 启动时读取 `generalupdate.manifest.json`,配合服务端地址和 AppSecretKey 即可进入更新流程
+- 不需要手写 `Configinfo`,只需用 `GeneralUpdateBootstrap` 读取 manifest
+
+---
+
+## Simulation:本地更新仿真
+
+### 解决什么问题
+
+你刚用 Patch 模块生成了补丁包,但不确定这个包在实际更新流程中能不能跑通。Simulation 模块在你本机启动一个临时更新服务,构建 Client/Upgrade 样例,模拟一次完整的“发现版本 → 下载补丁 → 应用更新”闭环,最后输出 PASS/FAIL 报告。
+
+### 前置条件
+
+- 已安装 .NET 10 SDK(或更高版本)
+- `dotnet --version` 可正常执行
+- 本地 5000 端口未被占用(可配置)
+
+### 输入
+
+| 字段 | 必填 | 说明 |
+|------|------|------|
+| Old App Directory | ✅ | 模拟用户当前安装的旧版本目录 |
+| Patch File | ✅ | Patch 模块生成的补丁 ZIP |
+| CurrentVersion | ✅ | 旧版本号(Simulation 内部传给 Client,用于版本校验) |
+| TargetVersion | ✅ | 新版本号(Simulation 内部赋值到补丁 ZIP,写入服务端版本源) |
+| AppType | ✅ | ClientApp = 1 / UpgradeApp = 2 |
+| Platform | ✅ | Windows = 1 / Linux = 2 |
+| AppSecretKey | ✅ | 客户端验证密钥 |
+| ProductId | ✅ | 产品标识 GUID |
+| UpdatePath | ✅ | 升级程序子目录名称,如 `update/` |
+| ServerPort | ❌ | 本地服务端口,默认 5000 |
+
+### 仿真过程
+
+1. **校验**:旧目录存在、Patch ZIP 存在、version 格式合法、.NET SDK 可用。
+2. **发布 Client**:`dotnet publish test_app/Client/ClientSample.csproj` 到 App Directory。
+3. **发布 Upgrade**:`dotnet publish test_app/Upgrade/UpgradeSample.csproj` 到 `UpdatePath` 子目录。
+4. **生成 manifest**:在 App Directory 写入 `generalupdate.manifest.json`。
+5. **准备补丁**:把 Patch ZIP 复制到内部 `.server` 目录,计算 SHA256,写入服务端版本源。
+6. **启动服务**:本地服务监听 `http://localhost:{ServerPort}`,提供 `POST /Upgrade/Verification`、`POST /Upgrade/Report`、`GET /patch/{filename}`。
+7. **运行 Client**:启动 `ClientSample.exe`,传入 `--server-url http://localhost:5000 --app-secret ... --client-version 1.0.0`。
+8. **停止服务**:Client 完成更新或超时后停止服务。
+9. **生成报告**:检查目录文件变化,输出 `simulation_report.md`。
+
+### 输出
+
+```
+{AppDirectory}/simulation_report.md ← 仿真报告(PASS/FAIL + 时间线)
+```
+
+报告包含配置表、PASS/FAIL 结论、Notes 和完整时间线,可以直接贴到发布记录或 CI artifact。
+
+---
+
+## Hash:SHA256 校验
+
+### 解决什么问题
+
+补丁包上传到 CDN/OSS 后,必须确保客户端下载到的文件和原始包一致。Hash 功能对本地文件计算 SHA256,输出小写十六进制字符串,你应该把这个值写入版本清单或服务端返回数据。
+
+### 使用方式
+
+在 **OSS Config** 模块中,点击 **ComputeHash**,选择本地 ZIP 文件,自动填入 SHA256 字段。你也可以单独使用这个功能来校验任何文件。
+
+---
+
+## Mobile:移动端打包
+
+### 解决什么问题
+
+如果你使用 `GeneralUpdate.Avalonia.Android` 或 `GeneralUpdate.Maui.Android` 组件为 Android 应用提供自动更新能力,每次发布新版本时都需要获取 APK/AAB 文件的元数据(包名、版本号、SHA256 哈希、文件大小),并将其上传到服务端进行版本管理。Mobile 模块把"解析 → 打包 → 上传 → 生成版本记录"这四步收敛到一个界面中。
+
+
+
+支持两种工作模式:
+
+- **文件模式**:直接选择 APK 或 AAB 文件,自动解析 AndroidManifest.xml 提取元数据
+- **项目模式**:选择 `.csproj` 项目文件,自动执行 `dotnet publish` 构建,然后定位产物并解析
+
+### 输入
+
+#### 文件模式
+
+| 字段 | 必填 | 说明 |
+|------|------|------|
+| APK/AAB 文件 | ✅ | 选择 `.apk` 或 `.aab` 文件,工具自动识别格式类型 |
+| Output Directory | ❌ | 版本记录 JSON 输出目录,为空时输出到桌面 |
+| ProductId | ✅ | 产品标识 GUID,用于区分服务端产品线 |
+| Platform | ✅ | 目标平台(默认 Android = 4) |
+| Product Name | ❌ | 产品名称,写入版本记录 |
+| Release Notes | ❌ | 发布说明 |
+| Is Forcibly | ❌ | 是否强制更新 |
+
+#### 项目模式
+
+| 字段 | 必填 | 说明 |
+|------|------|------|
+| `.csproj` 文件 | ✅ | 选择 MAUI 或 Avalonia Android 项目的 `.csproj`,工具自动解析 `ApplicationId`、`ApplicationDisplayVersion`、`ApplicationVersion` |
+| Output Directory | ❌ | 同上 |
+
+### 操作流程
+
+1. **选择模式**:切换 File Mode / Project Mode 开关。
+ - **文件模式**:点击 **Select File** 选择 `.apk` 或 `.aab` 文件。
+ - **项目模式**:点击 **Select Project** 选择 `.csproj` 文件,然后点击 **Build & Locate** 自动执行 `dotnet publish` 并定位产物。
+2. **Analyze**:点击 Analyze 按钮,工具自动:
+ - 识别文件格式(APK / Android App Bundle)
+ - 从 AndroidManifest.xml 中提取 `PackageName`、`VersionName`、`VersionCode`
+ - 计算 SHA256 哈希和文件大小
+3. **填写上传配置**:确认或编辑自动提取的元数据,填写 ProductId、Product Name 等发布信息。
+4. **Upload**:点击 Upload 上传到服务端,并自动生成版本记录 JSON 文件。
+
+### 工具内部做了什么
+
+1. **格式检测**:通过文件扩展名(`.apk` / `.aab`)和 ZIP 内部结构(`AndroidManifest.xml` 位置)自动识别包格式。
+ - APK 检测:打开 ZIP 文件,检查根目录是否存在 `AndroidManifest.xml`。
+ - AAB 检测:打开 ZIP 文件,检查是否存在 `base/manifest/AndroidManifest.xml`。
+ - 格式未知时(不是 .apk 也不是 .aab)会直接返回 Unknown。
+
+2. **元数据解析**:使用 `AxmlParser` 解析二进制的 AXML(Android Binary XML)格式,从 ZIP 中读取 `AndroidManifest.xml`。解析流程如下:
+ - **字符串池提取**:读取 AXML 文件的 Chunk 头,找到类型为 `0x0001` 的 StringPool Chunk,从中解析出所有 UTF-16LE 编码的字符串数组。
+ - **属性值提取**:遍历 XML 的 Start Element Chunk(类型 `0x0102`),解析属性块(每个属性 20 字节),通过属性名在字符串池中的索引匹配 `package` 和 `versionName`,再通过 `rawValueIndex` 从字符串池中取出属性值。
+ - **versionCode 提取**:versionCode 存储为整型属性(类型 `0x10` = INT_DEC 或 `0x11` = INT_HEX),直接从属性的 `typedValueData` 字段(偏移 +16,4 字节)读取有符号整数。
+ - AXML 结构与参考:https://justanapplication.wordpress.com/category/android/android-binary-xml/
+
+3. **SHA256 计算**:对完整文件计算 SHA256 哈希值,输出小写十六进制字符串。
+
+4. **文件大小**:读取文件长度并格式化为人类可读的显示(B / KB / MB / GB)。
+
+5. **项目构建**(仅项目模式):选择 `.csproj` 后会触发:
+ - `MobileCsprojParser.Parse()` 解析 `.csproj` 的 XML,提取 `TargetFramework`(支持单 TFM 和多 TFM,多 TFM 时自动选取包含 `-android` 的目标框架)、`ApplicationId`(映射为 PackageName)、`ApplicationDisplayVersion`(映射为 VersionName)、`ApplicationVersion`(映射为 VersionCode)、`UseMaui`(用于识别 MAUI 项目)、`AndroidPackageFormat`、`AssemblyName`。
+ - 调用 `dotnet publish "{csprojPath}" -c Release -o "{publishDir}"`。
+ - 构建完成后在 `bin/Release/{tfm}/publish/` 目录搜索 `.apk` 或 `.aab` 文件,自动定位构建产物。
+ - 项目类型显示:MAUI(`true`)或 Avalonia(没有 UseMaui)。
+
+6. **上传**:通过 HTTP multipart/form-data 将文件上传到服务端。上传表单字段和对应的数据源如下:
+
+ | 字段 | 值来源 | 示例 |
+ |------|--------|------|
+ | `Name` | ProductName(用户填写) | `MyApp` |
+ | `Version` | VersionName(自动解析) | `2.0.0` |
+ | `Hash` | SHA256(自动计算) | `a1b2c3d4...` |
+ | `Format` | 包格式(自动识别) | `.apk` / `.aab` |
+ | `Size` | 文件大小(自动计算) | `50000000` |
+ | `AppType` | 固定值 `"1"` | `1` |
+ | `Platform` | Platform(默认 4=Android) | `4` |
+ | `ProductId` | ProductId(用户填写 GUID) | `2d974e2a-...` |
+ | `IsForcibly` | 强制更新开关 | `true` / `false` |
+
+ 上传服务支持以下配置:
+ - **Server URL**:服务端地址
+ - **Upload Endpoint**:API 路径,默认 `/Packet/Create`
+ - **Timeout**:超时时间(秒)
+ - **Retry Count**:失败重试次数(指数退避)
+ - **Auth**:认证配置,支持 Basic / Bearer Token / API Key 三种模式(凭据通过 DPAPI 加密存储)
+
+7. **版本记录导出**:上传成功后自动生成 `mobile_version_{timestamp}.json`,包含完整的版本元数据。也可以在不上传的情况下单独点击 **Export Record Only** 导出记录,此时 URL 字段为 `"manual"`。
+
+### 输出
+
+```
+{OutputDirectory}/mobile_version_20260614120000.json
+```
+
+```json
+{
+ "name": "MyApp",
+ "version": "2.0.0",
+ "hash": "a1b2c3d4e5f6...",
+ "url": "https://server.example.com/packages/app-v2.0.0.apk",
+ "packageName": "com.example.myapp",
+ "fileSize": 50000000,
+ "format": "apk",
+ "platform": 4,
+ "productId": "2d974e2a-31e6-4887-9bb1-b4689e98c77a",
+ "isForcibly": false,
+ "releaseDate": "2026-06-14T12:00:00.0000000Z"
+}
+```
+
+### 下游如何使用
+
+- 将生成的版本记录 JSON 导入或上传到你的更新服务端(如 GeneralSpacestation)
+- 客户端(`GeneralUpdate.Avalonia.Android` 或 `GeneralUpdate.Maui.Android`)从服务端查询版本信息时,返回的数据结构与版本记录的内容对应
+- 客户端下载 APK 后使用 `hash` 字段做 SHA256 完整性校验
+
+### 支持的 AndroidManifest 字段提取
+
+| 清单属性 | 字段名 | 说明 |
+|---------|--------|------|
+| `package` | `PackageName` | 应用包名(唯一标识) |
+| `android:versionName` | `VersionName` | 展示版本号(如 `2.0.0`) |
+| `android:versionCode` | `VersionCode` | 内部版本代码(整数) |
+
+---
+
+## Settings:上传与运行参数
+
+设置页集中管理所有模块共用的持久化配置。保存后,配置会写入:
+
+```text
+%APPDATA%\GeneralUpdate.Tools\config.json
+```
+
+Windows 可按 `Win+R` 输入 `%APPDATA%\GeneralUpdate.Tools` 后打开。工具会同时维护 `config.json.backup`;密码、Token 和 API Key 使用系统加密后再写入配置。
+
+### 上传服务器
+
+| 字段 | 默认值 | 说明 |
+|------|--------|------|
+| 服务器地址 | 空 | 必须填写绝对地址,例如 `https://update.example.com` |
+| 上传接口路径 | `/api/v1/packages/upload` | 工具会与服务器地址拼接;可填写相对路径或以 `/` 开头的路径 |
+| 超时时间 | 300 秒 | 单次上传最长等待时间 |
+| 重试次数 | 3 | 失败后最多重试的次数;重试间隔采用指数退避 |
+| 补丁生成后自动上传 | 关闭 | 打开后,Patch 打包成功即调用上传接口 |
+
+上传使用 `multipart/form-data`,文件字段名为 `file`。HTTP 4xx(超时、429 除外)会直接视为拒绝;5xx、超时、网络错误可按重试次数继续尝试。
+
+### 身份认证
+
+| 认证方式 | 工具行为 |
+|----------|----------|
+| None | 不发送认证头 |
+| Basic Auth | 使用用户名、密码生成 `Authorization: Basic ...` |
+| Token | 在 `Authorization` 请求头中发送配置的令牌 |
+| API Key | 将 API Key 放入自定义请求头,默认请求头名为 `X-API-Key` |
+
+配置后建议先点击 **测试连接**。测试会向拼接后的完整地址发送 GET 请求,并根据 HTTP 成功状态判断可用性。
+
+### 仿真与功能开关
+
+- **本地服务器端口**:模拟更新的默认端口为 `5000`。
+- **模拟服务器需要身份认证**:为仿真服务器启用认证选项。
+- **打包前检测加密文件**:控制 Patch 模块是否在打包前扫描可疑文件。
+- **自动校验 SemVer**:保留为全局功能开关;实际模块仍会执行版本格式校验。
+- **显示 JSON 预览**:配置中的 JSON 预览选项。
+
+点击 **保存设置**立即持久化;**恢复默认**会重置上传、认证、仿真和功能开关配置。
+
+---
+
+## 推荐发布工作流
+
+### 桌面端更新
+
+这个顺序把 Patch、OSS、Config、Simulation 四个模块串联成一个完整的桌面应用发布流水线:
+
+```
+┌─────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
+│ 发布新旧 │ -> │ Patch │ -> │ OSS/Hash │ -> │ Config │ -> │ Simulation│
+│ 版本目录 │ │ 生成补丁 │ │ 算 Hash │ │ 生成清单 │ │ 本地验证 │
+└─────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
+```
+
+1. **构建发布目录**:在 CI 或本地 `dotnet publish` 得到 old/new 两个目录。
+2. **Patch**:选择 old/new,生成补丁 ZIP。
+3. **OSS Config**:对补丁 ZIP 计算 SHA256,填写下载 URL,导出 `oss_config.json`。(如果使用自建 Server,将相同信息写入 `versions.json`)。
+4. **Config**:选择 Client/Upgrade 的 `.csproj`,生成 `generalupdate.manifest.json`。
+5. **Simulation**:选择旧版本目录和补丁 ZIP,确认 PASS。
+6. **发布上线**:上传补丁 ZIP、OSS 清单到生产环境。
+
+### 移动端更新
+
+使用 Mobile 模块串联移动端 Android 应用发布:
+
+```
+┌────────────┐ ┌──────────┐ ┌──────────┐
+│ 构建 APK/ │ -> │ Mobile │ -> │ 发布上线 │
+│ AAB 产物 │ │ 解析+上传 │ │ 更新服务 │
+└────────────┘ └──────────┘ └──────────┘
+```
+
+1. **构建产物**:在 CI 或本地构建出 `.apk` / `.aab` 文件。
+2. **Mobile**:选择文件或项目,自动解析元数据、计算 SHA256、上传服务端、导出版本记录。
+3. **发布上线**:确认上传成功,客户端通过 `GeneralUpdate.Avalonia.Android` 或 `GeneralUpdate.Maui.Android` 检查更新。
+
+---
+
+## 常见问题
+
+| 现象 | 原因与处理 |
+|------|-----------|
+| Version invalid | 使用 `1.0.0`、`2.0.0-beta.1` 格式。不要用 `1.0` 或 `v1.0.0` |
+| Patch 输出为空或极小 | old/new 目录可能选反,或两个目录内容完全一致。确认 old 是用户已安装版本,new 是目标版本 |
+| 找不到 `delete_files.json` | 当前文件名是 `generalupdate.delete.json`,位于 Patch ZIP 根目录 |
+| Simulation 提示找不到 SDK | 安装 .NET 10 SDK 并确保命令行可执行 `dotnet --version` |
+| Simulation 端口冲突 | 修改 `ServerPort` 或释放本地 5000 端口 |
+| 客户端下载后 Hash 校验失败 | 对**最终上传到 CDN/OSS 的文件**重新计算 Hash,检查是否被中间代理重压缩 |
+| Upgrade 进程没有启动 | 检查 `generalupdate.manifest.json` 中 `updateAppName` 和 `updatePath` 是否与发布目录结构一致 |
+| Mobile 分析时提示 "Metadata extraction warning" | AXML 解析未找到预期属性,常见的两种原因:APK 使用资源 ID 引用而非直接文本存储属性值;或 APK 被加固/混淆后 AndroidManifest.xml 结构被修改。可以手动填写 PackageName、VersionName、VersionCode |
+| Mobile 项目模式 Build & Locate 失败 | 确认已安装 .NET SDK 且版本支持目标框架(TFM),检查 `.csproj` 包含 `-android` 目标框架,输出目录 `bin/Release/{tfm}/publish/` 没有被写入保护 |
+| Mobile 项目模式 "Build output not found" | `dotnet publish` 成功执行但未在预期目录找到 `.apk`/`.aab`。检查 `.csproj` 中 `AndroidPackageFormat` 设置是否正确(默认 `aab;apk` 优先产生 APK),以及 TFM 是否自动解析正确 |
+| Mobile 上传失败 | 检查服务端地址和 Endpoint 配置是否正确,确认服务端认证方式(Basic / Bearer / API Key)与工具配置一致,查看工具日志中的 HTTP 状态码和错误消息 |
+| Mobile 上传后客户端更新失败 | 确认服务端返回的版本记录 JSON 中 `Platform` 字段为 `4`(Android),`Format` 字段与客户端期望的 APK/AAB 格式一致 |
+
+---
+
+## 关联文档
+
+- [GeneralUpdate.Core](/docs/doc/GeneralUpdate.Core):Client/Upgrade 更新主流程
+- [GeneralUpdate.Differential](/docs/doc/GeneralUpdate.Differential):差分算法 Clean/Dirty 模式
+- [GeneralUpdate.Extension](/docs/doc/GeneralUpdate.Extension):扩展包安装与版本管理
+- [GeneralUpdate.Avalonia.Android](/avalonia/doc/GeneralUpdate.Avalonia.Android):Avalonia Android APK 更新组件
+- [GeneralUpdate.Maui.Android](/maui/doc/GeneralUpdate.Maui.Android):MAUI Android APK 更新组件
+- [入门实战手册](/docs/quickstart/Beginner%20cookbook):从零跑通完整更新闭环
diff --git a/website/tools/releaselog/GeneralUpdateToolsReleaselog.md b/website/tools/releaselog/GeneralUpdateToolsReleaselog.md
new file mode 100644
index 0000000..6dbe8bf
--- /dev/null
+++ b/website/tools/releaselog/GeneralUpdateToolsReleaselog.md
@@ -0,0 +1,45 @@
+---
+title: GeneralUpdate.Tools
+authors: juster
+tags: [log, tools]
+---
+
+# GeneralUpdate.Tools Release Log
+
+### 2026-06-14 — `v20260614061359`
+
+- Added the Mobile packaging workflow for APK/AAB files and Android projects: metadata extraction, `dotnet publish`, SHA256 calculation, package upload, and version-record export.
+- Added a real-time build and upload result window.
+
+### 2026-06-04 — `v20260604102526`
+
+- Updated the desktop window and navigation experience with a frameless Ursa window style, emoji navigation icons, and text-based theme and language controls.
+
+### 2026-06-03 — `v20260603132551`
+
+- Fixed the release workflow so published artifacts are retained and attached to the GitHub Release.
+
+### 2026-05-21 — `v20260521100654`, `v20260521093859`
+
+- Improved Simulation by reusing cached test-app builds and bundling the test applications with release artifacts.
+- Fixed test-app lookup to use the executable directory rather than the process base directory.
+
+### 2026-05-20 — `v20260520132608`
+
+- Improved the Simulation workflow and removed trimming that caused runtime failures; added native library extraction.
+
+### 2026-02-17 — `v20260217`
+
+- Updated packaging workflow and project configuration.
+
+### 2026-02-16 — `v20260216`
+
+- Refactored the packaging functionality.
+
+### 2026-02-14 — `v20260214`
+
+- Added project configuration extraction and JSON package generation.
+
+### 2026-01-03 — `v20260103`
+
+- Updated the .NET CI workflow.
diff --git a/website/versioned_docs/version-10.5.0/quickstart/Beginner cookbook.md b/website/versioned_docs/version-10.5.0/quickstart/Beginner cookbook.md
index 70c5e00..76e86c8 100644
--- a/website/versioned_docs/version-10.5.0/quickstart/Beginner cookbook.md
+++ b/website/versioned_docs/version-10.5.0/quickstart/Beginner cookbook.md
@@ -387,7 +387,7 @@ Use this table to diagnose common issues quickly. Most failures trace back to on
1. [GeneralUpdate.Core](../doc/GeneralUpdate.Core):更新策略、事件通知、静默更新、manifest 极简配置
2. [GeneralUpdate.Differential](../doc/GeneralUpdate.Differential):差分算法、并行处理和 Clean/Dirty
3. [GeneralUpdate.Bowl](../doc/GeneralUpdate.Bowl):崩溃监控、备份和失败恢复
-4. [GeneralUpdate.Tools](./GeneralUpdate.PacketTool):补丁包、Hash、OSS Config、Simulation 的完整操作指南
+4. [GeneralUpdate.Tools](/tools/quickstart/GeneralUpdate.PacketTool):补丁包、Hash、OSS Config、Simulation 的完整操作指南
## 安装目录注意事项