mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-20 23:54:26 +08:00
66 lines
3.3 KiB
XML
66 lines
3.3 KiB
XML
<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>
|
|
<IlcOptimizationPreference>Size</IlcOptimizationPreference>
|
|
<PublishReadyToRun>false</PublishReadyToRun>
|
|
<DebuggerSupport>false</DebuggerSupport>
|
|
<EventSourceSupport>false</EventSourceSupport>
|
|
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
|
|
<InvariantGlobalization>true</InvariantGlobalization>
|
|
<MetadataUpdaterSupport>false</MetadataUpdaterSupport>
|
|
<UseSystemResourceKeys>true</UseSystemResourceKeys>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
|
</PropertyGroup>
|
|
|
|
<Target
|
|
Name="PrepareInstallerEmbeddedNativeLibraries"
|
|
BeforeTargets="AssignTargetPaths"
|
|
Condition="'$(PublishAot)' == 'true' and '$(RuntimeIdentifier)' == 'win-x64'">
|
|
<ItemGroup>
|
|
<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)\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>
|
|
|
|
<PropertyGroup Condition="'$(PublishAot)' == 'true'">
|
|
<SuppressTrimAnalysisWarnings>false</SuppressTrimAnalysisWarnings>
|
|
<TrimmerSingleWarn>false</TrimmerSingleWarn>
|
|
<JsonSerializerIsReflectionEnabledByDefault>false</JsonSerializerIsReflectionEnabledByDefault>
|
|
<IsAotCompatible>true</IsAotCompatible>
|
|
</PropertyGroup>
|
|
</Project>
|