From cba9d16b54cd4ba5b8750ee97ed5aa36cf1fc382 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Fri, 29 Dec 2017 04:55:28 -0800 Subject: Update to latest changes from Core and send build notifications to Slack --- VisualStudio.wixext.sln | 20 +- appveyor.cmd | 4 +- appveyor.yml | 5 + src/FindLocalWix.props | 2 +- .../TestData/UsingVsixPackage/Package.en-us.wxl | 11 + .../TestData/UsingVsixPackage/Package.wxs | 24 ++ .../UsingVsixPackage/PackageComponents.wxs | 14 + .../TestData/UsingVsixPackage/example.txt | 1 + .../VisualStudioExtensionFixture.cs | 46 ++ .../WixToolsetTest.VisualStudio.csproj | 40 ++ src/wixext/Data/messages.xml | 133 ------ src/wixext/Data/tables.xml | 66 --- src/wixext/VSCompiler.cs | 469 +++++++++------------ src/wixext/VSDecompiler.cs | 8 +- src/wixext/VSExtensionData.cs | 48 +-- src/wixext/VSExtensionFactory.cs | 18 + src/wixext/VSWindowsInstallerBackendExtension.cs | 75 ++++ src/wixext/WixToolset.VisualStudio.wixext.csproj | 45 +- src/wixext/vs.xsd | 292 +++++++++++++ src/wixext/xsd/vs.xsd | 292 ------------- src/wixlib/packages.config | 4 +- src/wixlib/vs.wixproj | 18 +- 22 files changed, 771 insertions(+), 864 deletions(-) create mode 100644 src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl create mode 100644 src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs create mode 100644 src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs create mode 100644 src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt create mode 100644 src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs create mode 100644 src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj delete mode 100644 src/wixext/Data/messages.xml delete mode 100644 src/wixext/Data/tables.xml create mode 100644 src/wixext/VSExtensionFactory.cs create mode 100644 src/wixext/VSWindowsInstallerBackendExtension.cs create mode 100644 src/wixext/vs.xsd delete mode 100644 src/wixext/xsd/vs.xsd diff --git a/VisualStudio.wixext.sln b/VisualStudio.wixext.sln index ca8aac82..d787afa2 100644 --- a/VisualStudio.wixext.sln +++ b/VisualStudio.wixext.sln @@ -1,13 +1,15 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26730.16 +VisualStudioVersion = 15.0.27130.2003 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ca", "src\ca\vsca.vcxproj", "{45308B85-0628-4978-8FC8-6AD9E1AD5949}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vsca", "src\ca\vsca.vcxproj", "{45308B85-0628-4978-8FC8-6AD9E1AD5949}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.VisualStudio.wixext", "src\wixext\WixToolset.VisualStudio.wixext.csproj", "{61BFD377-9DE1-48B4-8687-560DF68D6F3B}" EndProject -Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "wixlib", "src\wixlib\vs.wixproj", "{14345C9D-8AF8-435A-BB1B-E067CE7EB321}" +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "vs", "src\wixlib\vs.wixproj", "{14345C9D-8AF8-435A-BB1B-E067CE7EB321}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.VisualStudio", "src\test\WixToolsetTest.VisualStudio\WixToolsetTest.VisualStudio.csproj", "{DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -49,6 +51,18 @@ Global {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|x64.Build.0 = Release|x64 {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|x86.ActiveCfg = Release|x86 {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|x86.Build.0 = Release|x86 + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x64.ActiveCfg = Debug|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x64.Build.0 = Debug|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x86.ActiveCfg = Debug|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x86.Build.0 = Debug|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|Any CPU.Build.0 = Release|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|x64.ActiveCfg = Release|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|x64.Build.0 = Release|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|x86.ActiveCfg = Release|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/appveyor.cmd b/appveyor.cmd index a4f49085..4621592d 100644 --- a/appveyor.cmd +++ b/appveyor.cmd @@ -5,7 +5,9 @@ nuget restore msbuild -p:Configuration=Release -t:Restore -msbuild -p:Configuration=Release -t:Pack .\src\wixext\WixToolset.VisualStudio.wixext.csproj +msbuild -p:Configuration=Release src\test\WixToolsetTest.VisualStudio\WixToolsetTest.VisualStudio.csproj + +msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.VisualStudio.wixext.csproj @popd @endlocal \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index d9da1df5..0c74d54b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -22,3 +22,8 @@ skip_tags: true artifacts: - path: build\Release\**\*.nupkg name: nuget + +notifications: +- provider: Slack + incoming_webhook: + secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA= diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props index e77fb386..016dac77 100644 --- a/src/FindLocalWix.props +++ b/src/FindLocalWix.props @@ -3,6 +3,6 @@ - $(MSBuildThisFileDirectory)..\..\Core\build\Release\publish\wix.targets + $(MSBuildThisFileDirectory)..\..\Core\build\Release\publish\net461\wix.targets diff --git a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl @@ -0,0 +1,11 @@ + + + + + + A newer version of [ProductName] is already installed. + MsiPackage + + diff --git a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs new file mode 100644 index 00000000..07e6ba3d --- /dev/null +++ b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs new file mode 100644 index 00000000..c8c72cc0 --- /dev/null +++ b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs @@ -0,0 +1,14 @@ + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt @@ -0,0 +1 @@ +This is example.txt. \ No newline at end of file diff --git a/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs b/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs new file mode 100644 index 00000000..5bcc4391 --- /dev/null +++ b/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs @@ -0,0 +1,46 @@ +// 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.VisualStudio +{ + using System.Linq; + using WixBuildTools.TestSupport; + using WixToolset.Core.TestPackage; + using WixToolset.VisualStudio; + using Xunit; + + public class VisualStudioExtensionFixture + { + [Fact] + public void CanBuildUsingVsixPackage() + { + var folder = TestData.Get(@"TestData\UsingVsixPackage"); + var build = new Builder(folder, typeof(VSExtensionFactory), new[] { folder }); + + var results = build.BuildAndQuery(Build, "CustomAction"); + Assert.Equal(new[] + { + "CustomAction:SetVS2010Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2010_VSIX_INSTALLER_PATH]\t0", + "CustomAction:SetVS2012Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2012_VSIX_INSTALLER_PATH]\t0", + "CustomAction:SetVS2013Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2013_VSIX_INSTALLER_PATH]\t0", + "CustomAction:SetVS2015Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2015_VSIX_INSTALLER_PATH]\t0", + "CustomAction:vimyrEjb_CFhXi3TTLayKNM2w7rvr4\t3122\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\" /admin\t0", + "CustomAction:viuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1074\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\"\t0", + "CustomAction:vrmyrEjb_CFhXi3TTLayKNM2w7rvr4\t3442\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t0", + "CustomAction:vruFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1394\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t0", + "CustomAction:VSFindInstances\t257\tVSCA\tFindInstances\t0", + "CustomAction:vumyrEjb_CFhXi3TTLayKNM2w7rvr4\t3186\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t0", + "CustomAction:vuuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1138\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t0", + "CustomAction:Vwd2012VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2012_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t0", + "CustomAction:Vwd2013VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2013_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t0", + "CustomAction:Vwd2015VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2015_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t0", + }, results.OrderBy(s => s).ToArray()); + } + + private static void Build(string[] args) + { + var result = WixRunner.Execute(args, out var messages); + Assert.Equal(0, result); + Assert.Empty(messages); + } + } +} diff --git a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj new file mode 100644 index 00000000..621ce70b --- /dev/null +++ b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj @@ -0,0 +1,40 @@ + + + + + + netcoreapp2.0 + false + + + + NU1701 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixext/Data/messages.xml b/src/wixext/Data/messages.xml deleted file mode 100644 index d1c85301..00000000 --- a/src/wixext/Data/messages.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - Invalid project output group: {0}. - - - - - - No project output group specified. - - - - - Failed to load MSBuild assembly: {0} - - - - - - Failed to load MSBuild engine: {0} - - - - - - Failed to load project {0}: {1} - - - - - - - Failed to build project {0}: {1} - - - - - - - Build failed. - - - - - Missing project output group '{1}' in project {0}. - - - - - - - DirectoryAttributeAccessor tried to access an invalid element type for attribute '{0'}. - - - - - - Invalid generated type: {0}. Must be one of: components, container, payloadgroup, layout. - - - - - - Invalid directory ID: {0}. Check that it doesn't start with a hyphen or slash. - - - - - - Invalid project name: {0}. Check that it doesn't start with a hyphen or slash. - - - - - - Build error during harvesting: {0} - - - - - - Failed to load MSBuild wrapper assembly: {0} - - - - - - Failed to load MSBuild wrapper type: {0} - - - - - - Failed to load MSBuild wrapper object: {0} - - - - - - - - Failed to set loggers: {0} - - - - - - Failed to set project configuration and platform: {0} - - - - - - - - Found ToolsVersion {0} inside project file. - - - - - - Loading project using MSBuild version {0}. - - - - - diff --git a/src/wixext/Data/tables.xml b/src/wixext/Data/tables.xml deleted file mode 100644 index e9c86097..00000000 --- a/src/wixext/Data/tables.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixext/VSCompiler.cs b/src/wixext/VSCompiler.cs index cf6226dd..8c01cb5b 100644 --- a/src/wixext/VSCompiler.cs +++ b/src/wixext/VSCompiler.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.VisualStudio { using System; using System.Collections.Generic; @@ -11,7 +11,7 @@ namespace WixToolset.Extensions /// /// The compiler for the WiX Toolset Visual Studio Extension. /// - public sealed class VSCompiler : CompilerExtension + public sealed class VSCompiler : BaseCompilerExtension { internal const int MsidbCustomActionTypeExe = 0x00000002; // Target = command line args internal const int MsidbCustomActionTypeProperty = 0x00000030; // Source = full path to executable @@ -20,22 +20,9 @@ namespace WixToolset.Extensions internal const int MsidbCustomActionTypeInScript = 0x00000400; // queue for execution within script internal const int MsidbCustomActionTypeNoImpersonate = 0x00000800; // queue for not impersonating - /// - /// Instantiate a new HelpCompiler. - /// - public VSCompiler() - { - this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/vs"; - } + public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/vs"; - /// - /// Processes an element for the Compiler. - /// - /// Source line number for the parent element. - /// 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) { switch (parentElement.Name.LocalName) { @@ -43,10 +30,10 @@ namespace WixToolset.Extensions switch (element.Name.LocalName) { case "VsixPackage": - this.ParseVsixPackageElement(element, context["ComponentId"], null); + this.ParseVsixPackageElement(intermediate, section, element, context["ComponentId"], null); break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } break; @@ -54,16 +41,16 @@ namespace WixToolset.Extensions switch (element.Name.LocalName) { case "HelpCollection": - this.ParseHelpCollectionElement(element, context["FileId"]); + this.ParseHelpCollectionElement(intermediate, section, element, context["FileId"]); break; case "HelpFile": - this.ParseHelpFileElement(element, context["FileId"]); + this.ParseHelpFileElement(intermediate, section, element, context["FileId"]); break; case "VsixPackage": - this.ParseVsixPackageElement(element, context["ComponentId"], context["FileId"]); + this.ParseVsixPackageElement(intermediate, section, element, context["ComponentId"], context["FileId"]); break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } break; @@ -73,186 +60,171 @@ namespace WixToolset.Extensions switch (element.Name.LocalName) { case "HelpCollectionRef": - this.ParseHelpCollectionRefElement(element); + this.ParseHelpCollectionRefElement(intermediate, section, element); break; case "HelpFilter": - this.ParseHelpFilterElement(element); + this.ParseHelpFilterElement(intermediate, section, element); 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; } } - /// - /// Parses a HelpCollectionRef element. - /// - /// Element to process. - private void ParseHelpCollectionRefElement(XElement node) + private void ParseHelpCollectionRefElement(Intermediate intermediate, IntermediateSection section, XElement element) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); - string id = null; + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { switch (attrib.Name.LocalName) { case "Id": - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "HelpNamespace", id); + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpNamespace", id.Id); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } if (null == id) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); } - foreach (XElement child in node.Elements()) + foreach (XElement child in element.Elements()) { if (this.Namespace == child.Name.Namespace) { - SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); + SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child); switch (child.Name.LocalName) { case "HelpFileRef": - this.ParseHelpFileRefElement(child, id); + this.ParseHelpFileRefElement(intermediate, section, child, id); break; default: - this.Core.UnexpectedElement(node, child); + this.ParseHelper.UnexpectedElement(element, child); break; } } else { - this.Core.ParseExtensionElement(node, child); + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child); } } } - /// - /// Parses a HelpCollection element. - /// - /// Element to process. - /// Identifier of the parent File element. - private void ParseHelpCollectionElement(XElement node, string fileId) + private void ParseHelpCollectionElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); - string id = null; + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; string description = null; string name = null; YesNoType suppressCAs = YesNoType.No; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { switch (attrib.Name.LocalName) { case "Id": - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); break; case "Description": - description = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + description = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Name": - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "SuppressCustomActions": - suppressCAs = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } if (null == id) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); } if (null == description) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Description")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Description")); } if (null == name) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); } - foreach (XElement child in node.Elements()) + foreach (XElement child in element.Elements()) { if (this.Namespace == child.Name.Namespace) { switch (child.Name.LocalName) { case "HelpFileRef": - this.ParseHelpFileRefElement(child, id); + this.ParseHelpFileRefElement(intermediate, section, child, id); break; case "HelpFilterRef": - this.ParseHelpFilterRefElement(child, id); + this.ParseHelpFilterRefElement(intermediate, section, child, id); break; case "PlugCollectionInto": - this.ParsePlugCollectionIntoElement(child, id); + this.ParsePlugCollectionIntoElement(intermediate, section, child, id); break; default: - this.Core.UnexpectedElement(node, child); + this.ParseHelper.UnexpectedElement(element, child); break; } } else { - this.Core.ParseExtensionElement(node, child); + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child); } } - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { - Row row = this.Core.CreateRow(sourceLineNumbers, "HelpNamespace"); - row[0] = id; - row[1] = name; - row[2] = fileId; - row[3] = description; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpNamespace", id); + row.Set(1, name); + row.Set(2, fileId); + row.Set(3, description); if (YesNoType.No == suppressCAs) { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); } } } - /// - /// Parses a HelpFile element. - /// - /// Element to process. - /// Identifier of the parent file element. - private void ParseHelpFileElement(XElement node, string fileId) + private void ParseHelpFileElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); - string id = null; + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; string name = null; int language = CompilerConstants.IntegerNotSet; string hxi = null; @@ -261,255 +233,232 @@ namespace WixToolset.Extensions string samples = null; YesNoType suppressCAs = YesNoType.No; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { switch (attrib.Name.LocalName) { case "Id": - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); break; case "AttributeIndex": - hxr = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "File", hxr); + hxr = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxr); break; case "Index": - hxi = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "File", hxi); + hxi = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxi); break; case "Language": - language = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); + language = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); break; case "Name": - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "SampleLocation": - samples = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "File", samples); + samples = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", samples); break; case "Search": - hxq = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "File", hxq); + hxq = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxq); break; case "SuppressCustomActions": - suppressCAs = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } if (null == id) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); } if (null == name) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); } - //uninstall will always fail silently, leaving file registered, if Language is not set + // Uninstall will always fail silently, leaving file registered, if Language is not set if (CompilerConstants.IntegerNotSet == language) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Language")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Language")); } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { - Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFile"); - row[0] = id; - row[1] = name; - row[2] = language; - row[3] = fileId; - row[4] = hxi; - row[5] = hxq; - row[6] = hxr; - row[7] = samples; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFile", id); + row.Set(1, name); + row.Set(2, language); + row.Set(3, fileId); + row.Set(4, hxi); + row.Set(5, hxq); + row.Set(6, hxr); + row.Set(7, samples); if (YesNoType.No == suppressCAs) { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); } } } - /// - /// Parses a HelpFileRef element. - /// - /// Element to process. - /// Identifier of the parent help collection. - private void ParseHelpFileRefElement(XElement node, string collectionId) + private void ParseHelpFileRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); - string id = null; + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { switch (attrib.Name.LocalName) { case "Id": - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "HelpFile", id); + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpFile", id.Id); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } if (null == id) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { - Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFileToNamespace"); - row[0] = id; - row[1] = collectionId; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFileToNamespace", id); + row.Set(1, collectionId); } } - /// - /// Parses a HelpFilter element. - /// - /// Element to process. - private void ParseHelpFilterElement(XElement node) + private void ParseHelpFilterElement(Intermediate intermediate, IntermediateSection section, XElement element) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); - string id = null; + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; string filterDefinition = null; string name = null; YesNoType suppressCAs = YesNoType.No; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { switch (attrib.Name.LocalName) { case "Id": - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); break; case "FilterDefinition": - filterDefinition = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + filterDefinition = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Name": - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "SuppressCustomActions": - suppressCAs = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } if (null == id) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); } if (null == name) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { - Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFilter"); - row[0] = id; - row[1] = name; - row[2] = filterDefinition; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFilter", id); + row.Set(1, name); + row.Set(2, filterDefinition); if (YesNoType.No == suppressCAs) { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); } } } - /// - /// Parses a HelpFilterRef element. - /// - /// Element to process. - /// Identifier of the parent help collection. - private void ParseHelpFilterRefElement(XElement node, string collectionId) + private void ParseHelpFilterRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); - string id = null; + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { switch (attrib.Name.LocalName) { case "Id": - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "HelpFilter", id); + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpFilter", id.Id); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } if (null == id) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { - Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFilterToNamespace"); - row[0] = id; - row[1] = collectionId; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFilterToNamespace", id); + row.Set(1, collectionId.Id); } } - /// - /// Parses a PlugCollectionInto element. - /// - /// Element to process. - /// Identifier of the parent help collection. - private void ParsePlugCollectionIntoElement(XElement node, string parentId) + private void ParsePlugCollectionIntoElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier parentId) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); string hxa = null; string hxt = null; string hxtParent = null; @@ -519,38 +468,38 @@ namespace WixToolset.Extensions bool pluginVS05 = false; bool pluginVS08 = false; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { switch (attrib.Name.LocalName) { case "Attributes": - hxa = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + hxa = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "TableOfContents": - hxt = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + hxt = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "TargetCollection": - namespaceParent = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + namespaceParent = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "TargetTableOfContents": - hxtParent = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + hxtParent = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "TargetFeature": - feature = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + feature = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "SuppressExternalNamespaces": - suppressExternalNamespaces = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + suppressExternalNamespaces = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } @@ -559,35 +508,33 @@ namespace WixToolset.Extensions if (null == namespaceParent) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetCollection")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetCollection")); } if (null == feature && (pluginVS05 || pluginVS08) && YesNoType.No == suppressExternalNamespaces) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFeature")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetFeature")); } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { - Row row = this.Core.CreateRow(sourceLineNumbers, "HelpPlugin"); - row[0] = parentId; - row[1] = namespaceParent; - row[2] = hxt; - row[3] = hxa; - row[4] = hxtParent; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpPlugin", parentId); + row.Set(1, namespaceParent); + row.Set(2, hxt); + row.Set(3, hxa); + row.Set(4, hxtParent); if (pluginVS05) { if (YesNoType.No == suppressExternalNamespaces) { // Bring in the help 2 base namespace components for VS 2005 - this.Core.CreateComplexReference(sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, + this.ParseHelper.CreateComplexReference(section, sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, ComplexReferenceChildType.ComponentGroup, "Help2_VS2005_Namespace_Components", false); // Reference CustomAction since nothing will happen without it - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", - "CA_HxMerge_VSIPCC_VSCC"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_HxMerge_VSIPCC_VSCC"); } } else if (pluginVS08) @@ -595,31 +542,23 @@ namespace WixToolset.Extensions if (YesNoType.No == suppressExternalNamespaces) { // Bring in the help 2 base namespace components for VS 2008 - this.Core.CreateComplexReference(sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, + this.ParseHelper.CreateComplexReference(section, sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, ComplexReferenceChildType.ComponentGroup, "Help2_VS2008_Namespace_Components", false); // Reference CustomAction since nothing will happen without it - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", - "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC"); } } else { // Reference the parent namespace to enforce the foreign key relationship - this.Core.CreateSimpleReference(sourceLineNumbers, "HelpNamespace", - namespaceParent); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpNamespace", namespaceParent); } } } - /// - /// Parses a VsixPackage element. - /// - /// Element to process. - /// Identifier of the parent Component element. - /// Identifier of the parent File element. - private void ParseVsixPackageElement(XElement node, string componentId, string fileId) + private void ParseVsixPackageElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string fileId) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); string propertyId = "VS_VSIX_INSTALLER_PATH"; string packageId = null; YesNoType permanent = YesNoType.NotSet; @@ -627,7 +566,7 @@ namespace WixToolset.Extensions string targetVersion = null; YesNoType vital = YesNoType.NotSet; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -636,21 +575,21 @@ namespace WixToolset.Extensions case "File": if (String.IsNullOrEmpty(fileId)) { - fileId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + fileId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); } else { - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "File", "File")); + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, element.Name.LocalName, "File", "File")); } break; case "PackageId": - packageId = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + packageId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Permanent": - permanent = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + permanent = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); break; case "Target": - target = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + target = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (target.ToLowerInvariant()) { case "integrated": @@ -681,53 +620,53 @@ namespace WixToolset.Extensions } break; case "TargetVersion": - targetVersion = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib); + targetVersion = this.ParseHelper.GetAttributeVersionValue(sourceLineNumbers, attrib); break; case "Vital": - vital = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + vital = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); break; case "VsixInstallerPathProperty": - propertyId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + propertyId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } if (String.IsNullOrEmpty(fileId)) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "File")); } if (String.IsNullOrEmpty(packageId)) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PackageId")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "PackageId")); } if (!String.IsNullOrEmpty(target) && String.IsNullOrEmpty(targetVersion)) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetVersion", "Target")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetVersion", "Target")); } else if (String.IsNullOrEmpty(target) && !String.IsNullOrEmpty(targetVersion)) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Target", "TargetVersion")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Target", "TargetVersion")); } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { // Ensure there is a reference to the AppSearch Property that will find the VsixInstaller.exe. - this.Core.CreateSimpleReference(sourceLineNumbers, "Property", propertyId); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Property", propertyId); // Ensure there is a reference to the package file (even if we are a child under it). - this.Core.CreateSimpleReference(sourceLineNumbers, "File", fileId); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", fileId); string cmdlinePrefix = "/q "; @@ -746,8 +685,8 @@ namespace WixToolset.Extensions } else // the package is vital so ensure there is a rollback action scheduled. { - Identifier rollbackNamePerUser = this.Core.CreateIdentifier("vru", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); - Identifier rollbackNamePerMachine = this.Core.CreateIdentifier("vrm", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); + Identifier rollbackNamePerUser = this.ParseHelper.CreateIdentifier("vru", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); + Identifier rollbackNamePerMachine = this.ParseHelper.CreateIdentifier("vrm", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); string rollbackCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); string rollbackCmdLinePerMachine = String.Concat(rollbackCmdLinePerUser, " /admin"); int rollbackExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeRollback | VSCompiler.MsidbCustomActionTypeInScript; @@ -755,27 +694,27 @@ namespace WixToolset.Extensions string rollbackConditionPerUser = String.Format("NOT ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. string rollbackConditionPerMachine = String.Format("ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. - this.SchedulePropertyExeAction(sourceLineNumbers, rollbackNamePerUser, propertyId, rollbackCmdLinePerUser, rollbackExtraBitsPerUser, rollbackConditionPerUser, null, installAfter); - this.SchedulePropertyExeAction(sourceLineNumbers, rollbackNamePerMachine, propertyId, rollbackCmdLinePerMachine, rollbackExtraBitsPerMachine, rollbackConditionPerMachine, null, rollbackNamePerUser.Id); + this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerUser, propertyId, rollbackCmdLinePerUser, rollbackExtraBitsPerUser, rollbackConditionPerUser, null, installAfter); + this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerMachine, propertyId, rollbackCmdLinePerMachine, rollbackExtraBitsPerMachine, rollbackConditionPerMachine, null, rollbackNamePerUser.Id); installAfter = rollbackNamePerMachine.Id; } - Identifier installNamePerUser = this.Core.CreateIdentifier("viu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); - Identifier installNamePerMachine = this.Core.CreateIdentifier("vim", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); + Identifier installNamePerUser = this.ParseHelper.CreateIdentifier("viu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); + Identifier installNamePerMachine = this.ParseHelper.CreateIdentifier("vim", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); string installCmdLinePerUser = String.Format("{0} \"[#{1}]\"", cmdlinePrefix, fileId); string installCmdLinePerMachine = String.Concat(installCmdLinePerUser, " /admin"); string installConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. string installConditionPerMachine = String.Format("ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. - this.SchedulePropertyExeAction(sourceLineNumbers, installNamePerUser, propertyId, installCmdLinePerUser, installExtraBits, installConditionPerUser, null, installAfter); - this.SchedulePropertyExeAction(sourceLineNumbers, installNamePerMachine, propertyId, installCmdLinePerMachine, installExtraBits | VSCompiler.MsidbCustomActionTypeNoImpersonate, installConditionPerMachine, null, installNamePerUser.Id); + this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerUser, propertyId, installCmdLinePerUser, installExtraBits, installConditionPerUser, null, installAfter); + this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerMachine, propertyId, installCmdLinePerMachine, installExtraBits | VSCompiler.MsidbCustomActionTypeNoImpersonate, installConditionPerMachine, null, installNamePerUser.Id); // If not permanent, schedule the uninstall custom action. if (permanent != YesNoType.Yes) { - Identifier uninstallNamePerUser = this.Core.CreateIdentifier("vuu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); - Identifier uninstallNamePerMachine = this.Core.CreateIdentifier("vum", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); + Identifier uninstallNamePerUser = this.ParseHelper.CreateIdentifier("vuu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); + Identifier uninstallNamePerMachine = this.ParseHelper.CreateIdentifier("vum", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); string uninstallCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); string uninstallCmdLinePerMachine = String.Concat(uninstallCmdLinePerUser, " /admin"); int uninstallExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeInScript; @@ -783,39 +722,39 @@ namespace WixToolset.Extensions string uninstallConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. string uninstallConditionPerMachine = String.Format("ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. - this.SchedulePropertyExeAction(sourceLineNumbers, uninstallNamePerUser, propertyId, uninstallCmdLinePerUser, uninstallExtraBitsPerUser, uninstallConditionPerUser, "InstallFinalize", null); - this.SchedulePropertyExeAction(sourceLineNumbers, uninstallNamePerMachine, propertyId, uninstallCmdLinePerMachine, uninstallExtraBitsPerMachine, uninstallConditionPerMachine, "InstallFinalize", null); + this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerUser, propertyId, uninstallCmdLinePerUser, uninstallExtraBitsPerUser, uninstallConditionPerUser, "InstallFinalize", null); + this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerMachine, propertyId, uninstallCmdLinePerMachine, uninstallExtraBitsPerMachine, uninstallConditionPerMachine, "InstallFinalize", null); } } } - private void SchedulePropertyExeAction(SourceLineNumber sourceLineNumbers, Identifier name, string source, string cmdline, int extraBits, string condition, string beforeAction, string afterAction) + private void SchedulePropertyExeAction(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier name, string source, string cmdline, int extraBits, string condition, string beforeAction, string afterAction) { const string sequence = "InstallExecuteSequence"; - Row actionRow = this.Core.CreateRow(sourceLineNumbers, "CustomAction", name); - actionRow[1] = VSCompiler.MsidbCustomActionTypeProperty | VSCompiler.MsidbCustomActionTypeExe | extraBits; - actionRow[2] = source; - actionRow[3] = cmdline; + var actionRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "CustomAction", name); + actionRow.Set(1, VSCompiler.MsidbCustomActionTypeProperty | VSCompiler.MsidbCustomActionTypeExe | extraBits); + actionRow.Set(2, source); + actionRow.Set(3, cmdline); - Row sequenceRow = this.Core.CreateRow(sourceLineNumbers, "WixAction"); - sequenceRow[0] = sequence; - sequenceRow[1] = name.Id; - sequenceRow[2] = condition; + var sequenceRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixAction", new Identifier(name.Access, sequence, name.Id)); + sequenceRow.Set(0, sequence); + sequenceRow.Set(1, name.Id); + sequenceRow.Set(2, condition); // no explicit sequence - sequenceRow[4] = beforeAction; - sequenceRow[5] = afterAction; - sequenceRow[6] = 0; // not overridable + sequenceRow.Set(4, beforeAction); + sequenceRow.Set(5, afterAction); + sequenceRow.Set(6, 0); // not overridable if (null != beforeAction) { if (WindowsInstallerStandard.IsStandardAction(beforeAction)) { - this.Core.CreateSimpleReference(sourceLineNumbers, "WixAction", sequence, beforeAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixAction", sequence, beforeAction); } else { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", beforeAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", beforeAction); } } @@ -823,11 +762,11 @@ namespace WixToolset.Extensions { if (WindowsInstallerStandard.IsStandardAction(afterAction)) { - this.Core.CreateSimpleReference(sourceLineNumbers, "WixAction", sequence, afterAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixAction", sequence, afterAction); } else { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", afterAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", afterAction); } } } diff --git a/src/wixext/VSDecompiler.cs b/src/wixext/VSDecompiler.cs index bfa0670c..08dc364a 100644 --- a/src/wixext/VSDecompiler.cs +++ b/src/wixext/VSDecompiler.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.VisualStudio { +#if TODO_CONSIDER_DECOMPILER using System; using System.Collections; using System.Diagnostics; @@ -104,7 +105,7 @@ namespace WixToolset.Extensions { helpFile.SampleLocation = (string)row[7]; } - + if (this.Core.RootElement is Wix.Module) { helpFile.SuppressCustomActions = VS.YesNoType.yes; @@ -270,7 +271,7 @@ namespace WixToolset.Extensions //we cannot do this work because we cannot get the FeatureComponent table //plugCollectionInto.TargetFeature = DecompileHelpComponents(); - + VS.HelpCollection helpCollection = (VS.HelpCollection)this.Core.GetIndexedElement("HelpNamespace", (string)row[0]); if (null != helpCollection) { @@ -293,4 +294,5 @@ namespace WixToolset.Extensions // return String.Empty; //} } +#endif } diff --git a/src/wixext/VSExtensionData.cs b/src/wixext/VSExtensionData.cs index edb1fd42..bc846af0 100644 --- a/src/wixext/VSExtensionData.cs +++ b/src/wixext/VSExtensionData.cs @@ -1,55 +1,15 @@ // 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.VisualStudio { - using System; - using System.Reflection; using WixToolset.Data; using WixToolset.Extensibility; - /// - /// The WiX Toolset Visual Studio Extension. - /// - public sealed class VSExtensionData : ExtensionData + public sealed class VSExtensionData : BaseExtensionData { - /// - /// Gets the optional table definitions for this extension. - /// - /// The optional table definitions for this extension. - public override TableDefinitionCollection TableDefinitions + public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) { - get - { - return VSExtensionData.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 VSExtensionData.GetExtensionLibrary(tableDefinitions); - } - - /// - /// Internal mechanism to access the extension's table definitions. - /// - /// Extension's table definitions. - internal static TableDefinitionCollection GetExtensionTableDefinitions() - { - return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml"); - } - - /// - /// Internal mechanism to access the extension's library. - /// - /// Extension's library. - internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions) - { - return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.vs.wixlib", tableDefinitions); + return Intermediate.Load(typeof(VSExtensionData).Assembly, "WixToolset.VisualStudio.vs.wixlib", tupleDefinitions); } } } diff --git a/src/wixext/VSExtensionFactory.cs b/src/wixext/VSExtensionFactory.cs new file mode 100644 index 00000000..650cbe04 --- /dev/null +++ b/src/wixext/VSExtensionFactory.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.VisualStudio +{ + using System; + using System.Collections.Generic; + using WixToolset.Extensibility; + + public class VSExtensionFactory : BaseExtensionFactory + { + protected override IEnumerable ExtensionTypes => new[] + { + typeof(VSCompiler), + typeof(VSExtensionData), + typeof(VSWindowsInstallerBackendExtension), + }; + } +} diff --git a/src/wixext/VSWindowsInstallerBackendExtension.cs b/src/wixext/VSWindowsInstallerBackendExtension.cs new file mode 100644 index 00000000..16ed008a --- /dev/null +++ b/src/wixext/VSWindowsInstallerBackendExtension.cs @@ -0,0 +1,75 @@ +// 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.VisualStudio +{ + using WixToolset.Data.WindowsInstaller; + using WixToolset.Extensibility; + + public class VSWindowsInstallerBackendExtension : BaseWindowsInstallerBackendExtension + { + private static readonly TableDefinition[] Tables = new[] { + new TableDefinition( + "HelpFile", + new[] + { + new ColumnDefinition("HelpFileKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpFile Table (required)."), + new ColumnDefinition("HelpFileName", ColumnType.String, 0, false, false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this HelpFile (required)."), + new ColumnDefinition("LangID", ColumnType.Number, 2, false, true, ColumnCategory.Language, description: "Language ID for content file (optional)."), + new ColumnDefinition("File_HxS", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxS (Title) file (required)."), + new ColumnDefinition("File_HxI", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxI (Index) file (required)."), + new ColumnDefinition("File_HxQ", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxQ (Query) file (required)."), + new ColumnDefinition("File_HxR", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxR (Attributes) file (required)."), + new ColumnDefinition("File_Samples", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for a file that is in the 'root' of the samples directory for this HelpFile (optional)."), + } + ), + new TableDefinition( + "HelpFileToNamespace", + new[] + { + new ColumnDefinition("HelpFile_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpFile", keyColumn: 1, description: "Foreign key into HelpFile table (required)."), + new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), + } + ), + new TableDefinition( + "HelpFilter", + new[] + { + new ColumnDefinition("FilterKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpFilter (required)."), + new ColumnDefinition("Description", ColumnType.Localized, 0, false, false, ColumnCategory.Text, description: "Friendly name for Filter (required)."), + new ColumnDefinition("QueryString", ColumnType.String, 0, false, true, ColumnCategory.Text, description: "Query String for Help Filter (optional)."), + } + ), + new TableDefinition( + "HelpFilterToNamespace", + new[] + { + new ColumnDefinition("HelpFilter_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpFilter", keyColumn: 1, description: "Foreign key into HelpFilter table (required)."), + new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), + } + ), + new TableDefinition( + "HelpNamespace", + new[] + { + new ColumnDefinition("NamespaceKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpNamespace (required)."), + new ColumnDefinition("NamespaceName", ColumnType.String, 0, false, false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this Namespace (required)."), + new ColumnDefinition("File_Collection", ColumnType.String, 72, false, false, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxC (Collection) file (required)."), + new ColumnDefinition("Description", ColumnType.Localized, 0, false, true, ColumnCategory.Text, description: "Friendly name for Namespace (optional)."), + } + ), + new TableDefinition( + "HelpPlugin", + new[] + { + new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table for the child namespace that will be plugged into the parent namespace (required)."), + new ColumnDefinition("HelpNamespace_Parent", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table for the parent namespace into which the child will be inserted (required)."), + new ColumnDefinition("File_HxT", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxT file of child namespace (optional)."), + new ColumnDefinition("File_HxA", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxA (Attributes) file of child namespace (optional)."), + new ColumnDefinition("File_ParentHxT", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxT file of parent namespace that now includes the new child namespace (optional)."), + } + ), + }; + + protected override TableDefinition[] TableDefinitionsForTuples => Tables; + } +} diff --git a/src/wixext/WixToolset.VisualStudio.wixext.csproj b/src/wixext/WixToolset.VisualStudio.wixext.csproj index 0b092662..e0c4a983 100644 --- a/src/wixext/WixToolset.VisualStudio.wixext.csproj +++ b/src/wixext/WixToolset.VisualStudio.wixext.csproj @@ -4,66 +4,29 @@ netstandard2.0 - WixToolset.Extensions + WixToolset.VisualStudio WiX Toolset Visual Studio Extension WiX Toolset VS Extension true build - - NU1701 - - - - - $(RootNamespace).Data.tables.xml - - - - $(RootNamespace).Data.Messages.resources - - - - $(RootNamespace).Xsd.vs.xsd - true - tools - - - - WixToolset.Data.Serialize - WixToolset.Extensions.Serialize.VS - - - - Data\vs.wixlib - - - + + - - - - - - - - false - + - - diff --git a/src/wixext/vs.xsd b/src/wixext/vs.xsd new file mode 100644 index 00000000..51172920 --- /dev/null +++ b/src/wixext/vs.xsd @@ -0,0 +1,292 @@ + + + + + + + + The source code schema for the WiX Toolset Visual Studio Extension. + + + + + + + Help Namespace for a help collection. The parent file is the key for the HxC (Collection) file. + + + + + + + + + + + + + Primary Key for HelpNamespace. + + + Friendly name for Namespace. + + + Internal Microsoft Help ID for this Namespace. + + + Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. + + + + + + + + Filter for Help Namespace. + + + + + + + + + + Primary Key for HelpFilter. + + + Query String for Help Filter. + + + Friendly name for Filter. + + + Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. + + + + + + + + File for Help Namespace. The parent file is the key for HxS (Title) file. + + + + + + + + Primary Key for HelpFile Table. + + + Key for HxR (Attributes) file. + + + Key for HxI (Index) file. + + + Language ID for content file. + + + Internal Microsoft Help ID for this HelpFile. + + + Key for a file that is in the "root" of the samples directory for this HelpFile. + + + Key for HxQ (Query) file. + + + Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. + + + + + + Plugin for Help Namespace. + + + Key for HxA (Attributes) file of child namespace. + + + Key for HxT file of child namespace. + + + + Foriegn Key into HelpNamespace table for the parent namespace into which the child will be inserted. + The following special keys can be used to plug into external namespaces defined outside of the installer. + MS_VSIPCC_v80 : Visual Studio 2005 + MS.VSIPCC.v90 : Visual Studio 2008 + + + + Key for HxT file of parent namespace that now includes the new child namespace. + + + Key for the feature parent of this help collection. Required only when plugging into external namespaces. + + + Suppress linking Visual Studio Help namespaces. Help redistributable merge modules will be required. Use this when building a merge module. + + + + + + Create a reference to a HelpFile element in another Fragment. + + + Primary Key for HelpFile Table. + + + + Extensibility point in the WiX XML Schema. Schema extensions can register additional + attributes at this point in the schema. + + + + + + + Create a reference to a HelpFile element in another Fragment. + + + Primary Key for HelpFilter. + + + + Extensibility point in the WiX XML Schema. Schema extensions can register additional + attributes at this point in the schema. + + + + + + + + Create a reference to a HelpCollection element in another Fragment. + + + + + + + + + + + + Primary Key for HelpNamespace Table. + + + + Extensibility point in the WiX XML Schema. Schema extensions can register additional + attributes at this point in the schema. + + + + + + + + + This element provides the metdata required to install/uninstall a file as + a VSIX Package. The VSIX package file will be installed as part of the MSI + then passed to the VSIX installer to install the VSIX package. To avoid the + duplication, simply use the MSI to install the VSIX package itself. + + + + + + + + + + + Reference to file identifer. This attribute is required when the element is not a + child of a File element and is invalid when the element is a child of the File element. + + + + + + + Identity of the VSIX package per its internal manifest. If this value is not correct + the VSIX package will not correctly uninstall. + + + + + + + Indicates whether the VSIX package is uninstalled when the parent Component is uninstalled. + The default is 'no'. + + + + + + + Specifies the SKU of Visual Studio in which to register the extension. If no target + is specified the extension is registered with all installed SKUs. If the Target + attribute is specified the TargetVersion attribute must also be specified. The + following is a list of known Visual Studio targets: integratedShell, professional, + premium, ultimate, vbExpress, vcExpress, vcsExpress, vwdExpress + + + + + + + Specifies the version of Visual Studio in which to register the extension. This attribute + is required if the Target attribute is specified. + + + + + + + Indicates whether failure to install the VSIX package causes the installation to rollback. + The default is 'yes'. + + + + + + + Optional reference to a Property element that contains the path to the VsixInstaller.exe. + By default, the latest VsixInstaller.exe on the machine will be used to install the VSIX + package. It is highly recommended that this attribute is *not* used. + + + + + + Extensibility point in the WiX XML Schema. Schema extensions can register additional + attributes at this point in the schema. + + + + + + + Values of this type will look like: "x.x.x.x" where x is an integer from 0 to 65534. + + + + + + + + Values of this type will either be "yes" or "no". + + + + + + + diff --git a/src/wixext/xsd/vs.xsd b/src/wixext/xsd/vs.xsd deleted file mode 100644 index 51172920..00000000 --- a/src/wixext/xsd/vs.xsd +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - - The source code schema for the WiX Toolset Visual Studio Extension. - - - - - - - Help Namespace for a help collection. The parent file is the key for the HxC (Collection) file. - - - - - - - - - - - - - Primary Key for HelpNamespace. - - - Friendly name for Namespace. - - - Internal Microsoft Help ID for this Namespace. - - - Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. - - - - - - - - Filter for Help Namespace. - - - - - - - - - - Primary Key for HelpFilter. - - - Query String for Help Filter. - - - Friendly name for Filter. - - - Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. - - - - - - - - File for Help Namespace. The parent file is the key for HxS (Title) file. - - - - - - - - Primary Key for HelpFile Table. - - - Key for HxR (Attributes) file. - - - Key for HxI (Index) file. - - - Language ID for content file. - - - Internal Microsoft Help ID for this HelpFile. - - - Key for a file that is in the "root" of the samples directory for this HelpFile. - - - Key for HxQ (Query) file. - - - Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. - - - - - - Plugin for Help Namespace. - - - Key for HxA (Attributes) file of child namespace. - - - Key for HxT file of child namespace. - - - - Foriegn Key into HelpNamespace table for the parent namespace into which the child will be inserted. - The following special keys can be used to plug into external namespaces defined outside of the installer. - MS_VSIPCC_v80 : Visual Studio 2005 - MS.VSIPCC.v90 : Visual Studio 2008 - - - - Key for HxT file of parent namespace that now includes the new child namespace. - - - Key for the feature parent of this help collection. Required only when plugging into external namespaces. - - - Suppress linking Visual Studio Help namespaces. Help redistributable merge modules will be required. Use this when building a merge module. - - - - - - Create a reference to a HelpFile element in another Fragment. - - - Primary Key for HelpFile Table. - - - - Extensibility point in the WiX XML Schema. Schema extensions can register additional - attributes at this point in the schema. - - - - - - - Create a reference to a HelpFile element in another Fragment. - - - Primary Key for HelpFilter. - - - - Extensibility point in the WiX XML Schema. Schema extensions can register additional - attributes at this point in the schema. - - - - - - - - Create a reference to a HelpCollection element in another Fragment. - - - - - - - - - - - - Primary Key for HelpNamespace Table. - - - - Extensibility point in the WiX XML Schema. Schema extensions can register additional - attributes at this point in the schema. - - - - - - - - - This element provides the metdata required to install/uninstall a file as - a VSIX Package. The VSIX package file will be installed as part of the MSI - then passed to the VSIX installer to install the VSIX package. To avoid the - duplication, simply use the MSI to install the VSIX package itself. - - - - - - - - - - - Reference to file identifer. This attribute is required when the element is not a - child of a File element and is invalid when the element is a child of the File element. - - - - - - - Identity of the VSIX package per its internal manifest. If this value is not correct - the VSIX package will not correctly uninstall. - - - - - - - Indicates whether the VSIX package is uninstalled when the parent Component is uninstalled. - The default is 'no'. - - - - - - - Specifies the SKU of Visual Studio in which to register the extension. If no target - is specified the extension is registered with all installed SKUs. If the Target - attribute is specified the TargetVersion attribute must also be specified. The - following is a list of known Visual Studio targets: integratedShell, professional, - premium, ultimate, vbExpress, vcExpress, vcsExpress, vwdExpress - - - - - - - Specifies the version of Visual Studio in which to register the extension. This attribute - is required if the Target attribute is specified. - - - - - - - Indicates whether failure to install the VSIX package causes the installation to rollback. - The default is 'yes'. - - - - - - - Optional reference to a Property element that contains the path to the VsixInstaller.exe. - By default, the latest VsixInstaller.exe on the machine will be used to install the VSIX - package. It is highly recommended that this attribute is *not* used. - - - - - - Extensibility point in the WiX XML Schema. Schema extensions can register additional - attributes at this point in the schema. - - - - - - - Values of this type will look like: "x.x.x.x" where x is an integer from 0 to 65534. - - - - - - - - Values of this type will either be "yes" or "no". - - - - - - - diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index 7120dc24..09c3a290 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/src/wixlib/vs.wixproj b/src/wixlib/vs.wixproj index 15dd5092..c5613bb4 100644 --- a/src/wixlib/vs.wixproj +++ b/src/wixlib/vs.wixproj @@ -1,10 +1,8 @@ - - + - {14345C9D-8AF8-435A-BB1B-E067CE7EB321} vs @@ -13,7 +11,6 @@ true en-us - @@ -31,35 +28,30 @@ - - - vsca {45308b85-0628-4978-8fc8-6ad9e1ad5949} - - 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}. - - + + - - + + \ No newline at end of file -- cgit v1.2.3-55-g6feb