2026-05-28 11:03:49 +08:00
|
|
|
using Avalonia.Controls.ApplicationLifetimes;
|
|
|
|
|
using LanMountainDesktop.Launcher.Views;
|
|
|
|
|
|
|
|
|
|
namespace LanMountainDesktop.Launcher.Shell;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2026-05-28 15:14:37 +08:00
|
|
|
/// Launcher GUI composition root. It only wires services and dispatches to entry coordinators.
|
2026-05-28 11:03:49 +08:00
|
|
|
/// </summary>
|
|
|
|
|
internal static class LauncherCompositionRoot
|
|
|
|
|
{
|
|
|
|
|
public static LauncherOrchestrator CreateOrchestrator(
|
|
|
|
|
CommandContext context,
|
|
|
|
|
string appRoot,
|
|
|
|
|
StartupAttemptRegistry startupAttemptRegistry,
|
2026-05-28 15:14:37 +08:00
|
|
|
LauncherCoordinatorIpcServer coordinatorServer)
|
2026-05-28 11:03:49 +08:00
|
|
|
{
|
2026-05-28 15:14:37 +08:00
|
|
|
_ = appRoot;
|
|
|
|
|
return LauncherServiceRegistration.CreateOrchestrator(context, startupAttemptRegistry, coordinatorServer);
|
2026-05-28 11:03:49 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-28 15:14:37 +08:00
|
|
|
public static Task RunOrchestratorWithSplashAsync(
|
2026-05-28 11:03:49 +08:00
|
|
|
IClassicDesktopStyleApplicationLifetime desktop,
|
|
|
|
|
CommandContext context,
|
2026-05-28 15:14:37 +08:00
|
|
|
SplashWindow splashWindow) =>
|
|
|
|
|
LauncherGuiCoordinator.RunAsync(desktop, context, splashWindow);
|
2026-05-28 11:03:49 +08:00
|
|
|
}
|