K22-CODE-24: every source file starts with a copyright line and an SPDX license identifier, the same header the KofTwentyTwo IntelliJ copyright profile inserts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: James Maes <james@kof22.com>
32 lines
830 B
C#
32 lines
830 B
C#
/*
|
|
* Copyright (c) 2026 James Maes (KofTwentyTwo)
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
using KofTwentyTwo.AppKit.Updates;
|
|
using Microsoft.UI.Dispatching;
|
|
|
|
|
|
namespace AppKit.Sample.WinUI;
|
|
|
|
/// <summary>
|
|
/// Custom entry point (DISABLE_XAML_GENERATED_MAIN) so Velopack handles its install,
|
|
/// update, and uninstall hooks before any UI exists.
|
|
/// </summary>
|
|
public static class Program
|
|
{
|
|
[STAThread]
|
|
private static void Main()
|
|
{
|
|
VelopackStartup.Run();
|
|
|
|
// The remainder mirrors the XAML-generated Main.
|
|
WinRT.ComWrappersSupport.InitializeComWrappers();
|
|
Microsoft.UI.Xaml.Application.Start(callbackParams =>
|
|
{
|
|
SynchronizationContext.SetSynchronizationContext(new DispatcherQueueSynchronizationContext(DispatcherQueue.GetForCurrentThread()));
|
|
_ = new App();
|
|
});
|
|
}
|
|
}
|