diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-03-07 06:27:53 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-03-07 20:55:12 +0100 |
commit | 439748fdeecad1e97307c2b0b154a6d1370b518c (patch) | |
tree | 2c825b68c237a877878ffbd626a822b63e2d8fac /build.bat | |
parent | names: better casing (diff) | |
download | wireguard-windows-439748fdeecad1e97307c2b0b154a6d1370b518c.tar.xz wireguard-windows-439748fdeecad1e97307c2b0b154a6d1370b518c.zip |
ui: embed resource the old fashioned way
If we ever get rid of the cgo requirement, we can return to rsrc or some
variant of it. But given that win32 GUI stuff benefits from the larger
cgo stacks, that seems unlikely. This gives us a bit more latitude to
embed all sorts of interesting things in here as well.
Clean up the makefile while we're at it and reduce the size of the exe.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'build.bat')
-rw-r--r-- | build.bat | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -4,15 +4,16 @@ set OLDPATH=%PATH% if not exist deps\.prepared call :installdeps set PATH=%STARTDIR%\deps\x86_64-w64-mingw32-native\bin\;%STARTDIR%\deps\go\bin\;%PATH% set CC=x86_64-w64-mingw32-gcc.exe +set CFLAGS=-O3 -Wall -std=gnu11 set GOOS=windows set GOARCH=amd64 set GOPATH=%STARTDIR%\deps\gopath set GOROOT=%STARTDIR%\deps\go set CGO_ENABLED=1 echo Assembling resources -go run github.com/akavel/rsrc -manifest ui/manifest.xml -ico ui/icon/icon.ico -arch amd64 -o resources.syso || goto :error +windres.exe -i resources.rc -o resources.syso -O coff || goto :error echo Building program -go build -ldflags="-H windowsgui" -o wireguard.exe || goto :error +go build -ldflags="-H windowsgui -s -w" -v -o wireguard.exe || goto :error goto :out :installdeps |