aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/build.bat
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-11-07 18:16:12 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-11-13 14:42:54 +0100
commitb71ffd1f09114936e3708bc1f914b2896950922b (patch)
tree765e201a57e16f0167e93fbf94d6d5367b0937c4 /build.bat
parentbuild: add wintun 0.9 and arm support to makefile (diff)
downloadwireguard-windows-b71ffd1f09114936e3708bc1f914b2896950922b.tar.xz
wireguard-windows-b71ffd1f09114936e3708bc1f914b2896950922b.zip
build: work with llvm-rc and use numbered icons
It's hard to keep these stable between resource compilers, so just use numbers, and roll with 7 to match rsrc/walk. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'build.bat')
-rw-r--r--build.bat3
1 files changed, 2 insertions, 1 deletions
diff --git a/build.bat b/build.bat
index 7bf73f98..de7bd799 100644
--- a/build.bat
+++ b/build.bat
@@ -38,6 +38,7 @@ if exist .deps\prepared goto :render
:build
for /f "tokens=3" %%a in ('findstr /r "Number.*=.*[0-9.]*" .\version\version.go') do set WIREGUARD_VERSION=%%a
set WIREGUARD_VERSION=%WIREGUARD_VERSION:"=%
+ for /f "tokens=1-4" %%a in ("%WIREGUARD_VERSION:.= % 0 0 0") do set WIREGUARD_VERSION_ARRAY=%%a,%%b,%%c,%%d
set GOOS=windows
set GOPATH=%BUILDDIR%.deps\gopath
set GOROOT=%BUILDDIR%.deps\go
@@ -84,7 +85,7 @@ if exist .deps\prepared goto :render
set GOARCH=%~3
mkdir %1 >NUL 2>&1
echo [+] Assembling resources %1
- windres -I ".deps\wintun\bin\%~1" -DWIREGUARD_WINDOWS_VERSION_ARRAY=%WIREGUARD_VERSION:.=,% -DWIREGUARD_WINDOWS_VERSION_STR=%WIREGUARD_VERSION% -i resources.rc -o "resources_%~3.syso" -O coff || exit /b %errorlevel%
+ windres -I ".deps\wintun\bin\%~1" -DWIREGUARD_VERSION_ARRAY=%WIREGUARD_VERSION_ARRAY% -DWIREGUARD_VERSION_STR=%WIREGUARD_VERSION% -i resources.rc -o "resources_%~3.syso" -O coff || exit /b %errorlevel%
echo [+] Building program %1
go build -ldflags="-H windowsgui -s -w" -tags walk_use_cgo -trimpath -v -o "%~1\wireguard.exe" || exit /b 1
if not exist "%~1\wg.exe" (