mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-20 23:54:26 +08:00
Improve launcher startup flow, logging, and host resolution. Key changes: add detailed startup logging and standardized preview messages; unify CLI vs GUI handling and error/result reporting (write result file when requested); refactor DeploymentLocator to a more robust host resolution (new HostResolutionResult, explicit/portable/published/debug resolution paths, legacy fallback); overhaul LauncherFlowCoordinator to better handle IPC stages, activation retries, window lifecycle, plugin/update flows and error reporting; add CommandContext helpers (IsGui/IsPreview/ExplicitAppRoot) and JSON context options; tighten async usage and ConfigureAwait calls; add better UI error handling and consistent exit codes. Several UX/debug conveniences and robustness fixes included.
32 lines
1.3 KiB
C#
32 lines
1.3 KiB
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
using LanMountainDesktop.Launcher.Models;
|
|
using LanMountainDesktop.Launcher.Services;
|
|
using LanMountainDesktop.Shared.Contracts.Launcher;
|
|
|
|
namespace LanMountainDesktop.Launcher;
|
|
|
|
[JsonSourceGenerationOptions(
|
|
WriteIndented = true,
|
|
PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase,
|
|
PropertyNameCaseInsensitive = true)]
|
|
[JsonSerializable(typeof(SignedFileMap))]
|
|
[JsonSerializable(typeof(UpdateFileEntry))]
|
|
[JsonSerializable(typeof(PlondsUpdateMetadata))]
|
|
[JsonSerializable(typeof(PlondsFileMap))]
|
|
[JsonSerializable(typeof(PlondsComponentEntry))]
|
|
[JsonSerializable(typeof(PlondsFileEntry))]
|
|
[JsonSerializable(typeof(PlondsHashDescriptor))]
|
|
[JsonSerializable(typeof(SnapshotMetadata))]
|
|
[JsonSerializable(typeof(AppVersionInfo))]
|
|
[JsonSerializable(typeof(StartupProgressMessage))]
|
|
[JsonSerializable(typeof(LauncherResult))]
|
|
[JsonSerializable(typeof(HostDiscoveryConfig))]
|
|
[JsonSerializable(typeof(PluginManifest))]
|
|
[JsonSerializable(typeof(PendingUpgrade))]
|
|
[JsonSerializable(typeof(List<PendingUpgrade>))]
|
|
[JsonSerializable(typeof(GitHubRelease))]
|
|
[JsonSerializable(typeof(GitHubAsset))]
|
|
[JsonSerializable(typeof(List<GitHubRelease>))]
|
|
internal sealed partial class AppJsonContext : JsonSerializerContext;
|