From 353e02c08a86a4effeb75bd86dc0bc4b3f5ee578 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 23 Dec 2023 02:11:44 +0800 Subject: [PATCH] add windows system util --- .gitignore | 3 ++ src/SPC/builder/windows/SystemUtil.php | 24 +++++++++++ src/SPC/doctor/item/WindowsToolCheckList.php | 44 ++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 src/SPC/builder/windows/SystemUtil.php create mode 100644 src/SPC/doctor/item/WindowsToolCheckList.php diff --git a/.gitignore b/.gitignore index e5454565..776dbffd 100644 --- a/.gitignore +++ b/.gitignore @@ -26,5 +26,8 @@ docker/source/ !/bin/setup-runtime* !/bin/spc-alpine-docker +# exclude windows build tools +/php-sdk-binary-tools/ + # default test directory /tests/var/ diff --git a/src/SPC/builder/windows/SystemUtil.php b/src/SPC/builder/windows/SystemUtil.php new file mode 100644 index 00000000..f03b0e43 --- /dev/null +++ b/src/SPC/builder/windows/SystemUtil.php @@ -0,0 +1,24 @@ +exec('git clone https://github.com/php/php-sdk-binary-tools.git ' . PHP_SDK_PATH); + } catch (RuntimeException) { + return false; + } + return true; + } +}