2026-04-21 20:59:52 +08:00
|
|
|
namespace LanMountainDesktop.Shared.Contracts.Launcher;
|
|
|
|
|
|
|
|
|
|
public enum StartupStage
|
|
|
|
|
{
|
|
|
|
|
Initializing,
|
|
|
|
|
LoadingSettings,
|
|
|
|
|
LoadingPlugins,
|
2026-04-23 00:27:01 +08:00
|
|
|
TrayReady,
|
2026-04-21 20:59:52 +08:00
|
|
|
InitializingUI,
|
2026-04-22 07:31:54 +08:00
|
|
|
ShellInitialized,
|
2026-04-23 00:27:01 +08:00
|
|
|
BackgroundReady,
|
2026-04-22 07:31:54 +08:00
|
|
|
DesktopVisible,
|
|
|
|
|
ActivationRedirected,
|
|
|
|
|
ActivationFailed,
|
2026-04-21 20:59:52 +08:00
|
|
|
Ready
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public record StartupProgressMessage
|
|
|
|
|
{
|
|
|
|
|
public StartupStage Stage { get; init; }
|
2026-04-22 07:31:54 +08:00
|
|
|
|
2026-04-21 20:59:52 +08:00
|
|
|
public int ProgressPercent { get; init; }
|
2026-04-22 07:31:54 +08:00
|
|
|
|
2026-04-21 20:59:52 +08:00
|
|
|
public string? Message { get; init; }
|
2026-04-22 07:31:54 +08:00
|
|
|
|
2026-04-21 20:59:52 +08:00
|
|
|
public DateTimeOffset Timestamp { get; init; } = DateTimeOffset.UtcNow;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static class LauncherIpcConstants
|
|
|
|
|
{
|
|
|
|
|
public const string LauncherPidEnvVar = "LMD_LAUNCHER_PID";
|
2026-04-22 07:31:54 +08:00
|
|
|
|
2026-04-21 20:59:52 +08:00
|
|
|
public const string PackageRootEnvVar = "LMD_PACKAGE_ROOT";
|
2026-04-22 07:31:54 +08:00
|
|
|
|
2026-04-21 20:59:52 +08:00
|
|
|
public const string VersionEnvVar = "LMD_VERSION";
|
2026-04-22 07:31:54 +08:00
|
|
|
|
2026-04-21 20:59:52 +08:00
|
|
|
public const string CodenameEnvVar = "LMD_CODENAME";
|
2026-04-23 00:27:01 +08:00
|
|
|
|
|
|
|
|
public const string LaunchSourceOptionName = "launch-source";
|
|
|
|
|
|
|
|
|
|
public const string RestartParentPidOptionName = "restart-parent-pid";
|
|
|
|
|
|
|
|
|
|
public const string RestartPresentationOptionName = "restart-presentation";
|
2026-04-21 20:59:52 +08:00
|
|
|
}
|