From 8808fc427381a179c5ab70ed8fed9599fee9e6d9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Apr 2026 11:42:25 +0000 Subject: [PATCH 1/3] Initial plan From 81a4126f21435a6b7605d35612d1bea8cd5358fc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Apr 2026 11:52:22 +0000 Subject: [PATCH 2/3] docs: update ClientCore and Core docs with new API changes from recent PRs - Add AddListenerUpdateInfo() method documentation (PR #166) - Add AddListenerUpdatePrecheck() replacing SetCustomSkipOption (PR #172) - Remove deprecated SetCustomSkipOption from ClientCore docs - Add UpdateOption.EnableSilentUpdate for silent update mode (PR #164) - Add ConfiginfoBuilder zero-configuration builder section (PR #157) - Add DriverDirectory field to Configinfo documentation (PR #145) - Remove SetFieldMappings from Core docs (PR #148) - Update driver upgrade example to use new DriverDirectory approach - Add new examples for precheck, silent update, and ConfiginfoBuilder - Add 2026-04-10 release log entries in English and Chinese - All changes applied to docs/, i18n/zh-Hans/, and i18n/en/" Agent-Logs-Url: https://github.com/GeneralLibrary/GeneralUpdate-Samples/sessions/1116c9d1-3933-4783-83a9-842784e0e6bd Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> --- website/docs/doc/GeneralUpdate.ClientCore.md | 199 +++++++++++++++-- website/docs/doc/GeneralUpdate.Core.md | 52 ++--- .../releaselog/GeneralUpdateReleaselog.md | 15 ++ .../current/doc/GeneralUpdate.ClientCore.md | 200 ++++++++++++++++-- .../current/doc/GeneralUpdate.Core.md | 50 +++-- .../releaselog/GeneralUpdateReleaselog.md | 15 ++ .../current/doc/GeneralUpdate.ClientCore.md | 199 +++++++++++++++-- .../current/doc/GeneralUpdate.Core.md | 52 ++--- .../releaselog/GeneralUpdateReleaselog.md | 15 ++ 9 files changed, 669 insertions(+), 128 deletions(-) diff --git a/website/docs/doc/GeneralUpdate.ClientCore.md b/website/docs/doc/GeneralUpdate.ClientCore.md index deb4ec3..9f914e4 100644 --- a/website/docs/doc/GeneralUpdate.ClientCore.md +++ b/website/docs/doc/GeneralUpdate.ClientCore.md @@ -28,13 +28,20 @@ public class GeneralClientBootstrap : AbstractBootstrap customFunc) ``` -#### SetCustomSkipOption 方法 +#### AddListenerUpdateInfo 方法 + +注册更新版本信息回调。版本验证完成后立即触发,可用于展示更新日志或版本列表。 + +```csharp +public GeneralClientBootstrap AddListenerUpdateInfo( + Action callbackAction) +``` + +**UpdateInfoEventArgs 属性:** +- `Info`: `VersionRespDTO` — 服务端返回的版本响应数据,包含可用版本列表及每个版本的 `UpdateLog` 字段 + +**示例:** +```csharp +.AddListenerUpdateInfo((sender, e) => +{ + foreach (var v in e.Info.Body ?? []) + Console.WriteLine($"{v.Version}: {v.UpdateLog}"); +}) +``` + +#### AddListenerUpdatePrecheck 方法 -设置自定义跳过选项,允许用户决定是否继续更新。 +注册更新预检回调,将更新信息通知和跳过更新决策合并为单一入口。回调接收完整的 `UpdateInfoEventArgs`(版本列表、强制更新标志等),返回 `true` 跳过更新,返回 `false` 继续更新。 +> **注意:** 此方法替代了旧的 `AddListenerUpdateInfo` + `SetCustomSkipOption` 组合写法。`IsForcibly` 为强制更新时,回调返回值将被忽略,更新始终执行。 + +```csharp +public GeneralClientBootstrap AddListenerUpdatePrecheck( + Func precheckFunc) +``` + +**示例:** ```csharp -public GeneralClientBootstrap SetCustomSkipOption(Func customSkipFunc) +.AddListenerUpdatePrecheck(updateInfo => +{ + // 在此可访问完整版本信息 + bool userChoseSkip = ShowUpdateDialog(updateInfo.Info); + return userChoseSkip; // true = 跳过, false = 继续更新 +}) ``` --- @@ -346,6 +387,11 @@ public class Configinfo /// Linux 平台下的脚本,用于在更新完成后为文件分配权限 /// public string Script { get; set; } + + /// + /// 驱动程序目录路径,指定包含需要更新的驱动文件的目录 + /// + public string DriverDirectory { get; set; } } ``` @@ -377,12 +423,76 @@ public enum UpdateOption /// /// 是否在更新前启用备份功能,默认启用;设置为 false 则不进行备份 /// - BackUp + BackUp, + + /// + /// 是否启用静默更新模式。启用后将在后台轮询检测新版本、静默下载更新包, + /// 并在主程序退出后自动启动升级流程,不影响用户的正常使用。 + /// + EnableSilentUpdate } ``` --- +## ConfiginfoBuilder 构建器 + +`ConfiginfoBuilder` 是零配置模式的 `Configinfo` 构建器,灵感来自 [Velopack](https://github.com/velopack/velopack) 的设计。只需提供三个必填参数即可自动生成完整的平台适配配置。 + +**命名空间:** `GeneralUpdate.Common.Shared.Object` + +### 特性 + +- 仅需三个参数:`UpdateUrl`、`Token`、`Scheme` +- 自动从 `.csproj` 文件提取应用名称、版本号和发布者信息 +- 自动适配 Windows / Linux / macOS 平台差异(路径、权限脚本等) +- 安装路径默认使用宿主程序所在目录(`AppDomain.CurrentDomain.BaseDirectory`) + +### 快速使用 + +```csharp +using GeneralUpdate.Common.Shared.Object; + +// 零配置:从 .csproj 自动提取名称、版本、发布者 +var config = ConfiginfoBuilder + .Create("https://api.example.com/updates", "your-token", "Bearer") + .Build(); + +await new GeneralClientBootstrap() + .SetConfig(config) + .LaunchAsync(); +``` + +### 自定义覆盖 + +```csharp +var config = ConfiginfoBuilder + .Create("https://api.example.com/updates", "your-token", "Bearer") + .SetAppName("CustomApp.exe") // 覆盖自动检测的名称 + .SetClientVersion("2.0.0") // 覆盖自动检测的版本 + .SetInstallPath("/custom/path") // 覆盖安装路径 + .Build(); +``` + +### 自动提取规则 + +| 配置项 | 提取来源 | csproj 字段 | 映射目标 | +|--------|----------|-------------|----------| +| 应用名称 | 项目文件 | `` 或文件名 | `AppName`、`MainAppName` | +| 版本号 | 项目文件 | `` | `ClientVersion`、`UpgradeClientVersion` | +| 发布者 | 项目文件 | `` 或 `` | `ProductId` | +| 安装路径 | 宿主程序运行时目录 | — | `InstallPath` | + +### 平台支持 + +| 平台 | 应用名称后缀 | 默认脚本 | +|------|------------|---------| +| Windows | `.exe` | 无 | +| Linux | 无后缀 | chmod 权限脚本 | +| macOS | 无后缀 | chmod 权限脚本 | + +--- + ## 实际使用示例 ### 示例 1:基本更新流程 @@ -518,7 +628,7 @@ await new GeneralClientBootstrap() .LaunchAsync(); ``` -### 示例 5:自定义操作和跳过选项 +### 示例 5:更新预检与跳过(AddListenerUpdatePrecheck) ```csharp using GeneralUpdate.ClientCore; @@ -533,20 +643,62 @@ var config = new Configinfo await new GeneralClientBootstrap() .SetConfig(config) - // 添加自定义操作(更新前检查环境) - .AddCustomOption(async () => + // 统一的更新预检回调:可获取版本信息并决定是否跳过 + .AddListenerUpdatePrecheck(updateInfo => { - Console.WriteLine("正在检查运行环境..."); - await Task.Delay(1000); - // 检查磁盘空间、依赖项等 - Console.WriteLine("环境检查完成"); + Console.WriteLine($"发现 {updateInfo.Info.Body?.Count ?? 0} 个新版本"); + Console.WriteLine("是否现在更新?(y/n)"); + var input = Console.ReadLine(); + return input?.ToLower() != "y"; // true = 跳过, false = 继续更新 }) - // 设置用户跳过选项 - .SetCustomSkipOption(() => + .AddListenerException((sender, args) => { - Console.WriteLine("发现新版本,是否更新?(y/n)"); - var input = Console.ReadLine(); - return input?.ToLower() == "y"; + Console.WriteLine($"更新异常:{args.Exception.Message}"); + }) + .LaunchAsync(); +``` + +### 示例 6:静默更新模式(EnableSilentUpdate) + +```csharp +using GeneralUpdate.ClientCore; +using GeneralUpdate.Common.Internal; +using GeneralUpdate.Common.Internal.Bootstrap; + +var config = new Configinfo +{ + UpdateUrl = "http://your-server.com/api/update/check", + ClientVersion = "1.0.0.0", + InstallPath = AppDomain.CurrentDomain.BaseDirectory +}; + +// 启用静默更新:后台每 20 分钟轮询,主程序退出后自动启动升级 +await new GeneralClientBootstrap() + .SetConfig(config) + .Option(UpdateOption.EnableSilentUpdate, true) + .AddListenerException((sender, args) => + { + Console.WriteLine($"静默更新异常:{args.Exception.Message}"); + }) + .LaunchAsync(); +``` + +### 示例 7:使用 ConfiginfoBuilder 零配置构建 + +```csharp +using GeneralUpdate.ClientCore; +using GeneralUpdate.Common.Shared.Object; + +// 从 .csproj 自动提取应用名称、版本和发布者 +var config = ConfiginfoBuilder + .Create("http://your-server.com/api/update/check", "your-token", "Bearer") + .Build(); + +await new GeneralClientBootstrap() + .SetConfig(config) + .AddListenerException((sender, args) => + { + Console.WriteLine($"更新异常:{args.Exception.Message}"); }) .LaunchAsync(); ``` @@ -577,12 +729,21 @@ await new GeneralClientBootstrap() - 黑名单中的文件和目录不会被更新 - 常用于保护配置文件、用户数据等 +6. **更新预检回调** + - `AddListenerUpdatePrecheck` 已替代旧的 `SetCustomSkipOption` + `AddListenerUpdateInfo` 组合 + - 强制更新(`IsForcibly = true`)时,回调返回值被忽略,更新始终执行 + +7. **静默更新** + - `EnableSilentUpdate` 不改变默认更新行为,需显式启用 + - 静默模式下,升级助手将在主程序退出事件触发后才启动 + ### 💡 最佳实践 +- **零配置构建**:优先使用 `ConfiginfoBuilder.Create()` 减少手动配置错误 - **备份策略**:始终启用 BackUp 选项,以便更新失败时可以回滚 - **差异更新**:启用 Patch 选项以减少下载量和更新时间 - **错误处理**:实现完整的异常监听和错误处理逻辑 -- **用户体验**:在更新前提示用户并允许选择更新时机 +- **用户体验**:使用 `AddListenerUpdatePrecheck` 在更新前提示用户并允许选择更新时机 - **测试验证**:在生产环境部署前充分测试更新流程 --- diff --git a/website/docs/doc/GeneralUpdate.Core.md b/website/docs/doc/GeneralUpdate.Core.md index 7e60681..33bb355 100644 --- a/website/docs/doc/GeneralUpdate.Core.md +++ b/website/docs/doc/GeneralUpdate.Core.md @@ -204,17 +204,6 @@ public GeneralUpdateBootstrap AddListenerException( Action callbackAction) ``` -#### SetFieldMappings 方法 - -设置字段映射表,用于解析驱动包信息。 - -```csharp -public GeneralUpdateBootstrap SetFieldMappings(Dictionary fieldMappings) -``` - -**参数:** -- `fieldMappings`: 字段映射字典,键为英文字段名,值为本地化字段名 - --- ## 配置类详解 @@ -387,26 +376,41 @@ catch (Exception e) } ``` -### 示例 2:启用驱动升级 +### 示例 2:启用驱动升级 + +驱动升级通过 `GeneralUpdate.ClientCore` 中的 `Configinfo.DriverDirectory` 字段传入驱动目录,`GeneralUpdate.Core` 中的 `DrivelutionMiddleware` 会自动处理驱动安装。 + +在 `ClientCore` 侧配置: ```csharp -using GeneralUpdate.Core; -using GeneralUpdate.Common.Internal.Bootstrap; +using GeneralUpdate.ClientCore; +using GeneralUpdate.Common.Shared.Object; -// 中文字段映射表 -var fieldMappingsCN = new Dictionary +var config = new Configinfo { - { "DriverName", "驱动名称" }, - { "DriverVersion", "驱动版本" }, - { "DriverDescription", "驱动描述" }, - { "InstallPath", "安装路径" } + UpdateUrl = "http://your-server.com/api/update/check", + ClientVersion = "1.0.0.0", + InstallPath = AppDomain.CurrentDomain.BaseDirectory, + // 指定包含驱动文件的目录 + DriverDirectory = @"C:\Drivers\Updates" }; +await new GeneralClientBootstrap() + .SetConfig(config) + .AddListenerException((sender, args) => + { + Console.WriteLine($"更新异常: {args.Exception.Message}"); + }) + .LaunchAsync(); +``` + +在 `Core`(升级助手)侧,无需额外配置,`DrivelutionMiddleware` 会自动从 `PipelineContext` 获取驱动目录并执行驱动安装: + +```csharp +using GeneralUpdate.Core; + await new GeneralUpdateBootstrap() - // 设置字段映射表 - .SetFieldMappings(fieldMappingsCN) - // 启用驱动更新 - .Option(UpdateOption.Drive, true) + .Option(UpdateOption.Drive, true) // 启用驱动升级 .AddListenerException((sender, args) => { Console.WriteLine($"升级异常: {args.Exception.Message}"); diff --git a/website/docs/releaselog/GeneralUpdateReleaselog.md b/website/docs/releaselog/GeneralUpdateReleaselog.md index 3bbd35a..4ae8c3d 100644 --- a/website/docs/releaselog/GeneralUpdateReleaselog.md +++ b/website/docs/releaselog/GeneralUpdateReleaselog.md @@ -7,6 +7,21 @@ tags: [log] # 📒Release log +### 📍2026-04-10 + +- Add `AddListenerUpdatePrecheck(Func)` to `GeneralClientBootstrap` — unified entry that receives the full version info and returns `true` to skip or `false` to proceed; replaces the combined use of `AddListenerUpdateInfo` + `SetCustomSkipOption`. Forced-update (`IsForcibly`) versions always proceed regardless of the callback return value. +- Remove deprecated `SetCustomSkipOption` from `GeneralClientBootstrap`. +- Add `AddListenerUpdateInfo(Action)` to `GeneralClientBootstrap` and `GeneralUpdateBootstrap` — dispatched immediately after version validation; each `VersionInfo` entry now carries a new `UpdateLog` field for release notes. +- Add opt-in silent update mode (`UpdateOption.EnableSilentUpdate`) to `GeneralClientBootstrap` — polls every 20 minutes in the background, prepares the update package silently, and launches the updater only after the host process exits. +- Add `ConfiginfoBuilder` — zero-configuration builder for `Configinfo`; only `UpdateUrl`, `Token`, and `Scheme` are required; all other fields are auto-detected from the `.csproj` file and the runtime platform (Windows / Linux / macOS). +- Add `DriverDirectory` field to `Configinfo` / `BaseConfigInfo` and propagate it through `ConfigurationMapper`, `ProcessInfo`, and `PipelineContext` to `DrivelutionMiddleware` for driver update support. +- Remove `SetFieldMappings` from `GeneralUpdateBootstrap`. +- Add full lifecycle tracing (`GeneralTracer`) across `GeneralUpdate.Bowl`, `GeneralUpdate.Extension`, `GeneralUpdate.Core`, `GeneralUpdate.ClientCore`, and `GeneralUpdate.Drivelution`. +- Fix `DefaultCleanMatcher.Match` incorrectly returning `null` for same-name files in different directories. +- Fix orphaned temp files in `BinaryHandler.Dirty` causing patch failures on repeated update runs. + + + ### 📍2026-01-06 10.0.0 - Adapt to .NET 10 upgrade and update the versions of referenced components. diff --git a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.ClientCore.md b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.ClientCore.md index f63b17c..c4a7549 100644 --- a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.ClientCore.md +++ b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.ClientCore.md @@ -28,13 +28,20 @@ public class GeneralClientBootstrap : AbstractBootstrap customFunc) ``` -#### SetCustomSkipOption Method +#### AddListenerUpdateInfo Method + +Register an update version info callback. Triggered immediately after version validation and can be used to display changelogs or version lists. + +```csharp +public GeneralClientBootstrap AddListenerUpdateInfo( + Action callbackAction) +``` + +**UpdateInfoEventArgs Properties:** +- `Info`: `VersionRespDTO` — version response data from the server, containing the list of available versions and a `UpdateLog` field per version + +**Example:** +```csharp +.AddListenerUpdateInfo((sender, e) => +{ + foreach (var v in e.Info.Body ?? []) + Console.WriteLine($"{v.Version}: {v.UpdateLog}"); +}) +``` + +#### AddListenerUpdatePrecheck Method + +Register an update precheck callback that merges version-info notification and skip-update decision into a single entry point. The callback receives the full `UpdateInfoEventArgs` (version list, forced-update flag, etc.) and returns `true` to skip or `false` to proceed. -Set custom skip options, allowing users to decide whether to continue with the update. +> **Note:** This method replaces the old `AddListenerUpdateInfo` + `SetCustomSkipOption` combination. When `IsForcibly` is set to true for a version, the callback return value is ignored and the update always proceeds. ```csharp -public GeneralClientBootstrap SetCustomSkipOption(Func customSkipFunc) +public GeneralClientBootstrap AddListenerUpdatePrecheck( + Func precheckFunc) +``` + +**Example:** +```csharp +.AddListenerUpdatePrecheck(updateInfo => +{ + // Full version details available here + bool userChoseSkip = ShowUpdateDialog(updateInfo.Info); + return userChoseSkip; // true = skip, false = proceed +}) ``` --- @@ -346,6 +387,11 @@ public class Configinfo /// Script for Linux platform to assign permissions to files after update completion /// public string Script { get; set; } + + /// + /// Driver directory path specifying the directory containing driver files to be updated + /// + public string DriverDirectory { get; set; } } ``` @@ -379,12 +425,77 @@ public enum UpdateOption /// Whether to enable backup function before update, enabled by default; /// if set to false, no backup will be performed /// - BackUp + BackUp, + + /// + /// Whether to enable silent update mode. When enabled, the client polls for new versions + /// in the background, silently prepares the update package, and launches the updater + /// only after the host application exits — without interrupting normal user operation. + /// + EnableSilentUpdate } ``` --- +## ConfiginfoBuilder + +`ConfiginfoBuilder` is a zero-configuration builder for `Configinfo`, inspired by [Velopack](https://github.com/velopack/velopack)'s design philosophy. Only three required parameters are needed; all other fields are auto-detected from the `.csproj` file and the runtime platform. + +**Namespace:** `GeneralUpdate.Common.Shared.Object` + +### Features + +- Only three parameters required: `UpdateUrl`, `Token`, `Scheme` +- Auto-extracts app name, version, and publisher from `.csproj` file +- Automatically adapts to Windows / Linux / macOS platform differences (paths, permission scripts, etc.) +- Install path defaults to the host program's base directory (`AppDomain.CurrentDomain.BaseDirectory`) + +### Quick Usage + +```csharp +using GeneralUpdate.Common.Shared.Object; + +// Zero-configuration: name, version, and publisher auto-extracted from .csproj +var config = ConfiginfoBuilder + .Create("https://api.example.com/updates", "your-token", "Bearer") + .Build(); + +await new GeneralClientBootstrap() + .SetConfig(config) + .LaunchAsync(); +``` + +### Custom Overrides + +```csharp +var config = ConfiginfoBuilder + .Create("https://api.example.com/updates", "your-token", "Bearer") + .SetAppName("CustomApp.exe") // Override auto-detected name + .SetClientVersion("2.0.0") // Override auto-detected version + .SetInstallPath("/custom/path") // Override install path + .Build(); +``` + +### Auto-Extraction Rules + +| Config Item | Extraction Source | csproj Field | Maps To | +|-------------|------------------|--------------|---------| +| App Name | Project file | `` or filename | `AppName`, `MainAppName` | +| Version | Project file | `` | `ClientVersion`, `UpgradeClientVersion` | +| Publisher | Project file | `` or `` | `ProductId` | +| Install Path | Host program runtime directory | — | `InstallPath` | + +### Platform Support + +| Platform | App Name Suffix | Default Script | +|----------|----------------|----------------| +| Windows | `.exe` | None | +| Linux | No suffix | chmod permission script | +| macOS | No suffix | chmod permission script | + +--- + ## Practical Usage Examples ### Example 1: Basic Update Process @@ -520,7 +631,7 @@ await new GeneralClientBootstrap() .LaunchAsync(); ``` -### Example 5: Custom Operations and Skip Options +### Example 5: Update Precheck and Skip (AddListenerUpdatePrecheck) ```csharp using GeneralUpdate.ClientCore; @@ -535,20 +646,62 @@ var config = new Configinfo await new GeneralClientBootstrap() .SetConfig(config) - // Add custom operation (check environment before update) - .AddCustomOption(async () => + // Unified precheck callback: access version info and decide whether to skip + .AddListenerUpdatePrecheck(updateInfo => { - Console.WriteLine("Checking runtime environment..."); - await Task.Delay(1000); - // Check disk space, dependencies, etc. - Console.WriteLine("Environment check completed"); + Console.WriteLine($"Found {updateInfo.Info.Body?.Count ?? 0} new version(s)"); + Console.WriteLine("Update now? (y/n)"); + var input = Console.ReadLine(); + return input?.ToLower() != "y"; // true = skip, false = proceed }) - // Set user skip option - .SetCustomSkipOption(() => + .AddListenerException((sender, args) => { - Console.WriteLine("New version found, update now? (y/n)"); - var input = Console.ReadLine(); - return input?.ToLower() == "y"; + Console.WriteLine($"Update exception: {args.Exception.Message}"); + }) + .LaunchAsync(); +``` + +### Example 6: Silent Update Mode (EnableSilentUpdate) + +```csharp +using GeneralUpdate.ClientCore; +using GeneralUpdate.Common.Internal; +using GeneralUpdate.Common.Internal.Bootstrap; + +var config = new Configinfo +{ + UpdateUrl = "http://your-server.com/api/update/check", + ClientVersion = "1.0.0.0", + InstallPath = AppDomain.CurrentDomain.BaseDirectory +}; + +// Enable silent update: polls in background every 20 min, launches updater after process exit +await new GeneralClientBootstrap() + .SetConfig(config) + .Option(UpdateOption.EnableSilentUpdate, true) + .AddListenerException((sender, args) => + { + Console.WriteLine($"Silent update exception: {args.Exception.Message}"); + }) + .LaunchAsync(); +``` + +### Example 7: Zero-Configuration with ConfiginfoBuilder + +```csharp +using GeneralUpdate.ClientCore; +using GeneralUpdate.Common.Shared.Object; + +// Auto-extracts app name, version, and publisher from .csproj +var config = ConfiginfoBuilder + .Create("http://your-server.com/api/update/check", "your-token", "Bearer") + .Build(); + +await new GeneralClientBootstrap() + .SetConfig(config) + .AddListenerException((sender, args) => + { + Console.WriteLine($"Update exception: {args.Exception.Message}"); }) .LaunchAsync(); ``` @@ -579,12 +732,21 @@ await new GeneralClientBootstrap() - Files and directories in the blacklist will not be updated - Commonly used to protect configuration files, user data, etc. +6. **Update Precheck Callback** + - `AddListenerUpdatePrecheck` replaces the old `SetCustomSkipOption` + `AddListenerUpdateInfo` combination + - When `IsForcibly` is `true` for a version, the callback return value is ignored and the update always proceeds + +7. **Silent Update** + - `EnableSilentUpdate` does not change default update behavior; it must be explicitly enabled + - In silent mode, the updater is launched only after the host process exit event fires + ### 💡 Best Practices +- **Zero-Configuration**: Prefer `ConfiginfoBuilder.Create()` to reduce manual configuration errors - **Backup Strategy**: Always enable the BackUp option to allow rollback in case of update failure - **Differential Update**: Enable the Patch option to reduce download size and update time - **Error Handling**: Implement complete exception listening and error handling logic -- **User Experience**: Prompt users before updating and allow them to choose update timing +- **User Experience**: Use `AddListenerUpdatePrecheck` to prompt users before updating and allow them to choose update timing - **Testing**: Thoroughly test the update process before production deployment --- diff --git a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md index 882ee84..504a1ce 100644 --- a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md +++ b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md @@ -204,17 +204,6 @@ public GeneralUpdateBootstrap AddListenerException( Action callbackAction) ``` -#### SetFieldMappings Method - -Set field mapping table for parsing driver package information. - -```csharp -public GeneralUpdateBootstrap SetFieldMappings(Dictionary fieldMappings) -``` - -**Parameters:** -- `fieldMappings`: Field mapping dictionary, key is English field name, value is localized field name - --- ## Configuration Class Details @@ -389,24 +378,39 @@ catch (Exception e) ### Example 2: Enable Driver Upgrade +Driver upgrades are configured via the `DriverDirectory` field in `Configinfo` on the `GeneralUpdate.ClientCore` side. The `DrivelutionMiddleware` in `GeneralUpdate.Core` automatically processes driver installation. + +On the `ClientCore` side: + ```csharp -using GeneralUpdate.Core; -using GeneralUpdate.Common.Internal.Bootstrap; +using GeneralUpdate.ClientCore; +using GeneralUpdate.Common.Shared.Object; -// Chinese field mapping table -var fieldMappingsCN = new Dictionary +var config = new Configinfo { - { "DriverName", "驱动名称" }, - { "DriverVersion", "驱动版本" }, - { "DriverDescription", "驱动描述" }, - { "InstallPath", "安装路径" } + UpdateUrl = "http://your-server.com/api/update/check", + ClientVersion = "1.0.0.0", + InstallPath = AppDomain.CurrentDomain.BaseDirectory, + // Specify the directory containing driver files + DriverDirectory = @"C:\Drivers\Updates" }; +await new GeneralClientBootstrap() + .SetConfig(config) + .AddListenerException((sender, args) => + { + Console.WriteLine($"Update exception: {args.Exception.Message}"); + }) + .LaunchAsync(); +``` + +On the `Core` (upgrade assistant) side, no additional configuration is needed — `DrivelutionMiddleware` automatically retrieves the driver directory from `PipelineContext` and performs driver installation: + +```csharp +using GeneralUpdate.Core; + await new GeneralUpdateBootstrap() - // Set field mappings - .SetFieldMappings(fieldMappingsCN) - // Enable driver update - .Option(UpdateOption.Drive, true) + .Option(UpdateOption.Drive, true) // Enable driver upgrade .AddListenerException((sender, args) => { Console.WriteLine($"Upgrade exception: {args.Exception.Message}"); diff --git a/website/i18n/en/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateReleaselog.md b/website/i18n/en/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateReleaselog.md index 07141f3..4d77b8a 100644 --- a/website/i18n/en/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateReleaselog.md +++ b/website/i18n/en/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateReleaselog.md @@ -7,6 +7,21 @@ tags: [log] # 📒Release log +### 📍2026-04-10 + +- Add `AddListenerUpdatePrecheck(Func)` to `GeneralClientBootstrap` — unified entry that receives the full version info and returns `true` to skip or `false` to proceed; replaces the combined use of `AddListenerUpdateInfo` + `SetCustomSkipOption`. Forced-update (`IsForcibly`) versions always proceed regardless of the callback return value. +- Remove deprecated `SetCustomSkipOption` from `GeneralClientBootstrap`. +- Add `AddListenerUpdateInfo(Action)` to `GeneralClientBootstrap` and `GeneralUpdateBootstrap` — dispatched immediately after version validation; each `VersionInfo` entry now carries a new `UpdateLog` field for release notes. +- Add opt-in silent update mode (`UpdateOption.EnableSilentUpdate`) to `GeneralClientBootstrap` — polls every 20 minutes in the background, prepares the update package silently, and launches the updater only after the host process exits. +- Add `ConfiginfoBuilder` — zero-configuration builder for `Configinfo`; only `UpdateUrl`, `Token`, and `Scheme` are required; all other fields are auto-detected from the `.csproj` file and the runtime platform (Windows / Linux / macOS). +- Add `DriverDirectory` field to `Configinfo` / `BaseConfigInfo` and propagate it through `ConfigurationMapper`, `ProcessInfo`, and `PipelineContext` to `DrivelutionMiddleware` for driver update support. +- Remove `SetFieldMappings` from `GeneralUpdateBootstrap`. +- Add full lifecycle tracing (`GeneralTracer`) across `GeneralUpdate.Bowl`, `GeneralUpdate.Extension`, `GeneralUpdate.Core`, `GeneralUpdate.ClientCore`, and `GeneralUpdate.Drivelution`. +- Fix `DefaultCleanMatcher.Match` incorrectly returning `null` for same-name files in different directories. +- Fix orphaned temp files in `BinaryHandler.Dirty` causing patch failures on repeated update runs. + + + - ### 📍2026-01-06 10.0.0 - Adapt to .NET 10 upgrade and update the versions of referenced components. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.ClientCore.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.ClientCore.md index deb4ec3..9f914e4 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.ClientCore.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.ClientCore.md @@ -28,13 +28,20 @@ public class GeneralClientBootstrap : AbstractBootstrap customFunc) ``` -#### SetCustomSkipOption 方法 +#### AddListenerUpdateInfo 方法 + +注册更新版本信息回调。版本验证完成后立即触发,可用于展示更新日志或版本列表。 + +```csharp +public GeneralClientBootstrap AddListenerUpdateInfo( + Action callbackAction) +``` + +**UpdateInfoEventArgs 属性:** +- `Info`: `VersionRespDTO` — 服务端返回的版本响应数据,包含可用版本列表及每个版本的 `UpdateLog` 字段 + +**示例:** +```csharp +.AddListenerUpdateInfo((sender, e) => +{ + foreach (var v in e.Info.Body ?? []) + Console.WriteLine($"{v.Version}: {v.UpdateLog}"); +}) +``` + +#### AddListenerUpdatePrecheck 方法 -设置自定义跳过选项,允许用户决定是否继续更新。 +注册更新预检回调,将更新信息通知和跳过更新决策合并为单一入口。回调接收完整的 `UpdateInfoEventArgs`(版本列表、强制更新标志等),返回 `true` 跳过更新,返回 `false` 继续更新。 +> **注意:** 此方法替代了旧的 `AddListenerUpdateInfo` + `SetCustomSkipOption` 组合写法。`IsForcibly` 为强制更新时,回调返回值将被忽略,更新始终执行。 + +```csharp +public GeneralClientBootstrap AddListenerUpdatePrecheck( + Func precheckFunc) +``` + +**示例:** ```csharp -public GeneralClientBootstrap SetCustomSkipOption(Func customSkipFunc) +.AddListenerUpdatePrecheck(updateInfo => +{ + // 在此可访问完整版本信息 + bool userChoseSkip = ShowUpdateDialog(updateInfo.Info); + return userChoseSkip; // true = 跳过, false = 继续更新 +}) ``` --- @@ -346,6 +387,11 @@ public class Configinfo /// Linux 平台下的脚本,用于在更新完成后为文件分配权限 /// public string Script { get; set; } + + /// + /// 驱动程序目录路径,指定包含需要更新的驱动文件的目录 + /// + public string DriverDirectory { get; set; } } ``` @@ -377,12 +423,76 @@ public enum UpdateOption /// /// 是否在更新前启用备份功能,默认启用;设置为 false 则不进行备份 /// - BackUp + BackUp, + + /// + /// 是否启用静默更新模式。启用后将在后台轮询检测新版本、静默下载更新包, + /// 并在主程序退出后自动启动升级流程,不影响用户的正常使用。 + /// + EnableSilentUpdate } ``` --- +## ConfiginfoBuilder 构建器 + +`ConfiginfoBuilder` 是零配置模式的 `Configinfo` 构建器,灵感来自 [Velopack](https://github.com/velopack/velopack) 的设计。只需提供三个必填参数即可自动生成完整的平台适配配置。 + +**命名空间:** `GeneralUpdate.Common.Shared.Object` + +### 特性 + +- 仅需三个参数:`UpdateUrl`、`Token`、`Scheme` +- 自动从 `.csproj` 文件提取应用名称、版本号和发布者信息 +- 自动适配 Windows / Linux / macOS 平台差异(路径、权限脚本等) +- 安装路径默认使用宿主程序所在目录(`AppDomain.CurrentDomain.BaseDirectory`) + +### 快速使用 + +```csharp +using GeneralUpdate.Common.Shared.Object; + +// 零配置:从 .csproj 自动提取名称、版本、发布者 +var config = ConfiginfoBuilder + .Create("https://api.example.com/updates", "your-token", "Bearer") + .Build(); + +await new GeneralClientBootstrap() + .SetConfig(config) + .LaunchAsync(); +``` + +### 自定义覆盖 + +```csharp +var config = ConfiginfoBuilder + .Create("https://api.example.com/updates", "your-token", "Bearer") + .SetAppName("CustomApp.exe") // 覆盖自动检测的名称 + .SetClientVersion("2.0.0") // 覆盖自动检测的版本 + .SetInstallPath("/custom/path") // 覆盖安装路径 + .Build(); +``` + +### 自动提取规则 + +| 配置项 | 提取来源 | csproj 字段 | 映射目标 | +|--------|----------|-------------|----------| +| 应用名称 | 项目文件 | `` 或文件名 | `AppName`、`MainAppName` | +| 版本号 | 项目文件 | `` | `ClientVersion`、`UpgradeClientVersion` | +| 发布者 | 项目文件 | `` 或 `` | `ProductId` | +| 安装路径 | 宿主程序运行时目录 | — | `InstallPath` | + +### 平台支持 + +| 平台 | 应用名称后缀 | 默认脚本 | +|------|------------|---------| +| Windows | `.exe` | 无 | +| Linux | 无后缀 | chmod 权限脚本 | +| macOS | 无后缀 | chmod 权限脚本 | + +--- + ## 实际使用示例 ### 示例 1:基本更新流程 @@ -518,7 +628,7 @@ await new GeneralClientBootstrap() .LaunchAsync(); ``` -### 示例 5:自定义操作和跳过选项 +### 示例 5:更新预检与跳过(AddListenerUpdatePrecheck) ```csharp using GeneralUpdate.ClientCore; @@ -533,20 +643,62 @@ var config = new Configinfo await new GeneralClientBootstrap() .SetConfig(config) - // 添加自定义操作(更新前检查环境) - .AddCustomOption(async () => + // 统一的更新预检回调:可获取版本信息并决定是否跳过 + .AddListenerUpdatePrecheck(updateInfo => { - Console.WriteLine("正在检查运行环境..."); - await Task.Delay(1000); - // 检查磁盘空间、依赖项等 - Console.WriteLine("环境检查完成"); + Console.WriteLine($"发现 {updateInfo.Info.Body?.Count ?? 0} 个新版本"); + Console.WriteLine("是否现在更新?(y/n)"); + var input = Console.ReadLine(); + return input?.ToLower() != "y"; // true = 跳过, false = 继续更新 }) - // 设置用户跳过选项 - .SetCustomSkipOption(() => + .AddListenerException((sender, args) => { - Console.WriteLine("发现新版本,是否更新?(y/n)"); - var input = Console.ReadLine(); - return input?.ToLower() == "y"; + Console.WriteLine($"更新异常:{args.Exception.Message}"); + }) + .LaunchAsync(); +``` + +### 示例 6:静默更新模式(EnableSilentUpdate) + +```csharp +using GeneralUpdate.ClientCore; +using GeneralUpdate.Common.Internal; +using GeneralUpdate.Common.Internal.Bootstrap; + +var config = new Configinfo +{ + UpdateUrl = "http://your-server.com/api/update/check", + ClientVersion = "1.0.0.0", + InstallPath = AppDomain.CurrentDomain.BaseDirectory +}; + +// 启用静默更新:后台每 20 分钟轮询,主程序退出后自动启动升级 +await new GeneralClientBootstrap() + .SetConfig(config) + .Option(UpdateOption.EnableSilentUpdate, true) + .AddListenerException((sender, args) => + { + Console.WriteLine($"静默更新异常:{args.Exception.Message}"); + }) + .LaunchAsync(); +``` + +### 示例 7:使用 ConfiginfoBuilder 零配置构建 + +```csharp +using GeneralUpdate.ClientCore; +using GeneralUpdate.Common.Shared.Object; + +// 从 .csproj 自动提取应用名称、版本和发布者 +var config = ConfiginfoBuilder + .Create("http://your-server.com/api/update/check", "your-token", "Bearer") + .Build(); + +await new GeneralClientBootstrap() + .SetConfig(config) + .AddListenerException((sender, args) => + { + Console.WriteLine($"更新异常:{args.Exception.Message}"); }) .LaunchAsync(); ``` @@ -577,12 +729,21 @@ await new GeneralClientBootstrap() - 黑名单中的文件和目录不会被更新 - 常用于保护配置文件、用户数据等 +6. **更新预检回调** + - `AddListenerUpdatePrecheck` 已替代旧的 `SetCustomSkipOption` + `AddListenerUpdateInfo` 组合 + - 强制更新(`IsForcibly = true`)时,回调返回值被忽略,更新始终执行 + +7. **静默更新** + - `EnableSilentUpdate` 不改变默认更新行为,需显式启用 + - 静默模式下,升级助手将在主程序退出事件触发后才启动 + ### 💡 最佳实践 +- **零配置构建**:优先使用 `ConfiginfoBuilder.Create()` 减少手动配置错误 - **备份策略**:始终启用 BackUp 选项,以便更新失败时可以回滚 - **差异更新**:启用 Patch 选项以减少下载量和更新时间 - **错误处理**:实现完整的异常监听和错误处理逻辑 -- **用户体验**:在更新前提示用户并允许选择更新时机 +- **用户体验**:使用 `AddListenerUpdatePrecheck` 在更新前提示用户并允许选择更新时机 - **测试验证**:在生产环境部署前充分测试更新流程 --- diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md index 7e60681..33bb355 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md @@ -204,17 +204,6 @@ public GeneralUpdateBootstrap AddListenerException( Action callbackAction) ``` -#### SetFieldMappings 方法 - -设置字段映射表,用于解析驱动包信息。 - -```csharp -public GeneralUpdateBootstrap SetFieldMappings(Dictionary fieldMappings) -``` - -**参数:** -- `fieldMappings`: 字段映射字典,键为英文字段名,值为本地化字段名 - --- ## 配置类详解 @@ -387,26 +376,41 @@ catch (Exception e) } ``` -### 示例 2:启用驱动升级 +### 示例 2:启用驱动升级 + +驱动升级通过 `GeneralUpdate.ClientCore` 中的 `Configinfo.DriverDirectory` 字段传入驱动目录,`GeneralUpdate.Core` 中的 `DrivelutionMiddleware` 会自动处理驱动安装。 + +在 `ClientCore` 侧配置: ```csharp -using GeneralUpdate.Core; -using GeneralUpdate.Common.Internal.Bootstrap; +using GeneralUpdate.ClientCore; +using GeneralUpdate.Common.Shared.Object; -// 中文字段映射表 -var fieldMappingsCN = new Dictionary +var config = new Configinfo { - { "DriverName", "驱动名称" }, - { "DriverVersion", "驱动版本" }, - { "DriverDescription", "驱动描述" }, - { "InstallPath", "安装路径" } + UpdateUrl = "http://your-server.com/api/update/check", + ClientVersion = "1.0.0.0", + InstallPath = AppDomain.CurrentDomain.BaseDirectory, + // 指定包含驱动文件的目录 + DriverDirectory = @"C:\Drivers\Updates" }; +await new GeneralClientBootstrap() + .SetConfig(config) + .AddListenerException((sender, args) => + { + Console.WriteLine($"更新异常: {args.Exception.Message}"); + }) + .LaunchAsync(); +``` + +在 `Core`(升级助手)侧,无需额外配置,`DrivelutionMiddleware` 会自动从 `PipelineContext` 获取驱动目录并执行驱动安装: + +```csharp +using GeneralUpdate.Core; + await new GeneralUpdateBootstrap() - // 设置字段映射表 - .SetFieldMappings(fieldMappingsCN) - // 启用驱动更新 - .Option(UpdateOption.Drive, true) + .Option(UpdateOption.Drive, true) // 启用驱动升级 .AddListenerException((sender, args) => { Console.WriteLine($"升级异常: {args.Exception.Message}"); diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateReleaselog.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateReleaselog.md index eba0b69..19ba0b8 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateReleaselog.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/releaselog/GeneralUpdateReleaselog.md @@ -7,6 +7,21 @@ tags: [log] # 📒更新日志 +## 📍2026-04-10 + +- 新增 `AddListenerUpdatePrecheck(Func)` 到 `GeneralClientBootstrap` —— 统一的更新预检入口,接收完整版本信息并通过返回值决定是否跳过(`true` = 跳过,`false` = 继续);替代旧的 `AddListenerUpdateInfo` + `SetCustomSkipOption` 组合。强制更新(`IsForcibly`)时,回调返回值被忽略,更新始终执行。 +- 移除已废弃的 `SetCustomSkipOption`。 +- 新增 `AddListenerUpdateInfo(Action)` 到 `GeneralClientBootstrap` 和 `GeneralUpdateBootstrap` —— 在版本验证完成后立即触发;`VersionInfo` 新增 `UpdateLog` 字段用于携带版本更新日志。 +- 新增静默更新模式(`UpdateOption.EnableSilentUpdate`)—— 在后台每 20 分钟轮询检测新版本,静默准备更新包,在主程序退出后自动启动升级流程。 +- 新增 `ConfiginfoBuilder` —— `Configinfo` 的零配置构建器,仅需 `UpdateUrl`、`Token`、`Scheme` 三个参数,其他字段自动从 `.csproj` 文件和运行时平台(Windows / Linux / macOS)检测。 +- 新增 `DriverDirectory` 字段到 `Configinfo` / `BaseConfigInfo`,并通过 `ConfigurationMapper`、`ProcessInfo`、`PipelineContext` 传递至 `DrivelutionMiddleware`,以支持驱动更新功能。 +- 移除 `GeneralUpdateBootstrap` 中已废弃的 `SetFieldMappings` 方法。 +- 为 `GeneralUpdate.Bowl`、`GeneralUpdate.Extension`、`GeneralUpdate.Core`、`GeneralUpdate.ClientCore`、`GeneralUpdate.Drivelution` 补充完整的生命周期追踪(`GeneralTracer`)。 +- 修复 `DefaultCleanMatcher.Match` 对不同目录下同名文件错误返回 `null` 的问题。 +- 修复 `BinaryHandler.Dirty` 中遗留临时文件导致重复更新时补丁失败的问题。 + + + ## 📍2026-01-06 10.0.0 - 适配.NET10升级引用组件版本。 From 1ff5a20e251cce3480489fc4c7baf6b5a5be03d0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Apr 2026 12:30:52 +0000 Subject: [PATCH 3/3] docs: fix code-docs discrepancies across all website documentation - Add DriverDirectory to Packet class in Core.md (all 3 copies) - Update .NET version tables to include .NET 10 in Bowl, Core, Differential, Drivelution, GeneralClient.OSS, UpgradeHub docs (all 3 copies each) - Fix malformed version string '9,10' -> '9, 10' in zh-Hans GeneralTracer.md Agent-Logs-Url: https://github.com/GeneralLibrary/GeneralUpdate-Samples/sessions/eacb5b23-1edb-47a0-a533-95ac3b940688 Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> --- website/docs/doc/GeneralClient.OSS.md | 2 +- website/docs/doc/GeneralUpdate.Bowl.md | 2 +- website/docs/doc/GeneralUpdate.Core.md | 7 ++++++- website/docs/doc/GeneralUpdate.Differential.md | 2 +- website/docs/doc/GeneralUpdate.Drivelution.md | 2 +- website/docs/doc/UpgradeHub.md | 2 +- .../current/doc/GeneralClient.OSS.md | 2 +- .../current/doc/GeneralUpdate.Bowl.md | 2 +- .../current/doc/GeneralUpdate.Core.md | 7 ++++++- .../current/doc/GeneralUpdate.Differential.md | 2 +- .../current/doc/GeneralUpdate.Drivelution.md | 2 +- .../current/doc/UpgradeHub.md | 2 +- .../current/doc/GeneralClient.OSS.md | 2 +- .../current/doc/GeneralTracer.md | 2 +- .../current/doc/GeneralUpdate.Bowl.md | 2 +- .../current/doc/GeneralUpdate.Core.md | 7 ++++++- .../current/doc/GeneralUpdate.Differential.md | 2 +- .../current/doc/GeneralUpdate.Drivelution.md | 2 +- .../current/doc/UpgradeHub.md | 2 +- 19 files changed, 34 insertions(+), 19 deletions(-) diff --git a/website/docs/doc/GeneralClient.OSS.md b/website/docs/doc/GeneralClient.OSS.md index f775f52..9d8b79e 100644 --- a/website/docs/doc/GeneralClient.OSS.md +++ b/website/docs/doc/GeneralClient.OSS.md @@ -128,7 +128,7 @@ catch (Exception ex) | Product | Version | | -------------- | ------------- | -| .NET | 5, 6, 7, 8, 9 | +| .NET | 5, 6, 7, 8, 9, 10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 | \ No newline at end of file diff --git a/website/docs/doc/GeneralUpdate.Bowl.md b/website/docs/doc/GeneralUpdate.Bowl.md index de44ec6..44e0b4f 100644 --- a/website/docs/doc/GeneralUpdate.Bowl.md +++ b/website/docs/doc/GeneralUpdate.Bowl.md @@ -313,7 +313,7 @@ Windows 事件查看器格式的系统日志(.evtx 文件): | 产品 | 版本 | | --------------- | ----------------- | -| .NET | 5, 6, 7, 8, 9 | +| .NET | 5, 6, 7, 8, 9, 10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 | diff --git a/website/docs/doc/GeneralUpdate.Core.md b/website/docs/doc/GeneralUpdate.Core.md index 33bb355..563acfb 100644 --- a/website/docs/doc/GeneralUpdate.Core.md +++ b/website/docs/doc/GeneralUpdate.Core.md @@ -336,6 +336,11 @@ public class Packet /// 是否启用驱动升级功能 /// public bool DriveEnabled { get; set; } + + /// + /// 驱动程序目录路径,与 Configinfo.DriverDirectory 对应,由 ConfigurationMapper 自动填充 + /// + public string DriverDirectory { get; set; } } ``` @@ -555,7 +560,7 @@ await new GeneralUpdateBootstrap() | 产品 | 版本 | | ------------------ | ----------------- | -| .NET | 5, 6, 7, 8, 9 | +| .NET | 5, 6, 7, 8, 9, 10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 | diff --git a/website/docs/doc/GeneralUpdate.Differential.md b/website/docs/doc/GeneralUpdate.Differential.md index edb101a..18c1262 100644 --- a/website/docs/doc/GeneralUpdate.Differential.md +++ b/website/docs/doc/GeneralUpdate.Differential.md @@ -434,7 +434,7 @@ await manager.GeneratePatchWithProgressAsync( | 产品 | 版本 | | ------------------ | ----------------- | -| .NET | 5, 6, 7, 8, 9 | +| .NET | 5, 6, 7, 8, 9, 10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 | diff --git a/website/docs/doc/GeneralUpdate.Drivelution.md b/website/docs/doc/GeneralUpdate.Drivelution.md index b6d5f18..bd36deb 100644 --- a/website/docs/doc/GeneralUpdate.Drivelution.md +++ b/website/docs/doc/GeneralUpdate.Drivelution.md @@ -732,7 +732,7 @@ GeneralDrivelution provides a complete driver update solution with the following | Product | Versions | | -------------- | ------------- | -| .NET | 8, 9 | +| .NET | 8, 9, 10 | | .NET Standard | N/A | | .NET Core | N/A | | .NET Framework | N/A | diff --git a/website/docs/doc/UpgradeHub.md b/website/docs/doc/UpgradeHub.md index 6438a0d..fb0fb19 100644 --- a/website/docs/doc/UpgradeHub.md +++ b/website/docs/doc/UpgradeHub.md @@ -95,7 +95,7 @@ appkey string The client key, uniquely identified, recommended value is a Guid, | Product | Version | | -------------- | ------------- | -| .NET | 5, 6, 7, 8, 9 | +| .NET | 5, 6, 7, 8, 9, 10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 | diff --git a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralClient.OSS.md b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralClient.OSS.md index 43d109d..69dbe8f 100644 --- a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralClient.OSS.md +++ b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralClient.OSS.md @@ -127,7 +127,7 @@ catch (Exception ex) | Product | Version | | -------------- | ------------- | -| .NET | 5, 6, 7, 8, 9 | +| .NET | 5, 6, 7, 8, 9, 10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 | \ No newline at end of file diff --git a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Bowl.md b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Bowl.md index 1fb57e4..bd13288 100644 --- a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Bowl.md +++ b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Bowl.md @@ -315,7 +315,7 @@ System log in Windows Event Viewer format (.evtx file): | Product | Version | | --------------- | ----------------- | -| .NET | 5, 6, 7, 8, 9 | +| .NET | 5, 6, 7, 8, 9, 10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 | diff --git a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md index 504a1ce..bfd8514 100644 --- a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md +++ b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md @@ -336,6 +336,11 @@ public class Packet /// Indicates if the driver upgrade feature is enabled /// public bool DriveEnabled { get; set; } + + /// + /// Driver directory path, corresponds to Configinfo.DriverDirectory and is auto-populated by ConfigurationMapper + /// + public string DriverDirectory { get; set; } } ``` @@ -555,7 +560,7 @@ await new GeneralUpdateBootstrap() | Product | Version | | -------------- | ------------- | -| .NET | 5, 6, 7, 8, 9 | +| .NET | 5, 6, 7, 8, 9, 10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 | diff --git a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Differential.md b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Differential.md index 4132a1a..48475aa 100644 --- a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Differential.md +++ b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Differential.md @@ -435,7 +435,7 @@ await manager.GeneratePatchWithProgressAsync( | Product | Version | | -------------- | ------------- | -| .NET | 5, 6, 7, 8, 9 | +| .NET | 5, 6, 7, 8, 9, 10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 | diff --git a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Drivelution.md b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Drivelution.md index b6d5f18..bd36deb 100644 --- a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Drivelution.md +++ b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Drivelution.md @@ -732,7 +732,7 @@ GeneralDrivelution provides a complete driver update solution with the following | Product | Versions | | -------------- | ------------- | -| .NET | 8, 9 | +| .NET | 8, 9, 10 | | .NET Standard | N/A | | .NET Core | N/A | | .NET Framework | N/A | diff --git a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/UpgradeHub.md b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/UpgradeHub.md index 6438a0d..fb0fb19 100644 --- a/website/i18n/en/docusaurus-plugin-content-docs/current/doc/UpgradeHub.md +++ b/website/i18n/en/docusaurus-plugin-content-docs/current/doc/UpgradeHub.md @@ -95,7 +95,7 @@ appkey string The client key, uniquely identified, recommended value is a Guid, | Product | Version | | -------------- | ------------- | -| .NET | 5, 6, 7, 8, 9 | +| .NET | 5, 6, 7, 8, 9, 10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 | diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralClient.OSS.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralClient.OSS.md index c60a918..6242297 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralClient.OSS.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralClient.OSS.md @@ -129,7 +129,7 @@ catch (Exception ex) | 产品 | 版本 | | -------------- | ------------- | -| .NET | 5、6、7、8、9 | +| .NET | 5、6、7、8、9、10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 | \ No newline at end of file diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralTracer.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralTracer.md index 61a8789..150aaa7 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralTracer.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralTracer.md @@ -59,7 +59,7 @@ GeneralTracer.SetTracingEnabled(false); | Product | Versions | | -------------- | ---------------- | -| .NET | 5, 6, 7, 8, 9,10 | +| .NET | 5, 6, 7, 8, 9, 10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 | diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Bowl.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Bowl.md index de44ec6..44e0b4f 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Bowl.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Bowl.md @@ -313,7 +313,7 @@ Windows 事件查看器格式的系统日志(.evtx 文件): | 产品 | 版本 | | --------------- | ----------------- | -| .NET | 5, 6, 7, 8, 9 | +| .NET | 5, 6, 7, 8, 9, 10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 | diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md index 33bb355..563acfb 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md @@ -336,6 +336,11 @@ public class Packet /// 是否启用驱动升级功能 /// public bool DriveEnabled { get; set; } + + /// + /// 驱动程序目录路径,与 Configinfo.DriverDirectory 对应,由 ConfigurationMapper 自动填充 + /// + public string DriverDirectory { get; set; } } ``` @@ -555,7 +560,7 @@ await new GeneralUpdateBootstrap() | 产品 | 版本 | | ------------------ | ----------------- | -| .NET | 5, 6, 7, 8, 9 | +| .NET | 5, 6, 7, 8, 9, 10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 | diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Differential.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Differential.md index edb101a..18c1262 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Differential.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Differential.md @@ -434,7 +434,7 @@ await manager.GeneratePatchWithProgressAsync( | 产品 | 版本 | | ------------------ | ----------------- | -| .NET | 5, 6, 7, 8, 9 | +| .NET | 5, 6, 7, 8, 9, 10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 | diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Drivelution.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Drivelution.md index 8c06456..f20ecf3 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Drivelution.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Drivelution.md @@ -732,7 +732,7 @@ GeneralDrivelution 提供完整的驱动更新解决方案,具有以下关键 | 产品 | 版本 | | -------------- | ------------- | -| .NET | 8、9 | +| .NET | 8、9、10 | | .NET Standard | 不适用 | | .NET Core | 不适用 | | .NET Framework | 不适用 | diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/UpgradeHub.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/UpgradeHub.md index 22ec8ea..7a78d16 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/UpgradeHub.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/UpgradeHub.md @@ -107,7 +107,7 @@ appkey string 客户端密钥,唯一标识推荐值为Guid,可随机生成 | 产品 | 版本 | | -------------- | ------------- | -| .NET | 5、6、7、8、9 | +| .NET | 5、6、7、8、9、10 | | .NET Framework | 4.6.1 | | .NET Standard | 2.0 | | .NET Core | 2.0 |