feat: Update build configuration and dependencies for Catalog Lite, including executable naming and validation improvements
This commit is contained in:
parent
03dfe0f3a1
commit
ddf47ad51b
4 changed files with 75 additions and 39 deletions
|
|
@ -36,6 +36,6 @@
|
|||
<Style Selector="ProgressBar">
|
||||
<Setter Property="MinHeight" Value="18" />
|
||||
</Style>
|
||||
<StyleInclude Source="avares://IconPacks.Avalonia/Icons.axaml" />
|
||||
<StyleInclude Source="avares://IconPacks.Avalonia.Material/Material.axaml" />
|
||||
</Application.Styles>
|
||||
</Application>
|
||||
|
|
@ -8,6 +8,14 @@
|
|||
<RootNamespace>CatalogLite</RootNamespace>
|
||||
<AvaloniaUseCompiledBindingsByDefault>false</AvaloniaUseCompiledBindingsByDefault>
|
||||
<CatalogLiteExpirationDate Condition="'$(CatalogLiteExpirationDate)' == ''">2026-12-31</CatalogLiteExpirationDate>
|
||||
<EnableMaddoSharedGdi>false</EnableMaddoSharedGdi>
|
||||
<UseAppHost>true</UseAppHost>
|
||||
<SelfContained>false</SelfContained>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
||||
<PublishTrimmed>false</PublishTrimmed>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
<DebugType>embedded</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'win-x64' Or '$(RuntimeIdentifier)' == 'win-arm64'">
|
||||
|
|
@ -19,14 +27,14 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MaddoShared\MaddoShared.csproj" />
|
||||
<ProjectReference Include="..\MaddoShared\MaddoShared.csproj" SetTargetFramework="TargetFramework=net10.0;EnableMaddoSharedGdi=false" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="11.3.13" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="11.3.13" />
|
||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.13" />
|
||||
<PackageReference Include="IconPacks.Avalonia" Version="2.0.0" />
|
||||
<PackageReference Include="IconPacks.Avalonia.Material" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.8" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.8" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.8" />
|
||||
|
|
@ -45,4 +53,25 @@
|
|||
Overwrite="true"
|
||||
Lines="using System.Reflection%3B

[assembly: AssemblyMetadata("CatalogLiteGeneratedExpirationDate", "$(CatalogLiteExpirationDate)")]
[assembly: AssemblyMetadata("CatalogLiteExpirationDate", "$(CatalogLiteExpirationDate)")]

namespace CatalogLite%3B

internal static class BuildExpiration
{
 public const string ExpirationDate = "$(CatalogLiteExpirationDate)"%3B
}" />
|
||||
</Target>
|
||||
|
||||
<Target Name="ValidateCatalogLiteFeatureDependencies" AfterTargets="ResolveReferences">
|
||||
<ItemGroup>
|
||||
<_CatalogLiteForbiddenReference Include="@(ReferencePath)" Condition="$([System.String]::Copy('%(FileName)').StartsWith('AIFotoONLUS')) Or '%(FileName)' == 'Catalog.Communication' Or '%(FileName)' == 'Microsoft.Windows.Compatibility' Or '%(FileName)' == 'System.Drawing.Common' Or '%(FileName)' == 'System.Private.Windows.GdiPlus' Or '%(FileName)' == 'System.Windows.Extensions'" />
|
||||
</ItemGroup>
|
||||
<Error Condition="'@(_CatalogLiteForbiddenReference)' != ''" Text="Catalog Lite must not reference AI or race upload assemblies: @(_CatalogLiteForbiddenReference->'%(FileName)%(Extension)', ', ')" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PruneCatalogLitePublishSidecars" AfterTargets="Publish" Condition="'$(PublishDir)' != '' And '$(PublishSingleFile)' == 'true'">
|
||||
<ItemGroup>
|
||||
<_CatalogLiteSidecarFile Include="$(PublishDir)**\*.dll.config;$(PublishDir)**\*.pdb" />
|
||||
</ItemGroup>
|
||||
<Delete Files="@(_CatalogLiteSidecarFile)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="ValidateCatalogLitePublishOutput" AfterTargets="PruneCatalogLitePublishSidecars" Condition="'$(PublishDir)' != '' And '$(PublishSingleFile)' == 'true'">
|
||||
<ItemGroup>
|
||||
<_CatalogLiteLooseNativeFile Include="$(PublishDir)**\*.dll;$(PublishDir)**\*.so;$(PublishDir)**\*.dylib" />
|
||||
</ItemGroup>
|
||||
<Error Condition="'@(_CatalogLiteLooseNativeFile)' != ''" Text="Catalog Lite single-file publish produced loose native/managed library files: @(_CatalogLiteLooseNativeFile->'%(Filename)%(Extension)', ', ')" />
|
||||
</Target>
|
||||
</Project>
|
||||
Loading…
Add table
Add a link
Reference in a new issue