aboutsummaryrefslogtreecommitdiffstats
path: root/installer/installer.wxs
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-07-22 07:36:21 +0000
committerJason A. Donenfeld <Jason@zx2c4.com>2019-08-02 09:43:32 +0000
commit22e2da002d8ad18b3d3f1286191f03854939f3c4 (patch)
treeca211b7743fa5e018694f11efb717621a9b13f25 /installer/installer.wxs
parentUse explicit running boolean and use set instead of exchange (diff)
downloadwintun-22e2da002d8ad18b3d3f1286191f03854939f3c4.tar.xz
wintun-22e2da002d8ad18b3d3f1286191f03854939f3c4.zip
Rewrite installer logic in C
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'installer/installer.wxs')
-rw-r--r--installer/installer.wxs51
1 files changed, 51 insertions, 0 deletions
diff --git a/installer/installer.wxs b/installer/installer.wxs
new file mode 100644
index 0000000..f5627dd
--- /dev/null
+++ b/installer/installer.wxs
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ SPDX-License-Identifier: GPL-2.0
+
+ Copyright (C) 2018-2019 WireGuard LLC. All Rights Reserved.
+-->
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <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"/>
+
+ <Directory Id="TARGETDIR" Name="SourceDir">
+ <Component Guid="b668d4c7-abb3-485a-b8df-d34200489a43">
+ <RegistryValue
+ Root="HKLM"
+ Key="SOFTWARE\Wintun"
+ Type="integer"
+ Value="1"
+ KeyPath="yes"/>
+ </Component>
+ </Directory>
+
+ <Property Id="WintunInstallerHash" Value="$(var.INSTALLER_LIBRARY_HASH)" SuppressModularization="yes"/>
+ <Property Id="WintunInstallerBuildtime" Value="$(var.INSTALLER_LIBRARY_TIME)" SuppressModularization="yes"/>
+ <Property Id="WintunVersion" Value="$(var.WINTUN_VERSION)" SuppressModularization="yes"/>
+
+ <Binary Id="installer.dll" SourceFile="!(bindpath.output_dir)installer.dll"/>
+ <CustomAction Id="EvaluateWintun" SuppressModularization="yes" BinaryKey="installer.dll" DllEntry="MsiEvaluate" Execute="immediate" />
+ <CustomAction Id="ProcessWintun" SuppressModularization="yes" BinaryKey="installer.dll" DllEntry="MsiProcess" Execute="deferred" Impersonate="no" />
+ <InstallExecuteSequence>
+ <Custom Action="EvaluateWintun" After="CostFinalize"/>
+ <Custom Action="ProcessWintun" After="InstallFiles"/>
+ </InstallExecuteSequence>
+
+ <?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, which is not supported. Please install the 64-bit variant instead."/>
+ <InstallExecuteSequence>
+ <Custom Action="WoW64Unsupported" After="LaunchConditions"><![CDATA[VersionNT64]]></Custom>
+ </InstallExecuteSequence>
+ <InstallUISequence>
+ <Custom Action="WoW64Unsupported" After="LaunchConditions"><![CDATA[VersionNT64]]></Custom>
+ </InstallUISequence>
+ <?endif?>
+ </Module>
+</Wix>