diff options
author | 2021-01-02 23:41:15 +0100 | |
---|---|---|
committer | 2021-01-04 13:33:10 +0100 | |
commit | 26cfc16ec6fca552e6e0ddf682fde0106259dedc (patch) | |
tree | 97dd86c75a3f0e06faae6bafd5df48f35fe2bdfc | |
parent | embeddable-dll-service: fix code block types (diff) | |
download | wireguard-windows-26cfc16ec6fca552e6e0ddf682fde0106259dedc.tar.xz wireguard-windows-26cfc16ec6fca552e6e0ddf682fde0106259dedc.zip |
embeddable-dll-service: download gcc again, since clang does not work with cgo
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | embeddable-dll-service/build.bat | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/embeddable-dll-service/build.bat b/embeddable-dll-service/build.bat index f7adcd49..e0aa4c3b 100644 --- a/embeddable-dll-service/build.bat +++ b/embeddable-dll-service/build.bat @@ -8,9 +8,16 @@ set PATH=%BUILDDIR%..\.deps\go\bin;%BUILDDIR%..\.deps;%PATH% set PATHEXT=.exe cd /d %BUILDDIR% || exit /b 1 -if exist ..\.deps\prepared goto :build +if exist .prepared goto :build :installdeps call ..\build.bat || goto :error + pushd ..\.deps || goto :error + rem Mirror of https://musl.cc/i686-w64-mingw32-native.zip + call :download mingw-x86.zip https://download.wireguard.com/windows-toolchain/distfiles/i686-w64-mingw32-native-20200907.zip c972c00993727ac9bff83c799f4df65662adb95bc871fa30cfa8857e744a7fbd || goto :error + rem Mirror of https://musl.cc/x86_64-w64-mingw32-native.zip + call :download mingw-amd64.zip https://download.wireguard.com/windows-toolchain/distfiles/x86_64-w64-mingw32-native-20200907.zip e34fbacbd25b007a8074fc96f7e08f886241e0473a055987ee57483c37567aa5 || goto :error + popd || goto :error + copy /y NUL .prepared > NUL || goto :error :build set GOOS=windows @@ -25,6 +32,17 @@ if exist ..\.deps\prepared goto :build echo [+] Success exit /b 0 +:download + echo [+] Downloading %1 + curl -#fLo %1 %2 || exit /b 1 + echo [+] Verifying %1 + for /f %%a in ('CertUtil -hashfile %1 SHA256 ^| findstr /r "^[0-9a-f]*$"') do if not "%%a"=="%~3" exit /b 1 + echo [+] Extracting %1 + tar -xf %1 %~4 || exit /b 1 + echo [+] Cleaning up %1 + del %1 || exit /b 1 + goto :eof + :build_plat set PATH=%BUILDDIR%..\.deps\%~2-w64-mingw32-native\bin;%PATH% set CC=%~2-w64-mingw32-gcc |