aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/installer/installer.wxs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--installer/installer.wxs65
1 files changed, 65 insertions, 0 deletions
diff --git a/installer/installer.wxs b/installer/installer.wxs
new file mode 100644
index 00000000..0b04a65a
--- /dev/null
+++ b/installer/installer.wxs
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:difx='http://schemas.microsoft.com/wix/DifxAppExtension'>
+ <Product Id="*" Name="WireGuard" Language="1033" Version="0.0.0.1" Manufacturer="WireGuard LLC" UpgradeCode="5e5a1da5-ba36-404d-92ec-41050d1c799c">
+ <!-- TODO: uninstall before installing -->
+ <Package InstallerVersion="200" Compressed="yes" Platform="x64" InstallScope="perMachine" Description="WireGuard: Fast, Modern, Secure VPN Tunnel" ReadOnly="yes" />
+
+ <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." AllowDowngrades="no" IgnoreRemoveFailure="no" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <Icon Id="icon.ico" SourceFile="..\ui\icon\icon.ico" />
+ <Property Id="ARPPRODUCTICON" Value="icon.ico" />
+ <Property Id="ARPURLINFOABOUT" Value="https://www.wireguard.com/" />
+ <Property Id="ARPNOREPAIR" Value="yes" />
+ <Property Id="ARPNOMODIFY" Value="yes" />
+ <Property Id="DISABLEADVTSHORTCUTS" Value="yes" />
+
+ <Feature Id="WireGuardFeature" Title="WireGuard" Level="1">
+ <ComponentGroupRef Id="WireGuardComponents" />
+ </Feature>
+ <Feature Id="WintunFeature" Title="Wintun" Level="1">
+ <ComponentGroupRef Id="WintunComponents" />
+ </Feature>
+ </Product>
+
+ <Fragment>
+ <Directory Id="TARGETDIR" Name="SourceDir">
+ <Directory Id="ProgramFiles64Folder">
+ <Directory Id="INSTALLFOLDER" Name="WireGuard" />
+ </Directory>
+ <Directory Id="ProgramMenuFolder" Name="ProgramMenuFolder" />
+ </Directory>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="WireGuardComponents">
+ <Component Directory="INSTALLFOLDER" Id="WireGuardExecutable" Win64="yes">
+ <File Source="..\wireguard.exe" KeyPath="yes">
+ <Shortcut Id="WireGuardStartMenuShortcut" Directory="ProgramMenuFolder" Name="WireGuard" Description="WireGuard: Fast, Modern, Secure VPN Tunnel" WorkingDirectory="INSTALLFOLDER" Advertise="yes" />
+ </File>
+ <ServiceControl Id="RemoveWireGuardManagerService" Name="WireGuard Manager" Remove="both" Stop="both"></ServiceControl>
+ <ServiceControl Id="RemoveWireGuardTunnelServices" Name="WireGuard Tunnel: test" Remove="both" Stop="both"></ServiceControl>
+ <!-- TODO: "test" is just a temporary hack. We need to enumerate all services that are "WireGuard Tunnel: *" and remove those. -->
+ </Component>
+ </ComponentGroup>
+
+ <ComponentGroup Id="WintunComponents">
+ <Component Directory="INSTALLFOLDER" Id="WintunComponent" Guid="f84ff766-d154-44a3-9c50-371503f46ce6" Win64="yes" Shared="yes" SharedDllRefCount="yes">
+ <!-- TODO: make sure we're installing the latest one. -->
+ <difx:Driver DeleteFiles="yes" ForceInstall="yes" Legacy="yes" PlugAndPlayPrompt="no" AddRemovePrograms="no" /> <!-- TODO: Remove legacy once we start signing drivers. -->
+ <!-- TODO: These should not end up staying in programfiles after the driver is installed. -->
+ <File Source="..\wintun\x64\Release\wintun\wintun.inf" />
+ <File Source="..\wintun\x64\Release\wintun\wintun.cat" />
+ <File Source="..\wintun\x64\Release\wintun\wintun.sys" />
+ </Component>
+ </ComponentGroup>
+
+ <InstallExecuteSequence>
+ <Custom Action="LaunchApplication" After="PublishProduct">NOT Installed</Custom>
+ </InstallExecuteSequence>
+ <CustomAction Id="LaunchApplication" HideTarget="yes" Impersonate="no" Execute="deferred" FileKey="wireguard.exe" ExeCommand="/installmanagerservice" Return="asyncNoWait" />
+
+ <!-- TODO: On uninstall: remove eventlog registration, remove system32\config\wireguard. -->
+ <!-- TODO: On install and uninstall, kill services. -->
+ </Fragment>
+</Wix>