feat(launcher): complete Campaign LA11 pre-gate support
This commit is contained in:
parent
f881e5b467
commit
134edabed2
19 changed files with 433 additions and 55 deletions
|
|
@ -14,17 +14,33 @@ namespace AcDream.Launcher;
|
|||
|
||||
public sealed partial class App : Application
|
||||
{
|
||||
private readonly LauncherStartupOptions? _startupOptions;
|
||||
private LauncherOrchestrator? _orchestrator;
|
||||
private LauncherWindowViewModel? _viewModel;
|
||||
private LauncherUpdateComposition? _updateComposition;
|
||||
|
||||
public App()
|
||||
{
|
||||
}
|
||||
|
||||
internal App(LauncherStartupOptions startupOptions)
|
||||
{
|
||||
_startupOptions = startupOptions
|
||||
?? throw new ArgumentNullException(nameof(startupOptions));
|
||||
}
|
||||
|
||||
internal LauncherStartupOptions StartupOptions => _startupOptions
|
||||
?? throw new InvalidOperationException(
|
||||
"Launcher startup options were not supplied by the composition root.");
|
||||
|
||||
public override void Initialize() => AvaloniaXamlLoader.Load(this);
|
||||
|
||||
public override void OnFrameworkInitializationCompleted()
|
||||
{
|
||||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||
{
|
||||
ApplicationPathSet paths = ApplicationPathSet.Resolve();
|
||||
LauncherStartupOptions startupOptions = StartupOptions;
|
||||
ApplicationPathSet paths = startupOptions.Paths;
|
||||
LauncherProfileStore profiles = LauncherProfileStore.ForApplicationPaths(paths);
|
||||
string rid = LauncherRuntimeIdentity.DetectRid();
|
||||
string executableSuffix = OperatingSystem.IsWindows() ? ".exe" : string.Empty;
|
||||
|
|
@ -57,7 +73,8 @@ public sealed partial class App : Application
|
|||
GetLauncherVersion(),
|
||||
AppContext.BaseDirectory,
|
||||
() => _orchestrator?.GetSnapshot().Sessions.Any(session => session.IsActive)
|
||||
== true);
|
||||
== true,
|
||||
updateManifestUri: startupOptions.UpdateManifestUri);
|
||||
_updateComposition = updates;
|
||||
|
||||
_orchestrator = new LauncherOrchestrator(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue