From e7763f64dbfbebcd90d61a936fd17c0e2a627029 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Thu, 7 May 2020 08:08:22 +0200 Subject: msi-example: add ARM64 support Signed-off-by: Simon Rozman --- msi-example/README.md | 22 +++++++++++++++------- msi-example/build.bat | 4 +++- msi-example/exampletun.wxs | 6 ++++-- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/msi-example/README.md b/msi-example/README.md index 4197de7..0a42201 100644 --- a/msi-example/README.md +++ b/msi-example/README.md @@ -14,25 +14,33 @@ dependencies. use it as follows below. #### Steps: -1. Generate a UUID using uuidgen.exe and replace `{{{FIXED 64BIT UUID}}}` in exampletun.wxs +1. Generate a UUID using uuidgen.exe and replace `{{{FIXED AMD64 UUID}}}` in exampletun.wxs with that UUID. For the life time of your entire product, even across versions, do not change that UUID. -2. Generate another UUID using uuidgen.exe and replace `{{{FIXED 32BIT UUID}}}` in +2. Generate a UUID using uuidgen.exe and replace `{{{FIXED ARM64 UUID}}}` in exampletun.wxs +with that UUID. For the life time of your entire product, even across versions, do not change +that UUID. + +3. Generate another UUID using uuidgen.exe and replace `{{{FIXED X86 UUID}}}` in exampletun.wxs with that UUID. For the life time of your entire product, even across versions, do not change that UUID. -3. Go to [Wintun.net](https://www.wintun.net/) and look at what the latest version is (`0.6`, +4. Go to [Wintun.net](https://www.wintun.net/) and look at what the latest version is (`0.6`, for example). Replace `{{{VERSION}}}` in build.bat with that version. -4. Download the amd64 MSM from [Wintun.net](https://www.wintun.net/) and compute its SHA2-256 +5. Download the amd64 MSM from [Wintun.net](https://www.wintun.net/) and compute its SHA2-256 +sum in all lowercase hex digits using `CertUtil -hashfile "path/to/file" SHA256`, and replace +`{{{64BIT HASH}}}` in build.bat with that value. + +6. Download the arm64 MSM from [Wintun.net](https://www.wintun.net/) and compute its SHA2-256 sum in all lowercase hex digits using `CertUtil -hashfile "path/to/file" SHA256`, and replace `{{{64BIT HASH}}}` in build.bat with that value. -5. Download the x86 MSM from [Wintun.net](https://www.wintun.net/) and compute its SHA2-256 +7. Download the x86 MSM from [Wintun.net](https://www.wintun.net/) and compute its SHA2-256 sum in all lowercase hex digits using `CertUtil -hashfile "path/to/file" SHA256`, and replace `{{{32BIT HASH}}}` in build.bat with that value. -6. Run build.bat. +8. Run build.bat. -7. Distribute dist\exampletun-*.msi for your own software only. +9. Distribute dist\exampletun-*.msi for your own software only. diff --git a/msi-example/build.bat b/msi-example/build.bat index fe3d3d9..08a83ee 100644 --- a/msi-example/build.bat +++ b/msi-example/build.bat @@ -17,7 +17,8 @@ if exist .deps\prepared goto :build cd .deps || goto :error call :download wintun-x86.msm https://www.wintun.net/builds/wintun-x86-{{{VERSION}}}.msm {{{32BIT HASH}}} || goto :error call :download wintun-amd64.msm https://www.wintun.net/builds/wintun-amd64-{{{VERSION}}}.msm {{{64BIT HASH}}} || goto :error - call :download wix-binaries.zip http://wixtoolset.org/downloads/v3.14.0.2812/wix314-binaries.zip 923892298f37514622c58cbbd9c2cadf2822d9bb53df8ee83aaeb05280777611 || goto :error + call :download wintun-arm64.msm https://www.wintun.net/builds/wintun-arm64-{{{VERSION}}}.msm {{{64BIT HASH}}} || goto :error + call :download wix-binaries.zip https://wixtoolset.org/downloads/v3.14.0.3910/wix314-binaries.zip 0904a88a4bcd9dd3c2274caabe73989cd72767ee90c8fa0bf813d004eec90d32 || goto :error echo [+] Extracting wix-binaries.zip mkdir wix\bin || goto :error tar -xf wix-binaries.zip -C wix\bin || goto :error @@ -30,6 +31,7 @@ if exist .deps\prepared goto :build set WIX=%BUILDDIR%.deps\wix\ call :msi x86 x86 || goto :error call :msi amd64 x64 || goto :error + call :msi arm64 arm64 || goto :error if exist ..\sign.bat call ..\sign.bat if "%SigningCertificate%"=="" goto :success if "%TimestampServer%"=="" goto :success diff --git a/msi-example/exampletun.wxs b/msi-example/exampletun.wxs index d5faf52..2dab6a0 100644 --- a/msi-example/exampletun.wxs +++ b/msi-example/exampletun.wxs @@ -5,9 +5,11 @@ Copyright (C) 2019 WireGuard LLC. All Rights Reserved. --> - + + + - + -- cgit v1.2.3-59-g8ed1b