aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/build.bat
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-03-04 18:10:36 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-03-04 18:10:36 +0100
commitc27c38f1cbed6d03c122dcae24801994957b79e7 (patch)
tree2d65ba1ed070667393d80f0390b2f546db0c18f1 /build.bat
parentbuild: support windows (diff)
downloadwireguard-windows-c27c38f1cbed6d03c122dcae24801994957b79e7.tar.xz
wireguard-windows-c27c38f1cbed6d03c122dcae24801994957b79e7.zip
build: switch to musl.cc
binutils issues finally resolved.
Diffstat (limited to 'build.bat')
-rw-r--r--build.bat23
1 files changed, 7 insertions, 16 deletions
diff --git a/build.bat b/build.bat
index e440e56c..c7c0b591 100644
--- a/build.bat
+++ b/build.bat
@@ -2,7 +2,7 @@
set STARTDIR=%cd%
set OLDPATH=%PATH%
if not exist deps\.prepared call :installdeps
-set PATH=%STARTDIR%\deps\tdm\bin\;%STARTDIR%\deps\go\bin\;%PATH%
+set PATH=%STARTDIR%\deps\x86_64-w64-mingw32-native\bin\;%STARTDIR%\deps\go\bin\;%PATH%
set CC=x86_64-w64-mingw32-gcc.exe
set GOOS=windows
set GOARCH=amd64
@@ -21,25 +21,16 @@ goto :out
cd deps || goto :error
echo Downloading golang
curl -#o go.zip https://dl.google.com/go/go1.12.windows-amd64.zip || goto :error
- echo Downloading gcc
- curl -#Lo gcc.zip https://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%%205%%20series/5.1.0-tdm64-1/gcc-5.1.0-tdm64-1-core.zip || goto :error
- echo Downloading binutils
- curl -#Lo binutils.zip https://sourceforge.net/projects/tdm-gcc/files/GNU%%20binutils/binutils-2.25-tdm64-1.zip || goto :error
- echo Downloading mingw64rt
- curl -#Lo mingw64rt.zip https://sourceforge.net/projects/tdm-gcc/files/MinGW-w64%%20runtime/GCC%%205%%20series/mingw64runtime-v4-git20150618-gcc5-tdm64-1.zip
+ echo Downloading mingw
+ curl -#o mingw.tar.gz http://musl.cc/x86_64-w64-mingw32-native.tgz || goto :error
echo Extracting golang
tar -xf go.zip || goto :error
- mkdir tdm || goto :error
- cd tdm || goto :error
echo Extracting gcc
- tar -xf ..\gcc.zip || goto :error
- echo Extracting binutils
- tar -xf ..\binutils.zip || goto :error
- echo Extracting mingw64rt
- tar -xf ..\mingw64rt.zip || goto :error
- cd .. || goto :error
+ rem We don't goto error here because the symlinks make it always fail
+ tar -xf mingw.tar.gz
+ move x86_64-w64-mingw32-native/include x86_64-w64-mingw32-native/x86_64-w64-mingw32/ > NUL || goto :error
echo Cleaning up
- del go.zip gcc.zip binutils.zip mingw64rt.zip || goto :error
+ del go.zip mingw.tar.gz || goto :error
copy /y NUL .prepared > NUL || goto :error
cd .. || goto :error
exit /b