From 549a494c9708989d226350f4794acb54a1321422 Mon Sep 17 00:00:00 2001 From: Juster Zhu Date: Sun, 22 Nov 2026 20:41:13 +0800 Subject: [PATCH 1/3] docs: expand GeneralUpdate.Tools guide Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../quickstart/GeneralUpdate.PacketTool.md | 65 ++++++++++++++++--- .../quickstart/GeneralUpdate.PacketTool.md | 65 ++++++++++++++++--- .../quickstart/GeneralUpdate.PacketTool.md | 65 ++++++++++++++++--- 3 files changed, 171 insertions(+), 24 deletions(-) diff --git a/website/docs/quickstart/GeneralUpdate.PacketTool.md b/website/docs/quickstart/GeneralUpdate.PacketTool.md index cf14445..a7075c9 100644 --- a/website/docs/quickstart/GeneralUpdate.PacketTool.md +++ b/website/docs/quickstart/GeneralUpdate.PacketTool.md @@ -32,17 +32,21 @@ dotnet run --project GeneralUpdate.Tools.csproj > Simulation 模块内部会调用 `dotnet publish` 构建测试应用,因此使用仿真功能时必须安装 .NET SDK。Mobile 模块的项目模式(Build & Locate)也会调用 `dotnet publish`,同样需要 .NET SDK。仅运行 Patch / Extension / OSS / Config 模块以及 Mobile 的文件模式则不需要。 -## 七个模块速览 +## 左侧导航模块 | 模块 | 你提供 | 工具产出 | 下游消费者 | |------|--------|----------|------------| -| **Patch** | 旧版本目录 + 新版本目录 | `{name}.zip`(含 `.patch` 文件、新文件、`generalupdate.delete.json`) | Server、OSS/CDN、Core Upgrade 进程 | -| **Extension** | 扩展源目录 + 元数据 | `{name}_{version}.zip`(含 `manifest.json`) | `GeneralUpdate.Extension` 组件 | -| **OSS Config** | 包名、版本、下载 URL、本地 ZIP(计算 Hash) | `oss_config.json`(版本数组) | OSS 客户端、对象存储发布流程 | -| **Config** | Client/Upgrade 的 `.csproj` | `generalupdate.manifest.json` + `sample_output/` 发布目录 | Client/Upgrade 启动引导 | -| **Simulation** | 旧版本目录 + 补丁 ZIP | 本地更新服务 + `simulation_report.md` | 发布前质量把关 | -| **Hash** | 本地文件(ZIP) | SHA256 小写十六进制字符串 | 完整性校验、服务端版本记录 | -| **Mobile** | APK/AAB 文件或 MAUI/Avalonia Android 的 `.csproj` | `mobile_version_{timestamp}.json` 版本记录 | 移动端更新服务端、GeneralUpdate.Avalonia/Maui 组件 | +| **补丁包(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 配置**的“计算”和 **移动端**的元数据分析中。 +::: --- @@ -463,6 +467,51 @@ Generate Sample 额外输出: --- +## 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 预览选项。 + +点击 **保存设置**立即持久化;**恢复默认**会重置上传、认证、仿真和功能开关配置。 + +--- + ## 推荐发布工作流 ### 桌面端更新 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 5a3f413..f154433 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 @@ -28,17 +28,21 @@ Go to [GeneralUpdate.Tools Releases](https://github.com/GeneralLibrary/GeneralUp > 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. -## Seven modules at a glance +## Sidebar modules | Module | What you provide | What the tool produces | Downstream consumer | |--------|-----------------|----------------------|---------------------| -| **Patch** | Old version directory + new version directory | `{name}.zip` (contains `.patch` files, new files, `generalupdate.delete.json`) | Server, OSS/CDN, Core Upgrade process | -| **Extension** | Extension source directory + metadata | `{name}_{version}.zip` (contains `manifest.json`) | `GeneralUpdate.Extension` component | -| **OSS Config** | Package name, version, download URL, local ZIP (for hash) | `oss_config.json` (version array) | OSS client, object storage publish flow | -| **Config** | Client/Upgrade `.csproj` files | `generalupdate.manifest.json` + `sample_output/` publish directory | Client/Upgrade bootstrap | -| **Simulation** | Old version directory + patch ZIP | Local update server + `simulation_report.md` | Pre-release QA gate | -| **Hash** | Local file (ZIP) | SHA256 lowercase hex string | Integrity check, server-side version records | -| **Mobile** | APK/AAB file or MAUI/Avalonia Android `.csproj` | `mobile_version_{timestamp}.json` version record | Mobile update server, GeneralUpdate.Avalonia/Maui components | +| **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. +::: --- @@ -443,6 +447,51 @@ Supports two modes: --- +## 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 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 0b9f0d9..dca64c5 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 @@ -32,17 +32,21 @@ dotnet run --project GeneralUpdate.Tools.csproj > Simulation 模块内部会调用 `dotnet publish` 构建测试应用,因此使用仿真功能时必须安装 .NET SDK。Mobile 模块的项目模式(Build & Locate)也会调用 `dotnet publish`,同样需要 .NET SDK。仅运行 Patch / Extension / OSS / Config 模块以及 Mobile 的文件模式则不需要。 -## 七个模块速览 +## 左侧导航模块 | 模块 | 你提供 | 工具产出 | 下游消费者 | |------|--------|----------|------------| -| **Patch** | 旧版本目录 + 新版本目录 | `{name}.zip`(含 `.patch` 文件、新文件、`generalupdate.delete.json`) | Server、OSS/CDN、Core Upgrade 进程 | -| **Extension** | 扩展源目录 + 元数据 | `{name}_{version}.zip`(含 `manifest.json`) | `GeneralUpdate.Extension` 组件 | -| **OSS Config** | 包名、版本、下载 URL、本地 ZIP(计算 Hash) | `oss_config.json`(版本数组) | OSS 客户端、对象存储发布流程 | -| **Config** | Client/Upgrade 的 `.csproj` | `generalupdate.manifest.json` + `sample_output/` 发布目录 | Client/Upgrade 启动引导 | -| **Simulation** | 旧版本目录 + 补丁 ZIP | 本地更新服务 + `simulation_report.md` | 发布前质量把关 | -| **Hash** | 本地文件(ZIP) | SHA256 小写十六进制字符串 | 完整性校验、服务端版本记录 | -| **Mobile** | APK/AAB 文件或 MAUI/Avalonia Android 的 `.csproj` | `mobile_version_{timestamp}.json` 版本记录 | 移动端更新服务端、GeneralUpdate.Avalonia/Maui 组件 | +| **补丁包(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 配置**的“计算”和 **移动端**的元数据分析中。 +::: --- @@ -458,6 +462,51 @@ Generate Sample 额外输出: --- +## 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 预览选项。 + +点击 **保存设置**立即持久化;**恢复默认**会重置上传、认证、仿真和功能开关配置。 + +--- + ## 推荐发布工作流 ### 桌面端更新 From 8404f9834cc9f441f5acfeb3a68818ae1e9a7faf Mon Sep 17 00:00:00 2001 From: Juster Zhu Date: Sun, 22 Nov 2026 21:21:38 +0800 Subject: [PATCH 2/3] docs: add product release logs and tools navigation Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../GeneralUpdateAvaloniaReleaselog.md | 20 +++++++++ .../GeneralUpdateToolsReleaselog.md | 45 +++++++++++++++++++ website/docusaurus.config.js | 23 ++++++++++ .../releaselog/GeneralZipReleaselog.md | 4 +- .../releaselog/GeneralZipReleaselog.md | 4 +- .../releaselog/GeneralZipReleaselog.md | 4 +- .../releaselog/GeneralZipReleaselog.md | 4 +- .../GeneralUpdateAvaloniaReleaselog.md | 20 +++++++++ .../releaselog/GeneralUpdateMauiReleaselog.md | 13 ++++++ .../GeneralUpdateToolsReleaselog.md | 45 +++++++++++++++++++ .../GeneralUpdateToolsReleaselog.md | 45 +++++++++++++++++++ .../releaselog/GeneralUpdateMauiReleaselog.md | 13 ++++++ website/sidebars.guavalonia.js | 6 +++ website/sidebars.gumaui.js | 6 +++ website/sidebars.js | 1 + .../GeneralUpdateToolsReleaselog.md | 45 +++++++++++++++++++ .../version-10.5.0-sidebars.json | 3 +- 17 files changed, 292 insertions(+), 9 deletions(-) create mode 100644 website/avalonia/releaselog/GeneralUpdateAvaloniaReleaselog.md create mode 100644 website/docs/releaselog/GeneralUpdateToolsReleaselog.md create mode 100644 website/i18n/en/docusaurus-plugin-content-docs-guavalonia/current/releaselog/GeneralUpdateAvaloniaReleaselog.md create mode 100644 website/i18n/en/docusaurus-plugin-content-docs-gumaui/current/releaselog/GeneralUpdateMauiReleaselog.md create mode 100644 website/i18n/en/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateToolsReleaselog.md create mode 100644 website/i18n/en/docusaurus-plugin-content-docs/version-10.5.0/releaselog/GeneralUpdateToolsReleaselog.md create mode 100644 website/maui/releaselog/GeneralUpdateMauiReleaselog.md create mode 100644 website/versioned_docs/version-10.5.0/releaselog/GeneralUpdateToolsReleaselog.md diff --git a/website/avalonia/releaselog/GeneralUpdateAvaloniaReleaselog.md b/website/avalonia/releaselog/GeneralUpdateAvaloniaReleaselog.md new file mode 100644 index 0000000..a9ceb3f --- /dev/null +++ b/website/avalonia/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/docs/releaselog/GeneralUpdateToolsReleaselog.md b/website/docs/releaselog/GeneralUpdateToolsReleaselog.md new file mode 100644 index 0000000..6dbe8bf --- /dev/null +++ b/website/docs/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/docusaurus.config.js b/website/docusaurus.config.js index 1926e46..952ba17 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -193,6 +193,29 @@ const config = { { label: 'GeneralUpdate.Avalonia', docsPluginId: 'guavalonia', basePath: '/avalonia' }, ], }, + { + type: 'dropdown', + label: 'GeneralUpdate.Tools', + position: 'left', + items: [ + { + type: 'doc', + docId: 'quickstart/GeneralUpdate.PacketTool', + docsPluginId: 'default', + label: '在线帮助', + }, + { + type: 'doc', + docId: 'releaselog/GeneralUpdateToolsReleaselog', + docsPluginId: 'default', + label: 'Release Log', + }, + { + href: 'https://github.com/GeneralLibrary/GeneralUpdate.Tools/releases', + label: 'GitHub Releases', + }, + ], + }, { type: 'docSidebar', sidebarId: 'agentSkillsSidebar', diff --git a/website/generalzip/releaselog/GeneralZipReleaselog.md b/website/generalzip/releaselog/GeneralZipReleaselog.md index c1cbe5f..5d40982 100644 --- a/website/generalzip/releaselog/GeneralZipReleaselog.md +++ b/website/generalzip/releaselog/GeneralZipReleaselog.md @@ -7,9 +7,9 @@ tags: [log] # 📒Release log -### 📍2026-11-20 — v2.0.0 能力扩展(待发布) +### 📍2026-11-20 — v0.0.2-beta 能力扩展(待发布) -*以下变更已合入 [GeneralZip 仓库](https://github.com/GeneralLibrary/GeneralZip) `main` 分支(PR #1、PR #2),组件版本已升至 `2.0.0`,尚未打发布 tag;正式发布后此处将标注 NuGet 版本号。* +*以下变更已合入 [GeneralZip 仓库](https://github.com/GeneralLibrary/GeneralZip) `main` 分支(PR #1、PR #2),对应版本为 `0.0.2-beta`;正式发布后此处将标注 NuGet 版本号。* - **隐式引导(破坏性重构)**: Rust 原生核心改为在 `GeneralZipFormatRegistry.Default` 首次构造时自动装配——自动加载核心、按能力位注册 7z/RAR 提供者、注入原生编解码委托,自定义注册表场景由编解码路由 `EnsureBridge()` 兜底;`GeneralZip.Initialize()` 与 `GeneralZipNative.Initialize()` 已移除,改用 `NativeCoreLoader.TryLoad()` 探测核心可用性 - **一行式归档操作**: 门面新增 `Append/AppendAsync`(向已有 ZIP 归档追加条目)、`Remove/RemoveAsync`(按条目名删除)、`Convert/ConvertAsync`(跨格式转换)——读出→重写语义;加密归档转换时自动继承原加密算法与口令,杜绝静默产出明文包 diff --git a/website/generalzip_versioned_docs/version-0.0.2-beta/releaselog/GeneralZipReleaselog.md b/website/generalzip_versioned_docs/version-0.0.2-beta/releaselog/GeneralZipReleaselog.md index c1cbe5f..5d40982 100644 --- a/website/generalzip_versioned_docs/version-0.0.2-beta/releaselog/GeneralZipReleaselog.md +++ b/website/generalzip_versioned_docs/version-0.0.2-beta/releaselog/GeneralZipReleaselog.md @@ -7,9 +7,9 @@ tags: [log] # 📒Release log -### 📍2026-11-20 — v2.0.0 能力扩展(待发布) +### 📍2026-11-20 — v0.0.2-beta 能力扩展(待发布) -*以下变更已合入 [GeneralZip 仓库](https://github.com/GeneralLibrary/GeneralZip) `main` 分支(PR #1、PR #2),组件版本已升至 `2.0.0`,尚未打发布 tag;正式发布后此处将标注 NuGet 版本号。* +*以下变更已合入 [GeneralZip 仓库](https://github.com/GeneralLibrary/GeneralZip) `main` 分支(PR #1、PR #2),对应版本为 `0.0.2-beta`;正式发布后此处将标注 NuGet 版本号。* - **隐式引导(破坏性重构)**: Rust 原生核心改为在 `GeneralZipFormatRegistry.Default` 首次构造时自动装配——自动加载核心、按能力位注册 7z/RAR 提供者、注入原生编解码委托,自定义注册表场景由编解码路由 `EnsureBridge()` 兜底;`GeneralZip.Initialize()` 与 `GeneralZipNative.Initialize()` 已移除,改用 `NativeCoreLoader.TryLoad()` 探测核心可用性 - **一行式归档操作**: 门面新增 `Append/AppendAsync`(向已有 ZIP 归档追加条目)、`Remove/RemoveAsync`(按条目名删除)、`Convert/ConvertAsync`(跨格式转换)——读出→重写语义;加密归档转换时自动继承原加密算法与口令,杜绝静默产出明文包 diff --git a/website/i18n/en/docusaurus-plugin-content-docs-generalzip/current/releaselog/GeneralZipReleaselog.md b/website/i18n/en/docusaurus-plugin-content-docs-generalzip/current/releaselog/GeneralZipReleaselog.md index f026b2a..2de4c87 100644 --- a/website/i18n/en/docusaurus-plugin-content-docs-generalzip/current/releaselog/GeneralZipReleaselog.md +++ b/website/i18n/en/docusaurus-plugin-content-docs-generalzip/current/releaselog/GeneralZipReleaselog.md @@ -7,9 +7,9 @@ tags: [log] # 📒Release log -### 📍2026-11-20 — v2.0.0 capability expansion (unreleased) +### 📍2026-11-20 — v0.0.2-beta capability expansion (unreleased) -*These changes are merged to the [`main` branch of the GeneralZip repository](https://github.com/GeneralLibrary/GeneralZip) (PR #1, PR #2); the component version has moved to `2.0.0` but no release tag has been cut yet — the NuGet version will be noted here once published.* +*These changes are merged to the [`main` branch of the GeneralZip repository](https://github.com/GeneralLibrary/GeneralZip) (PR #1, PR #2) and correspond to version `0.0.2-beta`; the NuGet version will be noted here once published.* - **Implicit bootstrap (breaking refactor)**: the Rust native core is now assembled automatically when `GeneralZipFormatRegistry.Default` is first constructed — the core is loaded, 7z/RAR providers are registered per capability bits, and the native codec delegates are injected; custom registries are covered by the codec router's `EnsureBridge()` fallback. `GeneralZip.Initialize()` and `GeneralZipNative.Initialize()` have been removed — use `NativeCoreLoader.TryLoad()` to probe core availability - **One-line archive operations**: the facade gains `Append/AppendAsync` (append entries to an existing ZIP archive), `Remove/RemoveAsync` (delete entries by name) and `Convert/ConvertAsync` (cross-format conversion) — read→rewrite semantics; converting an encrypted archive automatically inherits its algorithm and password, never silently producing a plaintext output diff --git a/website/i18n/en/docusaurus-plugin-content-docs-generalzip/version-0.0.2-beta/releaselog/GeneralZipReleaselog.md b/website/i18n/en/docusaurus-plugin-content-docs-generalzip/version-0.0.2-beta/releaselog/GeneralZipReleaselog.md index f026b2a..2de4c87 100644 --- a/website/i18n/en/docusaurus-plugin-content-docs-generalzip/version-0.0.2-beta/releaselog/GeneralZipReleaselog.md +++ b/website/i18n/en/docusaurus-plugin-content-docs-generalzip/version-0.0.2-beta/releaselog/GeneralZipReleaselog.md @@ -7,9 +7,9 @@ tags: [log] # 📒Release log -### 📍2026-11-20 — v2.0.0 capability expansion (unreleased) +### 📍2026-11-20 — v0.0.2-beta capability expansion (unreleased) -*These changes are merged to the [`main` branch of the GeneralZip repository](https://github.com/GeneralLibrary/GeneralZip) (PR #1, PR #2); the component version has moved to `2.0.0` but no release tag has been cut yet — the NuGet version will be noted here once published.* +*These changes are merged to the [`main` branch of the GeneralZip repository](https://github.com/GeneralLibrary/GeneralZip) (PR #1, PR #2) and correspond to version `0.0.2-beta`; the NuGet version will be noted here once published.* - **Implicit bootstrap (breaking refactor)**: the Rust native core is now assembled automatically when `GeneralZipFormatRegistry.Default` is first constructed — the core is loaded, 7z/RAR providers are registered per capability bits, and the native codec delegates are injected; custom registries are covered by the codec router's `EnsureBridge()` fallback. `GeneralZip.Initialize()` and `GeneralZipNative.Initialize()` have been removed — use `NativeCoreLoader.TryLoad()` to probe core availability - **One-line archive operations**: the facade gains `Append/AppendAsync` (append entries to an existing ZIP archive), `Remove/RemoveAsync` (delete entries by name) and `Convert/ConvertAsync` (cross-format conversion) — read→rewrite semantics; converting an encrypted archive automatically inherits its algorithm and password, never silently producing a plaintext output diff --git a/website/i18n/en/docusaurus-plugin-content-docs-guavalonia/current/releaselog/GeneralUpdateAvaloniaReleaselog.md b/website/i18n/en/docusaurus-plugin-content-docs-guavalonia/current/releaselog/GeneralUpdateAvaloniaReleaselog.md new file mode 100644 index 0000000..a9ceb3f --- /dev/null +++ b/website/i18n/en/docusaurus-plugin-content-docs-guavalonia/current/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/current/releaselog/GeneralUpdateMauiReleaselog.md b/website/i18n/en/docusaurus-plugin-content-docs-gumaui/current/releaselog/GeneralUpdateMauiReleaselog.md new file mode 100644 index 0000000..4832269 --- /dev/null +++ b/website/i18n/en/docusaurus-plugin-content-docs-gumaui/current/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/current/releaselog/GeneralUpdateToolsReleaselog.md b/website/i18n/en/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateToolsReleaselog.md new file mode 100644 index 0000000..6dbe8bf --- /dev/null +++ b/website/i18n/en/docusaurus-plugin-content-docs/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/version-10.5.0/releaselog/GeneralUpdateToolsReleaselog.md b/website/i18n/en/docusaurus-plugin-content-docs/version-10.5.0/releaselog/GeneralUpdateToolsReleaselog.md new file mode 100644 index 0000000..6dbe8bf --- /dev/null +++ b/website/i18n/en/docusaurus-plugin-content-docs/version-10.5.0/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/maui/releaselog/GeneralUpdateMauiReleaselog.md b/website/maui/releaselog/GeneralUpdateMauiReleaselog.md new file mode 100644 index 0000000..4832269 --- /dev/null +++ b/website/maui/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/sidebars.guavalonia.js b/website/sidebars.guavalonia.js index ddb04c9..8647c7f 100644 --- a/website/sidebars.guavalonia.js +++ b/website/sidebars.guavalonia.js @@ -11,6 +11,12 @@ const sidebars = { 'quickstart/Avalonia Android cookbook', 'doc/GeneralUpdate.Avalonia.Android', 'doc/Avalonia.Android-flow', + { + type: 'category', + label: 'Release Log', + collapsed: true, + items: ['releaselog/GeneralUpdateAvaloniaReleaselog'], + }, ], }; diff --git a/website/sidebars.gumaui.js b/website/sidebars.gumaui.js index 9b64957..a594f4d 100644 --- a/website/sidebars.gumaui.js +++ b/website/sidebars.gumaui.js @@ -11,6 +11,12 @@ const sidebars = { 'quickstart/Maui Android cookbook', 'doc/GeneralUpdate.Maui.Android', 'doc/Maui.Android-flow', + { + type: 'category', + label: 'Release Log', + collapsed: true, + items: ['releaselog/GeneralUpdateMauiReleaselog'], + }, ], }; diff --git a/website/sidebars.js b/website/sidebars.js index ee8dfb8..7d655e7 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -59,6 +59,7 @@ const sidebars = { collapsed: true, items: [ 'releaselog/GeneralUpdateReleaselog', + 'releaselog/GeneralUpdateToolsReleaselog', ], }, ], diff --git a/website/versioned_docs/version-10.5.0/releaselog/GeneralUpdateToolsReleaselog.md b/website/versioned_docs/version-10.5.0/releaselog/GeneralUpdateToolsReleaselog.md new file mode 100644 index 0000000..6dbe8bf --- /dev/null +++ b/website/versioned_docs/version-10.5.0/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_sidebars/version-10.5.0-sidebars.json b/website/versioned_sidebars/version-10.5.0-sidebars.json index 07b2068..0c080aa 100644 --- a/website/versioned_sidebars/version-10.5.0-sidebars.json +++ b/website/versioned_sidebars/version-10.5.0-sidebars.json @@ -39,7 +39,8 @@ "label": "Release Log", "collapsed": true, "items": [ - "releaselog/GeneralUpdateReleaselog" + "releaselog/GeneralUpdateReleaselog", + "releaselog/GeneralUpdateToolsReleaselog" ] } ] From d8c83df79d9c9e142e33441789103e8203257d46 Mon Sep 17 00:00:00 2001 From: Juster Zhu Date: Sun, 22 Nov 2026 22:13:13 +0800 Subject: [PATCH 3/3] docs: give Tools its own documentation Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../GeneralUpdateAvaloniaReleaselog.md | 14 +- website/docs/quickstart/Beginner cookbook.md | 2 +- .../quickstart/GeneralUpdate.PacketTool.md | 575 +---------------- .../GeneralUpdateToolsReleaselog.md | 42 +- website/docusaurus.config.js | 45 +- .../GeneralUpdateAvaloniaReleaselog.md | 20 + .../version-0.0.1-beta.10-sidebars.json | 8 +- .../releaselog/GeneralUpdateMauiReleaselog.md | 13 + .../version-0.0.1-beta.3-sidebars.json | 8 +- .../GeneralUpdateAvaloniaReleaselog.md | 20 + .../releaselog/GeneralUpdateMauiReleaselog.md | 13 + .../quickstart/GeneralUpdate.PacketTool.md | 559 +++++++++++++++++ .../GeneralUpdateToolsReleaselog.md | 45 ++ .../current/quickstart/Beginner cookbook.md | 2 +- .../quickstart/GeneralUpdate.PacketTool.md | 556 +---------------- .../GeneralUpdateToolsReleaselog.md | 42 +- .../quickstart/Beginner cookbook.md | 2 +- .../quickstart/GeneralUpdate.PacketTool.md | 573 +++++++++++++++++ .../current/quickstart/Beginner cookbook.md | 2 +- .../quickstart/GeneralUpdate.PacketTool.md | 570 +---------------- .../releaselog/GeneralUpdateMauiReleaselog.md | 6 +- website/sidebars.js | 2 - website/sidebars.tools.js | 14 + website/src/pages/index.js | 2 +- .../ProductsVersionsNavbarItem/index.js | 7 +- .../quickstart/GeneralUpdate.PacketTool.md | 578 ++++++++++++++++++ .../GeneralUpdateToolsReleaselog.md | 45 ++ .../quickstart/Beginner cookbook.md | 2 +- 28 files changed, 1944 insertions(+), 1823 deletions(-) create mode 100644 website/guavalonia_versioned_docs/version-0.0.1-beta.10/releaselog/GeneralUpdateAvaloniaReleaselog.md create mode 100644 website/gumaui_versioned_docs/version-0.0.1-beta.3/releaselog/GeneralUpdateMauiReleaselog.md create mode 100644 website/i18n/en/docusaurus-plugin-content-docs-guavalonia/version-0.0.1-beta.10/releaselog/GeneralUpdateAvaloniaReleaselog.md create mode 100644 website/i18n/en/docusaurus-plugin-content-docs-gumaui/version-0.0.1-beta.3/releaselog/GeneralUpdateMauiReleaselog.md create mode 100644 website/i18n/en/docusaurus-plugin-content-docs-tools/current/quickstart/GeneralUpdate.PacketTool.md create mode 100644 website/i18n/en/docusaurus-plugin-content-docs-tools/current/releaselog/GeneralUpdateToolsReleaselog.md create mode 100644 website/i18n/zh-Hans/docusaurus-plugin-content-docs-tools/current/quickstart/GeneralUpdate.PacketTool.md create mode 100644 website/sidebars.tools.js create mode 100644 website/tools/quickstart/GeneralUpdate.PacketTool.md create mode 100644 website/tools/releaselog/GeneralUpdateToolsReleaselog.md 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 模块把"解析 → 打包 → 上传 → 生成版本记录"这四步收敛到一个界面中。 - -