mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-06-06 18:08:16 +08:00
24bd21936f
* create-dmg * create-dmg-update * Potential fix for pull request finding OK Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
57 lines
2.0 KiB
XML
57 lines
2.0 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
<UsingTask TaskName="ExpandMacOSPlistVersion" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
|
|
<ParameterGroup>
|
|
<InputFile ParameterType="System.String" Required="true"/>
|
|
<OutputFile ParameterType="System.String" Required="true"/>
|
|
<AppVersion ParameterType="System.String" Required="true"/>
|
|
</ParameterGroup>
|
|
<Task>
|
|
<Code Type="Fragment" Language="cs"><![CDATA[
|
|
var token = "$" + "(Version)";
|
|
System.IO.File.WriteAllText(
|
|
OutputFile,
|
|
System.IO.File.ReadAllText(InputFile).Replace(token, AppVersion));
|
|
]]></Code>
|
|
</Task>
|
|
</UsingTask>
|
|
|
|
<PropertyGroup>
|
|
<OutputType>WinExe</OutputType>
|
|
<TargetFramework>net8.0</TargetFramework>
|
|
<Version>1.0.0</Version>
|
|
<Nullable>enable</Nullable>
|
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
|
<ApplicationIcon>..\Semi.Avalonia.Demo\Assets\irihi.ico</ApplicationIcon>
|
|
<!-- Uncomment below to enable Native AOT compilation-->
|
|
<!--<PublishAot>true</PublishAot>-->
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
|
<IsTrimmable>true</IsTrimmable>
|
|
<PublishTrimmed>true</PublishTrimmed>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<TrimmerRootDescriptor Include="Roots.xml"/>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Avalonia.Desktop"/>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
|
|
</ItemGroup>
|
|
|
|
<Target Name="ExpandMacOSInfoPlist" AfterTargets="Publish">
|
|
<ExpandMacOSPlistVersion
|
|
InputFile="$(MSBuildProjectDirectory)/Info-macOS.plist"
|
|
OutputFile="$(PublishDir)Info-macOS.plist"
|
|
AppVersion="$(Version)"/>
|
|
</Target>
|
|
</Project>
|