2026-06-03 00:50:52 +08:00
|
|
|
<Project>
|
|
|
|
|
<PropertyGroup Condition="'$(PublishAot)' == 'true'">
|
|
|
|
|
<PublishAot>true</PublishAot>
|
|
|
|
|
<PublishTrimmed>true</PublishTrimmed>
|
|
|
|
|
<TrimMode>partial</TrimMode>
|
|
|
|
|
<SelfContained>true</SelfContained>
|
|
|
|
|
<PublishSingleFile>true</PublishSingleFile>
|
|
|
|
|
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
|
|
|
|
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
|
|
|
|
|
<OptimizationPreference>Size</OptimizationPreference>
|
|
|
|
|
<PublishReadyToRun>false</PublishReadyToRun>
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
|
|
|
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
<ItemGroup Condition="'$(PublishAot)' == 'true'">
|
|
|
|
|
<TrimmerRootAssembly Include="Avalonia" />
|
|
|
|
|
<TrimmerRootAssembly Include="Avalonia.Desktop" />
|
2026-06-05 21:43:43 +08:00
|
|
|
<TrimmerRootAssembly Include="Avalonia.Themes.Fluent" />
|
2026-06-03 00:50:52 +08:00
|
|
|
<TrimmerRootAssembly Include="FluentIcons.Avalonia" />
|
|
|
|
|
<TrimmerRootAssembly Include="LanDesktopPLONDS.installer" />
|
|
|
|
|
<TrimmerRootAssembly Include="System.Text.Json" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
2026-06-05 21:43:43 +08:00
|
|
|
<Target
|
|
|
|
|
Name="PrepareInstallerEmbeddedNativeLibraries"
|
|
|
|
|
BeforeTargets="AssignTargetPaths"
|
|
|
|
|
Condition="'$(PublishAot)' == 'true' and '$(RuntimeIdentifier)' == 'win-x64'">
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<InstallerNativeLibrary
|
|
|
|
|
Include="$(PkgAvalonia_Angle_Windows_Natives)\runtimes\win-x64\native\av_libglesv2.dll"
|
|
|
|
|
CompressedName="av_libglesv2.dll.gz"
|
|
|
|
|
Condition="Exists('$(PkgAvalonia_Angle_Windows_Natives)\runtimes\win-x64\native\av_libglesv2.dll')" />
|
|
|
|
|
<InstallerNativeLibrary
|
|
|
|
|
Include="$(PkgHarfBuzzSharp_NativeAssets_Win32)\runtimes\win-x64\native\libHarfBuzzSharp.dll"
|
|
|
|
|
CompressedName="libHarfBuzzSharp.dll.gz"
|
|
|
|
|
Condition="Exists('$(PkgHarfBuzzSharp_NativeAssets_Win32)\runtimes\win-x64\native\libHarfBuzzSharp.dll')" />
|
|
|
|
|
<InstallerNativeLibrary
|
|
|
|
|
Include="$(PkgSkiaSharp_NativeAssets_Win32)\runtimes\win-x64\native\libSkiaSharp.dll"
|
|
|
|
|
CompressedName="libSkiaSharp.dll.gz"
|
|
|
|
|
Condition="Exists('$(PkgSkiaSharp_NativeAssets_Win32)\runtimes\win-x64\native\libSkiaSharp.dll')" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<Error
|
|
|
|
|
Condition="'@(InstallerNativeLibrary)' == ''"
|
|
|
|
|
Text="NativeAOT installer native libraries were not found. Restore the installer with -p:PublishAot=true -r win-x64 before publishing." />
|
|
|
|
|
|
|
|
|
|
<MakeDir Directories="$(IntermediateOutputPath)embedded-native\$(RuntimeIdentifier)\" />
|
|
|
|
|
<Exec
|
|
|
|
|
Command="powershell -NoProfile -ExecutionPolicy Bypass -File "$(MSBuildThisFileDirectory)Compress-NativeLibrary.ps1" -SourcePath "%(InstallerNativeLibrary.FullPath)" -DestinationPath "$(IntermediateOutputPath)embedded-native\$(RuntimeIdentifier)\%(InstallerNativeLibrary.CompressedName)"" />
|
|
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<EmbeddedResource
|
|
|
|
|
Include="$(IntermediateOutputPath)embedded-native\$(RuntimeIdentifier)\av_libglesv2.dll.gz"
|
|
|
|
|
LogicalName="LanDesktopPLONDS.Installer.NativeLibraries.av_libglesv2.dll.gz" />
|
|
|
|
|
<EmbeddedResource
|
|
|
|
|
Include="$(IntermediateOutputPath)embedded-native\$(RuntimeIdentifier)\libHarfBuzzSharp.dll.gz"
|
|
|
|
|
LogicalName="LanDesktopPLONDS.Installer.NativeLibraries.libHarfBuzzSharp.dll.gz" />
|
|
|
|
|
<EmbeddedResource
|
|
|
|
|
Include="$(IntermediateOutputPath)embedded-native\$(RuntimeIdentifier)\libSkiaSharp.dll.gz"
|
|
|
|
|
LogicalName="LanDesktopPLONDS.Installer.NativeLibraries.libSkiaSharp.dll.gz" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
</Target>
|
|
|
|
|
|
2026-06-03 00:50:52 +08:00
|
|
|
<PropertyGroup Condition="'$(PublishAot)' == 'true'">
|
|
|
|
|
<SuppressTrimAnalysisWarnings>false</SuppressTrimAnalysisWarnings>
|
|
|
|
|
<TrimmerSingleWarn>false</TrimmerSingleWarn>
|
|
|
|
|
<JsonSerializerIsReflectionEnabledByDefault>true</JsonSerializerIsReflectionEnabledByDefault>
|
|
|
|
|
<IsAotCompatible>true</IsAotCompatible>
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
</Project>
|