From 2afed204710fcb9098ce00ece65d489045fa6a41 Mon Sep 17 00:00:00 2001 From: Yifei Kong Date: Tue, 25 Jun 2024 11:27:23 +0800 Subject: [PATCH] Fix sysroot prefix for mingw32 --- .github/workflows/build-win.yaml | 2 +- win/build.sh | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-win.yaml b/.github/workflows/build-win.yaml index 1c4f8e48..93ebe283 100644 --- a/.github/workflows/build-win.yaml +++ b/.github/workflows/build-win.yaml @@ -65,7 +65,7 @@ jobs: - name: Copy and patch shell: msys2 {0} - run: ./win/build.sh + run: ./win/build.sh ${{ matrix.sys }} # - name: Setup tmate session for debugging # uses: mxschmitt/action-tmate@v3 diff --git a/win/build.sh b/win/build.sh index 4911b01a..eb49f2b0 100644 --- a/win/build.sh +++ b/win/build.sh @@ -72,20 +72,22 @@ mingw32-make -j CFG=-ssl-zlib-nghttp2-idn2-brotli-zstd-ipv6 cd .. +SYS=$1 + mkdir -p ../dist ls build mv build/lib/libcurl* ../dist/ -cp /mingw64/bin/libidn2-0.dll ../dist/ -cp /mingw64/bin/libnghttp2-14.dll ../dist/ -cp /mingw64/bin/libbrotlidec.dll ../dist/ -cp /mingw64/bin/libbrotlicommon.dll ../dist/ -cp /mingw64/bin/libpsl-5.dll ../dist/ -cp /mingw64/bin/libssh2-1.dll ../dist/ -cp /mingw64/bin/libzstd.dll ../dist/ -cp /mingw64/bin/zlib1.dll ../dist/ -cp /mingw64/bin/libiconv-2.dll ../dist/ -cp /mingw64/bin/libintl-8.dll ../dist/ -cp /mingw64/bin/libunistring-5.dll ../dist +cp /$SYS/bin/libidn2-0.dll ../dist/ +cp /$SYS/bin/libnghttp2-14.dll ../dist/ +cp /$SYS/bin/libbrotlidec.dll ../dist/ +cp /$SYS/bin/libbrotlicommon.dll ../dist/ +cp /$SYS/bin/libpsl-5.dll ../dist/ +cp /$SYS/bin/libssh2-1.dll ../dist/ +cp /$SYS/bin/libzstd.dll ../dist/ +cp /$SYS/bin/zlib1.dll ../dist/ +cp /$SYS/bin/libiconv-2.dll ../dist/ +cp /$SYS/bin/libintl-8.dll ../dist/ +cp /$SYS/bin/libunistring-5.dll ../dist mv build/src/*.exe ../dist/ cd ..