depot/third_party/nixpkgs/pkgs/by-name/bl/blendfarm/fix-nixos-crashing-on-runtime.patch

143 lines
5.5 KiB
Diff

From aecfb0a69f9e418158d4a09ec955e0c3f4d8f062 Mon Sep 17 00:00:00 2001
From: Lyze <11274700+lyze237@users.noreply.github.com>
Date: Fri, 20 Sep 2024 19:48:58 +0200
Subject: [PATCH] Fix nixos crashing
---
.../LogicReinc.BlendFarm.Client.csproj | 2 +-
LogicReinc.BlendFarm.Client/RenderTask.cs | 1 +
LogicReinc.BlendFarm.Client/Tasks/ChunkedTask.cs | 1 +
LogicReinc.BlendFarm.Client/Tasks/SplitChunkedTask.cs | 1 +
LogicReinc.BlendFarm.Client/Tasks/SplittedTask.cs | 1 +
.../runtimeconfig.template.json | 10 ++++++++++
LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj | 2 --
LogicReinc.BlendFarm/nuget.config | 11 -----------
LogicReinc.BlendFarm/runtimeconfig.template.json | 10 ++++++++++
9 files changed, 25 insertions(+), 14 deletions(-)
create mode 100644 LogicReinc.BlendFarm.Client/runtimeconfig.template.json
delete mode 100644 LogicReinc.BlendFarm/nuget.config
create mode 100644 LogicReinc.BlendFarm/runtimeconfig.template.json
diff --git a/LogicReinc.BlendFarm.Client/LogicReinc.BlendFarm.Client.csproj b/LogicReinc.BlendFarm.Client/LogicReinc.BlendFarm.Client.csproj
index d534ea7..698e8d6 100644
--- a/LogicReinc.BlendFarm.Client/LogicReinc.BlendFarm.Client.csproj
+++ b/LogicReinc.BlendFarm.Client/LogicReinc.BlendFarm.Client.csproj
@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="System.Drawing.Common" Version="5.0.0" />
+ <PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="System.Text.Json" Version="5.0.0" />
</ItemGroup>
diff --git a/LogicReinc.BlendFarm.Client/RenderTask.cs b/LogicReinc.BlendFarm.Client/RenderTask.cs
index 9cc67dd..5ba3086 100644
--- a/LogicReinc.BlendFarm.Client/RenderTask.cs
+++ b/LogicReinc.BlendFarm.Client/RenderTask.cs
@@ -13,6 +13,7 @@
using System.Text;
using System.Threading;
using System.Threading.Tasks;
+using ImageConverter = LogicReinc.BlendFarm.Client.ImageTypes.ImageConverter;
namespace LogicReinc.BlendFarm.Shared
{
diff --git a/LogicReinc.BlendFarm.Client/Tasks/ChunkedTask.cs b/LogicReinc.BlendFarm.Client/Tasks/ChunkedTask.cs
index 310fa20..d84dbea 100644
--- a/LogicReinc.BlendFarm.Client/Tasks/ChunkedTask.cs
+++ b/LogicReinc.BlendFarm.Client/Tasks/ChunkedTask.cs
@@ -5,6 +5,7 @@
using System.Drawing;
using System.Linq;
using System.Text;
+using ImageConverter = LogicReinc.BlendFarm.Client.ImageTypes.ImageConverter;
namespace LogicReinc.BlendFarm.Client.Tasks
{
diff --git a/LogicReinc.BlendFarm.Client/Tasks/SplitChunkedTask.cs b/LogicReinc.BlendFarm.Client/Tasks/SplitChunkedTask.cs
index 6ed55dd..bf1eb14 100644
--- a/LogicReinc.BlendFarm.Client/Tasks/SplitChunkedTask.cs
+++ b/LogicReinc.BlendFarm.Client/Tasks/SplitChunkedTask.cs
@@ -8,6 +8,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using ImageConverter = LogicReinc.BlendFarm.Client.ImageTypes.ImageConverter;
namespace LogicReinc.BlendFarm.Client.Tasks
{
diff --git a/LogicReinc.BlendFarm.Client/Tasks/SplittedTask.cs b/LogicReinc.BlendFarm.Client/Tasks/SplittedTask.cs
index 7edcb92..5483d8f 100644
--- a/LogicReinc.BlendFarm.Client/Tasks/SplittedTask.cs
+++ b/LogicReinc.BlendFarm.Client/Tasks/SplittedTask.cs
@@ -9,6 +9,7 @@
using System.Text;
using System.Threading;
using System.Threading.Tasks;
+using ImageConverter = LogicReinc.BlendFarm.Client.ImageTypes.ImageConverter;
namespace LogicReinc.BlendFarm.Client.Tasks
{
diff --git a/LogicReinc.BlendFarm.Client/runtimeconfig.template.json b/LogicReinc.BlendFarm.Client/runtimeconfig.template.json
new file mode 100644
index 0000000..738771b
--- /dev/null
+++ b/LogicReinc.BlendFarm.Client/runtimeconfig.template.json
@@ -0,0 +1,10 @@
+{
+ "properties": {
+ "runtimeOptions": {
+ "System.Drawing.EnableUnixSupport": true
+ }
+ },
+ "configProperties": {
+ "System.Drawing.EnableUnixSupport": true
+ }
+}
diff --git a/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj b/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj
index 97aa471..7e7096c 100644
--- a/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj
+++ b/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj
@@ -60,8 +60,6 @@
<ItemGroup>
<PackageReference Include="Avalonia" Version="0.10.15" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.15" />
- <PackageReference Include="runtime.linux-x64.CoreCompat.System.Drawing" Version="1.0.0-beta009" />
- <PackageReference Include="runtime.osx.10.10-x64.CoreCompat.System.Drawing" Version="5.8.64" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.0" />
</ItemGroup>
<ItemGroup>
diff --git a/LogicReinc.BlendFarm/nuget.config b/LogicReinc.BlendFarm/nuget.config
deleted file mode 100644
index 6c273ab..0000000
--- a/LogicReinc.BlendFarm/nuget.config
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- To use the Avalonia CI feed to get unstable packages, move this file to the root of your solution.
--->
-
-<configuration>
- <packageSources>
- <add key="AvaloniaCI" value="https://www.myget.org/F/avalonia-ci/api/v2" />
- </packageSources>
-</configuration>
diff --git a/LogicReinc.BlendFarm/runtimeconfig.template.json b/LogicReinc.BlendFarm/runtimeconfig.template.json
new file mode 100644
index 0000000..738771b
--- /dev/null
+++ b/LogicReinc.BlendFarm/runtimeconfig.template.json
@@ -0,0 +1,10 @@
+{
+ "properties": {
+ "runtimeOptions": {
+ "System.Drawing.EnableUnixSupport": true
+ }
+ },
+ "configProperties": {
+ "System.Drawing.EnableUnixSupport": true
+ }
+}