diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-07 18:16:12 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-13 14:42:54 +0100 |
commit | b71ffd1f09114936e3708bc1f914b2896950922b (patch) | |
tree | 765e201a57e16f0167e93fbf94d6d5367b0937c4 /build.bat | |
parent | build: add wintun 0.9 and arm support to makefile (diff) | |
download | wireguard-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.bat | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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" ( |