From 8877f1ca2ae9839620b43c4998a2894389aa3b1a Mon Sep 17 00:00:00 2001
From: dxcvvxd <77129815+dxcvvxd@users.noreply.github.com>
Date: Wed, 16 Sep 2026 14:39:08 +0300
Subject: [PATCH] fix(build): apply patches on pipefail, dedupe optimum types
in donor csproj
fixes #94, #96
- bootstrap.sh: find|head|grep sigpipe under set -o pipefail skipped all
patches. use find -print -quit.
- sources/VintagestoryApi/VintagestoryAPI.csproj: overlay now owns
csproj, remove stale patches/VintagestoryApi/VintagestoryAPI.csproj.patch.
add missing Compile Removes (OptimumMeshPartPool, OptimumChunkVisibilityBfs,
OptimumCompatibilityGuard, OptimumFrustumCullSimd, OptimumKometGuard) so
Optimum types compile only in Optimum.Api.Contracts, not also in
VintagestoryAPI.dll (cs0433).
---
.../VintagestoryAPI.csproj.patch | 26 -------------------
scripts/bootstrap.sh | 2 +-
.../VintagestoryApi/VintagestoryAPI.csproj | 5 ++++
3 files changed, 6 insertions(+), 27 deletions(-)
delete mode 100644 patches/VintagestoryApi/VintagestoryAPI.csproj.patch
diff --git a/patches/VintagestoryApi/VintagestoryAPI.csproj.patch b/patches/VintagestoryApi/VintagestoryAPI.csproj.patch
deleted file mode 100644
index c5c3cf33..00000000
--- a/patches/VintagestoryApi/VintagestoryAPI.csproj.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/VintagestoryApi/VintagestoryAPI.csproj b/VintagestoryApi/VintagestoryAPI.csproj
-index afbd3bc..2ebb1eb 100644
---- a/VintagestoryApi/VintagestoryAPI.csproj
-+++ b/VintagestoryApi/VintagestoryAPI.csproj
-@@ -37,19 +37,21 @@
-
-
-
-
-
-+
-
-
-
-
-
-
-
-
-
-
-+
-
-
-
-
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh
index 0acb504d..7177d74c 100644
--- a/scripts/bootstrap.sh
+++ b/scripts/bootstrap.sh
@@ -1465,7 +1465,7 @@ if [[ "${#ownership_conflicts[@]}" -gt 0 ]]; then
exit 1
fi
-if [[ -d "$patches_dir" ]] && find "$patches_dir" -name '*.patch' -print 2>/dev/null | head -n 1 | grep -q .; then
+if [[ -d "$patches_dir" ]] && find "$patches_dir" -name '*.patch' -print -quit >/dev/null 2>&1; then
# ZIP downloads (non-clone) lack a .git/ directory. git add and git apply
# both exit 128 without one. Create a temporary repo so patches can apply.
diff --git a/sources/VintagestoryApi/VintagestoryAPI.csproj b/sources/VintagestoryApi/VintagestoryAPI.csproj
index afbd3bc6..fd2374f5 100644
--- a/sources/VintagestoryApi/VintagestoryAPI.csproj
+++ b/sources/VintagestoryApi/VintagestoryAPI.csproj
@@ -38,7 +38,11 @@
+
+
+
+
@@ -49,6 +53,7 @@
+