create-dmg (#818)

* 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>
This commit is contained in:
zeje
2026-05-21 16:53:43 +08:00
committed by GitHub
parent 43b829e3b8
commit 24bd21936f
4 changed files with 225 additions and 2 deletions
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>Semi.Avalonia.Demo.Desktop</string>
<key>CFBundleIdentifier</key>
<string>org.avaloniaui.SemiAvaloniaDemo</string>
<key>CFBundleName</key>
<string>Semi Avalonia Demo</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(Version)</string>
<key>CFBundleVersion</key>
<string>$(Version)</string>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
</dict>
</plist>
@@ -1,7 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<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>
@@ -29,4 +46,11 @@
<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>