From fb2d676293cac18cb61d48895bc0b70d266eafc0 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Sun, 27 Jul 2025 01:22:11 +0700 Subject: [PATCH] zig doesn't support windows (php doesn't support mingw, zig can only compile mingw) --- src/SPC/store/pkg/Zig.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/SPC/store/pkg/Zig.php b/src/SPC/store/pkg/Zig.php index 65941703..a2846089 100644 --- a/src/SPC/store/pkg/Zig.php +++ b/src/SPC/store/pkg/Zig.php @@ -104,12 +104,16 @@ class Zig extends CustomPackage { $pkgroot = PKG_ROOT_PATH; $zig_bin_dir = "{$pkgroot}/{$name}"; - $zig_exec = match (PHP_OS_FAMILY) { - 'Windows' => "{$zig_bin_dir}/zig.exe", - default => "{$zig_bin_dir}/zig", - }; - if (file_exists($zig_exec) && file_exists("{$zig_bin_dir}/zig-cc")) { + $files = ['zig', 'zig-cc', 'zig-c++', 'zig-ar', 'zig-ld.lld', 'zig-ranlib', 'zig-objcopy']; + $all_exist = true; + foreach ($files as $file) { + if (!file_exists("{$zig_bin_dir}/{$file}")) { + $all_exist = false; + break; + } + } + if ($all_exist) { return; }