aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-03-09 04:51:39 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-03-09 07:45:41 +0100
commit277cc5816c04df32fb55b71adda75c7a8934373a (patch)
treeb936f19f3b8f6c5241daa854618ab30179cdf575
parentui: ensure window comes up on top (diff)
downloadwireguard-windows-277cc5816c04df32fb55b71adda75c7a8934373a.tar.xz
wireguard-windows-277cc5816c04df32fb55b71adda75c7a8934373a.zip
installer: add basic wix skeleton
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--installer/installer.wixproj49
-rw-r--r--installer/installer.wxs65
2 files changed, 114 insertions, 0 deletions
diff --git a/installer/installer.wixproj b/installer/installer.wixproj
new file mode 100644
index 00000000..3c0409ab
--- /dev/null
+++ b/installer/installer.wixproj
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>3.10</ProductVersion>
+ <ProjectGuid>6ccfa606-8048-4502-86ea-e88027abfb15</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>installer</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\$(Configuration)\</OutputPath>
+ <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
+ <DefineConstants>Debug</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\$(Configuration)\</OutputPath>
+ <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="installer.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <WixExtension Include="WixDifxAppExtension">
+ <HintPath>$(WixExtDir)\WixDifxAppExtension.dll</HintPath>
+ <Name>WixDifxAppExtension</Name>
+ </WixExtension>
+ </ItemGroup>
+ <ItemGroup>
+ <WixLibrary Include="difxapp_x64">
+ <HintPath>$(WixExtDir)\difxapp_x64.wixlib</HintPath>
+ <Name>difxapp_x64</Name>
+ </WixLibrary>
+ </ItemGroup>
+ <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
+ <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
+ <Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
+ </Target>
+ <!--
+ To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Wix.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project> \ No newline at end of file
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>