aboutsummaryrefslogtreecommitdiffstats
path: root/msi-example/README.md
blob: 4197de7c7e125005d52b235f114c4c9e9b083342 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
## Example Standalone MSI

The best way to include Wintun in your software is by including the MSMs in your final MSI,
as described by [the main README](../README.md). However, if you're stuck with an installation
system such as NSIS, which can not bundle MSM files, then you must build your own MSI, which
NSIS can then invoke. ***Do not use an MSI from elsewhere. You must build it yourself and
distribute only the MSI that you yourself build.*** Otherwise different projects will wind up
uninstalling each other by accident and disturbing the MSM reference counting. The steps in
this file should only be taken if you're not able to include an MSM into a MSI, something that
is easily possible using WiX or most commercial installation solutions.

This `msi-example` folder contains a WiX skeleton and a build script that handles all
dependencies. use it as follows below.

#### Steps:

1. Generate a UUID using uuidgen.exe and replace `{{{FIXED 64BIT 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
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`,
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
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
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.

7. Distribute dist\exampletun-*.msi for your own software only.