Skip to content

Commit a253ff7

Browse files
JusterZhuclaude
andauthored
Feature/unified sample hub (#73)
* fix(Server): add missing /Upgrade/Report route The server registers both /Upgrade/Verification and /Update/Verification but only /Update/Report for status reporting. Add /Upgrade/Report so clients using the /Upgrade/* URL variant can report update status. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs: comprehensive documentation update - Add Architecture.md: system architecture, update flow, component relationships - Add Pipeline.md: middleware pipeline deep dive, BSDiff/HDiffPatch algorithms - Add Security.md: TLS, auth (Bearer/API Key/HMAC), AES-256-CBC IPC encryption - Add Configuration.md: complete config reference for all components - Add FAQ.md: 24 frequently asked questions with code examples - Enhance PacketTool.md: add Simulate Update and Config Generator documentation - Enhance Packaging.md: expand from 2 links to comprehensive deployment guide - All new docs include English translations (i18n/en/) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat: unified sample hub — consolidate all samples into a single interactive CLI Consolidate all 9 individual sample projects into a single Hub console application with an interactive menu. Each sample demonstrates a different GeneralUpdate component API end-to-end. **New:** - src/Hub/ — unified sample launcher with interactive menu - src/Hub/Samples/ — all 9 samples as ISample implementations - src/Hub/AppConfig.cs — JSON configuration model - src/Hub/appsettings.json — server & product configuration - src/Run.cmd / src/Run.ps1 — one-click launcher scripts - src/gen_packages.ps1 — test package generator - src/content_client/ — test data for Differential sample - src/content_upgrade/ — test data for Upgrade packages - src/content/ — intermediate version test data - Directory.Build.props — shared build properties - global.json — .NET 10 SDK pinning **Samples & their GeneralUpdate API usage:** 1. CompleteUpdate — GeneralUpdateBootstrap (AppType.Client) 2. SilentUpdate — GeneralUpdateBootstrap (AppType.Client, silent) 3. OSS — GeneralUpdateBootstrap (AppType.OssClient) 4. Differential — DiffPipelineBuilder + BsdiffDiffer 5. Push — UpgradeHubService (SignalR push client) 6. Bowl — BowlContext (process monitor/dump) 7. Extension — GeneralExtensionHost (plugin system) 8. Drivelution — GeneralDrivelution (driver management) 9. Compress — CompressProvider (zip compress/decompress) **Removed:** old individual sample projects (Bowl, Client, Compress, Diff, Drivelution, Extension, OSS, Push, Upgrade) — all consolidated under src/Hub/. **Fixed:** - Removed unnecessary PackageReferences already provided by ASP.NET Core - Added OperatingSystem.IsWindows() guard in DrivelutionSample (CA1416) - Cleaned up unused GuLibsPath property in Directory.Build.props Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(Samples): resolve pipe buffer deadlock, missing UpdatePath, and input conflict - Program.cs: drain server stdout/stderr to prevent pipe buffer deadlock that blocked HTTP download request handling (~2 min timeout) - CompleteUpdateSample: add UpdatePath to find Hub.exe in Both scenario, add MultiDownloadCompleted listener for success feedback - SilentUpdateSample: wait for poll completion then call TryLaunchUpgrade, exit process after launch to prevent duplicate console input - OssSample: use full UpdateRequest with UpdatePath+UpdateAppName so OssClient can locate Hub.exe in temp install directory - libs: update GeneralUpdate.Core.dll with ClientStrategy launch banner and SilentPollOrchestrator improved log message Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(CI): update workflow for unified sample hub structure - Remove non-existent ClientSample.sln and UpgradeSample.sln references - Add .NET 10 SDK setup for Hub project (net10.0) - Build ServerSample.sln with .NET 8 - Build Hub with UseNuGet=true (local DLLs not available in CI) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix: address Copilot review — menu index and cross-machine paths - Program.cs: find sample by ISample.Index instead of array position to handle non-contiguous indices correctly - Run.ps1: replace hard-coded GeneralUpdate source path with auto-detect sibling repo + -GeneralUpdateSrc parameter - dotnet.yml: remove Hub build from CI (NuGet packages not synced with latest source), ServerSample build only for now Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f1f280a commit a253ff7

136 files changed

Lines changed: 6510 additions & 2088 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/dotnet.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will build a .NET project
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3-
41
name: .NET
52

63
on:
@@ -15,17 +12,22 @@ jobs:
1512
runs-on: ubuntu-latest
1613

1714
steps:
18-
- uses: actions/checkout@v3
19-
- name: Setup .NET
20-
uses: actions/setup-dotnet@v3
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup .NET 8
18+
uses: actions/setup-dotnet@v4
2119
with:
2220
dotnet-version: 8.0.x
23-
24-
- name: Restore dependencies ServerSample.sln
25-
run: dotnet restore ./src/Server/ServerSample.sln
2621

27-
- name: Restore dependencies ClientSample.sln
28-
run: dotnet restore ./src/Client/ClientSample.sln
22+
- name: Setup .NET 10
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: 10.0.x
26+
27+
- name: Build ServerSample
28+
run: dotnet build ./src/Server/ServerSample.sln
2929

30-
- name: Restore dependencies UpgradeSample.sln
31-
run: dotnet restore ./src/Upgrade/UpgradeSample.sln
30+
# Hub build requires local DLLs (libs/) or matching NuGet packages.
31+
# Enable when NuGet packages are published from latest GeneralUpdate source.
32+
# - name: Build Hub (NuGet mode)
33+
# run: dotnet build ./src/Hub/Hub.csproj -p:UseNuGet=true

Directory.Build.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ImplicitUsings>enable</ImplicitUsings>
4+
<Nullable>enable</Nullable>
5+
<LangVersion>latest</LangVersion>
6+
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
7+
</PropertyGroup>
8+
</Project>

cmd.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

global.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sdk": {
3+
"version": "10.0.201",
4+
"rollForward": "latestMajor",
5+
"allowPrerelease": true
6+
}
7+
}

src/Bowl/BowlSample/.idea/.idea.BowlSample/.idea/.gitignore

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/Bowl/BowlSample/.idea/.idea.BowlSample/.idea/encodings.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/Bowl/BowlSample/.idea/.idea.BowlSample/.idea/indexLayout.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/Bowl/BowlSample/.idea/.idea.BowlSample/.idea/vcs.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/Bowl/BowlSample/BowlSample.csproj

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/Bowl/BowlSample/BowlSample.sln

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)