diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-12-29 04:55:28 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-12-29 04:56:13 -0800 |
| commit | cba9d16b54cd4ba5b8750ee97ed5aa36cf1fc382 (patch) | |
| tree | 682423fc77e7f80cf727a91e9e6f3be7118be503 /src/wixext/VSCompiler.cs | |
| parent | e2d15ce225cbd9cd3e815cb9999f8896f8c610bf (diff) | |
| download | wix-cba9d16b54cd4ba5b8750ee97ed5aa36cf1fc382.tar.gz wix-cba9d16b54cd4ba5b8750ee97ed5aa36cf1fc382.tar.bz2 wix-cba9d16b54cd4ba5b8750ee97ed5aa36cf1fc382.zip | |
Update to latest changes from Core and send build notifications to Slack
Diffstat (limited to 'src/wixext/VSCompiler.cs')
| -rw-r--r-- | src/wixext/VSCompiler.cs | 469 |
1 files changed, 204 insertions, 265 deletions
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 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 2 | 2 | ||
| 3 | namespace WixToolset.Extensions | 3 | namespace WixToolset.VisualStudio |
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| @@ -11,7 +11,7 @@ namespace WixToolset.Extensions | |||
| 11 | /// <summary> | 11 | /// <summary> |
| 12 | /// The compiler for the WiX Toolset Visual Studio Extension. | 12 | /// The compiler for the WiX Toolset Visual Studio Extension. |
| 13 | /// </summary> | 13 | /// </summary> |
| 14 | public sealed class VSCompiler : CompilerExtension | 14 | public sealed class VSCompiler : BaseCompilerExtension |
| 15 | { | 15 | { |
| 16 | internal const int MsidbCustomActionTypeExe = 0x00000002; // Target = command line args | 16 | internal const int MsidbCustomActionTypeExe = 0x00000002; // Target = command line args |
| 17 | internal const int MsidbCustomActionTypeProperty = 0x00000030; // Source = full path to executable | 17 | internal const int MsidbCustomActionTypeProperty = 0x00000030; // Source = full path to executable |
| @@ -20,22 +20,9 @@ namespace WixToolset.Extensions | |||
| 20 | internal const int MsidbCustomActionTypeInScript = 0x00000400; // queue for execution within script | 20 | internal const int MsidbCustomActionTypeInScript = 0x00000400; // queue for execution within script |
| 21 | internal const int MsidbCustomActionTypeNoImpersonate = 0x00000800; // queue for not impersonating | 21 | internal const int MsidbCustomActionTypeNoImpersonate = 0x00000800; // queue for not impersonating |
| 22 | 22 | ||
| 23 | /// <summary> | 23 | public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/vs"; |
| 24 | /// Instantiate a new HelpCompiler. | ||
| 25 | /// </summary> | ||
| 26 | public VSCompiler() | ||
| 27 | { | ||
| 28 | this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/vs"; | ||
| 29 | } | ||
| 30 | 24 | ||
| 31 | /// <summary> | 25 | public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) |
| 32 | /// Processes an element for the Compiler. | ||
| 33 | /// </summary> | ||
| 34 | /// <param name="sourceLineNumbers">Source line number for the parent element.</param> | ||
| 35 | /// <param name="parentElement">Parent element of element to process.</param> | ||
| 36 | /// <param name="element">Element to process.</param> | ||
| 37 | /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param> | ||
| 38 | public override void ParseElement(XElement parentElement, XElement element, IDictionary<string, string> context) | ||
| 39 | { | 26 | { |
| 40 | switch (parentElement.Name.LocalName) | 27 | switch (parentElement.Name.LocalName) |
| 41 | { | 28 | { |
| @@ -43,10 +30,10 @@ namespace WixToolset.Extensions | |||
| 43 | switch (element.Name.LocalName) | 30 | switch (element.Name.LocalName) |
| 44 | { | 31 | { |
| 45 | case "VsixPackage": | 32 | case "VsixPackage": |
| 46 | this.ParseVsixPackageElement(element, context["ComponentId"], null); | 33 | this.ParseVsixPackageElement(intermediate, section, element, context["ComponentId"], null); |
| 47 | break; | 34 | break; |
| 48 | default: | 35 | default: |
| 49 | this.Core.UnexpectedElement(parentElement, element); | 36 | this.ParseHelper.UnexpectedElement(parentElement, element); |
| 50 | break; | 37 | break; |
| 51 | } | 38 | } |
| 52 | break; | 39 | break; |
| @@ -54,16 +41,16 @@ namespace WixToolset.Extensions | |||
| 54 | switch (element.Name.LocalName) | 41 | switch (element.Name.LocalName) |
| 55 | { | 42 | { |
| 56 | case "HelpCollection": | 43 | case "HelpCollection": |
| 57 | this.ParseHelpCollectionElement(element, context["FileId"]); | 44 | this.ParseHelpCollectionElement(intermediate, section, element, context["FileId"]); |
| 58 | break; | 45 | break; |
| 59 | case "HelpFile": | 46 | case "HelpFile": |
| 60 | this.ParseHelpFileElement(element, context["FileId"]); | 47 | this.ParseHelpFileElement(intermediate, section, element, context["FileId"]); |
| 61 | break; | 48 | break; |
| 62 | case "VsixPackage": | 49 | case "VsixPackage": |
| 63 | this.ParseVsixPackageElement(element, context["ComponentId"], context["FileId"]); | 50 | this.ParseVsixPackageElement(intermediate, section, element, context["ComponentId"], context["FileId"]); |
| 64 | break; | 51 | break; |
| 65 | default: | 52 | default: |
| 66 | this.Core.UnexpectedElement(parentElement, element); | 53 | this.ParseHelper.UnexpectedElement(parentElement, element); |
| 67 | break; | 54 | break; |
| 68 | } | 55 | } |
| 69 | break; | 56 | break; |
| @@ -73,186 +60,171 @@ namespace WixToolset.Extensions | |||
| 73 | switch (element.Name.LocalName) | 60 | switch (element.Name.LocalName) |
| 74 | { | 61 | { |
| 75 | case "HelpCollectionRef": | 62 | case "HelpCollectionRef": |
| 76 | this.ParseHelpCollectionRefElement(element); | 63 | this.ParseHelpCollectionRefElement(intermediate, section, element); |
| 77 | break; | 64 | break; |
| 78 | case "HelpFilter": | 65 | case "HelpFilter": |
| 79 | this.ParseHelpFilterElement(element); | 66 | this.ParseHelpFilterElement(intermediate, section, element); |
| 80 | break; | 67 | break; |
| 81 | default: | 68 | default: |
| 82 | this.Core.UnexpectedElement(parentElement, element); | 69 | this.ParseHelper.UnexpectedElement(parentElement, element); |
| 83 | break; | 70 | break; |
| 84 | } | 71 | } |
| 85 | break; | 72 | break; |
| 86 | default: | 73 | default: |
| 87 | this.Core.UnexpectedElement(parentElement, element); | 74 | this.ParseHelper.UnexpectedElement(parentElement, element); |
| 88 | break; | 75 | break; |
| 89 | } | 76 | } |
| 90 | } | 77 | } |
| 91 | 78 | ||
| 92 | /// <summary> | 79 | private void ParseHelpCollectionRefElement(Intermediate intermediate, IntermediateSection section, XElement element) |
| 93 | /// Parses a HelpCollectionRef element. | ||
| 94 | /// </summary> | ||
| 95 | /// <param name="node">Element to process.</param> | ||
| 96 | private void ParseHelpCollectionRefElement(XElement node) | ||
| 97 | { | 80 | { |
| 98 | SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 81 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 99 | string id = null; | 82 | Identifier id = null; |
| 100 | 83 | ||
| 101 | foreach (XAttribute attrib in node.Attributes()) | 84 | foreach (XAttribute attrib in element.Attributes()) |
| 102 | { | 85 | { |
| 103 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 86 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 104 | { | 87 | { |
| 105 | switch (attrib.Name.LocalName) | 88 | switch (attrib.Name.LocalName) |
| 106 | { | 89 | { |
| 107 | case "Id": | 90 | case "Id": |
| 108 | id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 91 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); |
| 109 | this.Core.CreateSimpleReference(sourceLineNumbers, "HelpNamespace", id); | 92 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpNamespace", id.Id); |
| 110 | break; | 93 | break; |
| 111 | default: | 94 | default: |
| 112 | this.Core.UnexpectedAttribute(node, attrib); | 95 | this.ParseHelper.UnexpectedAttribute(element, attrib); |
| 113 | break; | 96 | break; |
| 114 | } | 97 | } |
| 115 | } | 98 | } |
| 116 | else | 99 | else |
| 117 | { | 100 | { |
| 118 | this.Core.ParseExtensionAttribute(node, attrib); | 101 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); |
| 119 | } | 102 | } |
| 120 | } | 103 | } |
| 121 | 104 | ||
| 122 | if (null == id) | 105 | if (null == id) |
| 123 | { | 106 | { |
| 124 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); | 107 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); |
| 125 | } | 108 | } |
| 126 | 109 | ||
| 127 | foreach (XElement child in node.Elements()) | 110 | foreach (XElement child in element.Elements()) |
| 128 | { | 111 | { |
| 129 | if (this.Namespace == child.Name.Namespace) | 112 | if (this.Namespace == child.Name.Namespace) |
| 130 | { | 113 | { |
| 131 | SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); | 114 | SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child); |
| 132 | switch (child.Name.LocalName) | 115 | switch (child.Name.LocalName) |
| 133 | { | 116 | { |
| 134 | case "HelpFileRef": | 117 | case "HelpFileRef": |
| 135 | this.ParseHelpFileRefElement(child, id); | 118 | this.ParseHelpFileRefElement(intermediate, section, child, id); |
| 136 | break; | 119 | break; |
| 137 | default: | 120 | default: |
| 138 | this.Core.UnexpectedElement(node, child); | 121 | this.ParseHelper.UnexpectedElement(element, child); |
| 139 | break; | 122 | break; |
| 140 | } | 123 | } |
| 141 | } | 124 | } |
| 142 | else | 125 | else |
| 143 | { | 126 | { |
| 144 | this.Core.ParseExtensionElement(node, child); | 127 | this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child); |
| 145 | } | 128 | } |
| 146 | } | 129 | } |
| 147 | } | 130 | } |
| 148 | 131 | ||
| 149 | /// <summary> | 132 | private void ParseHelpCollectionElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) |
| 150 | /// Parses a HelpCollection element. | ||
| 151 | /// </summary> | ||
| 152 | /// <param name="node">Element to process.</param> | ||
| 153 | /// <param name="fileId">Identifier of the parent File element.</param> | ||
| 154 | private void ParseHelpCollectionElement(XElement node, string fileId) | ||
| 155 | { | 133 | { |
| 156 | SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 134 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 157 | string id = null; | 135 | Identifier id = null; |
| 158 | string description = null; | 136 | string description = null; |
| 159 | string name = null; | 137 | string name = null; |
| 160 | YesNoType suppressCAs = YesNoType.No; | 138 | YesNoType suppressCAs = YesNoType.No; |
| 161 | 139 | ||
| 162 | foreach (XAttribute attrib in node.Attributes()) | 140 | foreach (XAttribute attrib in element.Attributes()) |
| 163 | { | 141 | { |
| 164 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 142 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 165 | { | 143 | { |
| 166 | switch (attrib.Name.LocalName) | 144 | switch (attrib.Name.LocalName) |
| 167 | { | 145 | { |
| 168 | case "Id": | 146 | case "Id": |
| 169 | id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 147 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); |
| 170 | break; | 148 | break; |
| 171 | case "Description": | 149 | case "Description": |
| 172 | description = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 150 | description = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
| 173 | break; | 151 | break; |
| 174 | case "Name": | 152 | case "Name": |
| 175 | name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 153 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
| 176 | break; | 154 | break; |
| 177 | case "SuppressCustomActions": | 155 | case "SuppressCustomActions": |
| 178 | suppressCAs = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); | 156 | suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); |
| 179 | break; | 157 | break; |
| 180 | default: | 158 | default: |
| 181 | this.Core.UnexpectedAttribute(node, attrib); | 159 | this.ParseHelper.UnexpectedAttribute(element, attrib); |
| 182 | break; | 160 | break; |
| 183 | } | 161 | } |
| 184 | } | 162 | } |
| 185 | else | 163 | else |
| 186 | { | 164 | { |
| 187 | this.Core.ParseExtensionAttribute(node, attrib); | 165 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); |
| 188 | } | 166 | } |
| 189 | } | 167 | } |
| 190 | 168 | ||
| 191 | if (null == id) | 169 | if (null == id) |
| 192 | { | 170 | { |
| 193 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); | 171 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); |
| 194 | } | 172 | } |
| 195 | 173 | ||
| 196 | if (null == description) | 174 | if (null == description) |
| 197 | { | 175 | { |
| 198 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Description")); | 176 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Description")); |
| 199 | } | 177 | } |
| 200 | 178 | ||
| 201 | if (null == name) | 179 | if (null == name) |
| 202 | { | 180 | { |
| 203 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); | 181 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); |
| 204 | } | 182 | } |
| 205 | 183 | ||
| 206 | foreach (XElement child in node.Elements()) | 184 | foreach (XElement child in element.Elements()) |
| 207 | { | 185 | { |
| 208 | if (this.Namespace == child.Name.Namespace) | 186 | if (this.Namespace == child.Name.Namespace) |
| 209 | { | 187 | { |
| 210 | switch (child.Name.LocalName) | 188 | switch (child.Name.LocalName) |
| 211 | { | 189 | { |
| 212 | case "HelpFileRef": | 190 | case "HelpFileRef": |
| 213 | this.ParseHelpFileRefElement(child, id); | 191 | this.ParseHelpFileRefElement(intermediate, section, child, id); |
| 214 | break; | 192 | break; |
| 215 | case "HelpFilterRef": | 193 | case "HelpFilterRef": |
| 216 | this.ParseHelpFilterRefElement(child, id); | 194 | this.ParseHelpFilterRefElement(intermediate, section, child, id); |
| 217 | break; | 195 | break; |
| 218 | case "PlugCollectionInto": | 196 | case "PlugCollectionInto": |
| 219 | this.ParsePlugCollectionIntoElement(child, id); | 197 | this.ParsePlugCollectionIntoElement(intermediate, section, child, id); |
| 220 | break; | 198 | break; |
| 221 | default: | 199 | default: |
| 222 | this.Core.UnexpectedElement(node, child); | 200 | this.ParseHelper.UnexpectedElement(element, child); |
| 223 | break; | 201 | break; |
| 224 | } | 202 | } |
| 225 | } | 203 | } |
| 226 | else | 204 | else |
| 227 | { | 205 | { |
| 228 | this.Core.ParseExtensionElement(node, child); | 206 | this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child); |
| 229 | } | 207 | } |
| 230 | } | 208 | } |
| 231 | 209 | ||
| 232 | if (!this.Core.EncounteredError) | 210 | if (!this.Messaging.EncounteredError) |
| 233 | { | 211 | { |
| 234 | Row row = this.Core.CreateRow(sourceLineNumbers, "HelpNamespace"); | 212 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpNamespace", id); |
| 235 | row[0] = id; | 213 | row.Set(1, name); |
| 236 | row[1] = name; | 214 | row.Set(2, fileId); |
| 237 | row[2] = fileId; | 215 | row.Set(3, description); |
| 238 | row[3] = description; | ||
| 239 | 216 | ||
| 240 | if (YesNoType.No == suppressCAs) | 217 | if (YesNoType.No == suppressCAs) |
| 241 | { | 218 | { |
| 242 | this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); | 219 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); |
| 243 | } | 220 | } |
| 244 | } | 221 | } |
| 245 | } | 222 | } |
| 246 | 223 | ||
| 247 | /// <summary> | 224 | private void ParseHelpFileElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) |
| 248 | /// Parses a HelpFile element. | ||
| 249 | /// </summary> | ||
| 250 | /// <param name="node">Element to process.</param> | ||
| 251 | /// <param name="fileId">Identifier of the parent file element.</param> | ||
| 252 | private void ParseHelpFileElement(XElement node, string fileId) | ||
| 253 | { | 225 | { |
| 254 | SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 226 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 255 | string id = null; | 227 | Identifier id = null; |
| 256 | string name = null; | 228 | string name = null; |
| 257 | int language = CompilerConstants.IntegerNotSet; | 229 | int language = CompilerConstants.IntegerNotSet; |
| 258 | string hxi = null; | 230 | string hxi = null; |
| @@ -261,255 +233,232 @@ namespace WixToolset.Extensions | |||
| 261 | string samples = null; | 233 | string samples = null; |
| 262 | YesNoType suppressCAs = YesNoType.No; | 234 | YesNoType suppressCAs = YesNoType.No; |
| 263 | 235 | ||
| 264 | foreach (XAttribute attrib in node.Attributes()) | 236 | foreach (XAttribute attrib in element.Attributes()) |
| 265 | { | 237 | { |
| 266 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 238 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 267 | { | 239 | { |
| 268 | switch (attrib.Name.LocalName) | 240 | switch (attrib.Name.LocalName) |
| 269 | { | 241 | { |
| 270 | case "Id": | 242 | case "Id": |
| 271 | id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 243 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); |
| 272 | break; | 244 | break; |
| 273 | case "AttributeIndex": | 245 | case "AttributeIndex": |
| 274 | hxr = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 246 | hxr = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
| 275 | this.Core.CreateSimpleReference(sourceLineNumbers, "File", hxr); | 247 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxr); |
| 276 | break; | 248 | break; |
| 277 | case "Index": | 249 | case "Index": |
| 278 | hxi = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 250 | hxi = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
| 279 | this.Core.CreateSimpleReference(sourceLineNumbers, "File", hxi); | 251 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxi); |
| 280 | break; | 252 | break; |
| 281 | case "Language": | 253 | case "Language": |
| 282 | language = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); | 254 | language = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); |
| 283 | break; | 255 | break; |
| 284 | case "Name": | 256 | case "Name": |
| 285 | name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 257 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
| 286 | break; | 258 | break; |
| 287 | case "SampleLocation": | 259 | case "SampleLocation": |
| 288 | samples = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 260 | samples = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
| 289 | this.Core.CreateSimpleReference(sourceLineNumbers, "File", samples); | 261 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", samples); |
| 290 | break; | 262 | break; |
| 291 | case "Search": | 263 | case "Search": |
| 292 | hxq = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 264 | hxq = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
| 293 | this.Core.CreateSimpleReference(sourceLineNumbers, "File", hxq); | 265 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxq); |
| 294 | break; | 266 | break; |
| 295 | case "SuppressCustomActions": | 267 | case "SuppressCustomActions": |
| 296 | suppressCAs = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); | 268 | suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); |
| 297 | break; | 269 | break; |
| 298 | default: | 270 | default: |
| 299 | this.Core.UnexpectedAttribute(node, attrib); | 271 | this.ParseHelper.UnexpectedAttribute(element, attrib); |
| 300 | break; | 272 | break; |
| 301 | } | 273 | } |
| 302 | } | 274 | } |
| 303 | else | 275 | else |
| 304 | { | 276 | { |
| 305 | this.Core.ParseExtensionAttribute(node, attrib); | 277 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); |
| 306 | } | 278 | } |
| 307 | } | 279 | } |
| 308 | 280 | ||
| 309 | if (null == id) | 281 | if (null == id) |
| 310 | { | 282 | { |
| 311 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); | 283 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); |
| 312 | } | 284 | } |
| 313 | 285 | ||
| 314 | if (null == name) | 286 | if (null == name) |
| 315 | { | 287 | { |
| 316 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); | 288 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); |
| 317 | } | 289 | } |
| 318 | 290 | ||
| 319 | //uninstall will always fail silently, leaving file registered, if Language is not set | 291 | // Uninstall will always fail silently, leaving file registered, if Language is not set |
| 320 | if (CompilerConstants.IntegerNotSet == language) | 292 | if (CompilerConstants.IntegerNotSet == language) |
| 321 | { | 293 | { |
| 322 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Language")); | 294 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Language")); |
| 323 | } | 295 | } |
| 324 | 296 | ||
| 325 | this.Core.ParseForExtensionElements(node); | 297 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); |
| 326 | 298 | ||
| 327 | if (!this.Core.EncounteredError) | 299 | if (!this.Messaging.EncounteredError) |
| 328 | { | 300 | { |
| 329 | Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFile"); | 301 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFile", id); |
| 330 | row[0] = id; | 302 | row.Set(1, name); |
| 331 | row[1] = name; | 303 | row.Set(2, language); |
| 332 | row[2] = language; | 304 | row.Set(3, fileId); |
| 333 | row[3] = fileId; | 305 | row.Set(4, hxi); |
| 334 | row[4] = hxi; | 306 | row.Set(5, hxq); |
| 335 | row[5] = hxq; | 307 | row.Set(6, hxr); |
| 336 | row[6] = hxr; | 308 | row.Set(7, samples); |
| 337 | row[7] = samples; | ||
| 338 | 309 | ||
| 339 | if (YesNoType.No == suppressCAs) | 310 | if (YesNoType.No == suppressCAs) |
| 340 | { | 311 | { |
| 341 | this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); | 312 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); |
| 342 | } | 313 | } |
| 343 | } | 314 | } |
| 344 | } | 315 | } |
| 345 | 316 | ||
| 346 | /// <summary> | 317 | private void ParseHelpFileRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) |
| 347 | /// Parses a HelpFileRef element. | ||
| 348 | /// </summary> | ||
| 349 | /// <param name="node">Element to process.</param> | ||
| 350 | /// <param name="collectionId">Identifier of the parent help collection.</param> | ||
| 351 | private void ParseHelpFileRefElement(XElement node, string collectionId) | ||
| 352 | { | 318 | { |
| 353 | SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 319 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 354 | string id = null; | 320 | Identifier id = null; |
| 355 | 321 | ||
| 356 | foreach (XAttribute attrib in node.Attributes()) | 322 | foreach (XAttribute attrib in element.Attributes()) |
| 357 | { | 323 | { |
| 358 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 324 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 359 | { | 325 | { |
| 360 | switch (attrib.Name.LocalName) | 326 | switch (attrib.Name.LocalName) |
| 361 | { | 327 | { |
| 362 | case "Id": | 328 | case "Id": |
| 363 | id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 329 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); |
| 364 | this.Core.CreateSimpleReference(sourceLineNumbers, "HelpFile", id); | 330 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpFile", id.Id); |
| 365 | break; | 331 | break; |
| 366 | default: | 332 | default: |
| 367 | this.Core.UnexpectedAttribute(node, attrib); | 333 | this.ParseHelper.UnexpectedAttribute(element, attrib); |
| 368 | break; | 334 | break; |
| 369 | } | 335 | } |
| 370 | } | 336 | } |
| 371 | else | 337 | else |
| 372 | { | 338 | { |
| 373 | this.Core.ParseExtensionAttribute(node, attrib); | 339 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); |
| 374 | } | 340 | } |
| 375 | } | 341 | } |
| 376 | 342 | ||
| 377 | if (null == id) | 343 | if (null == id) |
| 378 | { | 344 | { |
| 379 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); | 345 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); |
| 380 | } | 346 | } |
| 381 | 347 | ||
| 382 | this.Core.ParseForExtensionElements(node); | 348 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); |
| 383 | 349 | ||
| 384 | if (!this.Core.EncounteredError) | 350 | if (!this.Messaging.EncounteredError) |
| 385 | { | 351 | { |
| 386 | Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFileToNamespace"); | 352 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFileToNamespace", id); |
| 387 | row[0] = id; | 353 | row.Set(1, collectionId); |
| 388 | row[1] = collectionId; | ||
| 389 | } | 354 | } |
| 390 | } | 355 | } |
| 391 | 356 | ||
| 392 | /// <summary> | 357 | private void ParseHelpFilterElement(Intermediate intermediate, IntermediateSection section, XElement element) |
| 393 | /// Parses a HelpFilter element. | ||
| 394 | /// </summary> | ||
| 395 | /// <param name="node">Element to process.</param> | ||
| 396 | private void ParseHelpFilterElement(XElement node) | ||
| 397 | { | 358 | { |
| 398 | SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 359 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 399 | string id = null; | 360 | Identifier id = null; |
| 400 | string filterDefinition = null; | 361 | string filterDefinition = null; |
| 401 | string name = null; | 362 | string name = null; |
| 402 | YesNoType suppressCAs = YesNoType.No; | 363 | YesNoType suppressCAs = YesNoType.No; |
| 403 | 364 | ||
| 404 | foreach (XAttribute attrib in node.Attributes()) | 365 | foreach (XAttribute attrib in element.Attributes()) |
| 405 | { | 366 | { |
| 406 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 367 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 407 | { | 368 | { |
| 408 | switch (attrib.Name.LocalName) | 369 | switch (attrib.Name.LocalName) |
| 409 | { | 370 | { |
| 410 | case "Id": | 371 | case "Id": |
| 411 | id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 372 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); |
| 412 | break; | 373 | break; |
| 413 | case "FilterDefinition": | 374 | case "FilterDefinition": |
| 414 | filterDefinition = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 375 | filterDefinition = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
| 415 | break; | 376 | break; |
| 416 | case "Name": | 377 | case "Name": |
| 417 | name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 378 | name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
| 418 | break; | 379 | break; |
| 419 | case "SuppressCustomActions": | 380 | case "SuppressCustomActions": |
| 420 | suppressCAs = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); | 381 | suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); |
| 421 | break; | 382 | break; |
| 422 | default: | 383 | default: |
| 423 | this.Core.UnexpectedAttribute(node, attrib); | 384 | this.ParseHelper.UnexpectedAttribute(element, attrib); |
| 424 | break; | 385 | break; |
| 425 | } | 386 | } |
| 426 | } | 387 | } |
| 427 | else | 388 | else |
| 428 | { | 389 | { |
| 429 | this.Core.ParseExtensionAttribute(node, attrib); | 390 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); |
| 430 | } | 391 | } |
| 431 | } | 392 | } |
| 432 | 393 | ||
| 433 | if (null == id) | 394 | if (null == id) |
| 434 | { | 395 | { |
| 435 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); | 396 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); |
| 436 | } | 397 | } |
| 437 | 398 | ||
| 438 | if (null == name) | 399 | if (null == name) |
| 439 | { | 400 | { |
| 440 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); | 401 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); |
| 441 | } | 402 | } |
| 442 | 403 | ||
| 443 | this.Core.ParseForExtensionElements(node); | 404 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); |
| 444 | 405 | ||
| 445 | if (!this.Core.EncounteredError) | 406 | if (!this.Messaging.EncounteredError) |
| 446 | { | 407 | { |
| 447 | Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFilter"); | 408 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFilter", id); |
| 448 | row[0] = id; | 409 | row.Set(1, name); |
| 449 | row[1] = name; | 410 | row.Set(2, filterDefinition); |
| 450 | row[2] = filterDefinition; | ||
| 451 | 411 | ||
| 452 | if (YesNoType.No == suppressCAs) | 412 | if (YesNoType.No == suppressCAs) |
| 453 | { | 413 | { |
| 454 | this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); | 414 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); |
| 455 | } | 415 | } |
| 456 | } | 416 | } |
| 457 | } | 417 | } |
| 458 | 418 | ||
| 459 | /// <summary> | 419 | private void ParseHelpFilterRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) |
| 460 | /// Parses a HelpFilterRef element. | ||
| 461 | /// </summary> | ||
| 462 | /// <param name="node">Element to process.</param> | ||
| 463 | /// <param name="collectionId">Identifier of the parent help collection.</param> | ||
| 464 | private void ParseHelpFilterRefElement(XElement node, string collectionId) | ||
| 465 | { | 420 | { |
| 466 | SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 421 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 467 | string id = null; | 422 | Identifier id = null; |
| 468 | 423 | ||
| 469 | foreach (XAttribute attrib in node.Attributes()) | 424 | foreach (XAttribute attrib in element.Attributes()) |
| 470 | { | 425 | { |
| 471 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 426 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 472 | { | 427 | { |
| 473 | switch (attrib.Name.LocalName) | 428 | switch (attrib.Name.LocalName) |
| 474 | { | 429 | { |
| 475 | case "Id": | 430 | case "Id": |
| 476 | id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 431 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); |
| 477 | this.Core.CreateSimpleReference(sourceLineNumbers, "HelpFilter", id); | 432 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpFilter", id.Id); |
| 478 | break; | 433 | break; |
| 479 | default: | 434 | default: |
| 480 | this.Core.UnexpectedAttribute(node, attrib); | 435 | this.ParseHelper.UnexpectedAttribute(element, attrib); |
| 481 | break; | 436 | break; |
| 482 | } | 437 | } |
| 483 | } | 438 | } |
| 484 | else | 439 | else |
| 485 | { | 440 | { |
| 486 | this.Core.ParseExtensionAttribute(node, attrib); | 441 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); |
| 487 | } | 442 | } |
| 488 | } | 443 | } |
| 489 | 444 | ||
| 490 | if (null == id) | 445 | if (null == id) |
| 491 | { | 446 | { |
| 492 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); | 447 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); |
| 493 | } | 448 | } |
| 494 | 449 | ||
| 495 | this.Core.ParseForExtensionElements(node); | 450 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); |
| 496 | 451 | ||
| 497 | if (!this.Core.EncounteredError) | 452 | if (!this.Messaging.EncounteredError) |
| 498 | { | 453 | { |
| 499 | Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFilterToNamespace"); | 454 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFilterToNamespace", id); |
| 500 | row[0] = id; | 455 | row.Set(1, collectionId.Id); |
| 501 | row[1] = collectionId; | ||
| 502 | } | 456 | } |
| 503 | } | 457 | } |
| 504 | 458 | ||
| 505 | /// <summary> | 459 | private void ParsePlugCollectionIntoElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier parentId) |
| 506 | /// Parses a PlugCollectionInto element. | ||
| 507 | /// </summary> | ||
| 508 | /// <param name="node">Element to process.</param> | ||
| 509 | /// <param name="parentId">Identifier of the parent help collection.</param> | ||
| 510 | private void ParsePlugCollectionIntoElement(XElement node, string parentId) | ||
| 511 | { | 460 | { |
| 512 | SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 461 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 513 | string hxa = null; | 462 | string hxa = null; |
| 514 | string hxt = null; | 463 | string hxt = null; |
| 515 | string hxtParent = null; | 464 | string hxtParent = null; |
| @@ -519,38 +468,38 @@ namespace WixToolset.Extensions | |||
| 519 | bool pluginVS05 = false; | 468 | bool pluginVS05 = false; |
| 520 | bool pluginVS08 = false; | 469 | bool pluginVS08 = false; |
| 521 | 470 | ||
| 522 | foreach (XAttribute attrib in node.Attributes()) | 471 | foreach (XAttribute attrib in element.Attributes()) |
| 523 | { | 472 | { |
| 524 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 473 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 525 | { | 474 | { |
| 526 | switch (attrib.Name.LocalName) | 475 | switch (attrib.Name.LocalName) |
| 527 | { | 476 | { |
| 528 | case "Attributes": | 477 | case "Attributes": |
| 529 | hxa = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 478 | hxa = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
| 530 | break; | 479 | break; |
| 531 | case "TableOfContents": | 480 | case "TableOfContents": |
| 532 | hxt = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 481 | hxt = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
| 533 | break; | 482 | break; |
| 534 | case "TargetCollection": | 483 | case "TargetCollection": |
| 535 | namespaceParent = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 484 | namespaceParent = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
| 536 | break; | 485 | break; |
| 537 | case "TargetTableOfContents": | 486 | case "TargetTableOfContents": |
| 538 | hxtParent = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 487 | hxtParent = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
| 539 | break; | 488 | break; |
| 540 | case "TargetFeature": | 489 | case "TargetFeature": |
| 541 | feature = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 490 | feature = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
| 542 | break; | 491 | break; |
| 543 | case "SuppressExternalNamespaces": | 492 | case "SuppressExternalNamespaces": |
| 544 | suppressExternalNamespaces = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); | 493 | suppressExternalNamespaces = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); |
| 545 | break; | 494 | break; |
| 546 | default: | 495 | default: |
| 547 | this.Core.UnexpectedAttribute(node, attrib); | 496 | this.ParseHelper.UnexpectedAttribute(element, attrib); |
| 548 | break; | 497 | break; |
| 549 | } | 498 | } |
| 550 | } | 499 | } |
| 551 | else | 500 | else |
| 552 | { | 501 | { |
| 553 | this.Core.ParseExtensionAttribute(node, attrib); | 502 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); |
| 554 | } | 503 | } |
| 555 | } | 504 | } |
| 556 | 505 | ||
| @@ -559,35 +508,33 @@ namespace WixToolset.Extensions | |||
| 559 | 508 | ||
| 560 | if (null == namespaceParent) | 509 | if (null == namespaceParent) |
| 561 | { | 510 | { |
| 562 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetCollection")); | 511 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetCollection")); |
| 563 | } | 512 | } |
| 564 | 513 | ||
| 565 | if (null == feature && (pluginVS05 || pluginVS08) && YesNoType.No == suppressExternalNamespaces) | 514 | if (null == feature && (pluginVS05 || pluginVS08) && YesNoType.No == suppressExternalNamespaces) |
| 566 | { | 515 | { |
| 567 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFeature")); | 516 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetFeature")); |
| 568 | } | 517 | } |
| 569 | 518 | ||
| 570 | this.Core.ParseForExtensionElements(node); | 519 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); |
| 571 | 520 | ||
| 572 | if (!this.Core.EncounteredError) | 521 | if (!this.Messaging.EncounteredError) |
| 573 | { | 522 | { |
| 574 | Row row = this.Core.CreateRow(sourceLineNumbers, "HelpPlugin"); | 523 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpPlugin", parentId); |
| 575 | row[0] = parentId; | 524 | row.Set(1, namespaceParent); |
| 576 | row[1] = namespaceParent; | 525 | row.Set(2, hxt); |
| 577 | row[2] = hxt; | 526 | row.Set(3, hxa); |
| 578 | row[3] = hxa; | 527 | row.Set(4, hxtParent); |
| 579 | row[4] = hxtParent; | ||
| 580 | 528 | ||
| 581 | if (pluginVS05) | 529 | if (pluginVS05) |
| 582 | { | 530 | { |
| 583 | if (YesNoType.No == suppressExternalNamespaces) | 531 | if (YesNoType.No == suppressExternalNamespaces) |
| 584 | { | 532 | { |
| 585 | // Bring in the help 2 base namespace components for VS 2005 | 533 | // Bring in the help 2 base namespace components for VS 2005 |
| 586 | this.Core.CreateComplexReference(sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, | 534 | this.ParseHelper.CreateComplexReference(section, sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, |
| 587 | ComplexReferenceChildType.ComponentGroup, "Help2_VS2005_Namespace_Components", false); | 535 | ComplexReferenceChildType.ComponentGroup, "Help2_VS2005_Namespace_Components", false); |
| 588 | // Reference CustomAction since nothing will happen without it | 536 | // Reference CustomAction since nothing will happen without it |
| 589 | this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", | 537 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_HxMerge_VSIPCC_VSCC"); |
| 590 | "CA_HxMerge_VSIPCC_VSCC"); | ||
| 591 | } | 538 | } |
| 592 | } | 539 | } |
| 593 | else if (pluginVS08) | 540 | else if (pluginVS08) |
| @@ -595,31 +542,23 @@ namespace WixToolset.Extensions | |||
| 595 | if (YesNoType.No == suppressExternalNamespaces) | 542 | if (YesNoType.No == suppressExternalNamespaces) |
| 596 | { | 543 | { |
| 597 | // Bring in the help 2 base namespace components for VS 2008 | 544 | // Bring in the help 2 base namespace components for VS 2008 |
| 598 | this.Core.CreateComplexReference(sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, | 545 | this.ParseHelper.CreateComplexReference(section, sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, |
| 599 | ComplexReferenceChildType.ComponentGroup, "Help2_VS2008_Namespace_Components", false); | 546 | ComplexReferenceChildType.ComponentGroup, "Help2_VS2008_Namespace_Components", false); |
| 600 | // Reference CustomAction since nothing will happen without it | 547 | // Reference CustomAction since nothing will happen without it |
| 601 | this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", | 548 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC"); |
| 602 | "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC"); | ||
| 603 | } | 549 | } |
| 604 | } | 550 | } |
| 605 | else | 551 | else |
| 606 | { | 552 | { |
| 607 | // Reference the parent namespace to enforce the foreign key relationship | 553 | // Reference the parent namespace to enforce the foreign key relationship |
| 608 | this.Core.CreateSimpleReference(sourceLineNumbers, "HelpNamespace", | 554 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpNamespace", namespaceParent); |
| 609 | namespaceParent); | ||
| 610 | } | 555 | } |
| 611 | } | 556 | } |
| 612 | } | 557 | } |
| 613 | 558 | ||
| 614 | /// <summary> | 559 | private void ParseVsixPackageElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string fileId) |
| 615 | /// Parses a VsixPackage element. | ||
| 616 | /// </summary> | ||
| 617 | /// <param name="node">Element to process.</param> | ||
| 618 | /// <param name="componentId">Identifier of the parent Component element.</param> | ||
| 619 | /// <param name="fileId">Identifier of the parent File element.</param> | ||
| 620 | private void ParseVsixPackageElement(XElement node, string componentId, string fileId) | ||
| 621 | { | 560 | { |
| 622 | SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 561 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 623 | string propertyId = "VS_VSIX_INSTALLER_PATH"; | 562 | string propertyId = "VS_VSIX_INSTALLER_PATH"; |
| 624 | string packageId = null; | 563 | string packageId = null; |
| 625 | YesNoType permanent = YesNoType.NotSet; | 564 | YesNoType permanent = YesNoType.NotSet; |
| @@ -627,7 +566,7 @@ namespace WixToolset.Extensions | |||
| 627 | string targetVersion = null; | 566 | string targetVersion = null; |
| 628 | YesNoType vital = YesNoType.NotSet; | 567 | YesNoType vital = YesNoType.NotSet; |
| 629 | 568 | ||
| 630 | foreach (XAttribute attrib in node.Attributes()) | 569 | foreach (XAttribute attrib in element.Attributes()) |
| 631 | { | 570 | { |
| 632 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 571 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 633 | { | 572 | { |
| @@ -636,21 +575,21 @@ namespace WixToolset.Extensions | |||
| 636 | case "File": | 575 | case "File": |
| 637 | if (String.IsNullOrEmpty(fileId)) | 576 | if (String.IsNullOrEmpty(fileId)) |
| 638 | { | 577 | { |
| 639 | fileId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 578 | fileId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
| 640 | } | 579 | } |
| 641 | else | 580 | else |
| 642 | { | 581 | { |
| 643 | this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "File", "File")); | 582 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, element.Name.LocalName, "File", "File")); |
| 644 | } | 583 | } |
| 645 | break; | 584 | break; |
| 646 | case "PackageId": | 585 | case "PackageId": |
| 647 | packageId = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 586 | packageId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
| 648 | break; | 587 | break; |
| 649 | case "Permanent": | 588 | case "Permanent": |
| 650 | permanent = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); | 589 | permanent = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); |
| 651 | break; | 590 | break; |
| 652 | case "Target": | 591 | case "Target": |
| 653 | target = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 592 | target = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
| 654 | switch (target.ToLowerInvariant()) | 593 | switch (target.ToLowerInvariant()) |
| 655 | { | 594 | { |
| 656 | case "integrated": | 595 | case "integrated": |
| @@ -681,53 +620,53 @@ namespace WixToolset.Extensions | |||
| 681 | } | 620 | } |
| 682 | break; | 621 | break; |
| 683 | case "TargetVersion": | 622 | case "TargetVersion": |
| 684 | targetVersion = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib); | 623 | targetVersion = this.ParseHelper.GetAttributeVersionValue(sourceLineNumbers, attrib); |
| 685 | break; | 624 | break; |
| 686 | case "Vital": | 625 | case "Vital": |
| 687 | vital = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); | 626 | vital = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); |
| 688 | break; | 627 | break; |
| 689 | case "VsixInstallerPathProperty": | 628 | case "VsixInstallerPathProperty": |
| 690 | propertyId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 629 | propertyId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
| 691 | break; | 630 | break; |
| 692 | default: | 631 | default: |
| 693 | this.Core.UnexpectedAttribute(node, attrib); | 632 | this.ParseHelper.UnexpectedAttribute(element, attrib); |
| 694 | break; | 633 | break; |
| 695 | } | 634 | } |
| 696 | } | 635 | } |
| 697 | else | 636 | else |
| 698 | { | 637 | { |
| 699 | this.Core.ParseExtensionAttribute(node, attrib); | 638 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); |
| 700 | } | 639 | } |
| 701 | } | 640 | } |
| 702 | 641 | ||
| 703 | if (String.IsNullOrEmpty(fileId)) | 642 | if (String.IsNullOrEmpty(fileId)) |
| 704 | { | 643 | { |
| 705 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File")); | 644 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "File")); |
| 706 | } | 645 | } |
| 707 | 646 | ||
| 708 | if (String.IsNullOrEmpty(packageId)) | 647 | if (String.IsNullOrEmpty(packageId)) |
| 709 | { | 648 | { |
| 710 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PackageId")); | 649 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "PackageId")); |
| 711 | } | 650 | } |
| 712 | 651 | ||
| 713 | if (!String.IsNullOrEmpty(target) && String.IsNullOrEmpty(targetVersion)) | 652 | if (!String.IsNullOrEmpty(target) && String.IsNullOrEmpty(targetVersion)) |
| 714 | { | 653 | { |
| 715 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetVersion", "Target")); | 654 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetVersion", "Target")); |
| 716 | } | 655 | } |
| 717 | else if (String.IsNullOrEmpty(target) && !String.IsNullOrEmpty(targetVersion)) | 656 | else if (String.IsNullOrEmpty(target) && !String.IsNullOrEmpty(targetVersion)) |
| 718 | { | 657 | { |
| 719 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Target", "TargetVersion")); | 658 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Target", "TargetVersion")); |
| 720 | } | 659 | } |
| 721 | 660 | ||
| 722 | this.Core.ParseForExtensionElements(node); | 661 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); |
| 723 | 662 | ||
| 724 | if (!this.Core.EncounteredError) | 663 | if (!this.Messaging.EncounteredError) |
| 725 | { | 664 | { |
| 726 | // Ensure there is a reference to the AppSearch Property that will find the VsixInstaller.exe. | 665 | // Ensure there is a reference to the AppSearch Property that will find the VsixInstaller.exe. |
| 727 | this.Core.CreateSimpleReference(sourceLineNumbers, "Property", propertyId); | 666 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Property", propertyId); |
| 728 | 667 | ||
| 729 | // Ensure there is a reference to the package file (even if we are a child under it). | 668 | // Ensure there is a reference to the package file (even if we are a child under it). |
| 730 | this.Core.CreateSimpleReference(sourceLineNumbers, "File", fileId); | 669 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", fileId); |
| 731 | 670 | ||
| 732 | string cmdlinePrefix = "/q "; | 671 | string cmdlinePrefix = "/q "; |
| 733 | 672 | ||
| @@ -746,8 +685,8 @@ namespace WixToolset.Extensions | |||
| 746 | } | 685 | } |
| 747 | else // the package is vital so ensure there is a rollback action scheduled. | 686 | else // the package is vital so ensure there is a rollback action scheduled. |
| 748 | { | 687 | { |
| 749 | Identifier rollbackNamePerUser = this.Core.CreateIdentifier("vru", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); | 688 | Identifier rollbackNamePerUser = this.ParseHelper.CreateIdentifier("vru", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); |
| 750 | Identifier rollbackNamePerMachine = this.Core.CreateIdentifier("vrm", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); | 689 | Identifier rollbackNamePerMachine = this.ParseHelper.CreateIdentifier("vrm", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); |
| 751 | string rollbackCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); | 690 | string rollbackCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); |
| 752 | string rollbackCmdLinePerMachine = String.Concat(rollbackCmdLinePerUser, " /admin"); | 691 | string rollbackCmdLinePerMachine = String.Concat(rollbackCmdLinePerUser, " /admin"); |
| 753 | int rollbackExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeRollback | VSCompiler.MsidbCustomActionTypeInScript; | 692 | int rollbackExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeRollback | VSCompiler.MsidbCustomActionTypeInScript; |
| @@ -755,27 +694,27 @@ namespace WixToolset.Extensions | |||
| 755 | 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. | 694 | 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. |
| 756 | string rollbackConditionPerMachine = String.Format("ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. | 695 | string rollbackConditionPerMachine = String.Format("ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. |
| 757 | 696 | ||
| 758 | this.SchedulePropertyExeAction(sourceLineNumbers, rollbackNamePerUser, propertyId, rollbackCmdLinePerUser, rollbackExtraBitsPerUser, rollbackConditionPerUser, null, installAfter); | 697 | this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerUser, propertyId, rollbackCmdLinePerUser, rollbackExtraBitsPerUser, rollbackConditionPerUser, null, installAfter); |
| 759 | this.SchedulePropertyExeAction(sourceLineNumbers, rollbackNamePerMachine, propertyId, rollbackCmdLinePerMachine, rollbackExtraBitsPerMachine, rollbackConditionPerMachine, null, rollbackNamePerUser.Id); | 698 | this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerMachine, propertyId, rollbackCmdLinePerMachine, rollbackExtraBitsPerMachine, rollbackConditionPerMachine, null, rollbackNamePerUser.Id); |
| 760 | 699 | ||
| 761 | installAfter = rollbackNamePerMachine.Id; | 700 | installAfter = rollbackNamePerMachine.Id; |
| 762 | } | 701 | } |
| 763 | 702 | ||
| 764 | Identifier installNamePerUser = this.Core.CreateIdentifier("viu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); | 703 | Identifier installNamePerUser = this.ParseHelper.CreateIdentifier("viu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); |
| 765 | Identifier installNamePerMachine = this.Core.CreateIdentifier("vim", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); | 704 | Identifier installNamePerMachine = this.ParseHelper.CreateIdentifier("vim", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); |
| 766 | string installCmdLinePerUser = String.Format("{0} \"[#{1}]\"", cmdlinePrefix, fileId); | 705 | string installCmdLinePerUser = String.Format("{0} \"[#{1}]\"", cmdlinePrefix, fileId); |
| 767 | string installCmdLinePerMachine = String.Concat(installCmdLinePerUser, " /admin"); | 706 | string installCmdLinePerMachine = String.Concat(installCmdLinePerUser, " /admin"); |
| 768 | string installConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. | 707 | string installConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. |
| 769 | string installConditionPerMachine = String.Format("ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. | 708 | string installConditionPerMachine = String.Format("ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. |
| 770 | 709 | ||
| 771 | this.SchedulePropertyExeAction(sourceLineNumbers, installNamePerUser, propertyId, installCmdLinePerUser, installExtraBits, installConditionPerUser, null, installAfter); | 710 | this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerUser, propertyId, installCmdLinePerUser, installExtraBits, installConditionPerUser, null, installAfter); |
| 772 | this.SchedulePropertyExeAction(sourceLineNumbers, installNamePerMachine, propertyId, installCmdLinePerMachine, installExtraBits | VSCompiler.MsidbCustomActionTypeNoImpersonate, installConditionPerMachine, null, installNamePerUser.Id); | 711 | this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerMachine, propertyId, installCmdLinePerMachine, installExtraBits | VSCompiler.MsidbCustomActionTypeNoImpersonate, installConditionPerMachine, null, installNamePerUser.Id); |
| 773 | 712 | ||
| 774 | // If not permanent, schedule the uninstall custom action. | 713 | // If not permanent, schedule the uninstall custom action. |
| 775 | if (permanent != YesNoType.Yes) | 714 | if (permanent != YesNoType.Yes) |
| 776 | { | 715 | { |
| 777 | Identifier uninstallNamePerUser = this.Core.CreateIdentifier("vuu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); | 716 | Identifier uninstallNamePerUser = this.ParseHelper.CreateIdentifier("vuu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); |
| 778 | Identifier uninstallNamePerMachine = this.Core.CreateIdentifier("vum", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); | 717 | Identifier uninstallNamePerMachine = this.ParseHelper.CreateIdentifier("vum", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); |
| 779 | string uninstallCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); | 718 | string uninstallCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); |
| 780 | string uninstallCmdLinePerMachine = String.Concat(uninstallCmdLinePerUser, " /admin"); | 719 | string uninstallCmdLinePerMachine = String.Concat(uninstallCmdLinePerUser, " /admin"); |
| 781 | int uninstallExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeInScript; | 720 | int uninstallExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeInScript; |
| @@ -783,39 +722,39 @@ namespace WixToolset.Extensions | |||
| 783 | string uninstallConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. | 722 | string uninstallConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. |
| 784 | string uninstallConditionPerMachine = String.Format("ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. | 723 | string uninstallConditionPerMachine = String.Format("ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. |
| 785 | 724 | ||
| 786 | this.SchedulePropertyExeAction(sourceLineNumbers, uninstallNamePerUser, propertyId, uninstallCmdLinePerUser, uninstallExtraBitsPerUser, uninstallConditionPerUser, "InstallFinalize", null); | 725 | this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerUser, propertyId, uninstallCmdLinePerUser, uninstallExtraBitsPerUser, uninstallConditionPerUser, "InstallFinalize", null); |
| 787 | this.SchedulePropertyExeAction(sourceLineNumbers, uninstallNamePerMachine, propertyId, uninstallCmdLinePerMachine, uninstallExtraBitsPerMachine, uninstallConditionPerMachine, "InstallFinalize", null); | 726 | this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerMachine, propertyId, uninstallCmdLinePerMachine, uninstallExtraBitsPerMachine, uninstallConditionPerMachine, "InstallFinalize", null); |
| 788 | } | 727 | } |
| 789 | } | 728 | } |
| 790 | } | 729 | } |
| 791 | 730 | ||
| 792 | private void SchedulePropertyExeAction(SourceLineNumber sourceLineNumbers, Identifier name, string source, string cmdline, int extraBits, string condition, string beforeAction, string afterAction) | 731 | private void SchedulePropertyExeAction(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier name, string source, string cmdline, int extraBits, string condition, string beforeAction, string afterAction) |
| 793 | { | 732 | { |
| 794 | const string sequence = "InstallExecuteSequence"; | 733 | const string sequence = "InstallExecuteSequence"; |
| 795 | 734 | ||
| 796 | Row actionRow = this.Core.CreateRow(sourceLineNumbers, "CustomAction", name); | 735 | var actionRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "CustomAction", name); |
| 797 | actionRow[1] = VSCompiler.MsidbCustomActionTypeProperty | VSCompiler.MsidbCustomActionTypeExe | extraBits; | 736 | actionRow.Set(1, VSCompiler.MsidbCustomActionTypeProperty | VSCompiler.MsidbCustomActionTypeExe | extraBits); |
| 798 | actionRow[2] = source; | 737 | actionRow.Set(2, source); |
| 799 | actionRow[3] = cmdline; | 738 | actionRow.Set(3, cmdline); |
| 800 | 739 | ||
| 801 | Row sequenceRow = this.Core.CreateRow(sourceLineNumbers, "WixAction"); | 740 | var sequenceRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixAction", new Identifier(name.Access, sequence, name.Id)); |
| 802 | sequenceRow[0] = sequence; | 741 | sequenceRow.Set(0, sequence); |
| 803 | sequenceRow[1] = name.Id; | 742 | sequenceRow.Set(1, name.Id); |
| 804 | sequenceRow[2] = condition; | 743 | sequenceRow.Set(2, condition); |
| 805 | // no explicit sequence | 744 | // no explicit sequence |
| 806 | sequenceRow[4] = beforeAction; | 745 | sequenceRow.Set(4, beforeAction); |
| 807 | sequenceRow[5] = afterAction; | 746 | sequenceRow.Set(5, afterAction); |
| 808 | sequenceRow[6] = 0; // not overridable | 747 | sequenceRow.Set(6, 0); // not overridable |
| 809 | 748 | ||
| 810 | if (null != beforeAction) | 749 | if (null != beforeAction) |
| 811 | { | 750 | { |
| 812 | if (WindowsInstallerStandard.IsStandardAction(beforeAction)) | 751 | if (WindowsInstallerStandard.IsStandardAction(beforeAction)) |
| 813 | { | 752 | { |
| 814 | this.Core.CreateSimpleReference(sourceLineNumbers, "WixAction", sequence, beforeAction); | 753 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixAction", sequence, beforeAction); |
| 815 | } | 754 | } |
| 816 | else | 755 | else |
| 817 | { | 756 | { |
| 818 | this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", beforeAction); | 757 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", beforeAction); |
| 819 | } | 758 | } |
| 820 | } | 759 | } |
| 821 | 760 | ||
| @@ -823,11 +762,11 @@ namespace WixToolset.Extensions | |||
| 823 | { | 762 | { |
| 824 | if (WindowsInstallerStandard.IsStandardAction(afterAction)) | 763 | if (WindowsInstallerStandard.IsStandardAction(afterAction)) |
| 825 | { | 764 | { |
| 826 | this.Core.CreateSimpleReference(sourceLineNumbers, "WixAction", sequence, afterAction); | 765 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixAction", sequence, afterAction); |
| 827 | } | 766 | } |
| 828 | else | 767 | else |
| 829 | { | 768 | { |
| 830 | this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", afterAction); | 769 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", afterAction); |
| 831 | } | 770 | } |
| 832 | } | 771 | } |
| 833 | } | 772 | } |
