Add update contracts, IPC progress & providers
Introduce a new update subsystem: shared contracts for manifests, messages, paths and state (LanMountainDesktop.Shared.Contracts.Update). Add IPC and reporting infrastructure for installer progress (IUpdateProgressReporter, LauncherUpdateProgressIpcServer, NullUpdateProgressReporter) and integrate progress/complete reporting into UpdateEngineService. Add multiple update service components and providers (CompositeManifestProvider, GithubReleaseManifestProvider, PlondsApiManifestProvider, UpdateDownloadEngine, UpdateOrchestrator, UpdateInstallGateway, CLI launcher bridge, launcher bridge interfaces, observable helper, state store, progress subject, JSON context). Update settings and models to support UseGhProxyMirror and PLONDS/GitHub fallback logic, plus localization strings and UI/viewmodel files for update settings and progress. Misc: installer script tweak and a small change in Plonds generator. This adds end-to-end support for checking, downloading and reporting update progress and results.
2026-05-03 19:31:04 +08:00
|
|
|
namespace LanMountainDesktop.Shared.Contracts.Update;
|
|
|
|
|
|
|
|
|
|
public enum UpdatePhase
|
|
|
|
|
{
|
|
|
|
|
Idle,
|
|
|
|
|
Checking,
|
|
|
|
|
Checked,
|
|
|
|
|
Downloading,
|
Add install checkpoint/resume and DDSS workflows
Introduce install checkpoint support and resume logic for updates, plus related locking and validation. Adds InstallCheckpoint model, AppJsonContext serialization, and UpdatePaths helpers for deployment lock, apply-in-progress lock and install-checkpoint path. UpdateEngineService gains checkpoint load/save/delete, incoming-state validation, resume logic for PLONDS and legacy updates, apply lock handling, and safer cleanup; ApplyPendingPlondsUpdateAsync and ApplyPendingUpdate flow updated accordingly. Add DeploymentLock contract and extend UpdateState with pause/resume/cancel helpers. Tests updated to cover stale/valid checkpoint resume and legacy/PLONDS flows. CI: enhance ddss-publish to detect release channel, validate S3 assets, prepare and atomically publish channel pointer; add ddss-rollback workflow to publish rollbacks; adjust plonds-build concurrency and release events.
2026-05-12 08:35:48 +08:00
|
|
|
PausedDownloading,
|
Add update contracts, IPC progress & providers
Introduce a new update subsystem: shared contracts for manifests, messages, paths and state (LanMountainDesktop.Shared.Contracts.Update). Add IPC and reporting infrastructure for installer progress (IUpdateProgressReporter, LauncherUpdateProgressIpcServer, NullUpdateProgressReporter) and integrate progress/complete reporting into UpdateEngineService. Add multiple update service components and providers (CompositeManifestProvider, GithubReleaseManifestProvider, PlondsApiManifestProvider, UpdateDownloadEngine, UpdateOrchestrator, UpdateInstallGateway, CLI launcher bridge, launcher bridge interfaces, observable helper, state store, progress subject, JSON context). Update settings and models to support UseGhProxyMirror and PLONDS/GitHub fallback logic, plus localization strings and UI/viewmodel files for update settings and progress. Misc: installer script tweak and a small change in Plonds generator. This adds end-to-end support for checking, downloading and reporting update progress and results.
2026-05-03 19:31:04 +08:00
|
|
|
Downloaded,
|
|
|
|
|
Installing,
|
Add install checkpoint/resume and DDSS workflows
Introduce install checkpoint support and resume logic for updates, plus related locking and validation. Adds InstallCheckpoint model, AppJsonContext serialization, and UpdatePaths helpers for deployment lock, apply-in-progress lock and install-checkpoint path. UpdateEngineService gains checkpoint load/save/delete, incoming-state validation, resume logic for PLONDS and legacy updates, apply lock handling, and safer cleanup; ApplyPendingPlondsUpdateAsync and ApplyPendingUpdate flow updated accordingly. Add DeploymentLock contract and extend UpdateState with pause/resume/cancel helpers. Tests updated to cover stale/valid checkpoint resume and legacy/PLONDS flows. CI: enhance ddss-publish to detect release channel, validate S3 assets, prepare and atomically publish channel pointer; add ddss-rollback workflow to publish rollbacks; adjust plonds-build concurrency and release events.
2026-05-12 08:35:48 +08:00
|
|
|
PausedInstalling,
|
Add update contracts, IPC progress & providers
Introduce a new update subsystem: shared contracts for manifests, messages, paths and state (LanMountainDesktop.Shared.Contracts.Update). Add IPC and reporting infrastructure for installer progress (IUpdateProgressReporter, LauncherUpdateProgressIpcServer, NullUpdateProgressReporter) and integrate progress/complete reporting into UpdateEngineService. Add multiple update service components and providers (CompositeManifestProvider, GithubReleaseManifestProvider, PlondsApiManifestProvider, UpdateDownloadEngine, UpdateOrchestrator, UpdateInstallGateway, CLI launcher bridge, launcher bridge interfaces, observable helper, state store, progress subject, JSON context). Update settings and models to support UseGhProxyMirror and PLONDS/GitHub fallback logic, plus localization strings and UI/viewmodel files for update settings and progress. Misc: installer script tweak and a small change in Plonds generator. This adds end-to-end support for checking, downloading and reporting update progress and results.
2026-05-03 19:31:04 +08:00
|
|
|
Installed,
|
|
|
|
|
Verifying,
|
|
|
|
|
Completed,
|
|
|
|
|
Failed,
|
|
|
|
|
Recovering,
|
|
|
|
|
RollingBack,
|
|
|
|
|
RolledBack
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum UpdatePayloadKind
|
|
|
|
|
{
|
|
|
|
|
DeltaPlonds,
|
|
|
|
|
DeltaLegacy,
|
|
|
|
|
FullInstaller
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum InstallStage
|
|
|
|
|
{
|
|
|
|
|
None,
|
|
|
|
|
VerifySignature,
|
|
|
|
|
CreateTarget,
|
|
|
|
|
ApplyFiles,
|
|
|
|
|
VerifyHashes,
|
|
|
|
|
ActivateDeployment,
|
|
|
|
|
Cleanup,
|
|
|
|
|
Completed,
|
|
|
|
|
Failed,
|
|
|
|
|
RollingBack
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum UpdateChannel
|
|
|
|
|
{
|
|
|
|
|
Stable,
|
|
|
|
|
Preview
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum UpdateMode
|
|
|
|
|
{
|
|
|
|
|
Manual,
|
|
|
|
|
DownloadThenConfirm,
|
|
|
|
|
SilentOnExit
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum UpdateDownloadSource
|
|
|
|
|
{
|
|
|
|
|
PlondsApi,
|
|
|
|
|
GitHub,
|
|
|
|
|
GhProxy
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static class UpdatePhaseExtensions
|
|
|
|
|
{
|
|
|
|
|
public static bool IsTerminal(this UpdatePhase phase) =>
|
|
|
|
|
phase is UpdatePhase.Completed or UpdatePhase.Failed or UpdatePhase.RolledBack;
|
|
|
|
|
|
|
|
|
|
public static bool IsBusy(this UpdatePhase phase) =>
|
Add install checkpoint/resume and DDSS workflows
Introduce install checkpoint support and resume logic for updates, plus related locking and validation. Adds InstallCheckpoint model, AppJsonContext serialization, and UpdatePaths helpers for deployment lock, apply-in-progress lock and install-checkpoint path. UpdateEngineService gains checkpoint load/save/delete, incoming-state validation, resume logic for PLONDS and legacy updates, apply lock handling, and safer cleanup; ApplyPendingPlondsUpdateAsync and ApplyPendingUpdate flow updated accordingly. Add DeploymentLock contract and extend UpdateState with pause/resume/cancel helpers. Tests updated to cover stale/valid checkpoint resume and legacy/PLONDS flows. CI: enhance ddss-publish to detect release channel, validate S3 assets, prepare and atomically publish channel pointer; add ddss-rollback workflow to publish rollbacks; adjust plonds-build concurrency and release events.
2026-05-12 08:35:48 +08:00
|
|
|
phase is UpdatePhase.Checking or UpdatePhase.Downloading or UpdatePhase.Installing
|
|
|
|
|
or UpdatePhase.Verifying or UpdatePhase.Recovering or UpdatePhase.RollingBack;
|
Add update contracts, IPC progress & providers
Introduce a new update subsystem: shared contracts for manifests, messages, paths and state (LanMountainDesktop.Shared.Contracts.Update). Add IPC and reporting infrastructure for installer progress (IUpdateProgressReporter, LauncherUpdateProgressIpcServer, NullUpdateProgressReporter) and integrate progress/complete reporting into UpdateEngineService. Add multiple update service components and providers (CompositeManifestProvider, GithubReleaseManifestProvider, PlondsApiManifestProvider, UpdateDownloadEngine, UpdateOrchestrator, UpdateInstallGateway, CLI launcher bridge, launcher bridge interfaces, observable helper, state store, progress subject, JSON context). Update settings and models to support UseGhProxyMirror and PLONDS/GitHub fallback logic, plus localization strings and UI/viewmodel files for update settings and progress. Misc: installer script tweak and a small change in Plonds generator. This adds end-to-end support for checking, downloading and reporting update progress and results.
2026-05-03 19:31:04 +08:00
|
|
|
|
|
|
|
|
public static bool CanCheck(this UpdatePhase phase) =>
|
|
|
|
|
phase is UpdatePhase.Idle or UpdatePhase.Checked or UpdatePhase.Downloaded
|
|
|
|
|
or UpdatePhase.Completed or UpdatePhase.Failed or UpdatePhase.RolledBack;
|
|
|
|
|
|
|
|
|
|
public static bool CanDownload(this UpdatePhase phase) =>
|
|
|
|
|
phase is UpdatePhase.Checked;
|
|
|
|
|
|
|
|
|
|
public static bool CanInstall(this UpdatePhase phase) =>
|
|
|
|
|
phase is UpdatePhase.Downloaded;
|
|
|
|
|
|
|
|
|
|
public static bool CanRollback(this UpdatePhase phase) =>
|
|
|
|
|
phase is UpdatePhase.Failed;
|
Add install checkpoint/resume and DDSS workflows
Introduce install checkpoint support and resume logic for updates, plus related locking and validation. Adds InstallCheckpoint model, AppJsonContext serialization, and UpdatePaths helpers for deployment lock, apply-in-progress lock and install-checkpoint path. UpdateEngineService gains checkpoint load/save/delete, incoming-state validation, resume logic for PLONDS and legacy updates, apply lock handling, and safer cleanup; ApplyPendingPlondsUpdateAsync and ApplyPendingUpdate flow updated accordingly. Add DeploymentLock contract and extend UpdateState with pause/resume/cancel helpers. Tests updated to cover stale/valid checkpoint resume and legacy/PLONDS flows. CI: enhance ddss-publish to detect release channel, validate S3 assets, prepare and atomically publish channel pointer; add ddss-rollback workflow to publish rollbacks; adjust plonds-build concurrency and release events.
2026-05-12 08:35:48 +08:00
|
|
|
|
|
|
|
|
public static bool CanPause(this UpdatePhase phase) =>
|
|
|
|
|
phase is UpdatePhase.Downloading;
|
|
|
|
|
|
|
|
|
|
public static bool CanResume(this UpdatePhase phase) =>
|
|
|
|
|
phase is UpdatePhase.PausedDownloading or UpdatePhase.PausedInstalling;
|
|
|
|
|
|
|
|
|
|
public static bool CanCancel(this UpdatePhase phase) =>
|
|
|
|
|
phase.IsBusy() || phase.CanResume();
|
|
|
|
|
|
|
|
|
|
public static bool IsPaused(this UpdatePhase phase) =>
|
|
|
|
|
phase is UpdatePhase.PausedDownloading or UpdatePhase.PausedInstalling;
|
Add update contracts, IPC progress & providers
Introduce a new update subsystem: shared contracts for manifests, messages, paths and state (LanMountainDesktop.Shared.Contracts.Update). Add IPC and reporting infrastructure for installer progress (IUpdateProgressReporter, LauncherUpdateProgressIpcServer, NullUpdateProgressReporter) and integrate progress/complete reporting into UpdateEngineService. Add multiple update service components and providers (CompositeManifestProvider, GithubReleaseManifestProvider, PlondsApiManifestProvider, UpdateDownloadEngine, UpdateOrchestrator, UpdateInstallGateway, CLI launcher bridge, launcher bridge interfaces, observable helper, state store, progress subject, JSON context). Update settings and models to support UseGhProxyMirror and PLONDS/GitHub fallback logic, plus localization strings and UI/viewmodel files for update settings and progress. Misc: installer script tweak and a small change in Plonds generator. This adds end-to-end support for checking, downloading and reporting update progress and results.
2026-05-03 19:31:04 +08:00
|
|
|
}
|