45 lines
2.6 KiB
XML
45 lines
2.6 KiB
XML
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
<PropertyGroup>
|
|
<AssemblyName>SwarmAssistentExtension</AssemblyName>
|
|
</PropertyGroup>
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.Data.Sqlite" Version="8.0.11" />
|
|
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.10" />
|
|
</ItemGroup>
|
|
<Import Project="../../SwarmUI.extension.props" />
|
|
<!-- Must come after the import: SwarmUI.extension.props disables it, but the Sqlite
|
|
assemblies have to sit next to the extension dll for SwarmExtensionLoadContext
|
|
to resolve them as private deps. -->
|
|
<PropertyGroup>
|
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
|
</PropertyGroup>
|
|
<!-- Everything else in the lock file is already loaded by the SwarmUI host. -->
|
|
<Target Name="ShipOnlySqlitePrivateDeps" AfterTargets="ResolveReferences">
|
|
<ItemGroup>
|
|
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)"
|
|
Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != 'Microsoft.Data.Sqlite'
|
|
AND '%(ReferenceCopyLocalPaths.NuGetPackageId)' != 'Microsoft.Data.Sqlite.Core'
|
|
AND !$([System.String]::Copy('%(ReferenceCopyLocalPaths.NuGetPackageId)').StartsWith('SQLitePCLRaw'))" />
|
|
</ItemGroup>
|
|
</Target>
|
|
<!-- Native libe_sqlite3 for Linux — also copy flat names the loader probes. -->
|
|
<Target Name="CopySqliteNativeRuntimes" AfterTargets="Build">
|
|
<ItemGroup>
|
|
<_SqliteNative Include="@(RuntimeCopyLocalItems)"
|
|
Condition="$([System.String]::Copy('%(RuntimeCopyLocalItems.DestinationSubPath)').Contains('e_sqlite3'))" />
|
|
</ItemGroup>
|
|
<Copy SourceFiles="@(_SqliteNative)"
|
|
DestinationFiles="$(OutputPath)@(_SqliteNative->'%(RuntimeCopyLocalItems.DestinationSubPath)')"
|
|
SkipUnchangedFiles="true"
|
|
Condition="'@(_SqliteNative)' != ''" />
|
|
<Copy SourceFiles="@(_SqliteNative)"
|
|
DestinationFiles="$(OutputPath)%(Filename)%(Extension)"
|
|
SkipUnchangedFiles="true"
|
|
Condition="'@(_SqliteNative)' != '' and $([System.String]::Copy('%(RuntimeCopyLocalItems.DestinationSubPath)').Contains('linux-x64'))" />
|
|
<Copy SourceFiles="@(_SqliteNative)"
|
|
DestinationFiles="$(OutputPath)e_sqlite3%(Extension)"
|
|
SkipUnchangedFiles="true"
|
|
Condition="'@(_SqliteNative)' != '' and $([System.String]::Copy('%(RuntimeCopyLocalItems.DestinationSubPath)').Contains('linux-x64')) and $([System.String]::Copy('%(Filename)').Contains('libe_sqlite3'))" />
|
|
</Target>
|
|
</Project>
|