diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..1d72e68 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,37 @@ +# 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. +# +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\.editorconfig +# then update all of the repos. + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.{cs,vb}] +dotnet_sort_system_directives_first = true + +[*.cs] +csharp_indent_case_contents = true : error +csharp_indent_switch_labels = true : error +csharp_new_line_before_open_brace = all +csharp_prefer_braces = true : error +csharp_style_expression_bodied_methods = when_on_single_line : suggestion +csharp_style_expression_bodied_constructors = when_on_single_line : suggestion +csharp_style_expression_bodied_operators = when_on_single_line : suggestion +csharp_style_expression_bodied_properties = when_on_single_line : suggestion +csharp_style_expression_bodied_indexers = when_on_single_line : suggestion +csharp_style_expression_bodied_accessors = when_on_single_line : suggestion +csharp_style_var_elsewhere = true : suggestion +csharp_style_var_for_built_in_types = true : suggestion +csharp_style_var_when_type_is_apparent = true : suggestion +dotnet_style_qualification_for_event = true : error +dotnet_style_qualification_for_field = true : error +dotnet_style_qualification_for_method = true : error +dotnet_style_qualification_for_property = true : error + +[*.targets] +indent_size = 2 diff --git a/Dependency.wixext.sln b/Dependency.wixext.sln new file mode 100644 index 0000000..c69a467 --- /dev/null +++ b/Dependency.wixext.sln @@ -0,0 +1,61 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2016 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dependencyca", "src\ca\dependencyca.vcxproj", "{B86AF46C-0F90-49CC-923F-A800B088D015}" +EndProject +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "dependency", "src\wixlib\dependency.wixproj", "{58ED0EC8-73F8-4EE1-8664-A53486D38EC8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Dependency.wixext", "src\wixext\WixToolset.Dependency.wixext.csproj", "{A0B6D3F1-AE5E-423B-BA92-60C9926CA498}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Dependency", "src\test\WixToolsetTest.Dependency\WixToolsetTest.Dependency.csproj", "{E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B86AF46C-0F90-49CC-923F-A800B088D015}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {B86AF46C-0F90-49CC-923F-A800B088D015}.Debug|Any CPU.Build.0 = Debug|Win32 + {B86AF46C-0F90-49CC-923F-A800B088D015}.Debug|x86.ActiveCfg = Debug|Win32 + {B86AF46C-0F90-49CC-923F-A800B088D015}.Debug|x86.Build.0 = Debug|Win32 + {B86AF46C-0F90-49CC-923F-A800B088D015}.Release|Any CPU.ActiveCfg = Release|Win32 + {B86AF46C-0F90-49CC-923F-A800B088D015}.Release|Any CPU.Build.0 = Release|Win32 + {B86AF46C-0F90-49CC-923F-A800B088D015}.Release|x86.ActiveCfg = Release|Win32 + {B86AF46C-0F90-49CC-923F-A800B088D015}.Release|x86.Build.0 = Release|Win32 + {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Debug|Any CPU.ActiveCfg = Debug|x86 + {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Debug|Any CPU.Build.0 = Debug|x86 + {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Debug|x86.ActiveCfg = Debug|x86 + {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Debug|x86.Build.0 = Debug|x86 + {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Release|Any CPU.ActiveCfg = Release|x86 + {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Release|Any CPU.Build.0 = Release|x86 + {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Release|x86.ActiveCfg = Release|x86 + {58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Release|x86.Build.0 = Release|x86 + {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Debug|x86.ActiveCfg = Debug|Any CPU + {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Debug|x86.Build.0 = Debug|Any CPU + {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Release|Any CPU.Build.0 = Release|Any CPU + {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Release|x86.ActiveCfg = Release|Any CPU + {A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Release|x86.Build.0 = Release|Any CPU + {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Debug|x86.ActiveCfg = Debug|Any CPU + {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Debug|x86.Build.0 = Debug|Any CPU + {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Release|Any CPU.Build.0 = Release|Any CPU + {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Release|x86.ActiveCfg = Release|Any CPU + {E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {77F012B1-8E94-4F85-9450-066C6BD15000} + EndGlobalSection +EndGlobal diff --git a/appveyor.cmd b/appveyor.cmd new file mode 100644 index 0000000..7367429 --- /dev/null +++ b/appveyor.cmd @@ -0,0 +1,13 @@ +@setlocal +@pushd %~dp0 + +nuget restore + +msbuild -p:Configuration=Release -t:Restore + +msbuild -p:Configuration=Release src\test\WixToolsetTest.Dependency\WixToolsetTest.Dependency.csproj + +msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.Dependency.wixext.csproj + +@popd +@endlocal \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..8d80c6a --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,42 @@ +# 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. +# +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml +# then update all of the repos. + +branches: + only: + - master + - develop + +image: Visual Studio 2017 + +version: 0.0.0.{build} +configuration: Release + +environment: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + NUGET_XMLDOC_MODE: skip + +build_script: + - appveyor.cmd + +pull_requests: + do_not_increment_build_number: true + +nuget: + disable_publish_on_pr: true + +skip_branch_with_pr: true +skip_tags: true + +artifacts: +- path: build\Release\**\*.nupkg + name: nuget +- path: build\Release\**\*.msi + name: msi + +notifications: +- provider: Slack + incoming_webhook: + secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA= diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000..aaee322 --- /dev/null +++ b/nuget.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props new file mode 100644 index 0000000..0e00132 --- /dev/null +++ b/src/Cpp.Build.props @@ -0,0 +1,104 @@ + + + + + + Win32 + $(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\ + $(OutputPath)$(Platform)\ + + + + $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + + + + + $(DisableSpecificCompilerWarnings) + Level4 + $(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions) + Use + precomp.h + StdCall + true + false + -YlprecompDefine + /Zc:threadSafeInit- %(AdditionalOptions) + true + + + $(ArmPreprocessorDefinitions);%(PreprocessorDefinitions) + $(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories) + + + $(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories) + + + $(ProjectSubSystem) + $(ProjectModuleDefinitionFile) + $(ResourceOnlyDll) + true + $(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies) + $(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories) + /IGNORE:4099 %(AdditionalOptions) + + + + + + NoExtensions + + + + + CDecl + + + + + OldStyle + true + true + + + + + Disabled + EnableFastChecks + _DEBUG;DEBUG;%(PreprocessorDefinitions) + MultiThreadedDebug + + + + + + MultiThreadedDebugDll + + + + + MinSpace + NDEBUG;%(PreprocessorDefinitions) + true + true + MultiThreaded + + + true + true + + + + + + MultiThreadedDll + + + + + $(LinkKeyFile) + $(LinkDelaySign) + + + diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 0000000..a22f447 --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,28 @@ + + + + + + Debug + false + MSB3246 + + $(MSBuildProjectName) + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\)) + $(BaseOutputPath)obj\$(ProjectName)\ + $(BaseOutputPath)$(Configuration)\ + + WiX Toolset Team + WiX Toolset + Copyright (c) .NET Foundation and contributors. All rights reserved. + MS-RL + WiX Toolset + + + + + + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets new file mode 100644 index 0000000..dac7452 --- /dev/null +++ b/src/Directory.Build.targets @@ -0,0 +1,48 @@ + + + + + + + true + $(SolutionPath) + $(NCrunchOriginalSolutionPath) + + + + + + + $([System.IO.File]::ReadAllText($(TheSolutionPath))) + $([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) )) + (?<="[PackageName]", ")(.*)(?=", ") + + + + + + %(Identity) + $(SolutionFileContent.Contains('\%(Identity).csproj')) + + + + + $(RegexPattern.Replace('[PackageName]','%(PackageName)') ) + $([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)')) + + + + + + + + + + + diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props new file mode 100644 index 0000000..a784e35 --- /dev/null +++ b/src/FindLocalWix.props @@ -0,0 +1,8 @@ + + + + + + $(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets + + diff --git a/src/ca/custommsierrors.h b/src/ca/custommsierrors.h new file mode 100644 index 0000000..2645045 --- /dev/null +++ b/src/ca/custommsierrors.h @@ -0,0 +1,5 @@ +#pragma once +// 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. + +#define msierrDependencyMissingDependencies 26451 +#define msierrDependencyHasDependents 26452 diff --git a/src/ca/dependencyca.vcxproj b/src/ca/dependencyca.vcxproj new file mode 100644 index 0000000..480a186 --- /dev/null +++ b/src/ca/dependencyca.vcxproj @@ -0,0 +1,61 @@ + + + + + + + + + + Debug + Win32 + + + Release + Win32 + + + + + {B86AF46C-0F90-49CC-923F-A800B088D015} + DynamicLibrary + v141 + Unicode + dependencyca + wixdepca.def + WiX Toolset Dependency CustomAction + + + + + + + msi.lib + + + + + Create + + + + + + + + + + + + + + + + + + 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}. + + + + + diff --git a/src/ca/wixdepca.vcxproj.filters b/src/ca/dependencyca.vcxproj.filters similarity index 90% rename from src/ca/wixdepca.vcxproj.filters rename to src/ca/dependencyca.vcxproj.filters index 1fdb023..d4931f3 100644 --- a/src/ca/wixdepca.vcxproj.filters +++ b/src/ca/dependencyca.vcxproj.filters @@ -27,11 +27,6 @@ Header Files - - - Resource Files - - Source Files diff --git a/src/ca/packages.config b/src/ca/packages.config new file mode 100644 index 0000000..ab964d2 --- /dev/null +++ b/src/ca/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/ca/wixdepca.def b/src/ca/wixdepca.def index df50e99..651c637 100644 --- a/src/ca/wixdepca.def +++ b/src/ca/wixdepca.def @@ -1,7 +1,7 @@ ; 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. -LIBRARY "wixdepca" +LIBRARY "dependencyca" EXPORTS WixDependencyRequire diff --git a/src/ca/wixdepca.vcxproj b/src/ca/wixdepca.vcxproj deleted file mode 100644 index b757a35..0000000 --- a/src/ca/wixdepca.vcxproj +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - Debug - Win32 - - - Release - Win32 - - - - - Debug - ARM - - - Release - ARM - - - - - {B86AF46C-0F90-49CC-923F-A800B088D015} - DynamicLibrary - Unicode - WixDepCA - wixdepca.def - - - - - - $(WixRoot)src\libs\dutil\inc;$(WixRoot)src\libs\wcautil;$(WixRoot)src\libs\deputil\inc - msi.lib;dutil.lib;deputil.lib;wcautil.lib - - - - - - - - - - - - - - - - - - diff --git a/src/test/WixToolsetTest.Dependency/DependencyExtensionFixture.cs b/src/test/WixToolsetTest.Dependency/DependencyExtensionFixture.cs new file mode 100644 index 0000000..07d6228 --- /dev/null +++ b/src/test/WixToolsetTest.Dependency/DependencyExtensionFixture.cs @@ -0,0 +1,32 @@ +// 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. + +namespace WixToolsetTest.Dependency +{ + using System.Linq; + using WixBuildTools.TestSupport; + using WixToolset.Core.TestPackage; + using WixToolset.Dependency; + using Xunit; + + public class DependencyExtensionFixture + { + [Fact] + public void CanBuildUsingProvides() + { + var folder = TestData.Get(@"TestData\UsingProvides"); + var build = new Builder(folder, typeof(DependencyExtensionFactory), new[] { folder }); + + var results = build.BuildAndQuery(Build, "WixDependencyProvider"); + Assert.Equal(new[] + { + "WixDependencyProvider:depJQsOasf1FRUsKxq8THB9sXk8yws\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tUsingProvides\t\t\t0", + }, results.OrderBy(s => s).ToArray()); + } + + private static void Build(string[] args) + { + var result = WixRunner.Execute(args) + .AssertSuccess(); + } + } +} diff --git a/src/test/WixToolsetTest.Dependency/TestData/UsingProvides/Package.en-us.wxl b/src/test/WixToolsetTest.Dependency/TestData/UsingProvides/Package.en-us.wxl new file mode 100644 index 0000000..38c12ac --- /dev/null +++ b/src/test/WixToolsetTest.Dependency/TestData/UsingProvides/Package.en-us.wxl @@ -0,0 +1,11 @@ + + + + + + A newer version of [ProductName] is already installed. + MsiPackage + + diff --git a/src/test/WixToolsetTest.Dependency/TestData/UsingProvides/Package.wxs b/src/test/WixToolsetTest.Dependency/TestData/UsingProvides/Package.wxs new file mode 100644 index 0000000..68ff98f --- /dev/null +++ b/src/test/WixToolsetTest.Dependency/TestData/UsingProvides/Package.wxs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.Dependency/TestData/UsingProvides/PackageComponents.wxs b/src/test/WixToolsetTest.Dependency/TestData/UsingProvides/PackageComponents.wxs new file mode 100644 index 0000000..e241fb1 --- /dev/null +++ b/src/test/WixToolsetTest.Dependency/TestData/UsingProvides/PackageComponents.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.Dependency/TestData/UsingProvides/example.txt b/src/test/WixToolsetTest.Dependency/TestData/UsingProvides/example.txt new file mode 100644 index 0000000..1b4ffe8 --- /dev/null +++ b/src/test/WixToolsetTest.Dependency/TestData/UsingProvides/example.txt @@ -0,0 +1 @@ +This is example.txt. \ No newline at end of file diff --git a/src/test/WixToolsetTest.Dependency/WixToolsetTest.Dependency.csproj b/src/test/WixToolsetTest.Dependency/WixToolsetTest.Dependency.csproj new file mode 100644 index 0000000..342325d --- /dev/null +++ b/src/test/WixToolsetTest.Dependency/WixToolsetTest.Dependency.csproj @@ -0,0 +1,38 @@ + + + + + + netcoreapp2.1 + false + + + + NU1701 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixext/DependencyCommon.cs b/src/wixext/DependencyCommon.cs index 4826d8b..cb36be3 100644 --- a/src/wixext/DependencyCommon.cs +++ b/src/wixext/DependencyCommon.cs @@ -1,6 +1,6 @@ // 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. -namespace WixToolset.Extensions +namespace WixToolset.Dependency { using System; using WixToolset; diff --git a/src/wixext/DependencyCompiler.cs b/src/wixext/DependencyCompiler.cs index a138c04..f866b58 100644 --- a/src/wixext/DependencyCompiler.cs +++ b/src/wixext/DependencyCompiler.cs @@ -1,6 +1,6 @@ // 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. -namespace WixToolset.Extensions +namespace WixToolset.Dependency { using System; using System.Collections.Generic; @@ -9,11 +9,12 @@ namespace WixToolset.Extensions using System.Xml.Linq; using WixToolset.Data; using WixToolset.Extensibility; + using WixToolset.Extensibility.Data; /// - /// The compiler for the WiX toolset dependency extension. + /// The compiler for the WiX Toolset Dependency Extension. /// - public sealed class DependencyCompiler : CompilerExtension + public sealed class DependencyCompiler : BaseCompilerExtension { /// /// Package type when parsing the Provides element. @@ -27,10 +28,7 @@ private enum PackageType MsuPackage } - public DependencyCompiler() - { - this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/dependency"; - } + public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/dependency"; /// /// Processes an attribute for the Compiler. @@ -38,24 +36,24 @@ public DependencyCompiler() /// Source line number for the parent element. /// Parent element of attribute. /// Attribute to process. - public override void ParseAttribute(XElement parentElement, XAttribute attribute, IDictionary context) + public override void ParseAttribute(Intermediate intermediate, IntermediateSection section, XElement parentElement, XAttribute attribute, IDictionary context) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(parentElement); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(parentElement); switch (parentElement.Name.LocalName) { case "Bundle": switch (attribute.Name.LocalName) { case "ProviderKey": - this.ParseProviderKeyAttribute(sourceLineNumbers, parentElement, attribute); + this.ParseProviderKeyAttribute(section, sourceLineNumbers, parentElement, attribute); break; default: - this.Core.UnexpectedAttribute(parentElement, attribute); + this.ParseHelper.UnexpectedAttribute(parentElement, attribute); break; } break; default: - this.Core.UnexpectedAttribute(parentElement, attribute); + this.ParseHelper.UnexpectedAttribute(parentElement, attribute); break; } } @@ -67,7 +65,7 @@ public override void ParseAttribute(XElement parentElement, XAttribute attribute /// Parent element of element to process. /// Element to process. /// Extra information about the context in which this element is being parsed. - public override void ParseElement(XElement parentElement, XElement element, IDictionary context) + public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary context) { PackageType packageType = PackageType.None; @@ -80,10 +78,10 @@ public override void ParseElement(XElement parentElement, XElement element, IDic switch (element.Name.LocalName) { case "Requires": - this.ParseRequiresElement(element, null, false); + this.ParseRequiresElement(intermediate, section, element, null, false); break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } break; @@ -100,7 +98,7 @@ public override void ParseElement(XElement parentElement, XElement element, IDic packageType = PackageType.MsuPackage; break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } @@ -111,10 +109,10 @@ public override void ParseElement(XElement parentElement, XElement element, IDic switch (element.Name.LocalName) { case "Provides": - this.ParseProvidesElement(element, packageType, packageId); + this.ParseProvidesElement(intermediate, section, element, packageType, packageId); break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } } @@ -127,9 +125,9 @@ public override void ParseElement(XElement parentElement, XElement element, IDic /// Element to process. /// Extra information about the context in which this element is being parsed. /// The component key path type if set. - public override ComponentKeyPath ParsePossibleKeyPathElement(XElement parentElement, XElement element, IDictionary context) + public override ComponentKeyPath ParsePossibleKeyPathElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary context) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(parentElement); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(parentElement); ComponentKeyPath keyPath = null; switch (parentElement.Name.LocalName) @@ -146,18 +144,18 @@ public override ComponentKeyPath ParsePossibleKeyPathElement(XElement parentElem case "Provides": if (win64) { - this.Core.OnMessage(DependencyWarnings.Win64Component(sourceLineNumbers, componentId)); + this.Messaging.Write(DependencyWarnings.Win64Component(sourceLineNumbers, componentId)); } - keyPath = this.ParseProvidesElement(element, PackageType.None, componentId); + keyPath = this.ParseProvidesElement(intermediate, section, element, PackageType.None, componentId); break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } @@ -170,7 +168,7 @@ public override ComponentKeyPath ParsePossibleKeyPathElement(XElement parentElem /// Source line number for the parent element. /// Parent element of attribute. /// The XML attribute for the ProviderKey attribute. - private void ParseProviderKeyAttribute(SourceLineNumber sourceLineNumbers, XElement parentElement, XAttribute attribute) + private void ParseProviderKeyAttribute(IntermediateSection section, SourceLineNumber sourceLineNumbers, XElement parentElement, XAttribute attribute) { Identifier id = null; string providerKey = null; @@ -179,41 +177,41 @@ private void ParseProviderKeyAttribute(SourceLineNumber sourceLineNumbers, XElem switch (attribute.Name.LocalName) { case "ProviderKey": - providerKey = this.Core.GetAttributeValue(sourceLineNumbers, attribute); + providerKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attribute); break; default: - this.Core.UnexpectedAttribute(parentElement, attribute); + this.ParseHelper.UnexpectedAttribute(parentElement, attribute); break; } // Make sure the key does not contain any illegal characters or values. if (String.IsNullOrEmpty(providerKey)) { - this.Core.OnMessage(WixErrors.IllegalEmptyAttributeValue(sourceLineNumbers, parentElement.Name.LocalName, attribute.Name.LocalName)); + this.Messaging.Write(ErrorMessages.IllegalEmptyAttributeValue(sourceLineNumbers, parentElement.Name.LocalName, attribute.Name.LocalName)); } else if (0 <= (illegalChar = providerKey.IndexOfAny(DependencyCommon.InvalidCharacters))) { StringBuilder sb = new StringBuilder(DependencyCommon.InvalidCharacters.Length * 2); Array.ForEach(DependencyCommon.InvalidCharacters, c => sb.Append(c).Append(" ")); - this.Core.OnMessage(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "ProviderKey", providerKey[illegalChar], sb.ToString())); + this.Messaging.Write(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "ProviderKey", providerKey[illegalChar], sb.ToString())); } else if ("ALL" == providerKey) { - this.Core.OnMessage(DependencyErrors.ReservedValue(sourceLineNumbers, parentElement.Name.LocalName, "ProviderKey", providerKey)); + this.Messaging.Write(DependencyErrors.ReservedValue(sourceLineNumbers, parentElement.Name.LocalName, "ProviderKey", providerKey)); } // Generate the primary key for the row. - id = this.Core.CreateIdentifier("dep", attribute.Name.LocalName, providerKey); + id = this.ParseHelper.CreateIdentifier("dep", attribute.Name.LocalName, providerKey); - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { // Create the provider row for the bundle. The Component_ field is required // in the table definition but unused for bundles, so just set it to the valid ID. - Row row = this.Core.CreateRow(sourceLineNumbers, "WixDependencyProvider", id); - row[1] = id.Id; - row[2] = providerKey; - row[5] = DependencyCommon.ProvidesAttributesBundle; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixDependencyProvider", id); + row.Set(1, id.Id); + row.Set(2, providerKey); + row.Set(5, DependencyCommon.ProvidesAttributesBundle); } } @@ -225,9 +223,9 @@ private void ParseProviderKeyAttribute(SourceLineNumber sourceLineNumbers, XElem /// Explicit key path. /// The identifier of the parent component or package. /// The type of key path if set. - private ComponentKeyPath ParseProvidesElement(XElement node, PackageType packageType, string parentId) + private ComponentKeyPath ParseProvidesElement(Intermediate intermediate, IntermediateSection section, XElement node, PackageType packageType, string parentId) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); ComponentKeyPath keyPath = null; Identifier id = null; string key = null; @@ -243,25 +241,25 @@ private ComponentKeyPath ParseProvidesElement(XElement node, PackageType package switch (attrib.Name.LocalName) { case "Id": - id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib); + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); break; case "Key": - key = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Version": - version = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib); + version = this.ParseHelper.GetAttributeVersionValue(sourceLineNumbers, attrib); break; case "DisplayName": - displayName = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + displayName = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } @@ -275,22 +273,22 @@ private ComponentKeyPath ParseProvidesElement(XElement node, PackageType package StringBuilder sb = new StringBuilder(DependencyCommon.InvalidCharacters.Length * 2); Array.ForEach(DependencyCommon.InvalidCharacters, c => sb.Append(c).Append(" ")); - this.Core.OnMessage(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "Key", key[illegalChar], sb.ToString())); + this.Messaging.Write(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "Key", key[illegalChar], sb.ToString())); } else if ("ALL" == key) { - this.Core.OnMessage(DependencyErrors.ReservedValue(sourceLineNumbers, node.Name.LocalName, "Key", key)); + this.Messaging.Write(DependencyErrors.ReservedValue(sourceLineNumbers, node.Name.LocalName, "Key", key)); } } else if (PackageType.ExePackage == packageType || PackageType.MsuPackage == packageType) { // Must specify the provider key when authored for a package. - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key")); } else if (PackageType.None == packageType) { // Make sure the ProductCode is authored and set the key. - this.Core.CreateSimpleReference(sourceLineNumbers, "Property", "ProductCode"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Property", "ProductCode"); key = "!(bind.property.ProductCode)"; } @@ -300,23 +298,23 @@ private ComponentKeyPath ParseProvidesElement(XElement node, PackageType package switch (packageType) { case PackageType.None: - this.Core.OnMessage(DependencyWarnings.DiscouragedVersionAttribute(sourceLineNumbers)); + this.Messaging.Write(DependencyWarnings.DiscouragedVersionAttribute(sourceLineNumbers)); break; case PackageType.MsiPackage: - this.Core.OnMessage(DependencyWarnings.DiscouragedVersionAttribute(sourceLineNumbers, parentId)); + this.Messaging.Write(DependencyWarnings.DiscouragedVersionAttribute(sourceLineNumbers, parentId)); break; } } else if (PackageType.MspPackage == packageType || PackageType.MsuPackage == packageType) { // Must specify the Version when authored for packages that do not contain a version. - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version")); } // Need the element ID for child element processing, so generate now if not authored. if (null == id) { - id = this.Core.CreateIdentifier("dep", node.Name.LocalName, parentId, key); + id = this.ParseHelper.CreateIdentifier("dep", node.Name.LocalName, parentId, key); } foreach (XElement child in node.Elements()) @@ -326,94 +324,93 @@ private ComponentKeyPath ParseProvidesElement(XElement node, PackageType package switch (child.Name.LocalName) { case "Requires": - this.ParseRequiresElement(child, id.Id, PackageType.None == packageType); + this.ParseRequiresElement(intermediate, section, child, id.Id, PackageType.None == packageType); break; case "RequiresRef": - this.ParseRequiresRefElement(child, id.Id, PackageType.None == packageType); + this.ParseRequiresRefElement(intermediate, section, child, id.Id, PackageType.None == packageType); break; default: - this.Core.UnexpectedElement(node, child); + this.ParseHelper.UnexpectedElement(node, child); break; } } else { - this.Core.ParseExtensionElement(node, child); + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); } } - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { // Create the row in the provider table. - Row row = this.Core.CreateRow(sourceLineNumbers, "WixDependencyProvider", id); - row[1] = parentId; - row[2] = key; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixDependencyProvider", id); + row.Set(1, parentId); + row.Set(2, key); if (!String.IsNullOrEmpty(version)) { - row[3] = version; + row.Set(3, version); } if (!String.IsNullOrEmpty(displayName)) { - row[4] = displayName; + row.Set(4, displayName); } if (0 != attributes) { - row[5] = attributes; + row.Set(5, attributes); } if (PackageType.None == packageType) { // Reference the Check custom action to check for dependencies on the current provider. - if (Platform.ARM == this.Core.CurrentPlatform) + if (Platform.ARM == this.Context.Platform) { // Ensure the ARM version of the CA is referenced. - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyCheck_ARM"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyCheck_ARM"); } else { // All other supported platforms use x86. - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyCheck"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyCheck"); } // Generate registry rows for the provider using binder properties. string keyProvides = String.Concat(DependencyCommon.RegistryRoot, key); - row = this.Core.CreateRow(sourceLineNumbers, "Registry", this.Core.CreateIdentifier("reg", id.Id, "(Default)")); - row[1] = -1; - row[2] = keyProvides; - row[3] = null; - row[4] = "[ProductCode]"; - row[5] = parentId; + row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Registry", this.ParseHelper.CreateIdentifier("reg", id.Id, "(Default)")); + row.Set(1, -1); + row.Set(2, keyProvides); + row.Set(4, "[ProductCode]"); + row.Set(5, parentId); // Use the Version registry value and use that as a potential key path. - Identifier idVersion = this.Core.CreateIdentifier("reg", id.Id, "Version"); + Identifier idVersion = this.ParseHelper.CreateIdentifier("reg", id.Id, "Version"); keyPath = new ComponentKeyPath() { Id = idVersion.Id, Explicit = false, Type = ComponentKeyPathType.Registry }; - row = this.Core.CreateRow(sourceLineNumbers, "Registry", idVersion); - row[1] = -1; - row[2] = keyProvides; - row[3] = "Version"; - row[4] = !String.IsNullOrEmpty(version) ? version : "[ProductVersion]"; - row[5] = parentId; + row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Registry", idVersion); + row.Set(1, -1); + row.Set(2, keyProvides); + row.Set(3, "Version"); + row.Set(4, !String.IsNullOrEmpty(version) ? version : "[ProductVersion]"); + row.Set(5, parentId); - row = this.Core.CreateRow(sourceLineNumbers, "Registry", this.Core.CreateIdentifier("reg", id.Id, "DisplayName")); - row[1] = -1; - row[2] = keyProvides; - row[3] = "DisplayName"; - row[4] = !String.IsNullOrEmpty(displayName) ? displayName : "[ProductName]"; - row[5] = parentId; + row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Registry", this.ParseHelper.CreateIdentifier("reg", id.Id, "DisplayName")); + row.Set(1, -1); + row.Set(2, keyProvides); + row.Set(3, "DisplayName"); + row.Set(4, !String.IsNullOrEmpty(displayName) ? displayName : "[ProductName]"); + row.Set(5, parentId); if (0 != attributes) { - row = this.Core.CreateRow(sourceLineNumbers, "Registry", this.Core.CreateIdentifier("reg", id.Id, "Attributes")); - row[1] = -1; - row[2] = keyProvides; - row[3] = "Attributes"; - row[4] = String.Concat("#", attributes.ToString(CultureInfo.InvariantCulture.NumberFormat)); - row[5] = parentId; + row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Registry", this.ParseHelper.CreateIdentifier("reg", id.Id, "Attributes")); + row.Set(1, -1); + row.Set(2, keyProvides); + row.Set(3, "Attributes"); + row.Set(4, String.Concat("#", attributes.ToString(CultureInfo.InvariantCulture.NumberFormat))); + row.Set(5, parentId); } } } @@ -427,9 +424,9 @@ private ComponentKeyPath ParseProvidesElement(XElement node, PackageType package /// The XML node for the Requires element. /// The parent provider identifier. /// Whether the Requires custom action should be referenced. - private void ParseRequiresElement(XElement node, string providerId, bool requiresAction) + private void ParseRequiresElement(Intermediate intermediate, IntermediateSection section, XElement node, string providerId, bool requiresAction) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); Identifier id = null; string providerKey = null; string minVersion = null; @@ -444,41 +441,41 @@ private void ParseRequiresElement(XElement node, string providerId, bool require switch (attrib.Name.LocalName) { case "Id": - id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib); + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); break; case "ProviderKey": - providerKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + providerKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Minimum": - minVersion = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib); + minVersion = this.ParseHelper.GetAttributeVersionValue(sourceLineNumbers, attrib); break; case "Maximum": - maxVersion = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib); + maxVersion = this.ParseHelper.GetAttributeVersionValue(sourceLineNumbers, attrib); break; case "IncludeMinimum": - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) { attributes |= DependencyCommon.RequiresAttributesMinVersionInclusive; } break; case "IncludeMaximum": - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) { attributes |= DependencyCommon.RequiresAttributesMaxVersionInclusive; } break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node); if (null == id) { @@ -486,18 +483,18 @@ private void ParseRequiresElement(XElement node, string providerId, bool require // element will be necessary and the Id attribute will be required. if (!String.IsNullOrEmpty(providerId)) { - id = this.Core.CreateIdentifier("dep", node.Name.LocalName, providerKey); + id = this.ParseHelper.CreateIdentifier("dep", node.Name.LocalName, providerKey); } else { - this.Core.OnMessage(WixErrors.ExpectedAttributeWhenElementNotUnderElement(sourceLineNumbers, node.Name.LocalName, "Id", "Provides")); + this.Messaging.Write(ErrorMessages.ExpectedAttributeWhenElementNotUnderElement(sourceLineNumbers, node.Name.LocalName, "Id", "Provides")); id = Identifier.Invalid; } } if (String.IsNullOrEmpty(providerKey)) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ProviderKey")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ProviderKey")); } // Make sure the key does not contain any illegal characters. else if (0 <= (illegalChar = providerKey.IndexOfAny(DependencyCommon.InvalidCharacters))) @@ -505,44 +502,44 @@ private void ParseRequiresElement(XElement node, string providerId, bool require StringBuilder sb = new StringBuilder(DependencyCommon.InvalidCharacters.Length * 2); Array.ForEach(DependencyCommon.InvalidCharacters, c => sb.Append(c).Append(" ")); - this.Core.OnMessage(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "ProviderKey", providerKey[illegalChar], sb.ToString())); + this.Messaging.Write(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "ProviderKey", providerKey[illegalChar], sb.ToString())); } - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { // Reference the Require custom action if required. if (requiresAction) { - if (Platform.ARM == this.Core.CurrentPlatform) + if (Platform.ARM == this.Context.Platform) { // Ensure the ARM version of the CA is referenced. - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyRequire_ARM"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyRequire_ARM"); } else { // All other supported platforms use x86. - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyRequire"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyRequire"); } } - Row row = this.Core.CreateRow(sourceLineNumbers, "WixDependency", id); - row[1] = providerKey; - row[2] = minVersion; - row[3] = maxVersion; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixDependency", id); + row.Set(1, providerKey); + row.Set(2, minVersion); + row.Set(3, maxVersion); if (0 != attributes) { - row[4] = attributes; + row.Set(4, attributes); } // Create the relationship between this WixDependency row and the WixDependencyProvider row. if (!String.IsNullOrEmpty(providerId)) { // Create the relationship between the WixDependency row and the parent WixDependencyProvider row. - row = this.Core.CreateRow(sourceLineNumbers, "WixDependencyRef"); - row[0] = providerId; - row[1] = id.Id; + row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixDependencyRef"); + row.Set(0, providerId); + row.Set(1, id.Id); } } } @@ -553,9 +550,9 @@ private void ParseRequiresElement(XElement node, string providerId, bool require /// The XML node for the RequiresRef element. /// The parent provider identifier. /// Whether the Requires custom action should be referenced. - private void ParseRequiresRefElement(XElement node, string providerId, bool requiresAction) + private void ParseRequiresRefElement(Intermediate intermediate, IntermediateSection section, XElement node, string providerId, bool requiresAction) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string id = null; foreach (XAttribute attrib in node.Attributes()) @@ -565,50 +562,50 @@ private void ParseRequiresRefElement(XElement node, string providerId, bool requ switch (attrib.Name.LocalName) { case "Id": - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + id = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node); if (String.IsNullOrEmpty(id)) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); } - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { // Reference the Require custom action if required. if (requiresAction) { - if (Platform.ARM == this.Core.CurrentPlatform) + if (Platform.ARM == this.Context.Platform) { // Ensure the ARM version of the CA is referenced. - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyRequire_ARM"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyRequire_ARM"); } else { // All other supported platforms use x86. - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyRequire"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyRequire"); } } // Create a link dependency on the row that contains information we'll need during bind. - this.Core.CreateSimpleReference(sourceLineNumbers, "WixDependency", id); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixDependency", id); // Create the relationship between the WixDependency row and the parent WixDependencyProvider row. - Row row = this.Core.CreateRow(sourceLineNumbers, "WixDependencyRef"); - row[0] = providerId; - row[1] = id; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixDependencyRef"); + row.Set(0, providerId); + row.Set(1, id); } } } diff --git a/src/wixext/DependencyDecompiler.cs b/src/wixext/DependencyDecompiler.cs index 3013cf7..31de309 100644 --- a/src/wixext/DependencyDecompiler.cs +++ b/src/wixext/DependencyDecompiler.cs @@ -1,7 +1,8 @@ // 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. -namespace WixToolset.Extensions +namespace WixToolset.Dependency { +#if TODO_CONSIDER_DECOMPILER using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -342,4 +343,5 @@ protected override int GetKeyForItem(KeyValuePair pair) } } } +#endif } diff --git a/src/wixext/DependencyErrors.cs b/src/wixext/DependencyErrors.cs new file mode 100644 index 0000000..83c0986 --- /dev/null +++ b/src/wixext/DependencyErrors.cs @@ -0,0 +1,37 @@ +// 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. + +namespace WixToolset.Dependency +{ + using System; + using System.Resources; + using WixToolset.Data; + + public static class DependencyErrors + { + public static Message IllegalCharactersInProvider(SourceLineNumber sourceLineNumbers, string attributeName, Char illegalChar, string illegalChars) + { + 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); + } + + public static Message ReservedValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue) + { + 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); + } + + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) + { + return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); + } + + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) + { + return new Message(sourceLineNumber, MessageLevel.Error, (int)id, resourceManager, resourceName, args); + } + + public enum Ids + { + IllegalCharactersInProvider = 5400, + ReservedValue = 5401, + } + } +} diff --git a/src/wixext/DependencyExtension.csproj b/src/wixext/DependencyExtension.csproj deleted file mode 100644 index 050e866..0000000 --- a/src/wixext/DependencyExtension.csproj +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - {A0B6D3F1-AE5E-423B-BA92-60C9926CA498} - WixDependencyExtension - Library - WixToolset.Extensions - - - - - - - - - - $(RootNamespace).Data.tables.xml - PreserveNewest - - - $(RootNamespace).Data.Messages.resources - - - $(RootNamespace).Xsd.Dependency.xsd - PreserveNewest - - - WixToolset.Data.Serialize - WixToolset.Extensions.Serialize.Dependency - - - Data\Dependency.wixlib - - - - - - - - - - - false - - - - diff --git a/src/wixext/DependencyExtensionData.cs b/src/wixext/DependencyExtensionData.cs index da2215c..e92aeff 100644 --- a/src/wixext/DependencyExtensionData.cs +++ b/src/wixext/DependencyExtensionData.cs @@ -1,64 +1,30 @@ // 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. -namespace WixToolset.Extensions +namespace WixToolset.Dependency { - using System; - using System.Reflection; using WixToolset.Data; using WixToolset.Extensibility; /// - /// The WiX toolset dependency extension. + /// The WiX Toolset Dependency Extension. /// - public sealed class DependencyExtensionData : ExtensionData + public sealed class DependencyExtensionData : BaseExtensionData { /// /// Gets the default culture. /// /// The default culture. - public override string DefaultCulture - { - get { return "en-us"; } - } - - /// - /// Gets the optional table definitions for this extension. - /// - /// The optional table definitions for this extension. - public override TableDefinitionCollection TableDefinitions - { - get - { - return DependencyExtensionData.GetExtensionTableDefinitions(); - } - } - - /// - /// Gets the library associated with this extension. - /// - /// The table definitions to use while loading the library. - /// The loaded library. - public override Library GetLibrary(TableDefinitionCollection tableDefinitions) - { - return DependencyExtensionData.GetExtensionLibrary(tableDefinitions); - } + public override string DefaultCulture => "en-US"; - /// - /// Internal mechanism to access the extension's table definitions. - /// - /// Extension's table definitions. - internal static TableDefinitionCollection GetExtensionTableDefinitions() + public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) { - return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml"); + tupleDefinition = DependencyTupleDefinitions.ByName(name); + return tupleDefinition != null; } - /// - /// Internal mechanism to access the extension's library. - /// - /// Extension's library. - internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions) + public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) { - return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.Dependency.wixlib", tableDefinitions); + return Intermediate.Load(typeof(DependencyExtensionData).Assembly, "WixToolset.Dependency.dependency.wixlib", tupleDefinitions); } } } diff --git a/src/wixext/DependencyExtensionFactory.cs b/src/wixext/DependencyExtensionFactory.cs new file mode 100644 index 0000000..c5b8965 --- /dev/null +++ b/src/wixext/DependencyExtensionFactory.cs @@ -0,0 +1,18 @@ +// 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. + +namespace WixToolset.Dependency +{ + using System; + using System.Collections.Generic; + using WixToolset.Extensibility; + + public class DependencyExtensionFactory : BaseExtensionFactory + { + protected override IEnumerable ExtensionTypes => new[] + { + typeof(DependencyCompiler), + typeof(DependencyExtensionData), + typeof(DependencyWindowsInstallerBackendBinderExtension), + }; + } +} diff --git a/src/wixext/DependencyWarnings.cs b/src/wixext/DependencyWarnings.cs new file mode 100644 index 0000000..802edc2 --- /dev/null +++ b/src/wixext/DependencyWarnings.cs @@ -0,0 +1,60 @@ +// 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. + +namespace WixToolset.Dependency +{ + using System; + using System.Resources; + using WixToolset.Data; + + public static class DependencyWarnings + { + public static Message DiscouragedVersionAttribute(SourceLineNumber sourceLineNumbers) + { + return Message(sourceLineNumbers, Ids.DiscouragedVersionAttribute, "The Provides/@Version attribute should not be specified in an MSI package. The ProductVersion will be used by default."); + } + + public static Message DiscouragedVersionAttribute(SourceLineNumber sourceLineNumbers, string id) + { + 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); + } + + public static Message PropertyRemoved(string name) + { + 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); + } + + public static Message ProvidesKeyNotFound(SourceLineNumber sourceLineNumbers, string id) + { + 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); + } + + public static Message RequiresKeyNotFound(SourceLineNumber sourceLineNumbers, string id) + { + 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); + } + + public static Message Win64Component(SourceLineNumber sourceLineNumbers, string componentId) + { + 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); + } + + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) + { + return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); + } + + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) + { + return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, resourceManager, resourceName, args); + } + + public enum Ids + { + ProvidesKeyNotFound = 5431, + RequiresKeyNotFound = 5432, + PropertyRemoved = 5433, + DiscouragedVersionAttribute = 5434, + Win64Component = 5435, + } + } +} diff --git a/src/wixext/DependencyBinder.cs b/src/wixext/DependencyWindowsInstallerBackendBinderExtension.cs similarity index 88% rename from src/wixext/DependencyBinder.cs rename to src/wixext/DependencyWindowsInstallerBackendBinderExtension.cs index 13fea20..485453a 100644 --- a/src/wixext/DependencyBinder.cs +++ b/src/wixext/DependencyWindowsInstallerBackendBinderExtension.cs @@ -1,24 +1,35 @@ // 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. -namespace WixToolset.Extensions +namespace WixToolset.Dependency { - using System; - using System.Collections.ObjectModel; - using System.Globalization; - using WixToolset.Data; + using System.Linq; + using System.Xml; + using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; - /// - /// The compiler for the WiX toolset dependency extension. - /// - public sealed class DependencyBinder : BinderExtension + public class DependencyWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension { + private static readonly TableDefinition[] Tables = LoadTables(); + + protected override TableDefinition[] TableDefinitionsForTuples => Tables; + + private static TableDefinition[] LoadTables() + { + using (var resourceStream = typeof(DependencyWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.Dependency.tables.xml")) + using (var reader = XmlReader.Create(resourceStream)) + { + var tables = TableDefinitionCollection.Load(reader); + return tables.ToArray(); + } + } + +#if TODO_TAG_BINDER_EXTENSION private Output output; /// /// Called after all output changes occur and right before the output is bound into its final format. /// - public override void Finish(Output output) + public void Finish(Output output) { // Only process MSI packages. if (OutputType.Product != output.Type) @@ -165,5 +176,6 @@ protected override string GetKeyForItem(Row row) return row.GetPrimaryKey('/'); } } +#endif } } diff --git a/src/wixext/Tuples/DependencyTupleDefinitions.cs b/src/wixext/Tuples/DependencyTupleDefinitions.cs new file mode 100644 index 0000000..fdd3f0b --- /dev/null +++ b/src/wixext/Tuples/DependencyTupleDefinitions.cs @@ -0,0 +1,47 @@ +// 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. + +namespace WixToolset.Dependency +{ + using System; + using WixToolset.Data; + + public enum DependencyTupleDefinitionType + { + WixDependency, + WixDependencyProvider, + WixDependencyRef, + } + + public static partial class DependencyTupleDefinitions + { + public static readonly Version Version = new Version("4.0.0"); + + public static IntermediateTupleDefinition ByName(string name) + { + if (!Enum.TryParse(name, out DependencyTupleDefinitionType type)) + { + return null; + } + + return ByType(type); + } + + public static IntermediateTupleDefinition ByType(DependencyTupleDefinitionType type) + { + switch (type) + { + case DependencyTupleDefinitionType.WixDependency: + return DependencyTupleDefinitions.WixDependency; + + case DependencyTupleDefinitionType.WixDependencyProvider: + return DependencyTupleDefinitions.WixDependencyProvider; + + case DependencyTupleDefinitionType.WixDependencyRef: + return DependencyTupleDefinitions.WixDependencyRef; + + default: + throw new ArgumentOutOfRangeException(nameof(type)); + } + } + } +} diff --git a/src/wixext/Tuples/WixDependencyProviderTuple.cs b/src/wixext/Tuples/WixDependencyProviderTuple.cs new file mode 100644 index 0000000..2fd6a80 --- /dev/null +++ b/src/wixext/Tuples/WixDependencyProviderTuple.cs @@ -0,0 +1,87 @@ +// 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. + +namespace WixToolset.Dependency +{ + using WixToolset.Data; + using WixToolset.Dependency.Tuples; + + public static partial class DependencyTupleDefinitions + { + public static readonly IntermediateTupleDefinition WixDependencyProvider = new IntermediateTupleDefinition( + DependencyTupleDefinitionType.WixDependencyProvider.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.WixDependencyProvider), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.ProviderKey), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.Version), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.DisplayName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(WixDependencyProviderTuple)); + } +} + +namespace WixToolset.Dependency.Tuples +{ + using WixToolset.Data; + + public enum WixDependencyProviderTupleFields + { + WixDependencyProvider, + Component_, + ProviderKey, + Version, + DisplayName, + Attributes, + } + + public class WixDependencyProviderTuple : IntermediateTuple + { + public WixDependencyProviderTuple() : base(DependencyTupleDefinitions.WixDependencyProvider, null, null) + { + } + + public WixDependencyProviderTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DependencyTupleDefinitions.WixDependencyProvider, sourceLineNumber, id) + { + } + + public IntermediateField this[WixDependencyProviderTupleFields index] => this.Fields[(int)index]; + + public string WixDependencyProvider + { + get => this.Fields[(int)WixDependencyProviderTupleFields.WixDependencyProvider].AsString(); + set => this.Set((int)WixDependencyProviderTupleFields.WixDependencyProvider, value); + } + + public string Component_ + { + get => this.Fields[(int)WixDependencyProviderTupleFields.Component_].AsString(); + set => this.Set((int)WixDependencyProviderTupleFields.Component_, value); + } + + public string ProviderKey + { + get => this.Fields[(int)WixDependencyProviderTupleFields.ProviderKey].AsString(); + set => this.Set((int)WixDependencyProviderTupleFields.ProviderKey, value); + } + + public string Version + { + get => this.Fields[(int)WixDependencyProviderTupleFields.Version].AsString(); + set => this.Set((int)WixDependencyProviderTupleFields.Version, value); + } + + public string DisplayName + { + get => this.Fields[(int)WixDependencyProviderTupleFields.DisplayName].AsString(); + set => this.Set((int)WixDependencyProviderTupleFields.DisplayName, value); + } + + public int Attributes + { + get => this.Fields[(int)WixDependencyProviderTupleFields.Attributes].AsNumber(); + set => this.Set((int)WixDependencyProviderTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/WixDependencyRefTuple.cs b/src/wixext/Tuples/WixDependencyRefTuple.cs new file mode 100644 index 0000000..3e996f5 --- /dev/null +++ b/src/wixext/Tuples/WixDependencyRefTuple.cs @@ -0,0 +1,55 @@ +// 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. + +namespace WixToolset.Dependency +{ + using WixToolset.Data; + using WixToolset.Dependency.Tuples; + + public static partial class DependencyTupleDefinitions + { + public static readonly IntermediateTupleDefinition WixDependencyRef = new IntermediateTupleDefinition( + DependencyTupleDefinitionType.WixDependencyRef.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(WixDependencyRefTupleFields.WixDependencyProvider_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDependencyRefTupleFields.WixDependency_), IntermediateFieldType.String), + }, + typeof(WixDependencyRefTuple)); + } +} + +namespace WixToolset.Dependency.Tuples +{ + using WixToolset.Data; + + public enum WixDependencyRefTupleFields + { + WixDependencyProvider_, + WixDependency_, + } + + public class WixDependencyRefTuple : IntermediateTuple + { + public WixDependencyRefTuple() : base(DependencyTupleDefinitions.WixDependencyRef, null, null) + { + } + + public WixDependencyRefTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DependencyTupleDefinitions.WixDependencyRef, sourceLineNumber, id) + { + } + + public IntermediateField this[WixDependencyRefTupleFields index] => this.Fields[(int)index]; + + public string WixDependencyProvider_ + { + get => this.Fields[(int)WixDependencyRefTupleFields.WixDependencyProvider_].AsString(); + set => this.Set((int)WixDependencyRefTupleFields.WixDependencyProvider_, value); + } + + public string WixDependency_ + { + get => this.Fields[(int)WixDependencyRefTupleFields.WixDependency_].AsString(); + set => this.Set((int)WixDependencyRefTupleFields.WixDependency_, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/WixDependencyTuple.cs b/src/wixext/Tuples/WixDependencyTuple.cs new file mode 100644 index 0000000..81e05ad --- /dev/null +++ b/src/wixext/Tuples/WixDependencyTuple.cs @@ -0,0 +1,79 @@ +// 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. + +namespace WixToolset.Dependency +{ + using WixToolset.Data; + using WixToolset.Dependency.Tuples; + + public static partial class DependencyTupleDefinitions + { + public static readonly IntermediateTupleDefinition WixDependency = new IntermediateTupleDefinition( + DependencyTupleDefinitionType.WixDependency.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.WixDependency), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.ProviderKey), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.MinVersion), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.MaxVersion), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(WixDependencyTuple)); + } +} + +namespace WixToolset.Dependency.Tuples +{ + using WixToolset.Data; + + public enum WixDependencyTupleFields + { + WixDependency, + ProviderKey, + MinVersion, + MaxVersion, + Attributes, + } + + public class WixDependencyTuple : IntermediateTuple + { + public WixDependencyTuple() : base(DependencyTupleDefinitions.WixDependency, null, null) + { + } + + public WixDependencyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DependencyTupleDefinitions.WixDependency, sourceLineNumber, id) + { + } + + public IntermediateField this[WixDependencyTupleFields index] => this.Fields[(int)index]; + + public string WixDependency + { + get => this.Fields[(int)WixDependencyTupleFields.WixDependency].AsString(); + set => this.Set((int)WixDependencyTupleFields.WixDependency, value); + } + + public string ProviderKey + { + get => this.Fields[(int)WixDependencyTupleFields.ProviderKey].AsString(); + set => this.Set((int)WixDependencyTupleFields.ProviderKey, value); + } + + public string MinVersion + { + get => this.Fields[(int)WixDependencyTupleFields.MinVersion].AsString(); + set => this.Set((int)WixDependencyTupleFields.MinVersion, value); + } + + public string MaxVersion + { + get => this.Fields[(int)WixDependencyTupleFields.MaxVersion].AsString(); + set => this.Set((int)WixDependencyTupleFields.MaxVersion, value); + } + + public int Attributes + { + get => this.Fields[(int)WixDependencyTupleFields.Attributes].AsNumber(); + set => this.Set((int)WixDependencyTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/WixToolset.Dependency.wixext.csproj b/src/wixext/WixToolset.Dependency.wixext.csproj new file mode 100644 index 0000000..7e9f1e3 --- /dev/null +++ b/src/wixext/WixToolset.Dependency.wixext.csproj @@ -0,0 +1,33 @@ + + + + + + netstandard2.0 + WixToolset.Dependency + WiX Toolset Dependency Extension + WiX Toolset Dependency Extension + true + build + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixext/WixToolset.Dependency.wixext.targets b/src/wixext/WixToolset.Dependency.wixext.targets new file mode 100644 index 0000000..494c018 --- /dev/null +++ b/src/wixext/WixToolset.Dependency.wixext.targets @@ -0,0 +1,11 @@ + + + + + + $(MSBuildThisFileDirectory)..\tools\WixToolset.Depedency.wixext.dll + + + + + diff --git a/src/wixext/messages.xml b/src/wixext/messages.xml deleted file mode 100644 index bd6eb60..0000000 --- a/src/wixext/messages.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - 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} - - - - - - - - The {0}/@{1} attribute value '{2}' is reserved and cannot be used here. Please choose a different value. - - - - - - - - - - The provider key with identifier {0} was not found in the WixDependencyProvider table. Related registry rows will not be removed from authoring. - - - - - - The dependency key with identifier {0} was not found in the WixDependency table. Related registry rows will not be removed from authoring. - - - - - - The property {0} was authored in the package with a value and will be removed. The property should not be authored. - - - - - - The Provides/@Version attribute should not be specified in an MSI package. The ProductVersion will be used by default. - - - The Provides/@Version attribute should not be specified for MSI package {0}. The ProductVersion will be used by default. - - - - - - 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. - - - - - - diff --git a/src/wixlib/DependencyExtension.wixproj b/src/wixlib/DependencyExtension.wixproj deleted file mode 100644 index e52218e..0000000 --- a/src/wixlib/DependencyExtension.wixproj +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - {58ED0EC8-73F8-4EE1-8664-A53486D38EC8} - dependency - Library - true - true - 1086 - en-us - - - - - - - - - - - - - - diff --git a/src/wixlib/DependencyExtension_Platform.wxi b/src/wixlib/DependencyExtension_Platform.wxi index d06b005..7cd7ad9 100644 --- a/src/wixlib/DependencyExtension_Platform.wxi +++ b/src/wixlib/DependencyExtension_Platform.wxi @@ -5,7 +5,7 @@ - + @@ -13,7 +13,7 @@ - + @@ -21,6 +21,6 @@ - + diff --git a/src/wixlib/caSuffix.wxi b/src/wixlib/caSuffix.wxi new file mode 100644 index 0000000..a56a239 --- /dev/null +++ b/src/wixlib/caSuffix.wxi @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/caerr.wxi b/src/wixlib/caerr.wxi new file mode 100644 index 0000000..141942f --- /dev/null +++ b/src/wixlib/caerr.wxi @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/wixlib/dependency.wixproj b/src/wixlib/dependency.wixproj new file mode 100644 index 0000000..6fa70e3 --- /dev/null +++ b/src/wixlib/dependency.wixproj @@ -0,0 +1,43 @@ + + + + + + + {58ED0EC8-73F8-4EE1-8664-A53486D38EC8} + dependency + Library + true + true + 1086 + en-us + + + + + + + + + + + + + dependencyca + {B86AF46C-0F90-49CC-923F-A800B088D015} + + + + + + + + + + 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}. + + + + + + diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config new file mode 100644 index 0000000..f3d424e --- /dev/null +++ b/src/wixlib/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/version.json b/version.json new file mode 100644 index 0000000..5f85777 --- /dev/null +++ b/version.json @@ -0,0 +1,11 @@ +{ + "version": "4.0", + "publicReleaseRefSpec": [ + "^refs/heads/master$" + ], + "cloudBuild": { + "buildNumber": { + "enabled": true + } + } +}