mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-20 23:54:26 +08:00
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using Avalonia;
|
|
using Avalonia.Win32;
|
|
|
|
namespace LanDesktopPLONDS.Installer;
|
|
|
|
public static class Program
|
|
{
|
|
[STAThread]
|
|
public static void Main(string[] args)
|
|
{
|
|
InstallerStartupDiagnostics.Initialize();
|
|
try
|
|
{
|
|
InstallerStartupDiagnostics.Log("Preparing native dependencies.");
|
|
if (!NativeDependencyBootstrapper.TryPrepare())
|
|
{
|
|
throw new InvalidOperationException("Failed to prepare native dependencies.");
|
|
}
|
|
|
|
InstallerStartupDiagnostics.Log("Starting Avalonia desktop lifetime.");
|
|
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
InstallerStartupDiagnostics.ReportFatal("The installer failed to start.", ex);
|
|
}
|
|
}
|
|
|
|
public static AppBuilder BuildAvaloniaApp()
|
|
{
|
|
return AppBuilder.Configure<App>()
|
|
.UsePlatformDetect()
|
|
.With(new Win32PlatformOptions
|
|
{
|
|
RenderingMode = [Win32RenderingMode.Software],
|
|
CompositionMode = [Win32CompositionMode.RedirectionSurface]
|
|
});
|
|
}
|
|
}
|