|
2 | 2 |
|
3 | 3 | <?if $(var.Platform)="x86"?> |
4 | 4 | <?define Program_Files="ProgramFilesFolder"?> |
5 | | -<?else?> |
| 5 | +<?else ?> |
6 | 6 | <?define Program_Files="ProgramFiles64Folder"?> |
7 | | -<?endif?> |
| 7 | +<?endif ?> |
8 | 8 | <?ifndef var.Version?> |
9 | 9 | <?error Undefined Version variable?> |
10 | | -<?endif?> |
| 10 | +<?endif ?> |
11 | 11 | <?ifndef var.Path?> |
12 | 12 | <?error Undefined Path variable?> |
13 | | -<?endif?> |
| 13 | +<?endif ?> |
14 | 14 |
|
15 | 15 | <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> |
16 | | - <Product Id="35e5e858-9372-4449-bf73-1cd6f7267128" |
| 16 | + <Product Id="*" |
17 | 17 | UpgradeCode="23f90fdd-9328-47ea-ab52-5380855a4b12" |
18 | 18 | Name="cloudflared" |
19 | 19 | Version="$(var.Version)" |
20 | 20 | Manufacturer="cloudflare" |
21 | 21 | Language="1033"> |
22 | 22 |
|
23 | | - <Package InstallerVersion="200" Compressed="yes" Comments="Windows Installer Package" InstallScope="perMachine"/> |
| 23 | + <Package InstallerVersion="200" Compressed="yes" Comments="Windows Installer Package" InstallScope="perMachine" /> |
24 | 24 |
|
25 | | - <Media Id="1" Cabinet="product.cab" EmbedCab="yes"/> |
| 25 | + <Media Id="1" Cabinet="product.cab" EmbedCab="yes" /> |
26 | 26 |
|
27 | | - <Upgrade Id="23f90fdd-9328-47ea-ab52-5380855a4b12"> |
28 | | - <UpgradeVersion Minimum="$(var.Version)" OnlyDetect="yes" Property="NEWERVERSIONDETECTED"/> |
29 | | - <UpgradeVersion Minimum="2020.8.0" Maximum="$(var.Version)" IncludeMinimum="yes" IncludeMaximum="no" |
30 | | - Property="OLDERVERSIONBEINGUPGRADED"/> |
31 | | - </Upgrade> |
32 | | - <Condition Message="A newer version of this software is already installed.">NOT NEWERVERSIONDETECTED</Condition> |
| 27 | + <MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." /> |
33 | 28 |
|
34 | | - <Directory Id="TARGETDIR" Name="SourceDir"> |
35 | | - <!--This specifies where the cloudflared.exe is moved to in the windows Operation System--> |
36 | | - <Directory Id="$(var.Program_Files)"> |
37 | | - <Directory Id="INSTALLDIR" Name="cloudflared"> |
38 | | - <Component Id="ApplicationFiles" Guid="35e5e858-9372-4449-bf73-1cd6f7267128"> |
39 | | - <File Id="ApplicationFile0" Source="$(var.Path)"/> |
40 | | - </Component> |
| 29 | + <Upgrade Id="23f90fdd-9328-47ea-ab52-5380855a4b12"> |
| 30 | + <UpgradeVersion Minimum="$(var.Version)" OnlyDetect="yes" Property="NEWERVERSIONDETECTED" /> |
| 31 | + <UpgradeVersion Minimum="2020.8.0" Maximum="$(var.Version)" IncludeMinimum="yes" IncludeMaximum="no" |
| 32 | + Property="OLDERVERSIONBEINGUPGRADED" /> |
| 33 | + </Upgrade> |
| 34 | + <Condition Message="A newer version of this software is already installed.">NOT NEWERVERSIONDETECTED</Condition> |
| 35 | + |
| 36 | + <Directory Id="TARGETDIR" Name="SourceDir"> |
| 37 | + <!--This specifies where the cloudflared.exe is moved to in the windows Operation System--> |
| 38 | + <Directory Id="$(var.Program_Files)"> |
| 39 | + <Directory Id="INSTALLDIR" Name="cloudflared"> |
| 40 | + <Component Id="ApplicationFiles" Guid="35e5e858-9372-4449-bf73-1cd6f7267128"> |
| 41 | + <File Id="ApplicationFile0" Source="$(var.Path)" /> |
| 42 | + </Component> |
| 43 | + </Directory> |
41 | 44 | </Directory> |
| 45 | + <Component Id="ENVS" Guid="6bb74449-d10d-4f4a-933e-6fc9fa006eae"> |
| 46 | + <!--Set the cloudflared bin location to the Path Environment Variable--> |
| 47 | + <Environment Id="ENV0" |
| 48 | + Name="PATH" |
| 49 | + Value="[INSTALLDIR]." |
| 50 | + Permanent="no" |
| 51 | + Part="last" |
| 52 | + Action="create" |
| 53 | + System="yes" /> |
| 54 | + </Component> |
42 | 55 | </Directory> |
43 | | - <Component Id="ENVS" Guid="6bb74449-d10d-4f4a-933e-6fc9fa006eae"> |
44 | | - <!--Set the cloudflared bin location to the Path Environment Variable--> |
45 | | - <Environment Id="ENV0" |
46 | | - Name="PATH" |
47 | | - Value="[INSTALLDIR]." |
48 | | - Permanent="no" |
49 | | - Part="last" |
50 | | - Action="create" |
51 | | - System="yes" /> |
52 | | - </Component> |
53 | | - </Directory> |
54 | | - |
55 | | - |
56 | | - <Feature Id='Complete' Level='1'> |
57 | | - <ComponentRef Id="ENVS"/> |
58 | | - <ComponentRef Id='ApplicationFiles' /> |
59 | | - </Feature> |
| 56 | + |
| 57 | + |
| 58 | + <Feature Id='Complete' Level='1'> |
| 59 | + <ComponentRef Id="ENVS" /> |
| 60 | + <ComponentRef Id='ApplicationFiles' /> |
| 61 | + </Feature> |
60 | 62 |
|
61 | 63 | </Product> |
62 | 64 | </Wix> |
0 commit comments