aboutsummaryrefslogtreecommitdiffstats
path: root/installer/installer.wixproj
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.wixproj
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.wixproj')
-rw-r--r--installer/installer.wixproj76
1 files changed, 76 insertions, 0 deletions
diff --git a/installer/installer.wixproj b/installer/installer.wixproj
new file mode 100644
index 0000000..69b40a6
--- /dev/null
+++ b/installer/installer.wixproj
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ SPDX-License-Identifier: GPL-2.0
+
+ Copyright (C) 2018-2019 WireGuard LLC. All Rights Reserved.
+-->
+<Project
+ xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
+ ToolsVersion="4.0"
+ InitialTargets="EnsureWixToolsetInstalled;HashInstallerLibrary"
+ DefaultTargets="Build">
+ <PropertyGroup>
+ <Configuration Condition="'$(Configuration)'==''">Release</Configuration>
+ <Platform Condition="'$(Platform)'==''">x64</Platform>
+ <ProjectGuid>{F95A1EBF-1E19-47D4-9D8C-4F0C41B9E3B8}</ProjectGuid>
+ <ProjectName>wintun</ProjectName>
+ <OutputType>Module</OutputType>
+ <DefineSolutionProperties>false</DefineSolutionProperties>
+ </PropertyGroup>
+
+ <Import Project="..\wintun.props"/>
+
+ <PropertyGroup>
+ <IntermediateOutputPath>..\$(WintunPlatform)\$(Configuration)\</IntermediateOutputPath>
+ <OutputPath>..\$(WintunPlatform)\$(Configuration)\</OutputPath>
+ <OutputName>$(ProjectName)</OutputName>
+ <DefineConstants>WINTUN_VERSION=$(WintunVersion);$(DefineConstants)</DefineConstants>
+ <SuppressSpecificWarnings>1006;1086;$(SuppressSpecificWarnings)</SuppressSpecificWarnings>
+ <LinkerSuppressSpecificWarnings>1079;1103;$(LinkerSuppressSpecificWarnings)</LinkerSuppressSpecificWarnings>
+ <SuppressIces>ICE30;ICE49;$(SuppressIces)</SuppressIces>
+ <LinkerAdditionalOptions>-b output_dir="$(IntermediateOutputPath.TrimEnd('\'))" $(LinkerAdditionalOptions)</LinkerAdditionalOptions>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'">
+ <SuppressPdbOutput>true</SuppressPdbOutput>
+ <OutputPath>..\$(DistributionDir)</OutputPath>
+ <OutputName>$(ProjectName)-$(WintunPlatform)-$(WintunVersionStr)</OutputName>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <Compile Include="installer.wxs"/>
+ </ItemGroup>
+
+ <Import Project="$(MSBuildProjectName).user" Condition="exists('$(MSBuildProjectName).user')"/>
+ <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>
+
+ <Target Name="HashInstallerLibrary">
+ <GetFileHash Files="$(IntermediateOutputPath)installer.dll" Algorithm="SHA256" HashEncoding="hex">
+ <Output TaskParameter="Items" ItemName="InstallerLibraryHash"/>
+ </GetFileHash>
+ <PropertyGroup>
+ <DefineConstants>$(DefineConstants);INSTALLER_LIBRARY_HASH=@(InstallerLibraryHash->Metadata('FileHash'));INSTALLER_LIBRARY_TIME=$([System.IO.File]::GetLastWriteTime('$(IntermediateOutputPath)installer.dll').Ticks)</DefineConstants>
+ </PropertyGroup>
+ </Target>
+
+ <Import Project="..\wintun.vcxproj.user" Condition="exists('..\wintun.vcxproj.user')"/>
+ <PropertyGroup>
+ <SigningCertificate Condition="$(SignMode)=='TestSign' And '$(TestCertificate)'!=''">$(TestCertificate)</SigningCertificate>
+ <SigningCertificate Condition="$(SignMode)=='ProductionSign' And '$(ProductionCertificate)'!=''">$(ProductionCertificate)</SigningCertificate>
+ <BuildDependsOn Condition="'$(SigningCertificate)'!='' And '$(TimeStampServer)'!=''">$(BuildDependsOn);SignTarget</BuildDependsOn>
+ <CleanDependsOn>CleanSignTarget;$(CleanDependsOn)</CleanDependsOn>
+ </PropertyGroup>
+ <Target
+ Name="SignTarget"
+ Inputs="$(TargetPath)"
+ Outputs="$(IntermediateOutputPath)$(TargetName).sign">
+ <Exec Command="signtool.exe sign /sha1 &quot;$(SigningCertificate)&quot; /fd sha256 /tr &quot;$(TimeStampServer)&quot; /td sha256 &quot;$(TargetPath)&quot;" />
+ <Touch Files="$(IntermediateOutputPath)$(TargetName).sign" AlwaysCreate="true"/>
+ </Target>
+ <Target Name="CleanSignTarget">
+ <Delete Files="$(IntermediateOutputPath)$(TargetName).sign"/>
+ </Target>
+</Project>