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/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/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/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/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/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 预览选项。 + +点击 **保存设置**立即持久化;**恢复默认**会重置上传、认证、仿真和功能开关配置。 + +--- + ## 推荐发布工作流 ### 桌面端更新 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" ] } ]