Integrate into latest v4.
Sean Hall committed
Feb 3, 2019 at 14:43 UTC
6f29d2fc2b3514cc85a7975e974e8e31f39288e2
44 files changed
+1323
-391
.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
Dependency.wixext.sln
new
+61
@@ -0,0 +1,61 @@
1
+
2
+Microsoft Visual Studio Solution File, Format Version 12.00
3
+# Visual Studio 15
4
+VisualStudioVersion = 15.0.28010.2016
5
+MinimumVisualStudioVersion = 10.0.40219.1
6
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dependencyca", "src\ca\dependencyca.vcxproj", "{B86AF46C-0F90-49CC-923F-A800B088D015}"
7
+EndProject
8
+Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "dependency", "src\wixlib\dependency.wixproj", "{58ED0EC8-73F8-4EE1-8664-A53486D38EC8}"
9
+EndProject
10
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Dependency.wixext", "src\wixext\WixToolset.Dependency.wixext.csproj", "{A0B6D3F1-AE5E-423B-BA92-60C9926CA498}"
11
+EndProject
12
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Dependency", "src\test\WixToolsetTest.Dependency\WixToolsetTest.Dependency.csproj", "{E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}"
13
+EndProject
14
+Global
15
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
16
+ Debug|Any CPU = Debug|Any CPU
17
+ Debug|x86 = Debug|x86
18
+ Release|Any CPU = Release|Any CPU
19
+ Release|x86 = Release|x86
20
+ EndGlobalSection
21
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
22
+ {B86AF46C-0F90-49CC-923F-A800B088D015}.Debug|Any CPU.ActiveCfg = Debug|Win32
23
+ {B86AF46C-0F90-49CC-923F-A800B088D015}.Debug|Any CPU.Build.0 = Debug|Win32
24
+ {B86AF46C-0F90-49CC-923F-A800B088D015}.Debug|x86.ActiveCfg = Debug|Win32
25
+ {B86AF46C-0F90-49CC-923F-A800B088D015}.Debug|x86.Build.0 = Debug|Win32
26
+ {B86AF46C-0F90-49CC-923F-A800B088D015}.Release|Any CPU.ActiveCfg = Release|Win32
27
+ {B86AF46C-0F90-49CC-923F-A800B088D015}.Release|Any CPU.Build.0 = Release|Win32
28
+ {B86AF46C-0F90-49CC-923F-A800B088D015}.Release|x86.ActiveCfg = Release|Win32
29
+ {B86AF46C-0F90-49CC-923F-A800B088D015}.Release|x86.Build.0 = Release|Win32
30
+ {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Debug|Any CPU.ActiveCfg = Debug|x86
31
+ {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Debug|Any CPU.Build.0 = Debug|x86
32
+ {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Debug|x86.ActiveCfg = Debug|x86
33
+ {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Debug|x86.Build.0 = Debug|x86
34
+ {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Release|Any CPU.ActiveCfg = Release|x86
35
+ {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Release|Any CPU.Build.0 = Release|x86
36
+ {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Release|x86.ActiveCfg = Release|x86
37
+ {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Release|x86.Build.0 = Release|x86
38
+ {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39
+ {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Debug|Any CPU.Build.0 = Debug|Any CPU
40
+ {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Debug|x86.ActiveCfg = Debug|Any CPU
41
+ {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Debug|x86.Build.0 = Debug|Any CPU
42
+ {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Release|Any CPU.ActiveCfg = Release|Any CPU
43
+ {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Release|Any CPU.Build.0 = Release|Any CPU
44
+ {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Release|x86.ActiveCfg = Release|Any CPU
45
+ {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Release|x86.Build.0 = Release|Any CPU
46
+ {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47
+ {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
48
+ {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Debug|x86.ActiveCfg = Debug|Any CPU
49
+ {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Debug|x86.Build.0 = Debug|Any CPU
50
+ {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
51
+ {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Release|Any CPU.Build.0 = Release|Any CPU
52
+ {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Release|x86.ActiveCfg = Release|Any CPU
53
+ {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Release|x86.Build.0 = Release|Any CPU
54
+ EndGlobalSection
55
+ GlobalSection(SolutionProperties) = preSolution
56
+ HideSolutionNode = FALSE
57
+ EndGlobalSection
58
+ GlobalSection(ExtensibilityGlobals) = postSolution
59
+ SolutionGuid = {77F012B1-8E94-4F85-9450-066C6BD15000}
60
+ EndGlobalSection
61
+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.Dependency\WixToolsetTest.Dependency.csproj
9
+
10
+msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.Dependency.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/Cpp.Build.props
new
+104
@@ -0,0 +1,104 @@
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>
5
+ <PropertyGroup>
6
+ <Platform Condition=" '$(Platform)' == '' OR '$(Platform)' == 'AnyCPU' ">Win32</Platform>
7
+ <IntDir>$(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\</IntDir>
8
+ <OutDir>$(OutputPath)$(Platform)\</OutDir>
9
+ </PropertyGroup>
10
+
11
+ <PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' AND '$(VisualStudioVersion)'=='15.0'">
12
+ <WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
13
+ </PropertyGroup>
14
+
15
+ <ItemDefinitionGroup>
16
+ <ClCompile>
17
+ <DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings>
18
+ <WarningLevel>Level4</WarningLevel>
19
+ <AdditionalIncludeDirectories>$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
20
+ <PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
21
+ <PrecompiledHeader>Use</PrecompiledHeader>
22
+ <PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
23
+ <CallingConvention Condition="'$(Platform)'=='Win32'">StdCall</CallingConvention>
24
+ <TreatWarningAsError>true</TreatWarningAsError>
25
+ <ExceptionHandling>false</ExceptionHandling>
26
+ <AdditionalOptions>-YlprecompDefine</AdditionalOptions>
27
+ <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
28
+ <MultiProcessorCompilation Condition=" $(NUMBER_OF_PROCESSORS) > 4 ">true</MultiProcessorCompilation>
29
+ </ClCompile>
30
+ <ResourceCompile>
31
+ <PreprocessorDefinitions>$(ArmPreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
32
+ <AdditionalIncludeDirectories>$(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
33
+ </ResourceCompile>
34
+ <Lib>
35
+ <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
36
+ </Lib>
37
+ <Link>
38
+ <SubSystem>$(ProjectSubSystem)</SubSystem>
39
+ <ModuleDefinitionFile>$(ProjectModuleDefinitionFile)</ModuleDefinitionFile>
40
+ <NoEntryPoint>$(ResourceOnlyDll)</NoEntryPoint>
41
+ <GenerateDebugInformation>true</GenerateDebugInformation>
42
+ <AdditionalDependencies>$(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
43
+ <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
44
+ <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/IGNORE:4099 %(AdditionalOptions)</AdditionalOptions>
45
+ </Link>
46
+ </ItemDefinitionGroup>
47
+
48
+ <ItemDefinitionGroup Condition=" '$(Platform)'=='Win32' and '$(PlatformToolset)'!='v100'">
49
+ <ClCompile>
50
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
51
+ </ClCompile>
52
+ </ItemDefinitionGroup>
53
+ <ItemDefinitionGroup Condition=" '$(Platform)'=='arm' ">
54
+ <ClCompile>
55
+ <CallingConvention>CDecl</CallingConvention>
56
+ </ClCompile>
57
+ </ItemDefinitionGroup>
58
+ <ItemDefinitionGroup Condition=" '$(ConfigurationType)'=='StaticLibrary' ">
59
+ <ClCompile>
60
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
61
+ <OmitDefaultLibName>true</OmitDefaultLibName>
62
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
63
+ </ClCompile>
64
+ </ItemDefinitionGroup>
65
+ <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' ">
66
+ <ClCompile>
67
+ <Optimization>Disabled</Optimization>
68
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
69
+ <PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
70
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
71
+ </ClCompile>
72
+ </ItemDefinitionGroup>
73
+ <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' ">
74
+ <ClCompile>
75
+ <BasicRuntimeChecks></BasicRuntimeChecks>
76
+ <RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
77
+ </ClCompile>
78
+ </ItemDefinitionGroup>
79
+ <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' ">
80
+ <ClCompile>
81
+ <Optimization>MinSpace</Optimization>
82
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
83
+ <FunctionLevelLinking>true</FunctionLevelLinking>
84
+ <IntrinsicFunctions>true</IntrinsicFunctions>
85
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
86
+ </ClCompile>
87
+ <Link>
88
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
89
+ <OptimizeReferences>true</OptimizeReferences>
90
+ </Link>
91
+ </ItemDefinitionGroup>
92
+ <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' ">
93
+ <ClCompile>
94
+ <BasicRuntimeChecks></BasicRuntimeChecks>
95
+ <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary>
96
+ </ClCompile>
97
+ </ItemDefinitionGroup>
98
+ <ItemDefinitionGroup Condition=" '$(CLRSupport)'=='true' ">
99
+ <Link>
100
+ <KeyFile>$(LinkKeyFile)</KeyFile>
101
+ <DelaySign>$(LinkDelaySign)</DelaySign>
102
+ </Link>
103
+ </ItemDefinitionGroup>
104
+</Project>
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>(?<="[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/ca/custommsierrors.h
new
+5
@@ -0,0 +1,5 @@
1
+#pragma once
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
+#define msierrDependencyMissingDependencies 26451
5
+#define msierrDependencyHasDependents 26452
src/ca/dependencyca.vcxproj
new
+61
@@ -0,0 +1,61 @@
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 DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5
+ <Import Project="..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props')" />
6
+ <Import Project="..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props')" />
7
+
8
+ <ItemGroup Label="ProjectConfigurations">
9
+ <ProjectConfiguration Include="Debug|Win32">
10
+ <Configuration>Debug</Configuration>
11
+ <Platform>Win32</Platform>
12
+ </ProjectConfiguration>
13
+ <ProjectConfiguration Include="Release|Win32">
14
+ <Configuration>Release</Configuration>
15
+ <Platform>Win32</Platform>
16
+ </ProjectConfiguration>
17
+ </ItemGroup>
18
+
19
+ <PropertyGroup Label="Globals">
20
+ <ProjectGuid>{B86AF46C-0F90-49CC-923F-A800B088D015}</ProjectGuid>
21
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
22
+ <PlatformToolset>v141</PlatformToolset>
23
+ <CharacterSet>Unicode</CharacterSet>
24
+ <TargetName>dependencyca</TargetName>
25
+ <ProjectModuleDefinitionFile>wixdepca.def</ProjectModuleDefinitionFile>
26
+ <Description>WiX Toolset Dependency CustomAction</Description>
27
+ </PropertyGroup>
28
+
29
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
30
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
31
+
32
+ <PropertyGroup>
33
+ <ProjectAdditionalLinkLibraries>msi.lib</ProjectAdditionalLinkLibraries>
34
+ </PropertyGroup>
35
+
36
+ <ItemGroup>
37
+ <ClCompile Include="dllmain.cpp">
38
+ <PrecompiledHeader>Create</PrecompiledHeader>
39
+ </ClCompile>
40
+ <ClCompile Include="wixdepca.cpp" />
41
+ </ItemGroup>
42
+
43
+ <ItemGroup>
44
+ <ClInclude Include="precomp.h" />
45
+ </ItemGroup>
46
+
47
+ <ItemGroup>
48
+ <None Include="packages.config" />
49
+ <None Include="wixdepca.def" />
50
+ </ItemGroup>
51
+
52
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
53
+
54
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
55
+ <PropertyGroup>
56
+ <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>
57
+ </PropertyGroup>
58
+ <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props'))" />
59
+ <Error Condition="!Exists('..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props'))" />
60
+ </Target>
61
+</Project>
src/ca/dependencyca.vcxproj.filters
renamed
-5
@@ -27,11 +27,6 @@
27
<Filter>Header Files</Filter>
28
</ClInclude>
29
</ItemGroup>
30
- <ItemGroup>
31
- <ResourceCompile Include="wixdepca.rc">
32
- <Filter>Resource Files</Filter>
33
- </ResourceCompile>
34
- </ItemGroup>
30
<ItemGroup>
31
<None Include="wixdepca.def">
32
<Filter>Source Files</Filter>
src/ca/packages.config
new
+5
@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<packages>
3
+ <package id="WixToolset.DUtil" version="4.0.16" targetFramework="native" />
4
+ <package id="WixToolset.WcaUtil" version="4.0.2" targetFramework="native" />
5
+</packages>
\ No newline at end of file
src/ca/wixdepca.def
+1
-1
@@ -1,7 +1,7 @@
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
4
-LIBRARY "wixdepca"
4
+LIBRARY "dependencyca"
5
6
EXPORTS
7
WixDependencyRequire
src/ca/wixdepca.vcxproj
deleted
-57
@@ -1,57 +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" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6
- <ItemGroup Label="ProjectConfigurations">
7
- <ProjectConfiguration Include="Debug|Win32">
8
- <Configuration>Debug</Configuration>
9
- <Platform>Win32</Platform>
10
- </ProjectConfiguration>
11
- <ProjectConfiguration Include="Release|Win32">
12
- <Configuration>Release</Configuration>
13
- <Platform>Win32</Platform>
14
- </ProjectConfiguration>
15
- </ItemGroup>
16
- <ItemGroup Label="ProjectConfigurations">
17
- <ProjectConfiguration Include="Debug|ARM">
18
- <Configuration>Debug</Configuration>
19
- <Platform>ARM</Platform>
20
- </ProjectConfiguration>
21
- <ProjectConfiguration Include="Release|ARM">
22
- <Configuration>Release</Configuration>
23
- <Platform>ARM</Platform>
24
- </ProjectConfiguration>
25
- </ItemGroup>
26
-
27
- <PropertyGroup Label="Globals">
28
- <ProjectGuid>{B86AF46C-0F90-49CC-923F-A800B088D015}</ProjectGuid>
29
- <ConfigurationType>DynamicLibrary</ConfigurationType>
30
- <CharacterSet>Unicode</CharacterSet>
31
- <TargetName>WixDepCA</TargetName>
32
- <ProjectModuleDefinitionFile>wixdepca.def</ProjectModuleDefinitionFile>
33
- </PropertyGroup>
34
-
35
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.props" />
36
-
37
- <PropertyGroup>
38
- <ProjectAdditionalIncludeDirectories>$(WixRoot)src\libs\dutil\inc;$(WixRoot)src\libs\wcautil;$(WixRoot)src\libs\deputil\inc</ProjectAdditionalIncludeDirectories>
39
- <ProjectAdditionalLinkLibraries>msi.lib;dutil.lib;deputil.lib;wcautil.lib</ProjectAdditionalLinkLibraries>
40
- </PropertyGroup>
41
-
42
- <ItemGroup>
43
- <ClCompile Include="dllmain.cpp" />
44
- <ClCompile Include="wixdepca.cpp" />
45
- </ItemGroup>
46
- <ItemGroup>
47
- <ClInclude Include="precomp.h" />
48
- </ItemGroup>
49
- <ItemGroup>
50
- <None Include="wixdepca.def" />
51
- </ItemGroup>
52
- <ItemGroup>
53
- <ResourceCompile Include="wixdepca.rc" />
54
- </ItemGroup>
55
-
56
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
57
-</Project>
src/test/WixToolsetTest.Dependency/DependencyExtensionFixture.cs
new
+32
@@ -0,0 +1,32 @@
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.Dependency
4
+{
5
+ using System.Linq;
6
+ using WixBuildTools.TestSupport;
7
+ using WixToolset.Core.TestPackage;
8
+ using WixToolset.Dependency;
9
+ using Xunit;
10
+
11
+ public class DependencyExtensionFixture
12
+ {
13
+ [Fact]
14
+ public void CanBuildUsingProvides()
15
+ {
16
+ var folder = TestData.Get(@"TestData\UsingProvides");
17
+ var build = new Builder(folder, typeof(DependencyExtensionFactory), new[] { folder });
18
+
19
+ var results = build.BuildAndQuery(Build, "WixDependencyProvider");
20
+ Assert.Equal(new[]
21
+ {
22
+ "WixDependencyProvider:depJQsOasf1FRUsKxq8THB9sXk8yws\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tUsingProvides\t\t\t0",
23
+ }, results.OrderBy(s => s).ToArray());
24
+ }
25
+
26
+ private static void Build(string[] args)
27
+ {
28
+ var result = WixRunner.Execute(args)
29
+ .AssertSuccess();
30
+ }
31
+ }
32
+}
src/test/WixToolsetTest.Dependency/TestData/UsingProvides/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.Dependency/TestData/UsingProvides/Package.wxs
new
+22
@@ -0,0 +1,22 @@
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
+
13
+ </Product>
14
+
15
+ <Fragment>
16
+ <Directory Id="TARGETDIR" Name="SourceDir">
17
+ <Directory Id="ProgramFilesFolder">
18
+ <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
19
+ </Directory>
20
+ </Directory>
21
+ </Fragment>
22
+</Wix>
src/test/WixToolsetTest.Dependency/TestData/UsingProvides/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:dep="http://wixtoolset.org/schemas/v4/wxs/dependency">
4
+ <Fragment>
5
+ <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
6
+ <Component>
7
+ <File Source="example.txt" />
8
+ <dep:Provides Key="UsingProvides" />
9
+ </Component>
10
+ </ComponentGroup>
11
+ </Fragment>
12
+</Wix>
src/test/WixToolsetTest.Dependency/TestData/UsingProvides/example.txt
new
+1
@@ -0,0 +1 @@
1
+This is example.txt.
\ No newline at end of file
src/test/WixToolsetTest.Dependency/WixToolsetTest.Dependency.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\UsingProvides\example.txt" CopyToOutputDirectory="PreserveNewest" />
16
+ <Content Include="TestData\UsingProvides\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
17
+ <Content Include="TestData\UsingProvides\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
18
+ <Content Include="TestData\UsingProvides\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
19
+ </ItemGroup>
20
+
21
+ <ItemGroup>
22
+ <ProjectReference Include="..\..\wixext\WixToolset.Dependency.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.8.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/DependencyCommon.cs
+1
-1
@@ -1,6 +1,6 @@
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.Dependency
4
{
5
using System;
6
using WixToolset;
src/wixext/DependencyCompiler.cs
+130
-133
@@ -1,6 +1,6 @@
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.Dependency
4
{
5
using System;
6
using System.Collections.Generic;
@@ -9,11 +9,12 @@ namespace WixToolset.Extensions
9
using System.Xml.Linq;
10
using WixToolset.Data;
11
using WixToolset.Extensibility;
12
+ using WixToolset.Extensibility.Data;
13
14
/// <summary>
14
- /// The compiler for the WiX toolset dependency extension.
15
+ /// The compiler for the WiX Toolset Dependency Extension.
16
/// </summary>
16
- public sealed class DependencyCompiler : CompilerExtension
17
+ public sealed class DependencyCompiler : BaseCompilerExtension
18
{
19
/// <summary>
20
/// Package type when parsing the Provides element.
@@ -27,10 +28,7 @@ namespace WixToolset.Extensions
28
MsuPackage
29
}
30
30
- public DependencyCompiler()
31
- {
32
- this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/dependency";
33
- }
31
+ public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/dependency";
32
33
/// <summary>
34
/// Processes an attribute for the Compiler.
@@ -38,24 +36,24 @@ namespace WixToolset.Extensions
36
/// <param name="sourceLineNumbers">Source line number for the parent element.</param>
37
/// <param name="parentElement">Parent element of attribute.</param>
38
/// <param name="attribute">Attribute to process.</param>
41
- public override void ParseAttribute(XElement parentElement, XAttribute attribute, IDictionary<string, string> context)
39
+ public override void ParseAttribute(Intermediate intermediate, IntermediateSection section, XElement parentElement, XAttribute attribute, IDictionary<string, string> context)
40
{
43
- SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(parentElement);
41
+ SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(parentElement);
42
switch (parentElement.Name.LocalName)
43
{
44
case "Bundle":
45
switch (attribute.Name.LocalName)
46
{
47
case "ProviderKey":
50
- this.ParseProviderKeyAttribute(sourceLineNumbers, parentElement, attribute);
48
+ this.ParseProviderKeyAttribute(section, sourceLineNumbers, parentElement, attribute);
49
break;
50
default:
53
- this.Core.UnexpectedAttribute(parentElement, attribute);
51
+ this.ParseHelper.UnexpectedAttribute(parentElement, attribute);
52
break;
53
}
54
break;
55
default:
58
- this.Core.UnexpectedAttribute(parentElement, attribute);
56
+ this.ParseHelper.UnexpectedAttribute(parentElement, attribute);
57
break;
58
}
59
}
@@ -67,7 +65,7 @@ namespace WixToolset.Extensions
65
/// <param name="parentElement">Parent element of element to process.</param>
66
/// <param name="element">Element to process.</param>
67
/// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
70
- public override void ParseElement(XElement parentElement, XElement element, IDictionary<string, string> context)
68
+ public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context)
69
{
70
PackageType packageType = PackageType.None;
71
@@ -80,10 +78,10 @@ namespace WixToolset.Extensions
78
switch (element.Name.LocalName)
79
{
80
case "Requires":
83
- this.ParseRequiresElement(element, null, false);
81
+ this.ParseRequiresElement(intermediate, section, element, null, false);
82
break;
83
default:
86
- this.Core.UnexpectedElement(parentElement, element);
84
+ this.ParseHelper.UnexpectedElement(parentElement, element);
85
break;
86
}
87
break;
@@ -100,7 +98,7 @@ namespace WixToolset.Extensions
98
packageType = PackageType.MsuPackage;
99
break;
100
default:
103
- this.Core.UnexpectedElement(parentElement, element);
101
+ this.ParseHelper.UnexpectedElement(parentElement, element);
102
break;
103
}
104
@@ -111,10 +109,10 @@ namespace WixToolset.Extensions
109
switch (element.Name.LocalName)
110
{
111
case "Provides":
114
- this.ParseProvidesElement(element, packageType, packageId);
112
+ this.ParseProvidesElement(intermediate, section, element, packageType, packageId);
113
break;
114
default:
117
- this.Core.UnexpectedElement(parentElement, element);
115
+ this.ParseHelper.UnexpectedElement(parentElement, element);
116
break;
117
}
118
}
@@ -127,9 +125,9 @@ namespace WixToolset.Extensions
125
/// <param name="element">Element to process.</param>
126
/// <param name="context">Extra information about the context in which this element is being parsed.</param>
127
/// <returns>The component key path type if set.</returns>
130
- public override ComponentKeyPath ParsePossibleKeyPathElement(XElement parentElement, XElement element, IDictionary<string, string> context)
128
+ public override ComponentKeyPath ParsePossibleKeyPathElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context)
129
{
132
- SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(parentElement);
130
+ SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(parentElement);
131
ComponentKeyPath keyPath = null;
132
133
switch (parentElement.Name.LocalName)
@@ -146,18 +144,18 @@ namespace WixToolset.Extensions
144
case "Provides":
145
if (win64)
146
{
149
- this.Core.OnMessage(DependencyWarnings.Win64Component(sourceLineNumbers, componentId));
147
+ this.Messaging.Write(DependencyWarnings.Win64Component(sourceLineNumbers, componentId));
148
}
149
152
- keyPath = this.ParseProvidesElement(element, PackageType.None, componentId);
150
+ keyPath = this.ParseProvidesElement(intermediate, section, element, PackageType.None, componentId);
151
break;
152
default:
155
- this.Core.UnexpectedElement(parentElement, element);
153
+ this.ParseHelper.UnexpectedElement(parentElement, element);
154
break;
155
}
156
break;
157
default:
160
- this.Core.UnexpectedElement(parentElement, element);
158
+ this.ParseHelper.UnexpectedElement(parentElement, element);
159
break;
160
}
161
@@ -170,7 +168,7 @@ namespace WixToolset.Extensions
168
/// <param name="sourceLineNumbers">Source line number for the parent element.</param>
169
/// <param name="parentElement">Parent element of attribute.</param>
170
/// <param name="attribute">The XML attribute for the ProviderKey attribute.</param>
173
- private void ParseProviderKeyAttribute(SourceLineNumber sourceLineNumbers, XElement parentElement, XAttribute attribute)
171
+ private void ParseProviderKeyAttribute(IntermediateSection section, SourceLineNumber sourceLineNumbers, XElement parentElement, XAttribute attribute)
172
{
173
Identifier id = null;
174
string providerKey = null;
@@ -179,41 +177,41 @@ namespace WixToolset.Extensions
177
switch (attribute.Name.LocalName)
178
{
179
case "ProviderKey":
182
- providerKey = this.Core.GetAttributeValue(sourceLineNumbers, attribute);
180
+ providerKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attribute);
181
break;
182
default:
185
- this.Core.UnexpectedAttribute(parentElement, attribute);
183
+ this.ParseHelper.UnexpectedAttribute(parentElement, attribute);
184
break;
185
}
186
187
// Make sure the key does not contain any illegal characters or values.
188
if (String.IsNullOrEmpty(providerKey))
189
{
192
- this.Core.OnMessage(WixErrors.IllegalEmptyAttributeValue(sourceLineNumbers, parentElement.Name.LocalName, attribute.Name.LocalName));
190
+ this.Messaging.Write(ErrorMessages.IllegalEmptyAttributeValue(sourceLineNumbers, parentElement.Name.LocalName, attribute.Name.LocalName));
191
}
192
else if (0 <= (illegalChar = providerKey.IndexOfAny(DependencyCommon.InvalidCharacters)))
193
{
194
StringBuilder sb = new StringBuilder(DependencyCommon.InvalidCharacters.Length * 2);
195
Array.ForEach<char>(DependencyCommon.InvalidCharacters, c => sb.Append(c).Append(" "));
196
199
- this.Core.OnMessage(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "ProviderKey", providerKey[illegalChar], sb.ToString()));
197
+ this.Messaging.Write(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "ProviderKey", providerKey[illegalChar], sb.ToString()));
198
}
199
else if ("ALL" == providerKey)
200
{
203
- this.Core.OnMessage(DependencyErrors.ReservedValue(sourceLineNumbers, parentElement.Name.LocalName, "ProviderKey", providerKey));
201
+ this.Messaging.Write(DependencyErrors.ReservedValue(sourceLineNumbers, parentElement.Name.LocalName, "ProviderKey", providerKey));
202
}
203
204
// Generate the primary key for the row.
207
- id = this.Core.CreateIdentifier("dep", attribute.Name.LocalName, providerKey);
205
+ id = this.ParseHelper.CreateIdentifier("dep", attribute.Name.LocalName, providerKey);
206
209
- if (!this.Core.EncounteredError)
207
+ if (!this.Messaging.EncounteredError)
208
{
209
// Create the provider row for the bundle. The Component_ field is required
210
// in the table definition but unused for bundles, so just set it to the valid ID.
213
- Row row = this.Core.CreateRow(sourceLineNumbers, "WixDependencyProvider", id);
214
- row[1] = id.Id;
215
- row[2] = providerKey;
216
- row[5] = DependencyCommon.ProvidesAttributesBundle;
211
+ var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixDependencyProvider", id);
212
+ row.Set(1, id.Id);
213
+ row.Set(2, providerKey);
214
+ row.Set(5, DependencyCommon.ProvidesAttributesBundle);
215
}
216
}
217
@@ -225,9 +223,9 @@ namespace WixToolset.Extensions
223
/// <param name="keyPath">Explicit key path.</param>
224
/// <param name="parentId">The identifier of the parent component or package.</param>
225
/// <returns>The type of key path if set.</returns>
228
- private ComponentKeyPath ParseProvidesElement(XElement node, PackageType packageType, string parentId)
226
+ private ComponentKeyPath ParseProvidesElement(Intermediate intermediate, IntermediateSection section, XElement node, PackageType packageType, string parentId)
227
{
230
- SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
228
+ SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
229
ComponentKeyPath keyPath = null;
230
Identifier id = null;
231
string key = null;
@@ -243,25 +241,25 @@ namespace WixToolset.Extensions
241
switch (attrib.Name.LocalName)
242
{
243
case "Id":
246
- id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
244
+ id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
245
break;
246
case "Key":
249
- key = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
247
+ key = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
248
break;
249
case "Version":
252
- version = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib);
250
+ version = this.ParseHelper.GetAttributeVersionValue(sourceLineNumbers, attrib);
251
break;
252
case "DisplayName":
255
- displayName = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
253
+ displayName = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
254
break;
255
default:
258
- this.Core.UnexpectedAttribute(node, attrib);
256
+ this.ParseHelper.UnexpectedAttribute(node, attrib);
257
break;
258
}
259
}
260
else
261
{
264
- this.Core.ParseExtensionAttribute(node, attrib);
262
+ this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib);
263
}
264
}
265
@@ -275,22 +273,22 @@ namespace WixToolset.Extensions
273
StringBuilder sb = new StringBuilder(DependencyCommon.InvalidCharacters.Length * 2);
274
Array.ForEach<char>(DependencyCommon.InvalidCharacters, c => sb.Append(c).Append(" "));
275
278
- this.Core.OnMessage(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "Key", key[illegalChar], sb.ToString()));
276
+ this.Messaging.Write(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "Key", key[illegalChar], sb.ToString()));
277
}
278
else if ("ALL" == key)
279
{
282
- this.Core.OnMessage(DependencyErrors.ReservedValue(sourceLineNumbers, node.Name.LocalName, "Key", key));
280
+ this.Messaging.Write(DependencyErrors.ReservedValue(sourceLineNumbers, node.Name.LocalName, "Key", key));
281
}
282
}
283
else if (PackageType.ExePackage == packageType || PackageType.MsuPackage == packageType)
284
{
285
// Must specify the provider key when authored for a package.
288
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key"));
286
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key"));
287
}
288
else if (PackageType.None == packageType)
289
{
290
// Make sure the ProductCode is authored and set the key.
293
- this.Core.CreateSimpleReference(sourceLineNumbers, "Property", "ProductCode");
291
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Property", "ProductCode");
292
key = "!(bind.property.ProductCode)";
293
}
294
@@ -300,23 +298,23 @@ namespace WixToolset.Extensions
298
switch (packageType)
299
{
300
case PackageType.None:
303
- this.Core.OnMessage(DependencyWarnings.DiscouragedVersionAttribute(sourceLineNumbers));
301
+ this.Messaging.Write(DependencyWarnings.DiscouragedVersionAttribute(sourceLineNumbers));
302
break;
303
case PackageType.MsiPackage:
306
- this.Core.OnMessage(DependencyWarnings.DiscouragedVersionAttribute(sourceLineNumbers, parentId));
304
+ this.Messaging.Write(DependencyWarnings.DiscouragedVersionAttribute(sourceLineNumbers, parentId));
305
break;
306
}
307
}
308
else if (PackageType.MspPackage == packageType || PackageType.MsuPackage == packageType)
309
{
310
// Must specify the Version when authored for packages that do not contain a version.
313
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version"));
311
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version"));
312
}
313
314
// Need the element ID for child element processing, so generate now if not authored.
315
if (null == id)
316
{
319
- id = this.Core.CreateIdentifier("dep", node.Name.LocalName, parentId, key);
317
+ id = this.ParseHelper.CreateIdentifier("dep", node.Name.LocalName, parentId, key);
318
}
319
320
foreach (XElement child in node.Elements())
@@ -326,94 +324,93 @@ namespace WixToolset.Extensions
324
switch (child.Name.LocalName)
325
{
326
case "Requires":
329
- this.ParseRequiresElement(child, id.Id, PackageType.None == packageType);
327
+ this.ParseRequiresElement(intermediate, section, child, id.Id, PackageType.None == packageType);
328
break;
329
case "RequiresRef":
332
- this.ParseRequiresRefElement(child, id.Id, PackageType.None == packageType);
330
+ this.ParseRequiresRefElement(intermediate, section, child, id.Id, PackageType.None == packageType);
331
break;
332
default:
335
- this.Core.UnexpectedElement(node, child);
333
+ this.ParseHelper.UnexpectedElement(node, child);
334
break;
335
}
336
}
337
else
338
{
341
- this.Core.ParseExtensionElement(node, child);
339
+ this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child);
340
}
341
}
342
345
- if (!this.Core.EncounteredError)
343
+ if (!this.Messaging.EncounteredError)
344
{
345
// Create the row in the provider table.
348
- Row row = this.Core.CreateRow(sourceLineNumbers, "WixDependencyProvider", id);
349
- row[1] = parentId;
350
- row[2] = key;
346
+ var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixDependencyProvider", id);
347
+ row.Set(1, parentId);
348
+ row.Set(2, key);
349
350
if (!String.IsNullOrEmpty(version))
351
{
354
- row[3] = version;
352
+ row.Set(3, version);
353
}
354
355
if (!String.IsNullOrEmpty(displayName))
356
{
359
- row[4] = displayName;
357
+ row.Set(4, displayName);
358
}
359
360
if (0 != attributes)
361
{
364
- row[5] = attributes;
362
+ row.Set(5, attributes);
363
}
364
365
if (PackageType.None == packageType)
366
{
367
// Reference the Check custom action to check for dependencies on the current provider.
370
- if (Platform.ARM == this.Core.CurrentPlatform)
368
+ if (Platform.ARM == this.Context.Platform)
369
{
370
// Ensure the ARM version of the CA is referenced.
373
- this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyCheck_ARM");
371
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyCheck_ARM");
372
}
373
else
374
{
375
// All other supported platforms use x86.
378
- this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyCheck");
376
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyCheck");
377
}
378
379
// Generate registry rows for the provider using binder properties.
380
string keyProvides = String.Concat(DependencyCommon.RegistryRoot, key);
381
384
- row = this.Core.CreateRow(sourceLineNumbers, "Registry", this.Core.CreateIdentifier("reg", id.Id, "(Default)"));
385
- row[1] = -1;
386
- row[2] = keyProvides;
387
- row[3] = null;
388
- row[4] = "[ProductCode]";
389
- row[5] = parentId;
382
+ row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Registry", this.ParseHelper.CreateIdentifier("reg", id.Id, "(Default)"));
383
+ row.Set(1, -1);
384
+ row.Set(2, keyProvides);
385
+ row.Set(4, "[ProductCode]");
386
+ row.Set(5, parentId);
387
388
// Use the Version registry value and use that as a potential key path.
392
- Identifier idVersion = this.Core.CreateIdentifier("reg", id.Id, "Version");
389
+ Identifier idVersion = this.ParseHelper.CreateIdentifier("reg", id.Id, "Version");
390
keyPath = new ComponentKeyPath() { Id = idVersion.Id, Explicit = false, Type = ComponentKeyPathType.Registry };
391
395
- row = this.Core.CreateRow(sourceLineNumbers, "Registry", idVersion);
396
- row[1] = -1;
397
- row[2] = keyProvides;
398
- row[3] = "Version";
399
- row[4] = !String.IsNullOrEmpty(version) ? version : "[ProductVersion]";
400
- row[5] = parentId;
392
+ row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Registry", idVersion);
393
+ row.Set(1, -1);
394
+ row.Set(2, keyProvides);
395
+ row.Set(3, "Version");
396
+ row.Set(4, !String.IsNullOrEmpty(version) ? version : "[ProductVersion]");
397
+ row.Set(5, parentId);
398
402
- row = this.Core.CreateRow(sourceLineNumbers, "Registry", this.Core.CreateIdentifier("reg", id.Id, "DisplayName"));
403
- row[1] = -1;
404
- row[2] = keyProvides;
405
- row[3] = "DisplayName";
406
- row[4] = !String.IsNullOrEmpty(displayName) ? displayName : "[ProductName]";
407
- row[5] = parentId;
399
+ row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Registry", this.ParseHelper.CreateIdentifier("reg", id.Id, "DisplayName"));
400
+ row.Set(1, -1);
401
+ row.Set(2, keyProvides);
402
+ row.Set(3, "DisplayName");
403
+ row.Set(4, !String.IsNullOrEmpty(displayName) ? displayName : "[ProductName]");
404
+ row.Set(5, parentId);
405
406
if (0 != attributes)
407
{
411
- row = this.Core.CreateRow(sourceLineNumbers, "Registry", this.Core.CreateIdentifier("reg", id.Id, "Attributes"));
412
- row[1] = -1;
413
- row[2] = keyProvides;
414
- row[3] = "Attributes";
415
- row[4] = String.Concat("#", attributes.ToString(CultureInfo.InvariantCulture.NumberFormat));
416
- row[5] = parentId;
408
+ row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Registry", this.ParseHelper.CreateIdentifier("reg", id.Id, "Attributes"));
409
+ row.Set(1, -1);
410
+ row.Set(2, keyProvides);
411
+ row.Set(3, "Attributes");
412
+ row.Set(4, String.Concat("#", attributes.ToString(CultureInfo.InvariantCulture.NumberFormat)));
413
+ row.Set(5, parentId);
414
}
415
}
416
}
@@ -427,9 +424,9 @@ namespace WixToolset.Extensions
424
/// <param name="node">The XML node for the Requires element.</param>
425
/// <param name="providerId">The parent provider identifier.</param>
426
/// <param name="requiresAction">Whether the Requires custom action should be referenced.</param>
430
- private void ParseRequiresElement(XElement node, string providerId, bool requiresAction)
427
+ private void ParseRequiresElement(Intermediate intermediate, IntermediateSection section, XElement node, string providerId, bool requiresAction)
428
{
432
- SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
429
+ SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
430
Identifier id = null;
431
string providerKey = null;
432
string minVersion = null;
@@ -444,41 +441,41 @@ namespace WixToolset.Extensions
441
switch (attrib.Name.LocalName)
442
{
443
case "Id":
447
- id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
444
+ id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
445
break;
446
case "ProviderKey":
450
- providerKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
447
+ providerKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
448
break;
449
case "Minimum":
453
- minVersion = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib);
450
+ minVersion = this.ParseHelper.GetAttributeVersionValue(sourceLineNumbers, attrib);
451
break;
452
case "Maximum":
456
- maxVersion = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib);
453
+ maxVersion = this.ParseHelper.GetAttributeVersionValue(sourceLineNumbers, attrib);
454
break;
455
case "IncludeMinimum":
459
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
456
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
457
{
458
attributes |= DependencyCommon.RequiresAttributesMinVersionInclusive;
459
}
460
break;
461
case "IncludeMaximum":
465
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
462
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
463
{
464
attributes |= DependencyCommon.RequiresAttributesMaxVersionInclusive;
465
}
466
break;
467
default:
471
- this.Core.UnexpectedAttribute(node, attrib);
468
+ this.ParseHelper.UnexpectedAttribute(node, attrib);
469
break;
470
}
471
}
472
else
473
{
477
- this.Core.ParseExtensionAttribute(node, attrib);
474
+ this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib);
475
}
476
}
477
481
- this.Core.ParseForExtensionElements(node);
478
+ this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node);
479
480
if (null == id)
481
{
@@ -486,18 +483,18 @@ namespace WixToolset.Extensions
483
// element will be necessary and the Id attribute will be required.
484
if (!String.IsNullOrEmpty(providerId))
485
{
489
- id = this.Core.CreateIdentifier("dep", node.Name.LocalName, providerKey);
486
+ id = this.ParseHelper.CreateIdentifier("dep", node.Name.LocalName, providerKey);
487
}
488
else
489
{
493
- this.Core.OnMessage(WixErrors.ExpectedAttributeWhenElementNotUnderElement(sourceLineNumbers, node.Name.LocalName, "Id", "Provides"));
490
+ this.Messaging.Write(ErrorMessages.ExpectedAttributeWhenElementNotUnderElement(sourceLineNumbers, node.Name.LocalName, "Id", "Provides"));
491
id = Identifier.Invalid;
492
}
493
}
494
495
if (String.IsNullOrEmpty(providerKey))
496
{
500
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ProviderKey"));
497
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ProviderKey"));
498
}
499
// Make sure the key does not contain any illegal characters.
500
else if (0 <= (illegalChar = providerKey.IndexOfAny(DependencyCommon.InvalidCharacters)))
@@ -505,44 +502,44 @@ namespace WixToolset.Extensions
502
StringBuilder sb = new StringBuilder(DependencyCommon.InvalidCharacters.Length * 2);
503
Array.ForEach<char>(DependencyCommon.InvalidCharacters, c => sb.Append(c).Append(" "));
504
508
- this.Core.OnMessage(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "ProviderKey", providerKey[illegalChar], sb.ToString()));
505
+ this.Messaging.Write(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "ProviderKey", providerKey[illegalChar], sb.ToString()));
506
}
507
508
512
- if (!this.Core.EncounteredError)
509
+ if (!this.Messaging.EncounteredError)
510
{
511
// Reference the Require custom action if required.
512
if (requiresAction)
513
{
517
- if (Platform.ARM == this.Core.CurrentPlatform)
514
+ if (Platform.ARM == this.Context.Platform)
515
{
516
// Ensure the ARM version of the CA is referenced.
520
- this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyRequire_ARM");
517
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyRequire_ARM");
518
}
519
else
520
{
521
// All other supported platforms use x86.
525
- this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyRequire");
522
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyRequire");
523
}
524
}
525
529
- Row row = this.Core.CreateRow(sourceLineNumbers, "WixDependency", id);
530
- row[1] = providerKey;
531
- row[2] = minVersion;
532
- row[3] = maxVersion;
526
+ var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixDependency", id);
527
+ row.Set(1, providerKey);
528
+ row.Set(2, minVersion);
529
+ row.Set(3, maxVersion);
530
531
if (0 != attributes)
532
{
536
- row[4] = attributes;
533
+ row.Set(4, attributes);
534
}
535
536
// Create the relationship between this WixDependency row and the WixDependencyProvider row.
537
if (!String.IsNullOrEmpty(providerId))
538
{
539
// Create the relationship between the WixDependency row and the parent WixDependencyProvider row.
543
- row = this.Core.CreateRow(sourceLineNumbers, "WixDependencyRef");
544
- row[0] = providerId;
545
- row[1] = id.Id;
540
+ row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixDependencyRef");
541
+ row.Set(0, providerId);
542
+ row.Set(1, id.Id);
543
}
544
}
545
}
@@ -553,9 +550,9 @@ namespace WixToolset.Extensions
550
/// <param name="node">The XML node for the RequiresRef element.</param>
551
/// <param name="providerId">The parent provider identifier.</param>
552
/// <param name="requiresAction">Whether the Requires custom action should be referenced.</param>
556
- private void ParseRequiresRefElement(XElement node, string providerId, bool requiresAction)
553
+ private void ParseRequiresRefElement(Intermediate intermediate, IntermediateSection section, XElement node, string providerId, bool requiresAction)
554
{
558
- SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
555
+ SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
556
string id = null;
557
558
foreach (XAttribute attrib in node.Attributes())
@@ -565,50 +562,50 @@ namespace WixToolset.Extensions
562
switch (attrib.Name.LocalName)
563
{
564
case "Id":
568
- id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
565
+ id = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
566
break;
567
default:
571
- this.Core.UnexpectedAttribute(node, attrib);
568
+ this.ParseHelper.UnexpectedAttribute(node, attrib);
569
break;
570
}
571
}
572
else
573
{
577
- this.Core.ParseExtensionAttribute(node, attrib);
574
+ this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib);
575
}
576
}
577
581
- this.Core.ParseForExtensionElements(node);
578
+ this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node);
579
580
if (String.IsNullOrEmpty(id))
581
{
585
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
582
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
583
}
584
588
- if (!this.Core.EncounteredError)
585
+ if (!this.Messaging.EncounteredError)
586
{
587
// Reference the Require custom action if required.
588
if (requiresAction)
589
{
593
- if (Platform.ARM == this.Core.CurrentPlatform)
590
+ if (Platform.ARM == this.Context.Platform)
591
{
592
// Ensure the ARM version of the CA is referenced.
596
- this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyRequire_ARM");
593
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyRequire_ARM");
594
}
595
else
596
{
597
// All other supported platforms use x86.
601
- this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyRequire");
598
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyRequire");
599
}
600
}
601
602
// Create a link dependency on the row that contains information we'll need during bind.
606
- this.Core.CreateSimpleReference(sourceLineNumbers, "WixDependency", id);
603
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixDependency", id);
604
605
// Create the relationship between the WixDependency row and the parent WixDependencyProvider row.
609
- Row row = this.Core.CreateRow(sourceLineNumbers, "WixDependencyRef");
610
- row[0] = providerId;
611
- row[1] = id;
606
+ var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixDependencyRef");
607
+ row.Set(0, providerId);
608
+ row.Set(1, id);
609
}
610
}
611
}
src/wixext/DependencyDecompiler.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.Dependency
4
{
5
+#if TODO_CONSIDER_DECOMPILER
6
using System;
7
using System.Collections.Generic;
8
using System.Collections.ObjectModel;
@@ -342,4 +343,5 @@ namespace WixToolset.Extensions
343
}
344
}
345
}
346
+#endif
347
}
src/wixext/DependencyErrors.cs
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
+namespace WixToolset.Dependency
4
+{
5
+ using System;
6
+ using System.Resources;
7
+ using WixToolset.Data;
8
+
9
+ public static class DependencyErrors
10
+ {
11
+ public static Message IllegalCharactersInProvider(SourceLineNumber sourceLineNumbers, string attributeName, Char illegalChar, string illegalChars)
12
+ {
13
+ return Message(sourceLineNumbers, Ids.IllegalCharactersInProvider, "The provider key authored into the {0} attribute contains an illegal character, '{1}'. Please author the provider key without any of the following characters: {2}", attributeName, illegalChar, illegalChars);
14
+ }
15
+
16
+ public static Message ReservedValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
17
+ {
18
+ return Message(sourceLineNumbers, Ids.ReservedValue, "The {0}/@{1} attribute value '{2}' is reserved and cannot be used here. Please choose a different value.", elementName, attributeName, attributeValue);
19
+ }
20
+
21
+ private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
22
+ {
23
+ return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
24
+ }
25
+
26
+ private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
27
+ {
28
+ return new Message(sourceLineNumber, MessageLevel.Error, (int)id, resourceManager, resourceName, args);
29
+ }
30
+
31
+ public enum Ids
32
+ {
33
+ IllegalCharactersInProvider = 5400,
34
+ ReservedValue = 5401,
35
+ }
36
+ }
37
+}
src/wixext/DependencyExtension.csproj
deleted
-50
@@ -1,50 +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>{A0B6D3F1-AE5E-423B-BA92-60C9926CA498}</ProjectGuid>
8
- <AssemblyName>WixDependencyExtension</AssemblyName>
9
- <OutputType>Library</OutputType>
10
- <RootNamespace>WixToolset.Extensions</RootNamespace>
11
- </PropertyGroup>
12
- <ItemGroup>
13
- <Compile Include="AssemblyInfo.cs" />
14
- <Compile Include="DependencyBinder.cs" />
15
- <Compile Include="DependencyCommon.cs" />
16
- <Compile Include="DependencyCompiler.cs" />
17
- <Compile Include="DependencyDecompiler.cs" />
18
- <Compile Include="DependencyExtensionData.cs" />
19
- <EmbeddedFlattenedResource Include="Data\tables.xml">
20
- <LogicalName>$(RootNamespace).Data.tables.xml</LogicalName>
21
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
22
- </EmbeddedFlattenedResource>
23
- <MsgGenSource Include="Data\messages.xml">
24
- <ResourcesLogicalName>$(RootNamespace).Data.Messages.resources</ResourcesLogicalName>
25
- </MsgGenSource>
26
- <EmbeddedFlattenedResource Include="Xsd\Dependency.xsd">
27
- <LogicalName>$(RootNamespace).Xsd.Dependency.xsd</LogicalName>
28
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
29
- </EmbeddedFlattenedResource>
30
- <XsdGenSource Include="Xsd\Dependency.xsd">
31
- <CommonNamespace>WixToolset.Data.Serialize</CommonNamespace>
32
- <Namespace>WixToolset.Extensions.Serialize.Dependency</Namespace>
33
- </XsdGenSource>
34
- <EmbeddedResource Include="$(OutputPath)Dependency.wixlib">
35
- <Link>Data\Dependency.wixlib</Link>
36
- </EmbeddedResource>
37
- </ItemGroup>
38
- <ItemGroup>
39
- <Reference Include="System" />
40
- <Reference Include="System.Xml" />
41
- <Reference Include="System.Xml.Linq" />
42
- <ProjectReference Include="..\..\..\libs\WixToolset.Data\WixToolset.Data.csproj" />
43
- <ProjectReference Include="..\..\..\libs\WixToolset.Extensibility\WixToolset.Extensibility.csproj" />
44
- <ProjectReference Include="..\..\..\tools\wix\Wix.csproj" />
45
- <ProjectReference Include="..\wixlib\DependencyExtension.wixproj">
46
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
47
- </ProjectReference>
48
- </ItemGroup>
49
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
50
-</Project>
src/wixext/DependencyExtensionData.cs
+9
-43
@@ -1,64 +1,30 @@
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.Dependency
4
{
5
- using System;
6
- using System.Reflection;
5
using WixToolset.Data;
6
using WixToolset.Extensibility;
7
8
/// <summary>
11
- /// The WiX toolset dependency extension.
9
+ /// The WiX Toolset Dependency Extension.
10
/// </summary>
13
- public sealed class DependencyExtensionData : ExtensionData
11
+ public sealed class DependencyExtensionData : BaseExtensionData
12
{
13
/// <summary>
14
/// Gets the default culture.
15
/// </summary>
16
/// <value>The default culture.</value>
19
- public override string DefaultCulture
20
- {
21
- get { return "en-us"; }
22
- }
23
-
24
- /// <summary>
25
- /// Gets the optional table definitions for this extension.
26
- /// </summary>
27
- /// <value>The optional table definitions for this extension.</value>
28
- public override TableDefinitionCollection TableDefinitions
29
- {
30
- get
31
- {
32
- return DependencyExtensionData.GetExtensionTableDefinitions();
33
- }
34
- }
35
-
36
- /// <summary>
37
- /// Gets the library associated with this extension.
38
- /// </summary>
39
- /// <param name="tableDefinitions">The table definitions to use while loading the library.</param>
40
- /// <returns>The loaded library.</returns>
41
- public override Library GetLibrary(TableDefinitionCollection tableDefinitions)
42
- {
43
- return DependencyExtensionData.GetExtensionLibrary(tableDefinitions);
44
- }
17
+ public override string DefaultCulture => "en-US";
18
46
- /// <summary>
47
- /// Internal mechanism to access the extension's table definitions.
48
- /// </summary>
49
- /// <returns>Extension's table definitions.</returns>
50
- internal static TableDefinitionCollection GetExtensionTableDefinitions()
19
+ public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)
20
{
52
- return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml");
21
+ tupleDefinition = DependencyTupleDefinitions.ByName(name);
22
+ return tupleDefinition != null;
23
}
24
55
- /// <summary>
56
- /// Internal mechanism to access the extension's library.
57
- /// </summary>
58
- /// <returns>Extension's library.</returns>
59
- internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions)
25
+ public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions)
26
{
61
- return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.Dependency.wixlib", tableDefinitions);
27
+ return Intermediate.Load(typeof(DependencyExtensionData).Assembly, "WixToolset.Dependency.dependency.wixlib", tupleDefinitions);
28
}
29
}
30
}
src/wixext/DependencyExtensionFactory.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.Dependency
4
+{
5
+ using System;
6
+ using System.Collections.Generic;
7
+ using WixToolset.Extensibility;
8
+
9
+ public class DependencyExtensionFactory : BaseExtensionFactory
10
+ {
11
+ protected override IEnumerable<Type> ExtensionTypes => new[]
12
+ {
13
+ typeof(DependencyCompiler),
14
+ typeof(DependencyExtensionData),
15
+ typeof(DependencyWindowsInstallerBackendBinderExtension),
16
+ };
17
+ }
18
+}
src/wixext/DependencyWarnings.cs
new
+60
@@ -0,0 +1,60 @@
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.Dependency
4
+{
5
+ using System;
6
+ using System.Resources;
7
+ using WixToolset.Data;
8
+
9
+ public static class DependencyWarnings
10
+ {
11
+ public static Message DiscouragedVersionAttribute(SourceLineNumber sourceLineNumbers)
12
+ {
13
+ return Message(sourceLineNumbers, Ids.DiscouragedVersionAttribute, "The Provides/@Version attribute should not be specified in an MSI package. The ProductVersion will be used by default.");
14
+ }
15
+
16
+ public static Message DiscouragedVersionAttribute(SourceLineNumber sourceLineNumbers, string id)
17
+ {
18
+ return Message(sourceLineNumbers, Ids.DiscouragedVersionAttribute, "The Provides/@Version attribute should not be specified for MSI package {0}. The ProductVersion will be used by default.", id);
19
+ }
20
+
21
+ public static Message PropertyRemoved(string name)
22
+ {
23
+ return Message(null, Ids.PropertyRemoved, "The property {0} was authored in the package with a value and will be removed. The property should not be authored.", name);
24
+ }
25
+
26
+ public static Message ProvidesKeyNotFound(SourceLineNumber sourceLineNumbers, string id)
27
+ {
28
+ return Message(sourceLineNumbers, Ids.ProvidesKeyNotFound, "The provider key with identifier {0} was not found in the WixDependencyProvider table. Related registry rows will not be removed from authoring.", id);
29
+ }
30
+
31
+ public static Message RequiresKeyNotFound(SourceLineNumber sourceLineNumbers, string id)
32
+ {
33
+ return Message(sourceLineNumbers, Ids.RequiresKeyNotFound, "The dependency key with identifier {0} was not found in the WixDependency table. Related registry rows will not be removed from authoring.", id);
34
+ }
35
+
36
+ public static Message Win64Component(SourceLineNumber sourceLineNumbers, string componentId)
37
+ {
38
+ return Message(sourceLineNumbers, Ids.Win64Component, "The Provides element should not be authored in the 64-bit component with identifier {0}. The dependency feature may not work if installing this package on 64-bit Windows operating systems prior to Windows 7 and Windows Server 2008 R2. Set the Component/@Win64 attribute to \"no\" to make sure the dependency feature works correctly on all supported operating systems.", componentId);
39
+ }
40
+
41
+ private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
42
+ {
43
+ return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
44
+ }
45
+
46
+ private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
47
+ {
48
+ return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, resourceManager, resourceName, args);
49
+ }
50
+
51
+ public enum Ids
52
+ {
53
+ ProvidesKeyNotFound = 5431,
54
+ RequiresKeyNotFound = 5432,
55
+ PropertyRemoved = 5433,
56
+ DiscouragedVersionAttribute = 5434,
57
+ Win64Component = 5435,
58
+ }
59
+ }
60
+}
src/wixext/DependencyWindowsInstallerBackendBinderExtension.cs
renamed
+22
-10
@@ -1,24 +1,35 @@
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.Dependency
4
{
5
- using System;
6
- using System.Collections.ObjectModel;
7
- using System.Globalization;
8
- using WixToolset.Data;
5
+ using System.Linq;
6
+ using System.Xml;
7
+ using WixToolset.Data.WindowsInstaller;
8
using WixToolset.Extensibility;
9
11
- /// <summary>
12
- /// The compiler for the WiX toolset dependency extension.
13
- /// </summary>
14
- public sealed class DependencyBinder : BinderExtension
10
+ public class DependencyWindowsInstallerBackendBinderExtension : 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(DependencyWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.Dependency.tables.xml"))
19
+ using (var reader = XmlReader.Create(resourceStream))
20
+ {
21
+ var tables = TableDefinitionCollection.Load(reader);
22
+ return tables.ToArray();
23
+ }
24
+ }
25
+
26
+#if TODO_TAG_BINDER_EXTENSION
27
private Output output;
28
29
/// <summary>
30
/// Called after all output changes occur and right before the output is bound into its final format.
31
/// </summary>
21
- public override void Finish(Output output)
32
+ public void Finish(Output output)
33
{
34
// Only process MSI packages.
35
if (OutputType.Product != output.Type)
@@ -165,5 +176,6 @@ namespace WixToolset.Extensions
176
return row.GetPrimaryKey('/');
177
}
178
}
179
+#endif
180
}
181
}
src/wixext/Tuples/DependencyTupleDefinitions.cs
new
+47
@@ -0,0 +1,47 @@
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.Dependency
4
+{
5
+ using System;
6
+ using WixToolset.Data;
7
+
8
+ public enum DependencyTupleDefinitionType
9
+ {
10
+ WixDependency,
11
+ WixDependencyProvider,
12
+ WixDependencyRef,
13
+ }
14
+
15
+ public static partial class DependencyTupleDefinitions
16
+ {
17
+ public static readonly Version Version = new Version("4.0.0");
18
+
19
+ public static IntermediateTupleDefinition ByName(string name)
20
+ {
21
+ if (!Enum.TryParse(name, out DependencyTupleDefinitionType type))
22
+ {
23
+ return null;
24
+ }
25
+
26
+ return ByType(type);
27
+ }
28
+
29
+ public static IntermediateTupleDefinition ByType(DependencyTupleDefinitionType type)
30
+ {
31
+ switch (type)
32
+ {
33
+ case DependencyTupleDefinitionType.WixDependency:
34
+ return DependencyTupleDefinitions.WixDependency;
35
+
36
+ case DependencyTupleDefinitionType.WixDependencyProvider:
37
+ return DependencyTupleDefinitions.WixDependencyProvider;
38
+
39
+ case DependencyTupleDefinitionType.WixDependencyRef:
40
+ return DependencyTupleDefinitions.WixDependencyRef;
41
+
42
+ default:
43
+ throw new ArgumentOutOfRangeException(nameof(type));
44
+ }
45
+ }
46
+ }
47
+}
src/wixext/Tuples/WixDependencyProviderTuple.cs
new
+87
@@ -0,0 +1,87 @@
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.Dependency
4
+{
5
+ using WixToolset.Data;
6
+ using WixToolset.Dependency.Tuples;
7
+
8
+ public static partial class DependencyTupleDefinitions
9
+ {
10
+ public static readonly IntermediateTupleDefinition WixDependencyProvider = new IntermediateTupleDefinition(
11
+ DependencyTupleDefinitionType.WixDependencyProvider.ToString(),
12
+ new[]
13
+ {
14
+ new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.WixDependencyProvider), IntermediateFieldType.String),
15
+ new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.Component_), IntermediateFieldType.String),
16
+ new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.ProviderKey), IntermediateFieldType.String),
17
+ new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.Version), IntermediateFieldType.String),
18
+ new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.DisplayName), IntermediateFieldType.String),
19
+ new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.Attributes), IntermediateFieldType.Number),
20
+ },
21
+ typeof(WixDependencyProviderTuple));
22
+ }
23
+}
24
+
25
+namespace WixToolset.Dependency.Tuples
26
+{
27
+ using WixToolset.Data;
28
+
29
+ public enum WixDependencyProviderTupleFields
30
+ {
31
+ WixDependencyProvider,
32
+ Component_,
33
+ ProviderKey,
34
+ Version,
35
+ DisplayName,
36
+ Attributes,
37
+ }
38
+
39
+ public class WixDependencyProviderTuple : IntermediateTuple
40
+ {
41
+ public WixDependencyProviderTuple() : base(DependencyTupleDefinitions.WixDependencyProvider, null, null)
42
+ {
43
+ }
44
+
45
+ public WixDependencyProviderTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DependencyTupleDefinitions.WixDependencyProvider, sourceLineNumber, id)
46
+ {
47
+ }
48
+
49
+ public IntermediateField this[WixDependencyProviderTupleFields index] => this.Fields[(int)index];
50
+
51
+ public string WixDependencyProvider
52
+ {
53
+ get => this.Fields[(int)WixDependencyProviderTupleFields.WixDependencyProvider].AsString();
54
+ set => this.Set((int)WixDependencyProviderTupleFields.WixDependencyProvider, value);
55
+ }
56
+
57
+ public string Component_
58
+ {
59
+ get => this.Fields[(int)WixDependencyProviderTupleFields.Component_].AsString();
60
+ set => this.Set((int)WixDependencyProviderTupleFields.Component_, value);
61
+ }
62
+
63
+ public string ProviderKey
64
+ {
65
+ get => this.Fields[(int)WixDependencyProviderTupleFields.ProviderKey].AsString();
66
+ set => this.Set((int)WixDependencyProviderTupleFields.ProviderKey, value);
67
+ }
68
+
69
+ public string Version
70
+ {
71
+ get => this.Fields[(int)WixDependencyProviderTupleFields.Version].AsString();
72
+ set => this.Set((int)WixDependencyProviderTupleFields.Version, value);
73
+ }
74
+
75
+ public string DisplayName
76
+ {
77
+ get => this.Fields[(int)WixDependencyProviderTupleFields.DisplayName].AsString();
78
+ set => this.Set((int)WixDependencyProviderTupleFields.DisplayName, value);
79
+ }
80
+
81
+ public int Attributes
82
+ {
83
+ get => this.Fields[(int)WixDependencyProviderTupleFields.Attributes].AsNumber();
84
+ set => this.Set((int)WixDependencyProviderTupleFields.Attributes, value);
85
+ }
86
+ }
87
+}
\ No newline at end of file
src/wixext/Tuples/WixDependencyRefTuple.cs
new
+55
@@ -0,0 +1,55 @@
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.Dependency
4
+{
5
+ using WixToolset.Data;
6
+ using WixToolset.Dependency.Tuples;
7
+
8
+ public static partial class DependencyTupleDefinitions
9
+ {
10
+ public static readonly IntermediateTupleDefinition WixDependencyRef = new IntermediateTupleDefinition(
11
+ DependencyTupleDefinitionType.WixDependencyRef.ToString(),
12
+ new[]
13
+ {
14
+ new IntermediateFieldDefinition(nameof(WixDependencyRefTupleFields.WixDependencyProvider_), IntermediateFieldType.String),
15
+ new IntermediateFieldDefinition(nameof(WixDependencyRefTupleFields.WixDependency_), IntermediateFieldType.String),
16
+ },
17
+ typeof(WixDependencyRefTuple));
18
+ }
19
+}
20
+
21
+namespace WixToolset.Dependency.Tuples
22
+{
23
+ using WixToolset.Data;
24
+
25
+ public enum WixDependencyRefTupleFields
26
+ {
27
+ WixDependencyProvider_,
28
+ WixDependency_,
29
+ }
30
+
31
+ public class WixDependencyRefTuple : IntermediateTuple
32
+ {
33
+ public WixDependencyRefTuple() : base(DependencyTupleDefinitions.WixDependencyRef, null, null)
34
+ {
35
+ }
36
+
37
+ public WixDependencyRefTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DependencyTupleDefinitions.WixDependencyRef, sourceLineNumber, id)
38
+ {
39
+ }
40
+
41
+ public IntermediateField this[WixDependencyRefTupleFields index] => this.Fields[(int)index];
42
+
43
+ public string WixDependencyProvider_
44
+ {
45
+ get => this.Fields[(int)WixDependencyRefTupleFields.WixDependencyProvider_].AsString();
46
+ set => this.Set((int)WixDependencyRefTupleFields.WixDependencyProvider_, value);
47
+ }
48
+
49
+ public string WixDependency_
50
+ {
51
+ get => this.Fields[(int)WixDependencyRefTupleFields.WixDependency_].AsString();
52
+ set => this.Set((int)WixDependencyRefTupleFields.WixDependency_, value);
53
+ }
54
+ }
55
+}
\ No newline at end of file
src/wixext/Tuples/WixDependencyTuple.cs
new
+79
@@ -0,0 +1,79 @@
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.Dependency
4
+{
5
+ using WixToolset.Data;
6
+ using WixToolset.Dependency.Tuples;
7
+
8
+ public static partial class DependencyTupleDefinitions
9
+ {
10
+ public static readonly IntermediateTupleDefinition WixDependency = new IntermediateTupleDefinition(
11
+ DependencyTupleDefinitionType.WixDependency.ToString(),
12
+ new[]
13
+ {
14
+ new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.WixDependency), IntermediateFieldType.String),
15
+ new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.ProviderKey), IntermediateFieldType.String),
16
+ new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.MinVersion), IntermediateFieldType.String),
17
+ new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.MaxVersion), IntermediateFieldType.String),
18
+ new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.Attributes), IntermediateFieldType.Number),
19
+ },
20
+ typeof(WixDependencyTuple));
21
+ }
22
+}
23
+
24
+namespace WixToolset.Dependency.Tuples
25
+{
26
+ using WixToolset.Data;
27
+
28
+ public enum WixDependencyTupleFields
29
+ {
30
+ WixDependency,
31
+ ProviderKey,
32
+ MinVersion,
33
+ MaxVersion,
34
+ Attributes,
35
+ }
36
+
37
+ public class WixDependencyTuple : IntermediateTuple
38
+ {
39
+ public WixDependencyTuple() : base(DependencyTupleDefinitions.WixDependency, null, null)
40
+ {
41
+ }
42
+
43
+ public WixDependencyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DependencyTupleDefinitions.WixDependency, sourceLineNumber, id)
44
+ {
45
+ }
46
+
47
+ public IntermediateField this[WixDependencyTupleFields index] => this.Fields[(int)index];
48
+
49
+ public string WixDependency
50
+ {
51
+ get => this.Fields[(int)WixDependencyTupleFields.WixDependency].AsString();
52
+ set => this.Set((int)WixDependencyTupleFields.WixDependency, value);
53
+ }
54
+
55
+ public string ProviderKey
56
+ {
57
+ get => this.Fields[(int)WixDependencyTupleFields.ProviderKey].AsString();
58
+ set => this.Set((int)WixDependencyTupleFields.ProviderKey, value);
59
+ }
60
+
61
+ public string MinVersion
62
+ {
63
+ get => this.Fields[(int)WixDependencyTupleFields.MinVersion].AsString();
64
+ set => this.Set((int)WixDependencyTupleFields.MinVersion, value);
65
+ }
66
+
67
+ public string MaxVersion
68
+ {
69
+ get => this.Fields[(int)WixDependencyTupleFields.MaxVersion].AsString();
70
+ set => this.Set((int)WixDependencyTupleFields.MaxVersion, value);
71
+ }
72
+
73
+ public int Attributes
74
+ {
75
+ get => this.Fields[(int)WixDependencyTupleFields.Attributes].AsNumber();
76
+ set => this.Set((int)WixDependencyTupleFields.Attributes, value);
77
+ }
78
+ }
79
+}
\ No newline at end of file
src/wixext/WixToolset.Dependency.wixext.csproj
new
+33
@@ -0,0 +1,33 @@
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.Dependency</RootNamespace>
8
+ <Description>WiX Toolset Dependency Extension</Description>
9
+ <Title>WiX Toolset Dependency Extension</Title>
10
+ <IsTool>true</IsTool>
11
+ <ContentTargetFolders>build</ContentTargetFolders>
12
+ </PropertyGroup>
13
+
14
+ <ItemGroup>
15
+ <Content Include="$(MSBuildThisFileName).targets" />
16
+ <Content Include="dependency.xsd" PackagePath="tools" />
17
+ <EmbeddedResource Include="tables.xml" />
18
+ <EmbeddedResource Include="$(OutputPath)..\dependency.wixlib" />
19
+ </ItemGroup>
20
+
21
+ <ItemGroup>
22
+ <PackageReference Include="WixToolset.Data" Version="4.0.*" PrivateAssets="all" />
23
+ <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" PrivateAssets="all" />
24
+ </ItemGroup>
25
+
26
+ <ItemGroup>
27
+ <ProjectReference Include="..\wixlib\dependency.wixproj" ReferenceOutputAssembly="false" Condition=" '$(NCrunch)'=='' " />
28
+ </ItemGroup>
29
+
30
+ <ItemGroup>
31
+ <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="all" />
32
+ </ItemGroup>
33
+</Project>
src/wixext/WixToolset.Dependency.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
+ <WixToolsetDepedencyWixextPath Condition=" '$(WixToolsetDepedencyWixextPath)' == '' ">$(MSBuildThisFileDirectory)..\tools\WixToolset.Depedency.wixext.dll</WixToolsetDepedencyWixextPath>
7
+ </PropertyGroup>
8
+ <ItemGroup>
9
+ <WixExtension Include="$(WixToolsetDepedencyWixextPath)" />
10
+ </ItemGroup>
11
+</Project>
src/wixext/messages.xml
deleted
-60
@@ -1,60 +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
-<Messages Namespace="WixToolset.Extensions" Resources="Data.Messages" xmlns="http://schemas.microsoft.com/genmsgs/2004/07/messages">
6
- <Class Name="DependencyErrors" ContainerName="DependencyErrorEventArgs" BaseContainerName="MessageEventArgs">
7
- <Message Id="IllegalCharactersInProvider" Number="5400">
8
- <Instance>
9
- The provider key authored into the {0} attribute contains an illegal character, '{1}'. Please author the provider key without any of the following characters: {2}
10
- <Parameter Type="System.String" Name="attributeName" />
11
- <Parameter Type="System.Char" Name="illegalChar" />
12
- <Parameter Type="System.String" Name="illegalChars" />
13
- </Instance>
14
- </Message>
15
- <Message Id="ReservedValue" Number="5401">
16
- <Instance>
17
- The {0}/@{1} attribute value '{2}' is reserved and cannot be used here. Please choose a different value.
18
- <Parameter Type="System.String" Name="elementName" />
19
- <Parameter Type="System.String" Name="attributeName" />
20
- <Parameter Type="System.String" Name="attributeValue" />
21
- </Instance>
22
- </Message>
23
- </Class>
24
- <Class Name="DependencyWarnings" ContainerName="DependencyWarningEventArgs" BaseContainerName="MessageEventArgs">
25
- <Message Id="ProvidesKeyNotFound" Number="5431">
26
- <Instance>
27
- The provider key with identifier {0} was not found in the WixDependencyProvider table. Related registry rows will not be removed from authoring.
28
- <Parameter Type="System.String" Name="id" />
29
- </Instance>
30
- </Message>
31
- <Message Id="RequiresKeyNotFound" Number="5432">
32
- <Instance>
33
- The dependency key with identifier {0} was not found in the WixDependency table. Related registry rows will not be removed from authoring.
34
- <Parameter Type="System.String" Name="id" />
35
- </Instance>
36
- </Message>
37
- <Message Id="PropertyRemoved" Number="5433" SourceLineNumbers="no">
38
- <Instance>
39
- The property {0} was authored in the package with a value and will be removed. The property should not be authored.
40
- <Parameter Type="System.String" Name="name" />
41
- </Instance>
42
- </Message>
43
- <Message Id="DiscouragedVersionAttribute" Number="5434">
44
- <Instance>
45
- The Provides/@Version attribute should not be specified in an MSI package. The ProductVersion will be used by default.
46
- </Instance>
47
- <Instance>
48
- The Provides/@Version attribute should not be specified for MSI package {0}. The ProductVersion will be used by default.
49
- <Parameter Type="System.String" Name="id" />
50
- </Instance>
51
- </Message>
52
- <Message Id="Win64Component" Number="5435">
53
- <Instance>
54
- The Provides element should not be authored in the 64-bit component with identifier {0}. The dependency feature may not work if installing this package on 64-bit Windows operating systems prior to Windows 7 and Windows Server 2008 R2. Set the Component/@Win64 attribute to "no" to make sure the dependency feature works correctly on all supported operating systems.
55
- <Parameter Type="System.String" Name="componentId" />
56
- </Instance>
57
- </Message>
58
- </Class>
59
- <Class Name="DependencyVerboses" ContainerName="DependencyVerboseEventArgs" BaseContainerName="MessageEventArgs" />
60
-</Messages>
src/wixlib/DependencyExtension.wixproj
deleted
-27
@@ -1,27 +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>{58ED0EC8-73F8-4EE1-8664-A53486D38EC8}</ProjectGuid>
8
- <OutputName>dependency</OutputName>
9
- <OutputType>Library</OutputType>
10
- <BindFiles>true</BindFiles>
11
- <Pedantic>true</Pedantic>
12
- <SuppressSpecificWarnings>1086</SuppressSpecificWarnings>
13
- <Cultures>en-us</Cultures>
14
- </PropertyGroup>
15
-
16
- <ItemGroup>
17
- <Compile Include="DependencyExtension.wxs" />
18
- <Compile Include="DependencyExtension_x86.wxs" />
19
- <EmbeddedResource Include="en-us.wxl" />
20
- </ItemGroup>
21
-
22
- <ItemGroup>
23
- <ProjectReference Include="..\ca\wixdepca.vcxproj" />
24
- </ItemGroup>
25
-
26
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
27
-</Project>
src/wixlib/DependencyExtension_Platform.wxi
+3
-3
@@ -5,7 +5,7 @@
5
<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
6
<?include caSuffix.wxi ?>
7
<Fragment>
8
- <CustomAction Id="WixDependencyRequire$(var.Suffix)" BinaryKey="WixDepCA$(var.Suffix)" DllEntry="WixDependencyRequire" Execute="immediate" Return="check" SuppressModularization="yes"/>
8
+ <CustomAction Id="WixDependencyRequire$(var.Suffix)" BinaryKey="DependencyCA$(var.Suffix)" DllEntry="WixDependencyRequire" Execute="immediate" Return="check" SuppressModularization="yes"/>
9
<InstallExecuteSequence>
10
<Custom Action="WixDependencyRequire$(var.Suffix)" Before="WixDependencyCheck$(var.Suffix)" Overridable="yes"><![CDATA[NOT DISABLEDEPENDENCYCHECK]]></Custom>
11
</InstallExecuteSequence>
@@ -13,7 +13,7 @@
13
<PropertyRef Id="DISABLEDEPENDENCYCHECK"/>
14
</Fragment>
15
<Fragment>
16
- <CustomAction Id="WixDependencyCheck$(var.Suffix)" BinaryKey="WixDepCA$(var.Suffix)" DllEntry="WixDependencyCheck" Execute="immediate" Return="check" SuppressModularization="yes"/>
16
+ <CustomAction Id="WixDependencyCheck$(var.Suffix)" BinaryKey="DependencyCA$(var.Suffix)" DllEntry="WixDependencyCheck" Execute="immediate" Return="check" SuppressModularization="yes"/>
17
<InstallExecuteSequence>
18
<Custom Action="WixDependencyCheck$(var.Suffix)" Before="InstallInitialize" Overridable="yes"><![CDATA[(REMOVE OR MsiPatchRemovalList) AND NOT (UPGRADINGPRODUCTCODE OR IGNOREDEPENDENCIES="ALL")]]></Custom>
19
</InstallExecuteSequence>
@@ -21,6 +21,6 @@
21
<PropertyRef Id="IGNOREDEPENDENCIES"/>
22
</Fragment>
23
<Fragment>
24
- <Binary Id="WixDepCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))wixdepca.dll"/>
24
+ <Binary Id="DependencyCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))dependencyca.dll"/>
25
</Fragment>
26
</Include>
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/caerr.wxi
new
+96
@@ -0,0 +1,96 @@
1
+<Include>
2
+ <?define msierrSecureObjectsFailedCreateSD = 25520?>
3
+ <?define msierrSecureObjectsFailedSet = 25521?>
4
+ <?define msierrSecureObjectsUnknownType = 25522?>
5
+ <?define msierrXmlFileFailedRead = 25530?>
6
+ <?define msierrXmlFileFailedOpen = 25531?>
7
+ <?define msierrXmlFileFailedSelect = 25532?>
8
+ <?define msierrXmlFileFailedSave = 25533?>
9
+ <?define msierrXmlConfigFailedRead = 25540?>
10
+ <?define msierrXmlConfigFailedOpen = 25541?>
11
+ <?define msierrXmlConfigFailedSelect = 25542?>
12
+ <?define msierrXmlConfigFailedSave = 25543?>
13
+ <?define msierrFirewallCannotConnect = 25580?>
14
+ <?define msierrIISCannotConnect = 26001?>
15
+ <?define msierrIISFailedReadWebSite = 26002?>
16
+ <?define msierrIISFailedReadWebDirs = 26003?>
17
+ <?define msierrIISFailedReadVDirs = 26004?>
18
+ <?define msierrIISFailedReadFilters = 26005?>
19
+ <?define msierrIISFailedReadAppPool = 26006?>
20
+ <?define msierrIISFailedReadMimeMap = 26007?>
21
+ <?define msierrIISFailedReadProp = 26008?>
22
+ <?define msierrIISFailedReadWebSvcExt = 26009?>
23
+ <?define msierrIISFailedReadWebError = 26010?>
24
+ <?define msierrIISFailedReadHttpHeader = 26011?>
25
+ <?define msierrIISFailedSchedTransaction = 26031?>
26
+ <?define msierrIISFailedSchedInstallWebs = 26032?>
27
+ <?define msierrIISFailedSchedInstallWebDirs = 26033?>
28
+ <?define msierrIISFailedSchedInstallVDirs = 26034?>
29
+ <?define msierrIISFailedSchedInstallFilters = 26035?>
30
+ <?define msierrIISFailedSchedInstallAppPool = 26036?>
31
+ <?define msierrIISFailedSchedInstallProp = 26037?>
32
+ <?define msierrIISFailedSchedInstallWebSvcExt = 26038?>
33
+ <?define msierrIISFailedSchedUninstallWebs = 26051?>
34
+ <?define msierrIISFailedSchedUninstallWebDirs = 26052?>
35
+ <?define msierrIISFailedSchedUninstallVDirs = 26053?>
36
+ <?define msierrIISFailedSchedUninstallFilters = 26054?>
37
+ <?define msierrIISFailedSchedUninstallAppPool = 26055?>
38
+ <?define msierrIISFailedSchedUninstallProp = 26056?>
39
+ <?define msierrIISFailedSchedUninstallWebSvcExt = 26057?>
40
+ <?define msierrIISFailedStartTransaction = 26101?>
41
+ <?define msierrIISFailedOpenKey = 26102?>
42
+ <?define msierrIISFailedCreateKey = 26103?>
43
+ <?define msierrIISFailedWriteData = 26104?>
44
+ <?define msierrIISFailedCreateApp = 26105?>
45
+ <?define msierrIISFailedDeleteKey = 26106?>
46
+ <?define msierrIISFailedDeleteApp = 26107?>
47
+ <?define msierrIISFailedDeleteValue = 26108?>
48
+ <?define msierrIISFailedCommitInUse = 26109?>
49
+ <?define msierrSQLFailedCreateDatabase = 26201?>
50
+ <?define msierrSQLFailedDropDatabase = 26202?>
51
+ <?define msierrSQLFailedConnectDatabase = 26203?>
52
+ <?define msierrSQLFailedExecString = 26204?>
53
+ <?define msierrSQLDatabaseAlreadyExists = 26205?>
54
+ <?define msierrPERFMONFailedRegisterDLL = 26251?>
55
+ <?define msierrPERFMONFailedUnregisterDLL = 26252?>
56
+ <?define msierrInstallPerfCounterData = 26253?>
57
+ <?define msierrUninstallPerfCounterData = 26254?>
58
+ <?define msierrSMBFailedCreate = 26301?>
59
+ <?define msierrSMBFailedDrop = 26302?>
60
+ <?define msierrCERTFailedOpen = 26351?>
61
+ <?define msierrCERTFailedAdd = 26352?>
62
+ <?define msierrUSRFailedUserCreate = 26401?>
63
+ <?define msierrUSRFailedUserCreatePswd = 26402?>
64
+ <?define msierrUSRFailedUserGroupAdd = 26403?>
65
+ <?define msierrUSRFailedUserCreateExists = 26404?>
66
+ <?define msierrUSRFailedGrantLogonAsService = 26405?>
67
+ <?define msierrDependencyMissingDependencies = 26451?>
68
+ <?define msierrDependencyHasDependents = 26452?>
69
+ <?define msierrDotNetRuntimeRequired = 27000?>
70
+ <?define msierrComPlusCannotConnect = 28001?>
71
+ <?define msierrComPlusPartitionReadFailed = 28002?>
72
+ <?define msierrComPlusPartitionRoleReadFailed = 28003?>
73
+ <?define msierrComPlusUserInPartitionRoleReadFailed = 28004?>
74
+ <?define msierrComPlusPartitionUserReadFailed = 28005?>
75
+ <?define msierrComPlusApplicationReadFailed = 28006?>
76
+ <?define msierrComPlusApplicationRoleReadFailed = 28007?>
77
+ <?define msierrComPlusUserInApplicationRoleReadFailed = 28008?>
78
+ <?define msierrComPlusAssembliesReadFailed = 28009?>
79
+ <?define msierrComPlusSubscriptionReadFailed = 28010?>
80
+ <?define msierrComPlusPartitionDependency = 28011?>
81
+ <?define msierrComPlusPartitionNotFound = 28012?>
82
+ <?define msierrComPlusPartitionIdConflict = 28013?>
83
+ <?define msierrComPlusPartitionNameConflict = 28014?>
84
+ <?define msierrComPlusApplicationDependency = 28015?>
85
+ <?define msierrComPlusApplicationNotFound = 28016?>
86
+ <?define msierrComPlusApplicationIdConflict = 28017?>
87
+ <?define msierrComPlusApplicationNameConflict = 28018?>
88
+ <?define msierrComPlusApplicationRoleDependency = 28019?>
89
+ <?define msierrComPlusApplicationRoleNotFound = 28020?>
90
+ <?define msierrComPlusApplicationRoleConflict = 28021?>
91
+ <?define msierrComPlusAssemblyDependency = 28022?>
92
+ <?define msierrComPlusSubscriptionIdConflict = 28023?>
93
+ <?define msierrComPlusSubscriptionNameConflict = 28024?>
94
+ <?define msierrComPlusFailedLookupNames = 28025?>
95
+ <?define msierrMsmqCannotConnect = 28101?>
96
+</Include>
\ No newline at end of file
src/wixlib/dependency.wixproj
new
+43
@@ -0,0 +1,43 @@
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-0005\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props')" />
5
+ <Import Project="..\FindLocalWix.props" />
6
+ <PropertyGroup>
7
+ <ProjectGuid>{58ED0EC8-73F8-4EE1-8664-A53486D38EC8}</ProjectGuid>
8
+ <OutputName>dependency</OutputName>
9
+ <OutputType>Library</OutputType>
10
+ <BindFiles>true</BindFiles>
11
+ <Pedantic>true</Pedantic>
12
+ <SuppressSpecificWarnings>1086</SuppressSpecificWarnings>
13
+ <Cultures>en-us</Cultures>
14
+ </PropertyGroup>
15
+
16
+ <ItemGroup>
17
+ <Compile Include="DependencyExtension.wxs" />
18
+ <Compile Include="DependencyExtension_x86.wxs" />
19
+ <EmbeddedResource Include="en-us.wxl" />
20
+ </ItemGroup>
21
+ <ItemGroup>
22
+ <None Include="packages.config" />
23
+ </ItemGroup>
24
+ <ItemGroup>
25
+ <ProjectReference Include="..\ca\dependencyca.vcxproj">
26
+ <Name>dependencyca</Name>
27
+ <Project>{B86AF46C-0F90-49CC-923F-A800B088D015}</Project>
28
+ </ProjectReference>
29
+ </ItemGroup>
30
+ <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' AND Exists('$(WixTargetsPath)') " />
31
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets') " />
32
+ <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
33
+ <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/." />
34
+ </Target>
35
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
36
+ <PropertyGroup>
37
+ <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>
38
+ </PropertyGroup>
39
+ <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'))" />
40
+ <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props'))" />
41
+ </Target>
42
+ <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
43
+</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-0005" 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
+}