diff options
author | Simon Rozman <simon@rozman.si> | 2020-10-23 18:25:17 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-10 17:35:00 +0100 |
commit | d4e8408093edbdb47516b4bf4a23abdb14239a8c (patch) | |
tree | ee94ab1c6400f812b26f47b34bb8c298697f0dbd | |
parent | firewall, winipcfg: add arm and arm64 build tags (diff) | |
download | wireguard-windows-d4e8408093edbdb47516b4bf4a23abdb14239a8c.tar.xz wireguard-windows-d4e8408093edbdb47516b4bf4a23abdb14239a8c.zip |
wintun: move to RCDATA resource
Signed-off-by: Simon Rozman <simon@rozman.si>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | build.bat | 5 | ||||
-rw-r--r-- | installer/build.bat | 2 | ||||
-rw-r--r-- | installer/wireguard.wxs | 11 | ||||
-rw-r--r-- | resources.rc | 1 |
4 files changed, 4 insertions, 15 deletions
@@ -1,6 +1,6 @@ @echo off rem SPDX-License-Identifier: MIT -rem Copyright (C) 2019 WireGuard LLC. All Rights Reserved. +rem Copyright (C) 2019-2020 WireGuard LLC. All Rights Reserved. setlocal enabledelayedexpansion set BUILDDIR=%~dp0 @@ -25,6 +25,7 @@ if exist .deps\prepared goto :render call :download wireguard-tools.zip https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-1.0.20200319.zip f0f186924b67696e5dac6020270b0ac27fd7d96b4976605d1cded405d27b2f54 "--exclude wg-quick --strip-components 1" || goto :error rem Mirror of https://sourceforge.net/projects/gnuwin32/files/patch/2.5.9-7/patch-2.5.9-7-bin.zip with fixed manifest call :download patch.zip https://download.wireguard.com/windows-toolchain/distfiles/patch-2.5.9-7-bin-fixed-manifest.zip 25977006ca9713f2662a5d0a2ed3a5a138225b8be3757035bd7da9dcf985d0a1 "--strip-components 1 bin" || goto :error + call :download wintun.zip https://www.wintun.net/builds/wintun-0.9.zip 69afc860c9e5b5579f09847aeb9ac7b5190ec8ff6f21b6ec799f80351f19d1dd || goto :error echo [+] Patching go for %%a in ("..\go-patches\*.patch") do .\patch.exe -f -N -r- -d go -p1 --binary < "%%a" || goto :error copy /y NUL prepared > NUL || goto :error @@ -78,7 +79,7 @@ if exist .deps\prepared goto :render set GOARCH=%~3 mkdir %1 >NUL 2>&1 echo [+] Assembling resources %1 - windres -i resources.rc -o resources.syso -O coff || exit /b %errorlevel% + windres -I ".deps\wintun\bin\%~1" -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" ( diff --git a/installer/build.bat b/installer/build.bat index 864987d8..318fbb29 100644 --- a/installer/build.bat +++ b/installer/build.bat @@ -22,8 +22,6 @@ if exist .deps\prepared goto :build rmdir /s /q .deps 2> NUL mkdir .deps || goto :error cd .deps || goto :error - call :download wintun-x86.msm https://www.wintun.net/builds/wintun-x86-0.8.1.msm 5b47f83ffa9c361a360196d692f64755183e82c65f4753accc92087e6736af10 || goto :error - call :download wintun-amd64.msm https://www.wintun.net/builds/wintun-amd64-0.8.1.msm af9644438a716f5a022052e3574ee0404c3e3309daff84889d656178fbc6b168 || goto :error call :download wix-binaries.zip https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip 2c1888d5d1dba377fc7fa14444cf556963747ff9a0a289a3599cf09da03b9e2e || goto :error echo [+] Extracting wix-binaries.zip mkdir wix\bin || goto :error diff --git a/installer/wireguard.wxs b/installer/wireguard.wxs index 5bbb1ebb..ae08ac4a 100644 --- a/installer/wireguard.wxs +++ b/installer/wireguard.wxs @@ -42,7 +42,6 @@ <Property Id="ARPURLINFOABOUT" Value="https://www.wireguard.com/" /> <Property Id="ARPNOMODIFY" Value="yes" /> <Property Id="DISABLEADVTSHORTCUTS" Value="yes" /> - <Property Id="DISABLEROLLBACK" Value="yes" /> <Property Id="MSIDISABLERMRESTART" Value="1" /> <Property Id="MSIRMSHUTDOWN" Value="1" /> @@ -90,21 +89,11 @@ </ComponentGroup> <!-- - Merge modules - --> - <DirectoryRef Id="WireGuardFolder"> - <Merge Id="WintunMergeModule" Language="0" DiskId="1" SourceFile=".deps\wintun-$(var.WIREGUARD_PLATFORM).msm" /> - </DirectoryRef> - - <!-- Features --> <Feature Id="WireGuardFeature" Title="WireGuard" Level="1"> <ComponentGroupRef Id="WireGuardComponents" /> </Feature> - <Feature Id="WintunFeature" Title="Wintun" Level="1"> - <MergeRef Id="WintunMergeModule" /> - </Feature> <!-- Evaluate WireGuard services and populate ServiceControl table diff --git a/resources.rc b/resources.rc index f66ef4b5..063d1038 100644 --- a/resources.rc +++ b/resources.rc @@ -12,6 +12,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST manifest.xml $wireguard.ico ICON ui/icon/wireguard.ico dot-gray.ico ICON ui/icon/dot-gray.ico +wintun.dll RCDATA wintun.dll #define VERSIONINFO_TEMPLATE(block_id, lang_id, codepage_id, file_desc, comments) \ VS_VERSION_INFO VERSIONINFO \ |