π¨ GeneralUpdate Update UI Guide
If your app needs to show users the update progress (instead of silently updating in the background), this page will help you generate the right UI code.
First: What each program displaysβ
GeneralUpdate uses a dual-process architecture, and each process shows a different UI:
Your main program (Client)
Shows "Checking for updates β Download progress"
User sees: Downloading 45% / Speed / Time remaining
β After download completes, launches β
Upgrade program (Upgrade)
Shows "Installing update, please wait..."
User sees: Installation progress bar / Failure message
Client: Handles downloading β show a progress bar, speed, version info Upgrade: Handles file installation (fast) β just show a "please wait" screen
Which situation are you in?β
| Situation | What to do |
|---|---|
| Already have a main app, need to add an update window | Add an update window to your existing project (this page will help) |
| Starting from scratch | First use generalupdate-init to set up the dual-project structure, then come back for the UI |
| No UI needed (silent update) | Go to generalupdate-strategy for silent mode |
Supported UI frameworksβ
| Framework | Template file | Highlights |
|---|---|---|
| WPF + LayUI.Wpf | LayUIStyle.xaml | Glass-effect progress bar |
| WPF + WPFDevelopers | WPFDevelopersStyle.xaml | Circular progress, breathing animation |
| Avalonia + SemiUrsa | SemiUrsaClientView.axaml | Cross-platform, dark mode toggle |
| WinForms + AntdUI | AntdUIStyle.cs | Dark theme |
| MAUI | MauiUpdatePage.xaml | Mobile + desktop |
The update logic is the same across all frameworks β only the visual style changes.
The 4 key UI statesβ
An update window is essentially a state machine with 4 main states:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β Checking β
β "Checking for updates..." β
β β β
β βΌ β
β β‘ Downloading (the main state) β
β ββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β MyApp_2.0.0.0.zip 45% β β
β β βββββββββββββββββββββββββ β β
β β Speed: 3.2 MB/s Remaining: 12s β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βΌ β
β β’ Installing β
β "Installing update, please do not power off..." β
β β β
β βΌ β
β β£ Complete / Failed β
β "Update complete!" / "Download failed, retry" β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
There are additional sub-states ("Already up to date", "Paused", "Retrying"), but beginners only need to focus on β and β‘.
How to connect update progress to your UIβ
GeneralUpdate fires events with progress data β you just map the numbers to your UI controls:
// GeneralUpdate progress event β update your UI
bootstrap.AddListenerMultiDownloadStatistics((_, e) =>
{
// e.ProgressPercentage β your progress bar Value (0-100)
// e.Speed β your speed label
// e.Remaining β your time remaining label
// e.BytesReceived β bytes downloaded
// e.TotalBytesToReceive β total bytes to download
});
That's it. The core work is mapping these 5 values to your UI controls.
Info to gather before generating UIβ
### Your project
- UI framework: ______ (WPF / WinForms / Avalonia / MAUI / Console)
- Need dark mode: ______ (Yes/No)
### Update window role (see "First" section above)
- Client (main app): ______ (need to show download progress?)
- Upgrade (installer): ______ (need to show installation status?)
Simple example: Console progress barβ
Even without a GUI, a console progress bar is easy:
await new GeneralUpdateBootstrap()
.SetConfig(config)
.AddListenerMultiDownloadStatistics((_, e) =>
{
Console.Write($"\rDownload progress: {e.ProgressPercentage}% ");
Console.Write($"[{new string('β ', (int)(e.ProgressPercentage / 5))}");
Console.WriteLine($"{new string('β‘', 20 - (int)(e.ProgressPercentage / 5))}]");
Console.Write($"Speed: {e.Speed}/s");
})
.LaunchAsync();
Known issues & tipsβ
| # | Issue | Note |
|---|---|---|
| 1 | Don't do heavy work in update callbacks | Only update UI β no file I/O or network requests |
| 2 | Cross-thread UI updates | WPF: Dispatcher.Invoke, WinForms: Control.Invoke |
| 3 | Upgrade doesn't need download progress | Upgrade just installs β show "Please wait" |
| 4 | Show a retry button on failure | Otherwise users get stuck at 99% |
| 5 | Don't jump progress to 100% instantly | Users need to see intermediate progress |
Advanced: Full-state UI templatesβ
If you need a complete UI (pause, resume, retry, dark mode toggle, etc.), the skill repository provides full template code.
To generate: describe your UI framework in Claude Code, and the AI will select and generate the appropriate template.
Related pagesβ
- generalupdate-init β First set up the dual-project structure
- generalupdate-strategy β Silent mode (no UI needed)
- generalupdate-advanced β Advanced customization