585ec16cac
The certificate(s) must be installed before drivers are installed. Signed-off-by: Simon Rozman <simon@rozman.si>
137 lines
5.0 KiB
XML
137 lines
5.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
SPDX-License-Identifier: GPL-2.0
|
|
|
|
Copyright (C) 2018-2019 WireGuard LLC. All Rights Reserved.
|
|
-->
|
|
<?if $(var.Platform) = "x86"?>
|
|
<?define PlatformProgramFilesFolder = "ProgramFilesFolder"?>
|
|
<?else?>
|
|
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder"?>
|
|
<?endif?>
|
|
<Wix
|
|
xmlns="http://schemas.microsoft.com/wix/2006/wi"
|
|
xmlns:diffx="http://schemas.microsoft.com/wix/DifxAppExtension"
|
|
xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension">
|
|
<Module Id="wintun" Language="0" Version="$(var.WINTUN_VERSION)">
|
|
<Package
|
|
Id="c28309d9-1954-4f2d-a7d1-228850092460"
|
|
Description="Wintun Userspace Tunnel"
|
|
Manufacturer="WireGuard LLC"
|
|
InstallerVersion="200"
|
|
InstallPrivileges="elevated"
|
|
InstallScope="perMachine"
|
|
ReadOnly="yes"/>
|
|
|
|
<Binary Id="wintun.cer" SourceFile="!(bindpath.output_dir)wintun.cer"/>
|
|
|
|
<Property Id="WINDOWS10_VER_MAJ">
|
|
<RegistrySearch Id="Windows10VersionMaj" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Name="CurrentMajorVersionNumber" Type="raw"/>
|
|
</Property>
|
|
|
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
|
<Directory Id="WintunFolder">
|
|
<Component Id="wintun.cat.whql" Guid="2f17bc6d-0006-47c4-8ba3-f055d1852558">
|
|
<Condition><![CDATA[WINDOWS10_VER_MAJ]]></Condition>
|
|
<File
|
|
Id="wintun.cat.whql"
|
|
Name="wintun.cat"
|
|
Source="!(bindpath.whql_dir)wintun.cat"
|
|
DefaultVersion="$(var.WINTUN_VERSION)"
|
|
DefaultLanguage="0"/>
|
|
<diffx:Driver
|
|
AddRemovePrograms="no"
|
|
PlugAndPlayPrompt="no"/>
|
|
</Component>
|
|
<Component Id="wintun.cat" Guid="41fbe711-a1af-4b83-8b5d-fc1b112969c1">
|
|
<Condition><![CDATA[NOT WINDOWS10_VER_MAJ]]></Condition>
|
|
<File
|
|
Id="wintun.cat"
|
|
Name="wintun.cat"
|
|
Source="!(bindpath.output_dir)wintun\wintun.cat"
|
|
DefaultVersion="$(var.WINTUN_VERSION)"
|
|
DefaultLanguage="0"/>
|
|
<iis:Certificate
|
|
Id="wintun.cer"
|
|
Name="WireGuard LLC"
|
|
StoreLocation="localMachine"
|
|
StoreName="trustedPublisher"
|
|
BinaryKey="wintun.cer"
|
|
Request="no"/>
|
|
<diffx:Driver
|
|
AddRemovePrograms="no"
|
|
PlugAndPlayPrompt="no"/>
|
|
</Component>
|
|
|
|
<Component Id="wintun.inf" Guid="c58122b3-c7ba-4207-b68d-a236e371f9ed">
|
|
<File
|
|
Id="wintun.inf"
|
|
Name="wintun.inf"
|
|
Source="!(bindpath.output_dir)wintun\wintun.inf"
|
|
DefaultVersion="$(var.WINTUN_VERSION)"
|
|
DefaultLanguage="0"/>
|
|
</Component>
|
|
|
|
<Component Id="wintun.sys.whql" Guid="039baa6d-b16b-4dc2-8b86-8bb500f78de0">
|
|
<Condition><![CDATA[WINDOWS10_VER_MAJ]]></Condition>
|
|
<File
|
|
Id="wintun.sys.whql"
|
|
Name="wintun.sys"
|
|
Source="!(bindpath.whql_dir)wintun.sys"
|
|
DefaultVersion="$(var.WINTUN_VERSION)"
|
|
DefaultLanguage="0"/>
|
|
</Component>
|
|
<Component Id="wintun.sys" Guid="d0fde4a4-d228-4803-b57e-76bd8b16cf42">
|
|
<Condition><![CDATA[NOT WINDOWS10_VER_MAJ]]></Condition>
|
|
<File
|
|
Id="wintun.sys"
|
|
Name="wintun.sys"
|
|
Source="!(bindpath.output_dir)wintun\wintun.sys"
|
|
DefaultVersion="$(var.WINTUN_VERSION)"
|
|
DefaultLanguage="0"/>
|
|
</Component>
|
|
</Directory>
|
|
</Directory>
|
|
|
|
<!--
|
|
The WintunFolder is relocated inside product folder when our module is merged.
|
|
To avoid this, set WintunFolder property to [ProgramFilesFolder]\Wintun explicitly
|
|
in each installer sequence.
|
|
-->
|
|
<Property Id="$(var.PlatformProgramFilesFolder)" SuppressModularization="yes"/><!-- This will produce CNDL1006 and CNDL1086 warnings, but it prevents "[ProgramFiles(64)Folder]" from being modularized to "[ProgramFiles(64)Folder.C28309D9_1954_4F2D_A7D1_228850092460]". -->
|
|
<CustomAction Id="WintunFolder" Property="WintunFolder" Value="[$(var.PlatformProgramFilesFolder)]\Wintun"/>
|
|
<AdminExecuteSequence>
|
|
<Custom Action="WintunFolder" Before="CostInitialize"/>
|
|
</AdminExecuteSequence>
|
|
<AdminUISequence>
|
|
<Custom Action="WintunFolder" Before="CostInitialize"/>
|
|
</AdminUISequence>
|
|
<AdvertiseExecuteSequence>
|
|
<Custom Action="WintunFolder" Before="CostInitialize"/>
|
|
</AdvertiseExecuteSequence>
|
|
<InstallExecuteSequence>
|
|
<Custom Action="WintunFolder" Before="CostInitialize"/>
|
|
</InstallExecuteSequence>
|
|
<InstallUISequence>
|
|
<Custom Action="WintunFolder" Before="CostInitialize"/>
|
|
</InstallUISequence>
|
|
|
|
<!--
|
|
Prevent WoW64 installations.
|
|
-->
|
|
<?if $(var.Platform) = "x86"?>
|
|
<CustomAction Id="WoW64Unsupported" Error="You are attempting to install the 32-bit variant of [ProductName] on a 64-bit operating system. 32-bit variant will not work with your operating system. The installation of the 64-bit variant is recommended."/>
|
|
<InstallExecuteSequence>
|
|
<Custom Action="WoW64Unsupported" After="LaunchConditions"><![CDATA[VersionNT64]]></Custom>
|
|
</InstallExecuteSequence>
|
|
<InstallUISequence>
|
|
<Custom Action="WoW64Unsupported" After="LaunchConditions"><![CDATA[VersionNT64]]></Custom>
|
|
</InstallUISequence>
|
|
<?endif?>
|
|
|
|
<InstallExecuteSequence>
|
|
<Custom Action="InstallCertificates" Before="MsiProcessDrivers"><![CDATA[VersionNT > 400]]></Custom>
|
|
</InstallExecuteSequence>
|
|
</Module>
|
|
</Wix>
|