@joebigelow / wix-1 / commits / 704139b7

Integrate into latest v4.

Sean Hall committed Feb 2, 2019 at 17:01 UTC 704139b787d2016e43b6a87dbfc41555dac8326a
33 files changed +734 -153
.editorconfig new
+37
@@ -0,0 +1,37 @@
1 +# Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 +#
3 +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\.editorconfig
4 +# then update all of the repos.
5 +
6 +root = true
7 +
8 +[*]
9 +charset = utf-8
10 +indent_style = space
11 +indent_size = 4
12 +trim_trailing_whitespace = true
13 +
14 +[*.{cs,vb}]
15 +dotnet_sort_system_directives_first = true
16 +
17 +[*.cs]
18 +csharp_indent_case_contents = true : error
19 +csharp_indent_switch_labels = true : error
20 +csharp_new_line_before_open_brace = all
21 +csharp_prefer_braces = true : error
22 +csharp_style_expression_bodied_methods = when_on_single_line : suggestion
23 +csharp_style_expression_bodied_constructors = when_on_single_line : suggestion
24 +csharp_style_expression_bodied_operators = when_on_single_line : suggestion
25 +csharp_style_expression_bodied_properties = when_on_single_line : suggestion
26 +csharp_style_expression_bodied_indexers = when_on_single_line : suggestion
27 +csharp_style_expression_bodied_accessors = when_on_single_line : suggestion
28 +csharp_style_var_elsewhere = true : suggestion
29 +csharp_style_var_for_built_in_types = true : suggestion
30 +csharp_style_var_when_type_is_apparent = true : suggestion
31 +dotnet_style_qualification_for_event = true : error
32 +dotnet_style_qualification_for_field = true : error
33 +dotnet_style_qualification_for_method = true : error
34 +dotnet_style_qualification_for_property = true : error
35 +
36 +[*.targets]
37 +indent_size = 2
DifxApp.wixext.sln new
+63
@@ -0,0 +1,63 @@
1 +
2 +Microsoft Visual Studio Solution File, Format Version 12.00
3 +# Visual Studio 15
4 +VisualStudioVersion = 15.0.27130.2003
5 +MinimumVisualStudioVersion = 15.0.26124.0
6 +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "difxapp", "src\wixlib\difxapp.wixproj", "{5066EB93-D8F7-4FAE-B687-024D7A81BD95}"
7 +EndProject
8 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.DifxApp.wixext", "src\wixext\WixToolset.DifxApp.wixext.csproj", "{2256EFD7-E678-4485-818D-986D590068BE}"
9 +EndProject
10 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.DifxApp", "src\test\WixToolsetTest.DifxApp\WixToolsetTest.DifxApp.csproj", "{883D7BA3-1ADC-47AC-95B0-221BB0B7788D}"
11 +EndProject
12 +Global
13 + GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 + Debug|Any CPU = Debug|Any CPU
15 + Debug|x64 = Debug|x64
16 + Debug|x86 = Debug|x86
17 + Release|Any CPU = Release|Any CPU
18 + Release|x64 = Release|x64
19 + Release|x86 = Release|x86
20 + EndGlobalSection
21 + GlobalSection(ProjectConfigurationPlatforms) = postSolution
22 + {5066EB93-D8F7-4FAE-B687-024D7A81BD95}.Debug|Any CPU.ActiveCfg = Debug|x86
23 + {5066EB93-D8F7-4FAE-B687-024D7A81BD95}.Debug|Any CPU.Build.0 = Debug|x86
24 + {5066EB93-D8F7-4FAE-B687-024D7A81BD95}.Debug|x64.ActiveCfg = Debug|x86
25 + {5066EB93-D8F7-4FAE-B687-024D7A81BD95}.Debug|x86.ActiveCfg = Debug|x86
26 + {5066EB93-D8F7-4FAE-B687-024D7A81BD95}.Debug|x86.Build.0 = Debug|x86
27 + {5066EB93-D8F7-4FAE-B687-024D7A81BD95}.Release|Any CPU.ActiveCfg = Release|x86
28 + {5066EB93-D8F7-4FAE-B687-024D7A81BD95}.Release|Any CPU.Build.0 = Release|x86
29 + {5066EB93-D8F7-4FAE-B687-024D7A81BD95}.Release|x64.ActiveCfg = Release|x86
30 + {5066EB93-D8F7-4FAE-B687-024D7A81BD95}.Release|x86.ActiveCfg = Release|x86
31 + {5066EB93-D8F7-4FAE-B687-024D7A81BD95}.Release|x86.Build.0 = Release|x86
32 + {2256EFD7-E678-4485-818D-986D590068BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33 + {2256EFD7-E678-4485-818D-986D590068BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
34 + {2256EFD7-E678-4485-818D-986D590068BE}.Debug|x64.ActiveCfg = Debug|Any CPU
35 + {2256EFD7-E678-4485-818D-986D590068BE}.Debug|x64.Build.0 = Debug|Any CPU
36 + {2256EFD7-E678-4485-818D-986D590068BE}.Debug|x86.ActiveCfg = Debug|Any CPU
37 + {2256EFD7-E678-4485-818D-986D590068BE}.Debug|x86.Build.0 = Debug|Any CPU
38 + {2256EFD7-E678-4485-818D-986D590068BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
39 + {2256EFD7-E678-4485-818D-986D590068BE}.Release|Any CPU.Build.0 = Release|Any CPU
40 + {2256EFD7-E678-4485-818D-986D590068BE}.Release|x64.ActiveCfg = Release|Any CPU
41 + {2256EFD7-E678-4485-818D-986D590068BE}.Release|x64.Build.0 = Release|Any CPU
42 + {2256EFD7-E678-4485-818D-986D590068BE}.Release|x86.ActiveCfg = Release|Any CPU
43 + {2256EFD7-E678-4485-818D-986D590068BE}.Release|x86.Build.0 = Release|Any CPU
44 + {883D7BA3-1ADC-47AC-95B0-221BB0B7788D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
45 + {883D7BA3-1ADC-47AC-95B0-221BB0B7788D}.Debug|Any CPU.Build.0 = Debug|Any CPU
46 + {883D7BA3-1ADC-47AC-95B0-221BB0B7788D}.Debug|x64.ActiveCfg = Debug|Any CPU
47 + {883D7BA3-1ADC-47AC-95B0-221BB0B7788D}.Debug|x64.Build.0 = Debug|Any CPU
48 + {883D7BA3-1ADC-47AC-95B0-221BB0B7788D}.Debug|x86.ActiveCfg = Debug|Any CPU
49 + {883D7BA3-1ADC-47AC-95B0-221BB0B7788D}.Debug|x86.Build.0 = Debug|Any CPU
50 + {883D7BA3-1ADC-47AC-95B0-221BB0B7788D}.Release|Any CPU.ActiveCfg = Release|Any CPU
51 + {883D7BA3-1ADC-47AC-95B0-221BB0B7788D}.Release|Any CPU.Build.0 = Release|Any CPU
52 + {883D7BA3-1ADC-47AC-95B0-221BB0B7788D}.Release|x64.ActiveCfg = Release|Any CPU
53 + {883D7BA3-1ADC-47AC-95B0-221BB0B7788D}.Release|x64.Build.0 = Release|Any CPU
54 + {883D7BA3-1ADC-47AC-95B0-221BB0B7788D}.Release|x86.ActiveCfg = Release|Any CPU
55 + {883D7BA3-1ADC-47AC-95B0-221BB0B7788D}.Release|x86.Build.0 = Release|Any CPU
56 + EndGlobalSection
57 + GlobalSection(SolutionProperties) = preSolution
58 + HideSolutionNode = FALSE
59 + EndGlobalSection
60 + GlobalSection(ExtensibilityGlobals) = postSolution
61 + SolutionGuid = {60A3EA0F-9313-47F8-BF6B-74478A57B577}
62 + EndGlobalSection
63 +EndGlobal
appveyor.cmd new
+13
@@ -0,0 +1,13 @@
1 +@setlocal
2 +@pushd %~dp0
3 +
4 +nuget restore
5 +
6 +msbuild -p:Configuration=Release -t:Restore
7 +
8 +msbuild -p:Configuration=Release src\test\WixToolsetTest.DifxApp\WixToolsetTest.DifxApp.csproj
9 +
10 +msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.DifxApp.wixext.csproj
11 +
12 +@popd
13 +@endlocal
\ No newline at end of file
appveyor.yml new
+42
@@ -0,0 +1,42 @@
1 +# Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 +#
3 +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml
4 +# then update all of the repos.
5 +
6 +branches:
7 + only:
8 + - master
9 + - develop
10 +
11 +image: Visual Studio 2017
12 +
13 +version: 0.0.0.{build}
14 +configuration: Release
15 +
16 +environment:
17 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
18 + DOTNET_CLI_TELEMETRY_OPTOUT: 1
19 + NUGET_XMLDOC_MODE: skip
20 +
21 +build_script:
22 + - appveyor.cmd
23 +
24 +pull_requests:
25 + do_not_increment_build_number: true
26 +
27 +nuget:
28 + disable_publish_on_pr: true
29 +
30 +skip_branch_with_pr: true
31 +skip_tags: true
32 +
33 +artifacts:
34 +- path: build\Release\**\*.nupkg
35 + name: nuget
36 +- path: build\Release\**\*.msi
37 + name: msi
38 +
39 +notifications:
40 +- provider: Slack
41 + incoming_webhook:
42 + secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA=
nuget.config new
+16
@@ -0,0 +1,16 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<configuration>
3 + <packageSources>
4 + <clear />
5 + <add key="wixtoolset-data" value="https://ci.appveyor.com/nuget/wixtoolset-data" />
6 + <add key="wixtoolset-extensibility" value="https://ci.appveyor.com/nuget/wixtoolset-extensibility" />
7 + <add key="wixtoolset-core" value="https://ci.appveyor.com/nuget/wixtoolset-core" />
8 + <add key="wixtoolset-core-native" value="https://ci.appveyor.com/nuget/wixtoolset-core-native" />
9 + <add key="wixtoolset-dtf" value="https://ci.appveyor.com/nuget/wixtoolset-dtf" />
10 + <add key="wixtoolset-dutil" value="https://ci.appveyor.com/nuget/wixtoolset-dutil" />
11 + <add key="wixtoolset-wcautil" value="https://ci.appveyor.com/nuget/wixtoolset-wcautil" />
12 + <add key="wixtoolset-tools" value="https://ci.appveyor.com/nuget/wixtoolset-tools" />
13 + <add key="wixbuildtools" value="https://ci.appveyor.com/nuget/wixbuildtools" />
14 + <add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
15 + </packageSources>
16 +</configuration>
\ No newline at end of file
src/Directory.Build.props new
+28
@@ -0,0 +1,28 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +<!--
4 + Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.Build.props
5 + then update all of the repos.
6 +-->
7 +<Project>
8 + <PropertyGroup>
9 + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
10 + <EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink>
11 + <MSBuildWarningsAsMessages>MSB3246</MSBuildWarningsAsMessages>
12 +
13 + <ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
14 + <BaseOutputPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\))</BaseOutputPath>
15 + <BaseIntermediateOutputPath>$(BaseOutputPath)obj\$(ProjectName)\</BaseIntermediateOutputPath>
16 + <OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
17 +
18 + <Authors>WiX Toolset Team</Authors>
19 + <Company>WiX Toolset</Company>
20 + <Copyright>Copyright (c) .NET Foundation and contributors. All rights reserved.</Copyright>
21 + <PackageLicenseExpression>MS-RL</PackageLicenseExpression>
22 + <Product>WiX Toolset</Product>
23 + </PropertyGroup>
24 +
25 + <Import Project="Cpp.Build.props" Condition=" Exists('Cpp.Build.props') And '$(MSBuildProjectExtension)'=='.vcxproj' " />
26 + <Import Project="Wix.Build.props" Condition=" Exists('Wix.Build.props') And '$(MSBuildProjectExtension)'=='.wixproj' " />
27 + <Import Project="Custom.Build.props" Condition=" Exists('Custom.Build.props') " />
28 +</Project>
src/Directory.Build.targets new
+48
@@ -0,0 +1,48 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +<!--
4 + Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.Build.targets
5 + then update all of the repos.
6 +-->
7 +<!--
8 + Replace PackageReferences with ProjectReferences when the projects can be found in .sln.
9 + See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284
10 +-->
11 +<Project>
12 + <PropertyGroup>
13 + <ReplacePackageReferences>true</ReplacePackageReferences>
14 + <TheSolutionPath Condition=" '$(NCrunch)'=='' ">$(SolutionPath)</TheSolutionPath>
15 + <TheSolutionPath Condition=" '$(NCrunch)'=='1' ">$(NCrunchOriginalSolutionPath)</TheSolutionPath>
16 + </PropertyGroup>
17 +
18 + <Choose>
19 + <When Condition="$(ReplacePackageReferences) AND '$(TheSolutionPath)' != '' AND '$(TheSolutionPath)' != '*undefined*' AND Exists('$(TheSolutionPath)')">
20 +
21 + <PropertyGroup>
22 + <SolutionFileContent>$([System.IO.File]::ReadAllText($(TheSolutionPath)))</SolutionFileContent>
23 + <SmartSolutionDir>$([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) ))</SmartSolutionDir>
24 + <RegexPattern>(?&lt;="[PackageName]", ")(.*)(?=", ")</RegexPattern>
25 + </PropertyGroup>
26 +
27 + <ItemGroup>
28 + <!-- Keep the identity of the PackageReference -->
29 + <SmartPackageReference Include="@(PackageReference)">
30 + <PackageName>%(Identity)</PackageName>
31 + <InSolution>$(SolutionFileContent.Contains('\%(Identity).csproj'))</InSolution>
32 + </SmartPackageReference>
33 +
34 + <!-- Filter them by mapping them to another ItemGroup using the WithMetadataValue item function -->
35 + <PackageInSolution Include="@(SmartPackageReference->WithMetadataValue('InSolution', True))">
36 + <Pattern>$(RegexPattern.Replace('[PackageName]','%(PackageName)') )</Pattern>
37 + <SmartPath>$([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)'))</SmartPath>
38 + </PackageInSolution>
39 +
40 + <ProjectReference Include="@(PackageInSolution->'$(SmartSolutionDir)\%(SmartPath)' )"/>
41 +
42 + <!-- Remove the package references that are now referenced as projects -->
43 + <PackageReference Remove="@(PackageInSolution->'%(PackageName)' )"/>
44 + </ItemGroup>
45 +
46 + </When>
47 + </Choose>
48 +</Project>
src/FindLocalWix.props new
+8
@@ -0,0 +1,8 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 + <PropertyGroup>
6 + <WixTargetsPath Condition=" '$(Configuration)' == 'Debug' And Exists('$(MSBuildThisFileDirectory)..\..\Tools\README.md') ">$(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets</WixTargetsPath>
7 + </PropertyGroup>
8 +</Project>
src/test/WixToolsetTest.DifxApp/DifxAppExtensionFixture.cs new
+36
@@ -0,0 +1,36 @@
1 +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 +
3 +namespace WixToolsetTest.DifxApp
4 +{
5 + using System.Linq;
6 + using WixBuildTools.TestSupport;
7 + using WixToolset.Core.TestPackage;
8 + using WixToolset.DifxApp;
9 + using Xunit;
10 +
11 + public class DifxAppExtensionFixture
12 + {
13 + [Fact]
14 + public void CanBuildUsingDriver()
15 + {
16 + var folder = TestData.Get(@"TestData\UsingDriver");
17 + var build = new Builder(folder, typeof(DifxAppExtensionFactory), new[] { folder });
18 +
19 + var results = build.BuildAndQuery(Build, "CustomAction");
20 + Assert.Equal(new[]
21 + {
22 + "CustomAction:MsiCleanupOnSuccess\t1\tDIFxApp.dll\tCleanupOnSuccess\t0",
23 + "CustomAction:MsiInstallDrivers\t3073\tDIFxAppA.dll\tInstallDriverPackages\t0",
24 + "CustomAction:MsiProcessDrivers\t1\tDIFxApp.dll\tProcessDriverPackages\t0",
25 + "CustomAction:MsiRollbackInstall\t3329\tDIFxAppA.dll\tRollbackInstall\t0",
26 + "CustomAction:MsiUninstallDrivers\t3073\tDIFxAppA.dll\tUninstallDriverPackages\t0",
27 + }, results.OrderBy(s => s).ToArray());
28 + }
29 +
30 + private static void Build(string[] args)
31 + {
32 + var result = WixRunner.Execute(args)
33 + .AssertSuccess();
34 + }
35 + }
36 +}
src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.en-us.wxl new
+11
@@ -0,0 +1,11 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +
3 +<!--
4 +This file contains the declaration of all the localizable strings.
5 +-->
6 +<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">
7 +
8 + <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String>
9 + <String Id="FeatureTitle">MsiPackage</String>
10 +
11 +</WixLocalization>
src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.wxs new
+21
@@ -0,0 +1,21 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 + <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
4 + <Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" />
5 +
6 + <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
7 + <MediaTemplate />
8 +
9 + <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
10 + <ComponentGroupRef Id="ProductComponents" />
11 + </Feature>
12 + </Product>
13 +
14 + <Fragment>
15 + <Directory Id="TARGETDIR" Name="SourceDir">
16 + <Directory Id="ProgramFilesFolder">
17 + <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
18 + </Directory>
19 + </Directory>
20 + </Fragment>
21 +</Wix>
src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/PackageComponents.wxs new
+12
@@ -0,0 +1,12 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
3 + xmlns:difxapp="http://wixtoolset.org/schemas/v4/wxs/difxapp">
4 + <Fragment>
5 + <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
6 + <Component>
7 + <File Source="example.txt" />
8 + <difxapp:Driver />
9 + </Component>
10 + </ComponentGroup>
11 + </Fragment>
12 +</Wix>
src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/example.txt new
+1
@@ -0,0 +1 @@
1 +This is example.txt.
\ No newline at end of file
src/test/WixToolsetTest.DifxApp/WixToolsetTest.DifxApp.csproj new
+38
@@ -0,0 +1,38 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +<Project Sdk="Microsoft.NET.Sdk">
5 + <PropertyGroup>
6 + <TargetFramework>netcoreapp2.1</TargetFramework>
7 + <IsPackable>false</IsPackable>
8 + </PropertyGroup>
9 +
10 + <PropertyGroup>
11 + <NoWarn>NU1701</NoWarn>
12 + </PropertyGroup>
13 +
14 + <ItemGroup>
15 + <Content Include="TestData\UsingDriver\example.txt" CopyToOutputDirectory="PreserveNewest" />
16 + <Content Include="TestData\UsingDriver\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
17 + <Content Include="TestData\UsingDriver\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
18 + <Content Include="TestData\UsingDriver\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
19 + </ItemGroup>
20 +
21 + <ItemGroup>
22 + <ProjectReference Include="..\..\wixext\WixToolset.DifxApp.wixext.csproj" />
23 + </ItemGroup>
24 +
25 + <ItemGroup>
26 + <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" PrivateAssets="all" />
27 + </ItemGroup>
28 +
29 + <ItemGroup>
30 + <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
31 + </ItemGroup>
32 +
33 + <ItemGroup>
34 + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
35 + <PackageReference Include="xunit" Version="2.4.0" />
36 + <PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
37 + </ItemGroup>
38 +</Project>
src/wixext/DifxAppCompiler.cs
+40 -26
@@ -1,26 +1,27 @@
1 // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3 -namespace WixToolset.Extensions
3 +namespace WixToolset.DifxApp
4 {
5 using System;
6 using System.Collections.Generic;
7 using System.Xml.Linq;
8 using WixToolset.Data;
9 + using WixToolset.DifxApp.Tuples;
10 using WixToolset.Extensibility;
11
12 /// <summary>
13 /// The compiler for the WiX Toolset Driver Install Frameworks for Applications Extension.
14 /// </summary>
14 - public sealed class DifxAppCompiler : CompilerExtension
15 + public sealed class DifxAppCompiler : BaseCompilerExtension
16 {
17 private HashSet<string> components;
18
19 + public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/difxapp";
20 /// <summary>
21 /// Instantiate a new DifxAppCompiler.
22 /// </summary>
23 public DifxAppCompiler()
24 {
23 - this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/difxapp";
25 this.components = new HashSet<string>();
26 }
27
@@ -31,26 +32,27 @@ namespace WixToolset.Extensions
32 /// <param name="parentElement">Parent element of element to process.</param>
33 /// <param name="element">Element to process.</param>
34 /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
34 - public override void ParseElement(XElement parentElement, XElement element, IDictionary<string, string> context)
35 + public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context)
36 {
37 switch (parentElement.Name.LocalName)
38 {
39 case "Component":
40 string componentId = context["ComponentId"];
41 string directoryId = context["DirectoryId"];
42 + bool componentWin64 = Boolean.Parse(context["Win64"]);
43
44 switch (element.Name.LocalName)
45 {
46 case "Driver":
45 - this.ParseDriverElement(element, componentId);
47 + this.ParseDriverElement(intermediate, section, element, componentId, componentWin64);
48 break;
49 default:
48 - this.Core.UnexpectedElement(parentElement, element);
50 + this.ParseHelper.UnexpectedElement(parentElement, element);
51 break;
52 }
53 break;
54 default:
53 - this.Core.UnexpectedElement(parentElement, element);
55 + this.ParseHelper.UnexpectedElement(parentElement, element);
56 break;
57 }
58 }
@@ -60,9 +62,9 @@ namespace WixToolset.Extensions
62 /// </summary>
63 /// <param name="node">Element to parse.</param>
64 /// <param name="componentId">Identifier for parent component.</param>
63 - private void ParseDriverElement(XElement node, string componentId)
65 + private void ParseDriverElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentId, bool win64)
66 {
65 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
67 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
68 int attributes = 0;
69 int sequence = CompilerConstants.IntegerNotSet;
70
@@ -71,7 +73,7 @@ namespace WixToolset.Extensions
73 {
74 if (this.components.Contains(componentId))
75 {
74 - this.Core.OnMessage(WixErrors.TooManyElements(sourceLineNumbers, "Component", node.Name.LocalName, 1));
76 + this.Messaging.Write(ErrorMessages.TooManyElements(sourceLineNumbers, "Component", node.Name.LocalName, 1));
77 }
78 else
79 {
@@ -86,62 +88,74 @@ namespace WixToolset.Extensions
88 switch (attrib.Name.LocalName)
89 {
90 case "AddRemovePrograms":
89 - if (YesNoType.No == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
91 + if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
92 {
93 attributes |= 0x4;
94 }
95 break;
96 case "DeleteFiles":
95 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
97 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
98 {
99 attributes |= 0x10;
100 }
101 break;
102 case "ForceInstall":
101 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
103 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
104 {
105 attributes |= 0x1;
106 }
107 break;
108 case "Legacy":
107 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
109 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
110 {
111 attributes |= 0x8;
112 }
113 break;
114 case "PlugAndPlayPrompt":
113 - if (YesNoType.No == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
115 + if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
116 {
117 attributes |= 0x2;
118 }
119 break;
120 case "Sequence":
119 - sequence = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
121 + sequence = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
122 break;
123 default:
122 - this.Core.UnexpectedAttribute(node, attrib);
124 + this.ParseHelper.UnexpectedAttribute(node, attrib);
125 break;
126 }
127 }
128 else
129 {
128 - this.Core.ParseExtensionAttribute(node, attrib);
130 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib);
131 }
132 }
133
132 - this.Core.ParseForExtensionElements(node);
134 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node);
135
134 - if (!this.Core.EncounteredError)
136 + if (!this.Messaging.EncounteredError)
137 {
136 - Row row = this.Core.CreateRow(sourceLineNumbers, "MsiDriverPackages");
137 - row[0] = componentId;
138 - row[1] = attributes;
139 - if (CompilerConstants.IntegerNotSet != sequence)
138 + switch (this.Context.Platform)
139 {
141 - row[2] = sequence;
140 + case Platform.X86:
141 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "MsiProcessDrivers");
142 + break;
143 + case Platform.X64:
144 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "MsiProcessDrivers_x64");
145 + break;
146 + case Platform.IA64:
147 + case Platform.ARM:
148 + this.Messaging.Write(ErrorMessages.UnsupportedPlatformForElement(sourceLineNumbers, this.Context.Platform.ToString(), node.Name.LocalName));
149 + break;
150 }
151
144 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "MsiProcessDrivers");
152 + var row = (MsiDriverPackagesTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "MsiDriverPackages");
153 + row.Set(0, componentId);
154 + row.Set(1, attributes);
155 + if (CompilerConstants.IntegerNotSet != sequence)
156 + {
157 + row.Set(2, sequence);
158 + }
159 }
160 }
161 }
src/wixext/DifxAppDecompiler.cs
+3 -1
@@ -1,7 +1,8 @@
1 // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3 -namespace WixToolset.Extensions
3 +namespace WixToolset.DifxApp
4 {
5 +#if TODO_CONSIDER_DECOMPILER
6 using System;
7 using System.Collections;
8 using System.Globalization;
@@ -93,4 +94,5 @@ namespace WixToolset.Extensions
94 }
95 }
96 }
97 +#endif
98 }
src/wixext/DifxAppExtensionData.cs
+8 -28
@@ -1,43 +1,23 @@
1 // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3 -namespace WixToolset.Extensions
3 +namespace WixToolset.DifxApp
4 {
5 - using System;
6 - using System.Reflection;
5 using WixToolset.Data;
6 using WixToolset.Extensibility;
7
10 - /// <summary>
11 - /// The WiX Toolset Driver Install Frameworks for Applications Extension.
12 - /// </summary>
13 - public sealed class DifxAppExtensionData : ExtensionData
8 + public sealed class DifxAppExtensionData : BaseExtensionData
9 {
15 - private static TableDefinitionCollection tableDefinitions;
10 + public override string DefaultCulture => "en-US";
11
17 - /// <summary>
18 - /// Gets the optional table definitions for this extension.
19 - /// </summary>
20 - /// <value>The optional table definitions for this extension.</value>
21 - public override TableDefinitionCollection TableDefinitions
12 + public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)
13 {
23 - get
24 - {
25 - return DifxAppExtensionData.GetExtensionTableDefinitions();
26 - }
14 + tupleDefinition = DifxAppTupleDefinitions.ByName(name);
15 + return tupleDefinition != null;
16 }
17
29 - /// <summary>
30 - /// Internal mechanism to access the extension's table definitions.
31 - /// </summary>
32 - /// <returns>Extension's table definitions.</returns>
33 - internal static TableDefinitionCollection GetExtensionTableDefinitions()
18 + public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions)
19 {
35 - if (null == DifxAppExtensionData.tableDefinitions)
36 - {
37 - DifxAppExtensionData.tableDefinitions = ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml");
38 - }
39 -
40 - return DifxAppExtensionData.tableDefinitions;
20 + return Intermediate.Load(typeof(DifxAppExtensionData).Assembly, "WixToolset.DifxApp.difxapp.wixlib", tupleDefinitions);
21 }
22 }
23 }
src/wixext/DifxAppExtensionFactory.cs new
+18
@@ -0,0 +1,18 @@
1 +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 +
3 +namespace WixToolset.DifxApp
4 +{
5 + using System;
6 + using System.Collections.Generic;
7 + using WixToolset.Extensibility;
8 +
9 + public class DifxAppExtensionFactory : BaseExtensionFactory
10 + {
11 + protected override IEnumerable<Type> ExtensionTypes => new[]
12 + {
13 + typeof(DifxAppCompiler),
14 + typeof(DifxAppExtensionData),
15 + typeof(DifxAppWindowsInstallerBackendBinderExtension),
16 + };
17 + }
18 +}
src/wixext/DifxAppWindowsInstallerBackendBinderExtension.cs new
+26
@@ -0,0 +1,26 @@
1 +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 +
3 +namespace WixToolset.DifxApp
4 +{
5 + using System.Linq;
6 + using System.Xml;
7 + using WixToolset.Data.WindowsInstaller;
8 + using WixToolset.Extensibility;
9 +
10 + public class DifxAppWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension
11 + {
12 + private static readonly TableDefinition[] Tables = LoadTables();
13 +
14 + protected override TableDefinition[] TableDefinitionsForTuples => Tables;
15 +
16 + private static TableDefinition[] LoadTables()
17 + {
18 + using (var resourceStream = typeof(DifxAppWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.DifxApp.tables.xml"))
19 + using (var reader = XmlReader.Create(resourceStream))
20 + {
21 + var tables = TableDefinitionCollection.Load(reader);
22 + return tables.ToArray();
23 + }
24 + }
25 + }
26 +}
src/wixext/Tuples/DifxAppTupleDefinitions.cs new
+39
@@ -0,0 +1,39 @@
1 +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 +
3 +namespace WixToolset.DifxApp
4 +{
5 + using System;
6 + using WixToolset.Data;
7 +
8 + public enum DifxAppTupleDefinitionType
9 + {
10 + MsiDriverPackages,
11 + }
12 +
13 + public static partial class DifxAppTupleDefinitions
14 + {
15 + public static readonly Version Version = new Version("4.0.0");
16 +
17 + public static IntermediateTupleDefinition ByName(string name)
18 + {
19 + if (!Enum.TryParse(name, out DifxAppTupleDefinitionType type))
20 + {
21 + return null;
22 + }
23 +
24 + return ByType(type);
25 + }
26 +
27 + public static IntermediateTupleDefinition ByType(DifxAppTupleDefinitionType type)
28 + {
29 + switch (type)
30 + {
31 + case DifxAppTupleDefinitionType.MsiDriverPackages:
32 + return DifxAppTupleDefinitions.MsiDriverPackages;
33 +
34 + default:
35 + throw new ArgumentOutOfRangeException(nameof(type));
36 + }
37 + }
38 + }
39 +}
src/wixext/Tuples/MsiDriverPackagesTuple.cs new
+63
@@ -0,0 +1,63 @@
1 +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 +
3 +namespace WixToolset.DifxApp
4 +{
5 + using WixToolset.Data;
6 + using WixToolset.DifxApp.Tuples;
7 +
8 + public static partial class DifxAppTupleDefinitions
9 + {
10 + public static readonly IntermediateTupleDefinition MsiDriverPackages = new IntermediateTupleDefinition(
11 + DifxAppTupleDefinitionType.MsiDriverPackages.ToString(),
12 + new[]
13 + {
14 + new IntermediateFieldDefinition(nameof(MsiDriverPackagesTupleFields.Component), IntermediateFieldType.String),
15 + new IntermediateFieldDefinition(nameof(MsiDriverPackagesTupleFields.Flags), IntermediateFieldType.Number),
16 + new IntermediateFieldDefinition(nameof(MsiDriverPackagesTupleFields.Sequence), IntermediateFieldType.Number),
17 + },
18 + typeof(MsiDriverPackagesTuple));
19 + }
20 +}
21 +
22 +namespace WixToolset.DifxApp.Tuples
23 +{
24 + using WixToolset.Data;
25 +
26 + public enum MsiDriverPackagesTupleFields
27 + {
28 + Component,
29 + Flags,
30 + Sequence,
31 + }
32 +
33 + public class MsiDriverPackagesTuple : IntermediateTuple
34 + {
35 + public MsiDriverPackagesTuple() : base(DifxAppTupleDefinitions.MsiDriverPackages, null, null)
36 + {
37 + }
38 +
39 + public MsiDriverPackagesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DifxAppTupleDefinitions.MsiDriverPackages, sourceLineNumber, id)
40 + {
41 + }
42 +
43 + public IntermediateField this[MsiDriverPackagesTupleFields index] => this.Fields[(int)index];
44 +
45 + public string Component
46 + {
47 + get => this.Fields[(int)MsiDriverPackagesTupleFields.Component].AsString();
48 + set => this.Set((int)MsiDriverPackagesTupleFields.Component, value);
49 + }
50 +
51 + public int Flags
52 + {
53 + get => this.Fields[(int)MsiDriverPackagesTupleFields.Flags].AsNumber();
54 + set => this.Set((int)MsiDriverPackagesTupleFields.Flags, value);
55 + }
56 +
57 + public int Sequence
58 + {
59 + get => this.Fields[(int)MsiDriverPackagesTupleFields.Sequence].AsNumber();
60 + set => this.Set((int)MsiDriverPackagesTupleFields.Sequence, value);
61 + }
62 + }
63 +}
\ No newline at end of file
src/wixext/WixDifxAppExtension.csproj deleted
-47
@@ -1,47 +0,0 @@
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 -
4 -
5 -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
6 - <PropertyGroup>
7 - <ProjectGuid>{2256EFD7-E678-4485-818D-986D590068BE}</ProjectGuid>
8 - <AssemblyName>WixDifxAppExtension</AssemblyName>
9 - <OutputType>Library</OutputType>
10 - <RootNamespace>WixToolset.Extensions</RootNamespace>
11 - </PropertyGroup>
12 - <ItemGroup>
13 - <Compile Include="AssemblyInfo.cs" />
14 - <Compile Include="DifxAppCompiler.cs" />
15 - <Compile Include="DifxAppDecompiler.cs" />
16 - <Compile Include="DifxAppExtensionData.cs" />
17 - <EmbeddedFlattenedResource Include="Data\tables.xml">
18 - <LogicalName>$(RootNamespace).Data.tables.xml</LogicalName>
19 - </EmbeddedFlattenedResource>
20 - <EmbeddedFlattenedResource Include="Xsd\difxapp.xsd">
21 - <LogicalName>$(RootNamespace).Xsd.difxapp.xsd</LogicalName>
22 - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
23 - </EmbeddedFlattenedResource>
24 - <XsdGenSource Include="Xsd\difxapp.xsd">
25 - <SubType>Designer</SubType>
26 - <CommonNamespace>WixToolset.Data.Serialize</CommonNamespace>
27 - <Namespace>WixToolset.Extensions.Serialize.DifxApp</Namespace>
28 - </XsdGenSource>
29 - </ItemGroup>
30 - <ItemGroup>
31 - <Reference Include="System" />
32 - <Reference Include="System.Xml" />
33 - <Reference Include="System.Xml.Linq" />
34 - <ProjectReference Include="..\..\..\libs\WixToolset.Data\WixToolset.Data.csproj" />
35 - <ProjectReference Include="..\..\..\libs\WixToolset.Extensibility\WixToolset.Extensibility.csproj" />
36 - <ProjectReference Include="..\..\..\tools\wix\Wix.csproj" />
37 - <ProjectReference Include="..\wixlib\DIFxAppExtension.wixproj">
38 - <Properties>Platform=x86</Properties>
39 - <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
40 - </ProjectReference>
41 - <ProjectReference Include="..\wixlib\DIFxAppExtension.wixproj">
42 - <Properties>Platform=x64</Properties>
43 - <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
44 - </ProjectReference>
45 - </ItemGroup>
46 - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
47 -</Project>
src/wixext/WixToolset.DifxApp.wixext.csproj new
+30
@@ -0,0 +1,30 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +<Project Sdk="Microsoft.NET.Sdk">
5 + <PropertyGroup>
6 + <TargetFramework>netstandard2.0</TargetFramework>
7 + <RootNamespace>WixToolset.DifxApp</RootNamespace>
8 + <Description>WiX Toolset DIFxApp Extension</Description>
9 + <Title>WiX Toolset DIFxApp Extension</Title>
10 + <IsTool>true</IsTool>
11 + <ContentTargetFolders>build</ContentTargetFolders>
12 + </PropertyGroup>
13 + <ItemGroup>
14 + <Content Include="$(MSBuildThisFileName).targets" />
15 + <Content Include="difxapp.xsd" PackagePath="tools" />
16 + <EmbeddedResource Include="tables.xml" />
17 + <EmbeddedResource Include="$(OutputPath)..\difxapp.wixlib" />
18 + </ItemGroup>
19 + <ItemGroup>
20 + <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" PrivateAssets="all" />
21 + </ItemGroup>
22 +
23 + <ItemGroup>
24 + <ProjectReference Include="..\wixlib\difxapp.wixproj" ReferenceOutputAssembly="false" Condition=" '$(NCrunch)'=='' " />
25 + </ItemGroup>
26 +
27 + <ItemGroup>
28 + <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="all" />
29 + </ItemGroup>
30 +</Project>
src/wixext/WixToolset.DifxApp.wixext.targets new
+11
@@ -0,0 +1,11 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
5 + <PropertyGroup>
6 + <WixToolsetDifxAppWixextPath Condition=" '$(WixToolsetDifxAppWixextPath)' == '' ">$(MSBuildThisFileDirectory)..\tools\WixToolset.DifxApp.wixext.dll</WixToolsetDifxAppWixextPath>
7 + </PropertyGroup>
8 + <ItemGroup>
9 + <WixExtension Include="$(WixToolsetDifxAppWixextPath)" />
10 + </ItemGroup>
11 +</Project>
src/wixlib/DIFxAppExtension.wixproj deleted
-30
@@ -1,30 +0,0 @@
1 -<?xml version="1.0" encoding="utf-8" ?>
2 -<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 -
4 -
5 -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
6 - <PropertyGroup>
7 - <ProjectGuid>{5066EB93-D8F7-4FAE-B687-024D7A81BD95}</ProjectGuid>
8 - <OutputName>difxapp_$(Platform)</OutputName>
9 - <OutputType>Library</OutputType>
10 - <BindFiles>true</BindFiles>
11 - <Pedantic>true</Pedantic>
12 - <Cultures>en-us</Cultures>
13 - </PropertyGroup>
14 -
15 - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.props" />
16 -
17 - <PropertyGroup>
18 - <DefineConstants>
19 - $(DefineConstants);
20 - DIFxAppDll=$(ProjectDir)$(Platform)\DIFxApp.dll;
21 - DIFxAppADll=$(ProjectDir)$(Platform)\DIFxAppA.dll;
22 - </DefineConstants>
23 - </PropertyGroup>
24 -
25 - <ItemGroup>
26 - <Compile Include="DIFxAppExtension.wxs" />
27 - </ItemGroup>
28 -
29 - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
30 -</Project>
src/wixlib/DIFxAppExtension.wxs deleted
-21
@@ -1,21 +0,0 @@
1 -<?xml version='1.0'?>
2 -<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 -
4 -
5 -<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>
6 - <Fragment Id='DIFxAppCustomActions'>
7 - <InstallExecuteSequence>
8 - <Custom Action='MsiProcessDrivers' After='InstallFiles'>VersionNT &gt; 400</Custom>
9 - <Custom Action='MsiCleanupOnSuccess' After='InstallFinalize'>VersionNT &gt; 400</Custom>
10 - </InstallExecuteSequence>
11 -
12 - <Binary Id='DIFxApp.dll' SourceFile='$(var.DIFxAppDll)'/>
13 - <Binary Id='DIFxAppA.dll' SourceFile='$(var.DIFxAppADll)'/>
14 -
15 - <CustomAction Id='MsiProcessDrivers' BinaryKey='DIFxApp.dll' DllEntry='ProcessDriverPackages' SuppressModularization='yes' Execute='immediate' />
16 - <CustomAction Id='MsiInstallDrivers' BinaryKey='DIFxAppA.dll' DllEntry='InstallDriverPackages' SuppressModularization='yes' Execute='deferred' Impersonate='no' />
17 - <CustomAction Id='MsiUninstallDrivers' BinaryKey='DIFxAppA.dll' DllEntry='UninstallDriverPackages' SuppressModularization='yes' Execute='deferred' Impersonate='no' />
18 - <CustomAction Id='MsiRollbackInstall' BinaryKey='DIFxAppA.dll' DllEntry='RollbackInstall' SuppressModularization='yes' Execute='rollback' Impersonate='no' />
19 - <CustomAction Id='MsiCleanupOnSuccess' BinaryKey='DIFxApp.dll' DllEntry='CleanupOnSuccess' SuppressModularization='yes' Execute='immediate' />
20 - </Fragment>
21 -</Wix>
src/wixlib/DifxAppExtension_Platform.wxi new
+23
@@ -0,0 +1,23 @@
1 +<?xml version='1.0'?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +
5 +<Include xmlns='http://wixtoolset.org/schemas/v4/wxs'>
6 + <?include caSuffix.wxi ?>
7 +
8 + <Fragment>
9 + <InstallExecuteSequence>
10 + <Custom Action='MsiProcessDrivers' After='InstallFiles'>VersionNT &gt; 400</Custom>
11 + <Custom Action='MsiCleanupOnSuccess' After='InstallFinalize'>VersionNT &gt; 400</Custom>
12 + </InstallExecuteSequence>
13 +
14 + <Binary Id='DIFxApp.dll$(var.Suffix)' SourceFile='$(var.platform)\DIFxApp.dll'/>
15 + <Binary Id='DIFxAppA.dll$(var.Suffix)' SourceFile='$(var.platform)\DIFxAppA.dll'/>
16 +
17 + <CustomAction Id='MsiProcessDrivers$(var.Suffix)' BinaryKey='DIFxApp.dll$(var.Suffix)' DllEntry='ProcessDriverPackages' SuppressModularization='yes' Execute='immediate' />
18 + <CustomAction Id='MsiInstallDrivers$(var.Suffix)' BinaryKey='DIFxAppA.dll$(var.Suffix)' DllEntry='InstallDriverPackages' SuppressModularization='yes' Execute='deferred' Impersonate='no' />
19 + <CustomAction Id='MsiUninstallDrivers$(var.Suffix)' BinaryKey='DIFxAppA.dll$(var.Suffix)' DllEntry='UninstallDriverPackages' SuppressModularization='yes' Execute='deferred' Impersonate='no' />
20 + <CustomAction Id='MsiRollbackInstall$(var.Suffix)' BinaryKey='DIFxAppA.dll$(var.Suffix)' DllEntry='RollbackInstall' SuppressModularization='yes' Execute='rollback' Impersonate='no' />
21 + <CustomAction Id='MsiCleanupOnSuccess$(var.Suffix)' BinaryKey='DIFxApp.dll$(var.Suffix)' DllEntry='CleanupOnSuccess' SuppressModularization='yes' Execute='immediate' />
22 + </Fragment>
23 +</Include>
src/wixlib/DifxAppExtension_x64.wxs new
+8
@@ -0,0 +1,8 @@
1 +<?xml version="1.0"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +
5 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
6 + <?define platform=x64 ?>
7 + <?include DifxAppExtension_Platform.wxi ?>
8 +</Wix>
src/wixlib/DifxAppExtension_x86.wxs new
+8
@@ -0,0 +1,8 @@
1 +<?xml version="1.0"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +
5 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
6 + <?define platform=x86 ?>
7 + <?include DifxAppExtension_Platform.wxi ?>
8 +</Wix>
src/wixlib/caSuffix.wxi new
+28
@@ -0,0 +1,28 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
5 + <?ifndef platform ?>
6 + <?error Required value "platform" not defined in include caSuffix.wxi ?>
7 + <?endif ?>
8 +
9 + <?ifdef Suffix ?>
10 + <?undef Suffix ?>
11 + <?undef DeferredSuffix ?>
12 + <?endif ?>
13 +
14 + <?if $(var.platform)="x86" ?>
15 + <?define Suffix="" ?>
16 + <?define DeferredSuffix="" ?>
17 + <?endif ?>
18 +
19 + <?if $(var.platform)="x64" ?>
20 + <?define Suffix="_x64" ?>
21 + <?define DeferredSuffix="_64" ?>
22 + <?endif ?>
23 +
24 + <?if $(var.platform)="arm" ?>
25 + <?define Suffix="_ARM" ?>
26 + <?define DeferredSuffix="_ARM" ?>
27 + <?endif ?>
28 +</Include>
src/wixlib/difxapp.wixproj new
+39
@@ -0,0 +1,39 @@
1 +<?xml version="1.0" encoding="utf-8" ?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +<Project DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0">
4 + <Import Project="..\..\packages\WixToolset.MSBuild.4.0.0-build-0035\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0035\build\WixToolset.MSBuild.props')" />
5 + <Import Project="..\FindLocalWix.props" />
6 + <PropertyGroup>
7 + <ProjectGuid>{5066EB93-D8F7-4FAE-B687-024D7A81BD95}</ProjectGuid>
8 + <OutputName>difxapp</OutputName>
9 + <OutputType>Library</OutputType>
10 + <BindFiles>true</BindFiles>
11 + <Pedantic>true</Pedantic>
12 + <Cultures>en-us</Cultures>
13 + </PropertyGroup>
14 +
15 + <ItemGroup>
16 + <Compile Include="DifxAppExtension_x64.wxs" />
17 + <Compile Include="DifxAppExtension_x86.wxs" />
18 + </ItemGroup>
19 +
20 + <ItemGroup>
21 + <None Include="caSuffix.wxi" />
22 + <None Include="DifxAppExtension_Platform.wxi" />
23 + <None Include="packages.config" />
24 + </ItemGroup>
25 +
26 + <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' AND Exists('$(WixTargetsPath)') " />
27 + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets') " />
28 + <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
29 + <Error Text="WiX Toolset build tools (v4.0 or later) must be installed to build this project. To download the WiX Toolset, go to http://wixtoolset.org/releases/." />
30 + </Target>
31 + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
32 + <PropertyGroup>
33 + <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
34 + </PropertyGroup>
35 + <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" />
36 + <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0035\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0035\build\WixToolset.MSBuild.props'))" />
37 + </Target>
38 + <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
39 +</Project>
src/wixlib/packages.config new
+5
@@ -0,0 +1,5 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<packages>
3 + <package id="Nerdbank.GitVersioning" version="2.1.65" developmentDependency="true" targetFramework="net40" />
4 + <package id="WixToolset.MSBuild" version="4.0.0-build-0035" developmentDependency="true" targetFramework="net40" />
5 +</packages>
\ No newline at end of file
version.json new
+11
@@ -0,0 +1,11 @@
1 +{
2 + "version": "4.0",
3 + "publicReleaseRefSpec": [
4 + "^refs/heads/master$"
5 + ],
6 + "cloudBuild": {
7 + "buildNumber": {
8 + "enabled": true
9 + }
10 + }
11 +}