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
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup><OutputType>WinExe</OutputType><TargetFramework>net8.0</TargetFramework><Nullable>enable</Nullable><ImplicitUsings>enable</ImplicitUsings></PropertyGroup>
|
||||
<PropertyGroup><Version>0.2.1</Version><OutputType>WinExe</OutputType><TargetFramework>net8.0</TargetFramework><Nullable>enable</Nullable><ImplicitUsings>enable</ImplicitUsings></PropertyGroup>
|
||||
<ItemGroup><PackageReference Include="Avalonia.Desktop" Version="11.3.8"/><PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.8"/><PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0"/></ItemGroup>
|
||||
<ItemGroup><AvaloniaResource Include="Assets/**"/></ItemGroup></Project>
|
||||
@@ -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