aboutsummaryrefslogtreecommitdiffstats
path: root/wintun.wixproj
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-04-19 15:24:39 +0200
committerSimon Rozman <simon@rozman.si>2019-04-19 15:25:44 +0200
commit9f31f278400570d949b85350290753cdeea30a9c (patch)
tree043e6aa1cdb99d7ad9558669238b44a296e111d0 /wintun.wixproj
parentMakefile: use more standard output filenames for msm (diff)
downloadwintun-9f31f278400570d949b85350290753cdeea30a9c.tar.xz
wintun-9f31f278400570d949b85350290753cdeea30a9c.zip
Switch from NMake to MSBuild
This allows common version and other configuration in wintun.props. - MSM packaging migrated to WiX MSBuild project and extended to support digital signing - Building supports single Platform|Configuration per run - again :( - wintun.vcxproj cleanup Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'wintun.wixproj')
-rw-r--r--wintun.wixproj70
1 files changed, 70 insertions, 0 deletions
diff --git a/wintun.wixproj b/wintun.wixproj
new file mode 100644
index 0000000..7ee76d9
--- /dev/null
+++ b/wintun.wixproj
@@ -0,0 +1,70 @@
+<?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"
+ 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>
+ <CompilerAdditionalOptions>-ext WixDifxAppExtension -ext WixIIsExtension $(CompilerAdditionalOptions)</CompilerAdditionalOptions>
+ <LinkerSuppressSpecificWarnings>1103;$(LinkerSuppressSpecificWarnings)</LinkerSuppressSpecificWarnings>
+ <LinkerAdditionalOptions>-ext WixDifxAppExtension -ext WixIIsExtension -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="wintun.wxs"/>
+ </ItemGroup>
+ <ItemGroup>
+ <WixLibrary Include="difxapp_$(Platform).wixlib"/>
+ </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>
+
+ <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>
+ <AfterBuildDependsOnTargets Condition="'$(SigningCertificate)'!='' And '$(TimeStampServer)'!=''">SignTarget</AfterBuildDependsOnTargets>
+ <BuildDependsOn>$(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 /q &quot;$(TargetPath)&quot;" />
+ <Touch Files="$(IntermediateOutputPath)$(TargetName).sign" AlwaysCreate="true"/>
+ </Target>
+ <Target Name="CleanSignTarget">
+ <Delete Files="$(IntermediateOutputPath)$(TargetName).sign"/>
+ </Target>
+</Project>