[backend/csproj] Depend on in-house builds of NetVips.Native

This bypasses https://github.com/kleisauke/net-vips/issues/233 and allows us to not need separate msbuild options per architecture, greatly simplifying build options.
This commit is contained in:
Laura Hausmann 2024-06-19 14:23:49 +02:00
parent eb1c123c61
commit aed143cc59
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
3 changed files with 4 additions and 19 deletions

View file

@ -12,13 +12,13 @@ COPY Iceshrimp.Shared/*.csproj /src/Iceshrimp.Shared/
WORKDIR /src/Iceshrimp.Backend
ARG VIPS=true
ARG TARGETARCH
RUN dotnet restore -a $TARGETARCH -p:BundleNativeDepsMusl=$VIPS -p:EnableLibVips=$VIPS
RUN dotnet restore -a $TARGETARCH -p:BundleNativeDeps=$VIPS -p:EnableLibVips=$VIPS
# copy build files
COPY . /src/
# build
RUN dotnet publish --no-restore -c Release -a $TARGETARCH -o /app -p:BundleNativeDepsMusl=$VIPS -p:EnableLibVips=$VIPS
RUN dotnet publish --no-restore -c Release -a $TARGETARCH -o /app -p:BundleNativeDeps=$VIPS -p:EnableLibVips=$VIPS
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS builder-aot
RUN dotnet workload install wasm-tools

View file

@ -75,23 +75,7 @@
</ItemGroup>
<ItemGroup Condition=" '$(EnableLibVips)' == 'true' And '$(BundleNativeDeps)' == 'true' ">
<PackageReference Include="NetVips.Native.linux-x64" Version="8.15.2" />
<PackageReference Include="NetVips.Native.linux-arm64" Version="8.15.2" />
</ItemGroup>
<ItemGroup Condition=" '$(EnableLibVips)' == 'true' And '$(BundleNativeDepsMusl)' == 'true' ">
<PackageReference Include="NetVips.Native.linux-musl-x64" Version="8.15.2" />
<PackageReference Include="NetVips.Native.linux-musl-arm64" Version="8.15.2" />
</ItemGroup>
<ItemGroup Condition=" '$(EnableLibVips)' == 'true' And ($([MSBuild]::IsOSPlatform('macOS')) Or '$(BundleNativeDepsMacOS)' == 'true') ">
<PackageReference Include="NetVips.Native.osx-x64" Version="8.15.2" />
<PackageReference Include="NetVips.Native.osx-arm64" Version="8.15.2" />
</ItemGroup>
<ItemGroup Condition=" '$(EnableLibVips)' == 'true' And ($([MSBuild]::IsOSPlatform('Windows')) Or '$(BundleNativeDepsWindows)' == 'true') ">
<PackageReference Include="NetVips.Native.win-x64" Version="8.15.2" />
<PackageReference Include="NetVips.Native.win-arm64" Version="8.15.2" />
<PackageReference Include="NetVips.Native" Version="8.15.2-iceshrimp" />
</ItemGroup>
<ItemGroup>

View file

@ -13,6 +13,7 @@
<packageSource key="iceshrimp.dev">
<package pattern="Iceshrimp.*" />
<package pattern="dotNetRdf.Core" />
<package pattern="NetVips.Native" />
</packageSource>
</packageSourceMapping>
</configuration>