mirror of
https://gitee.com/chinware/atomui.git
synced 2024-11-29 18:38:16 +08:00
支持aot
This commit is contained in:
parent
d6f656ec08
commit
9c061d0f93
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"githubPullRequests.ignoredPullRequestBranches": [
|
||||
"develop"
|
||||
]
|
||||
}
|
@ -6,13 +6,26 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>AtomUI.Demo.Desktop</RootNamespace>
|
||||
|
||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AvaloniaResource Include="Assets\**"/>
|
||||
<TrimmerRootDescriptor Include="Roots.xml"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<TrimmerRootDescriptor Include="Roots.xml" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<PublishAot>true</PublishAot>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
|
@ -18,18 +18,25 @@ internal class Program
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
BuildAvaloniaApp()
|
||||
.With(new FontManagerOptions
|
||||
{
|
||||
FontFallbacks = new[]
|
||||
try
|
||||
{
|
||||
BuildAvaloniaApp()
|
||||
.With(new FontManagerOptions
|
||||
{
|
||||
FontFallbacks = new[]
|
||||
{
|
||||
new FontFallback
|
||||
{
|
||||
FontFamily = new FontFamily("Microsoft YaHei")
|
||||
}
|
||||
}
|
||||
})
|
||||
.StartWithClassicDesktopLifetime(args);
|
||||
}
|
||||
})
|
||||
.StartWithClassicDesktopLifetime(args);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
File.WriteAllText("error.log", ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public static AppBuilder BuildAvaloniaApp()
|
||||
|
7
samples/AtomUI.Demo.Desktop/Roots.xml
Normal file
7
samples/AtomUI.Demo.Desktop/Roots.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<linker>
|
||||
<assembly fullname="AtomUI.Demo.Desktop" preserve="All"/>
|
||||
<assembly fullname="AtomUI.Theme" preserve="All"/>
|
||||
<assembly fullname="Avalonia.Base" preserve="All"/>
|
||||
<assembly fullname="AtomUI.Controls" preserve="All"/>
|
||||
<assembly fullname="Avalonia.Remote.Protocol" preserve="All"/>
|
||||
</linker>
|
@ -21,6 +21,6 @@ public class EnumExtension : MarkupExtension
|
||||
// Array can not perform well for Items of ListBox.
|
||||
// Version : 11.0.0-preview4
|
||||
// By nlb at 2023.3.28.
|
||||
return Enum.GetValues(Type).OfType<object>().ToList();
|
||||
return Enum.GetValuesAsUnderlyingType(Type).OfType<object>().ToList();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user