aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2020-05-07 08:08:22 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-10-30 16:50:58 +0100
commite7763f64dbfbebcd90d61a936fd17c0e2a627029 (patch)
tree765f81715f64a9917dc43d333918a9724bac3925
parentmsi-example: remove unused parameter in call :msi (diff)
downloadwintun-e7763f64dbfbebcd90d61a936fd17c0e2a627029.tar.xz
wintun-e7763f64dbfbebcd90d61a936fd17c0e2a627029.zip
msi-example: add ARM64 support
Signed-off-by: Simon Rozman <simon@rozman.si>
-rw-r--r--msi-example/README.md22
-rw-r--r--msi-example/build.bat4
-rw-r--r--msi-example/exampletun.wxs6
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.
-->
<?if $(var.EXAMPLETUN_PLATFORM) = "amd64"?>
- <?define UpgradeCode = "{{{FIXED 64BIT UUID}}}"?>
+ <?define UpgradeCode = "{{{FIXED AMD64 UUID}}}"?>
+<?elseif $(var.EXAMPLETUN_PLATFORM) = "arm64"?>
+ <?define UpgradeCode = "{{{FIXED ARM64 UUID}}}"?>
<?elseif $(var.EXAMPLETUN_PLATFORM) = "x86"?>
- <?define UpgradeCode = "{{{FIXED 32BIT UUID}}}"?>
+ <?define UpgradeCode = "{{{FIXED X86 UUID}}}"?>
<?else?>
<?error Unknown platform ?>
<?endif?>