mirror of
https://github.com/amnezia-vpn/amneziawg-windows-client.git
synced 2026-06-02 06:23:38 +02:00
build: make arm64 binary by copying arm binary
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
/x86
|
/x86
|
||||||
/amd64
|
/amd64
|
||||||
/arm
|
/arm
|
||||||
|
/arm64
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
/locales/*/out.gotext.json
|
/locales/*/out.gotext.json
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ RESOURCE_FILES := resources.rc version/version.go manifest.xml $(patsubst %.svg,
|
|||||||
DEPLOYMENT_HOST ?= winvm
|
DEPLOYMENT_HOST ?= winvm
|
||||||
DEPLOYMENT_PATH ?= Desktop
|
DEPLOYMENT_PATH ?= Desktop
|
||||||
|
|
||||||
all: amd64/wireguard.exe x86/wireguard.exe arm/wireguard.exe
|
all: amd64/wireguard.exe x86/wireguard.exe arm64/wireguard.exe arm/wireguard.exe
|
||||||
|
|
||||||
define download =
|
define download =
|
||||||
.distfiles/$(1):
|
.distfiles/$(1):
|
||||||
@@ -66,6 +66,10 @@ arm/wireguard.exe: export GOARM := 7
|
|||||||
arm/wireguard.exe: resources_arm.syso $(SOURCE_FILES)
|
arm/wireguard.exe: resources_arm.syso $(SOURCE_FILES)
|
||||||
go build $(GOFLAGS) -o $@
|
go build $(GOFLAGS) -o $@
|
||||||
|
|
||||||
|
arm64/wireguard.exe: arm/wireguard.exe
|
||||||
|
mkdir -p $(@D)
|
||||||
|
cp $< $@
|
||||||
|
|
||||||
remaster: export GOARCH := amd64
|
remaster: export GOARCH := amd64
|
||||||
remaster: export GOPROXY := direct
|
remaster: export GOPROXY := direct
|
||||||
remaster: .deps/go/prepared
|
remaster: .deps/go/prepared
|
||||||
@@ -92,7 +96,7 @@ deploy: amd64/wireguard.exe
|
|||||||
scp $< $(DEPLOYMENT_HOST):$(DEPLOYMENT_PATH)
|
scp $< $(DEPLOYMENT_HOST):$(DEPLOYMENT_PATH)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf *.syso ui/icon/*.ico x86/ amd64/ arm/ .deps
|
rm -rf *.syso ui/icon/*.ico x86/ amd64/ arm/ arm64/ .deps
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -rf .distfiles
|
rm -rf .distfiles
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ if exist .deps\prepared goto :render
|
|||||||
call :build_plat x86 i686 386 || goto :error
|
call :build_plat x86 i686 386 || goto :error
|
||||||
call :build_plat amd64 x86_64 amd64 || goto :error
|
call :build_plat amd64 x86_64 amd64 || goto :error
|
||||||
call :build_plat arm armv7 arm || goto :error
|
call :build_plat arm armv7 arm || goto :error
|
||||||
|
call :build_plat arm64 aarch64 arm64 || goto :error
|
||||||
|
|
||||||
:sign
|
:sign
|
||||||
if exist .\sign.bat call .\sign.bat
|
if exist .\sign.bat call .\sign.bat
|
||||||
@@ -81,7 +82,11 @@ if exist .deps\prepared goto :render
|
|||||||
echo [+] Assembling resources %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 -c 65001 || 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
|
echo [+] Building program %1
|
||||||
go build -ldflags="-H windowsgui -s -w" -trimpath -v -o "%~1\wireguard.exe" || exit /b 1
|
if %1==arm64 (
|
||||||
|
copy "arm\wireguard.exe" "%~1\wireguard.exe" || exit /b 1
|
||||||
|
) else (
|
||||||
|
go build -ldflags="-H windowsgui -s -w" -trimpath -v -o "%~1\wireguard.exe" || exit /b 1
|
||||||
|
)
|
||||||
if not exist "%~1\wg.exe" (
|
if not exist "%~1\wg.exe" (
|
||||||
echo [+] Building command line tools %1
|
echo [+] Building command line tools %1
|
||||||
del .deps\src\*.exe .deps\src\*.o .deps\src\wincompat\*.o 2> NUL
|
del .deps\src\*.exe .deps\src\*.o .deps\src\wincompat\*.o 2> NUL
|
||||||
|
|||||||
Reference in New Issue
Block a user