Merge pull request #13 from josephmoresena/master

Update to ILCompiler 7.0.0-*
This commit is contained in:
Todor Totev 2021-10-15 10:33:11 +03:00 committed by GitHub
commit d400f93339
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 6 deletions

1
.gitignore vendored
View File

@ -348,3 +348,4 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
.DS_Store

View File

@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- if you want to check exceptions, change this to "Exe" and start your app from the console -->
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<Platforms>AnyCPU;x64</Platforms>
<ApplicationIcon>app.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
@ -33,10 +34,11 @@
<EmbeddedResource Include="windows.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="0.10.7" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.7" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.7" />
<PackageReference Include="Microsoft.DotNet.ILCompiler" Version="6.0.0-*" />
<PackageReference Include="Avalonia" Version="0.10.8" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.8" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.8" />
<PackageReference Include="Dotnet.Bundle" Version="*" Condition="$(RuntimeIdentifier.StartsWith('osx'))" />
<PackageReference Include="Microsoft.DotNet.ILCompiler" Version="7.0.0-*" />
</ItemGroup>
<ItemGroup>
<!-- Avalonia relies heavily on reflection. Describe types reflected upon here. -->
@ -45,9 +47,34 @@
<ItemGroup>
<None Update="avalonia.png" CopyToPublishDirectory="PreserveNewest">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</None>
<None Update="dotnet.png" CopyToPublishDirectory="PreserveNewest">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="app.icns" CopyToPublishDirectory="PreserveNewest" Condition="$(RuntimeIdentifier.StartsWith('osx'))">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<PropertyGroup Condition="$(RuntimeIdentifier.StartsWith('osx'))">
<CFBundleName>$(AssemblyName)</CFBundleName>
<CFBundleDisplayName>$(AssemblyName)</CFBundleDisplayName>
<CFBundleIdentifier>com.$(username).$(AssemblyName)</CFBundleIdentifier>
<CFBundleVersion>1.0.0</CFBundleVersion>
<CFBundlePackageType>APPL</CFBundlePackageType>
<!--<CFBundleSignature>????</CFBundleSignature>-->
<CFBundleExecutable>$(AssemblyName)</CFBundleExecutable>
<CFBundleIconFile>app.icns</CFBundleIconFile>
<NSPrincipalClass>NSApplication</NSPrincipalClass>
<NSHighResolutionCapable>true</NSHighResolutionCapable>
<CFBundleShortVersionString>1.0</CFBundleShortVersionString>
<!-- Optional -->
<NSRequiresAquaSystemAppearance>true</NSRequiresAquaSystemAppearance>
</PropertyGroup>
<Target Name="ConfigureTrimming" BeforeTargets="PrepareForILLink">
<ItemGroup>
<ManagedAssemblyToLink>
<TrimMode>link</TrimMode>
</ManagedAssemblyToLink>
</ItemGroup>
</Target>
</Project>

BIN
src/app.icns Normal file

Binary file not shown.

9
test.command Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
dir=${0%/*}
if [ -d "$dir" ]; then
cd "$dir"
fi
rm -f src/packages.lock.json
dotnet publish -r osx-x64 -c release /p:RestoreLockedMode=true -t:BundleApp
rm src/bin/Release/net*/osx-x64/publish/*.icns
strip src/bin/Release/net*/osx-x64/publish/AvaloniaCoreRTDemo.app/Contents/MacOS/AvaloniaCoreRTDemo

6
test.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
rm -f src/packages.lock.json
dotnet publish -r linux-x64 -c release /p:RestoreLockedMode=true
cd src/bin/Release/net*/linux-x64/publish
cp AvaloniaCoreRTDemo AvaloniaCoreRTDemo.bin
strip AvaloniaCoreRTDemo.bin