aboutsummaryrefslogtreecommitdiff
path: root/src/wixext/UtilCompiler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/wixext/UtilCompiler.cs')
-rw-r--r--src/wixext/UtilCompiler.cs85
1 files changed, 85 insertions, 0 deletions
diff --git a/src/wixext/UtilCompiler.cs b/src/wixext/UtilCompiler.cs
index 79dbbc6d..fdc1c9eb 100644
--- a/src/wixext/UtilCompiler.cs
+++ b/src/wixext/UtilCompiler.cs
@@ -233,6 +233,19 @@ namespace WixToolset.Util
233 case "User": 233 case "User":
234 this.ParseUserElement(intermediate, section, element, null); 234 this.ParseUserElement(intermediate, section, element, null);
235 break; 235 break;
236 case "BroadcastEnvironmentChange":
237 case "BroadcastSettingChange":
238 case "CheckRebootRequired":
239 case "ExitEarlyWithSuccess":
240 case "FailWhenDeferred":
241 case "QueryWindowsDirectories":
242 case "QueryWindowsDriverInfo":
243 case "QueryWindowsSuiteInfo":
244 case "QueryWindowsWellKnownSIDs":
245 case "WaitForEvent":
246 case "WaitForEventDeferred":
247 this.AddCustomActionReference(intermediate, section, element, parentElement);
248 break;
236 case "ComponentSearch": 249 case "ComponentSearch":
237 case "ComponentSearchRef": 250 case "ComponentSearchRef":
238 case "DirectorySearch": 251 case "DirectorySearch":
@@ -340,6 +353,24 @@ namespace WixToolset.Util
340 break; 353 break;
341 } 354 }
342 break; 355 break;
356 case "UI":
357 switch (element.Name.LocalName)
358 {
359 case "BroadcastEnvironmentChange":
360 case "BroadcastSettingChange":
361 case "CheckRebootRequired":
362 case "ExitEarlyWithSuccess":
363 case "FailWhenDeferred":
364 case "QueryWindowsDirectories":
365 case "QueryWindowsDriverInfo":
366 case "QueryWindowsSuiteInfo":
367 case "QueryWindowsWellKnownSIDs":
368 case "WaitForEvent":
369 case "WaitForEventDeferred":
370 this.AddCustomActionReference(intermediate, section, element, parentElement);
371 break;
372 }
373 break;
343 default: 374 default:
344 this.ParseHelper.UnexpectedElement(parentElement, element); 375 this.ParseHelper.UnexpectedElement(parentElement, element);
345 break; 376 break;
@@ -348,6 +379,60 @@ namespace WixToolset.Util
348 return possibleKeyPath; 379 return possibleKeyPath;
349 } 380 }
350 381
382 private void AddCustomActionReference(Intermediate intermediate, IntermediateSection section, XElement element, XElement parentElement)
383 {
384 // These elements are not supported for bundles.
385 if (parentElement.Name.LocalName == "Bundle")
386 {
387 this.ParseHelper.UnexpectedElement(parentElement, element);
388 return;
389 }
390
391 var customAction = element.Name.LocalName;
392 switch (element.Name.LocalName)
393 {
394 case "BroadcastEnvironmentChange":
395 case "BroadcastSettingChange":
396 case "CheckRebootRequired":
397 case "ExitEarlyWithSuccess":
398 case "FailWhenDeferred":
399 case "WaitForEvent":
400 case "WaitForEventDeferred":
401 //default: customAction = element.Name.LocalName;
402 break;
403 case "QueryWindowsDirectories":
404 customAction = "QueryOsDirs";
405 break;
406 case "QueryWindowsDriverInfo":
407 customAction = "QueryOsDriverInfo";
408 break;
409 case "QueryWindowsSuiteInfo":
410 customAction = "QueryOsInfo";
411 break;
412 case "QueryWindowsWellKnownSIDs":
413 customAction = "QueryOsWellKnownSID";
414 break;
415 }
416
417 foreach (var attrib in element.Attributes())
418 {
419 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
420 {
421 // no attributes today
422 }
423 else
424 {
425 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
426 }
427 }
428
429 var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
430
431 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
432
433 this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, customAction, this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64);
434 }
435
351 /// <summary> 436 /// <summary>
352 /// Parses the common search attributes shared across all searches. 437 /// Parses the common search attributes shared across all searches.
353 /// </summary> 438 /// </summary>