Reduce Windows DLL dependencies and package release 0.2.1
This commit is contained in:
1 parent
fc0edd433f
commit
efaf16de18
17 files changed
+153
-21
No files matched your search
@@ -6,6 +6,20 @@ internal static class Program
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
if (args.Contains("--package-check"))
|
||||
{
|
||||
// Exercise the actual published bundle without loading credentials or acquiring the UI lease.
|
||||
BuildAvaloniaApp().SetupWithoutStarting();
|
||||
var folder=Path.Combine(Path.GetTempPath(),"ads-package-"+Guid.NewGuid().ToString("N"));
|
||||
using var vm=new MainViewModel(folder,backgroundMonitoring:false,loadLocalCredentials:false);
|
||||
var window=new MainWindow {DataContext=vm};
|
||||
using var done=new CancellationTokenSource();
|
||||
window.Show();
|
||||
Avalonia.Threading.DispatcherTimer.RunOnce(()=>{window.Close();done.Cancel();},TimeSpan.FromSeconds(2));
|
||||
Avalonia.Threading.Dispatcher.UIThread.MainLoop(done.Token);
|
||||
Console.WriteLine("PACKAGE_CHECK_OK");
|
||||
return;
|
||||
}
|
||||
if (!OperatingSystem.IsWindows()) { BuildAvaloniaApp().StartWithClassicDesktopLifetime(args); return; }
|
||||
using var instance = new DesktopInstance();
|
||||
Instance = instance;
|
||||
|
||||
Reference in new issue
Block a user