aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-03-13 11:28:45 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-03-15 14:49:27 -0600
commit3ed41e2f1ecf4e5e6c7c96ea11f6ada0b813e024 (patch)
treeaa27592f3b48c9d4829e1c733d73c26e778ebede
parentl18n: add French translation (diff)
downloadwireguard-windows-3ed41e2f1ecf4e5e6c7c96ea11f6ada0b813e024.tar.xz
wireguard-windows-3ed41e2f1ecf4e5e6c7c96ea11f6ada0b813e024.zip
build: generalize generation mechanism to all submodules
-rw-r--r--Makefile6
-rw-r--r--README.md2
-rw-r--r--build.bat6
3 files changed, 7 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 129964a0..b8308ebe 100644
--- a/Makefile
+++ b/Makefile
@@ -46,10 +46,10 @@ fmt: export GOARCH := amd64
fmt:
go fmt ./...
-generate: export CC := i686-w64-mingw32-gcc
-generate: export GOARCH := 386
+generate: export CC := x86_64-w64-mingw32-gcc
+generate: export GOARCH := amd64
generate:
- go generate
+ go generate ./...
deploy: amd64/wireguard.exe
-ssh $(DEPLOYMENT_HOST) -- 'taskkill /im wireguard.exe /f'
diff --git a/README.md b/README.md
index f0b18455..793eec4b 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ To translate WireGuard UI to your language:
3. Configure and run `build` to prepare initial `locales\<langID>\messages.gotext.json` file:
```
- C:\Projects\wireguard-windows> set GenerateLocalizations=yes
+ C:\Projects\wireguard-windows> set GoGenerate=yes
C:\Projects\wireguard-windows> build
C:\Projects\wireguard-windows> copy locales\<langID>\out.gotext.json locales\<langID>\messages.gotext.json
```
diff --git a/build.bat b/build.bat
index f951f069..12c9da27 100644
--- a/build.bat
+++ b/build.bat
@@ -70,9 +70,9 @@ if exist .deps\prepared goto :render
mkdir %1 >NUL 2>&1
echo [+] Assembling resources %1
windres -i resources.rc -o resources.syso -O coff || exit /b %errorlevel%
- if "%GenerateLocalizations%|%1"=="yes|x86" (
- echo [+] Generating localizations %1
- go generate || exit /b 1
+ if "%GoGenerate%|%1"=="yes|x86" (
+ echo [+] Regenerating files
+ go generate ./... || exit /b 1
)
echo [+] Building program %1
go build -ldflags="-H windowsgui -s -w" -tags walk_use_cgo -trimpath -v -o "%~1\wireguard.exe" || exit /b 1