| 1 |
<?xml version="1.0"?> |
| 2 |
|
| 3 |
<?if $(var.Platform)="x64" ?> |
| 4 |
<?define Program_Files="ProgramFiles64Folder"?> |
| 5 |
<?else ?> |
| 6 |
<?define Program_Files="ProgramFilesFolder"?> |
| 7 |
<?endif ?> |
| 8 |
<?ifndef var.Version?> |
| 9 |
<?error Undefined Version variable?> |
| 10 |
<?endif ?> |
| 11 |
<?ifndef var.Path?> |
| 12 |
<?error Undefined Path variable?> |
| 13 |
<?endif ?> |
| 14 |
|
| 15 |
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> |
| 16 |
<Product Id="*" |
| 17 |
UpgradeCode="fbf99dd8-c21e-4f9b-a632-de53bb64c45e" |
| 18 |
Name="dnscrypt-proxy" |
| 19 |
Version="$(var.Version)" |
| 20 |
Manufacturer="DNSCrypt" |
| 21 |
Language="1033"> |
| 22 |
|
| 23 |
<Package InstallerVersion="200" Compressed="yes" Comments="Windows Installer Package" InstallScope="perMachine" /> |
| 24 |
<Media Id="1" Cabinet="product.cab" EmbedCab="yes" /> |
| 25 |
<MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." /> |
| 26 |
|
| 27 |
<Upgrade Id="fbf99dd8-c21e-4f9b-a632-de53bb64c45e"> |
| 28 |
<UpgradeVersion Minimum="$(var.Version)" OnlyDetect="yes" Property="NEWERVERSIONDETECTED" /> |
| 29 |
<UpgradeVersion Minimum="2.1.0" Maximum="$(var.Version)" IncludeMinimum="yes" IncludeMaximum="no" Property="OLDERVERSIONBEINGUPGRADED" /> |
| 30 |
</Upgrade> |
| 31 |
<Condition Message="A newer version of this software is already installed.">NOT NEWERVERSIONDETECTED</Condition> |
| 32 |
|
| 33 |
<Directory Id="TARGETDIR" Name="SourceDir"> |
| 34 |
<Directory Id="$(var.Program_Files)"> |
| 35 |
<Directory Id="INSTALLDIR" Name="DNSCrypt"> |
| 36 |
<Component Id="ApplicationFiles" Guid="7d693c0b-71d8-436a-9c84-60a11dc74092"> |
| 37 |
<File Id="dnscryptproxy.exe" KeyPath="yes" Source="$(var.Path)\dnscrypt-proxy.exe" DiskId="1"/> |
| 38 |
<File Source="$(var.Path)\LICENSE"></File> |
| 39 |
<File Source="$(var.Path)\service-install.bat"></File> |
| 40 |
<File Source="$(var.Path)\service-restart.bat"></File> |
| 41 |
<File Source="$(var.Path)\service-uninstall.bat"></File> |
| 42 |
<File Source="$(var.Path)\example-dnscrypt-proxy.toml"></File> |
| 43 |
</Component> |
| 44 |
<Component Id="ConfigInstall" Guid="db7b691e-f7c7-4c9a-92e1-c6f21ce6430f" KeyPath="yes"> |
| 45 |
<Condition><![CDATA[CONFIGFILE]]></Condition> |
| 46 |
<CopyFile Id="dnscryptproxytoml" DestinationDirectory="INSTALLDIR" DestinationName="dnscrypt-proxy.toml" SourceProperty="CONFIGFILE"> |
| 47 |
</CopyFile> |
| 48 |
<RemoveFile Id="RemoveConfig" Directory="INSTALLDIR" Name="dnscrypt-proxy.toml" On="uninstall" /> |
| 49 |
</Component> |
| 50 |
</Directory> |
| 51 |
</Directory> |
| 52 |
</Directory> |
| 53 |
|
| 54 |
<Feature Id="Complete" Level="1"> |
| 55 |
<ComponentRef Id="ApplicationFiles" /> |
| 56 |
<ComponentRef Id="ConfigInstall" /> |
| 57 |
</Feature> |
| 58 |
|
| 59 |
</Product> |
| 60 |
</Wix> |