aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-11-09 11:42:05 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-11-10 17:35:01 +0100
commitdaa13bc3c5c51e98f7c775f8934960c349cd33a9 (patch)
tree7a33aa7261f30c6e990be32a4e62312dc2204a15
parentbuild: rebuild linker after patching (diff)
downloadwireguard-windows-daa13bc3c5c51e98f7c775f8934960c349cd33a9.tar.xz
wireguard-windows-daa13bc3c5c51e98f7c775f8934960c349cd33a9.zip
build: set codepage at command line for rc
Work around limitation of llvm-rc. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--Makefile2
-rw-r--r--build.bat2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 4e01ffa1..f1d88cd7 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ VERSION := $(shell sed -n 's/^\s*Number\s*=\s*"\([0-9.]\+\)"$$/\1/p' version/ver
empty :=
space := $(empty) $(empty)
comma := ,
-RCFLAGS := -DWIREGUARD_VERSION_ARRAY=$(subst $(space),$(comma),$(wordlist 1,4,$(subst .,$(space),$(VERSION)) 0 0 0 0)) -DWIREGUARD_VERSION_STR=$(VERSION) -O coff
+RCFLAGS := -DWIREGUARD_VERSION_ARRAY=$(subst $(space),$(comma),$(wordlist 1,4,$(subst .,$(space),$(VERSION)) 0 0 0 0)) -DWIREGUARD_VERSION_STR=$(VERSION) -O coff -c 65001
rwildcard=$(foreach d,$(filter-out .deps,$(wildcard $1*)),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
SOURCE_FILES := $(call rwildcard,,*.go) .deps/go/prepared go.mod go.sum
diff --git a/build.bat b/build.bat
index 32c1a9f9..4ff89cc3 100644
--- a/build.bat
+++ b/build.bat
@@ -79,7 +79,7 @@ if exist .deps\prepared goto :render
set GOARCH=%~3
mkdir %1 >NUL 2>&1
echo [+] Assembling resources %1
- %~2-w64-mingw32-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%
+ %~2-w64-mingw32-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 -c 65001 || exit /b %errorlevel%
echo [+] Building program %1
go build -ldflags="-H windowsgui -s -w" -trimpath -v -o "%~1\wireguard.exe" || exit /b 1
if not exist "%~1\wg.exe" (