From f25894d30a92c6144ed356c40eb78fe97d044932 Mon Sep 17 00:00:00 2001
From: Hans <hans.chen@bricks.tools>
Date: Sun, 5 May 2024 02:52:10 +0800
Subject: [PATCH] fix: fix Windows x64 SDK prepare

---
 scripts/prepare-windows.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/scripts/prepare-windows.sh b/scripts/prepare-windows.sh
index 182351c..c1811b1 100755
--- a/scripts/prepare-windows.sh
+++ b/scripts/prepare-windows.sh
@@ -6,16 +6,21 @@ cd externals
 mkdir win32-x64 || true
 cd win32-x64
 
+mkdir SDK || true
+
 if [ ! -f OpenCL-SDK.zip ]; then
   curl -L https://github.com/KhronosGroup/OpenCL-SDK/releases/download/v2023.12.14/OpenCL-SDK-v2023.12.14-Win-x64.zip -o OpenCL-SDK.zip
-  7z x OpenCL-SDK-v2023.12.14-Win-x64.zip -oSDK
+  7z x OpenCL-SDK.zip
+  cp -r OpenCL-SDK-*/* SDK
+  rm -rf OpenCL-SDK-*
 fi
 
 if [ ! -f CLBlast.zip ]; then
   curl -L https://github.com/CNugteren/CLBlast/releases/download/1.6.2/CLBlast-1.6.2-windows-x64.zip -o CLBlast.zip
   7z x CLBlast.zip
   7z x CLBlast*.7z
-  mv CLBlast-1.6.2-windows-x64/* SDK
+  cp -r CLBlast-*/* SDK
+  rm -rf CLBlast-*
 fi
 
 cd ..