aboutsummaryrefslogtreecommitdiff
path: root/src/wixext
diff options
context:
space:
mode:
Diffstat (limited to 'src/wixext')
-rw-r--r--src/wixext/UtilCompiler.cs85
-rw-r--r--src/wixext/util.xsd121
2 files changed, 206 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>
diff --git a/src/wixext/util.xsd b/src/wixext/util.xsd
index b6f0365b..133a93fa 100644
--- a/src/wixext/util.xsd
+++ b/src/wixext/util.xsd
@@ -1586,6 +1586,127 @@
1586 </xs:attribute> 1586 </xs:attribute>
1587 </xs:complexType> 1587 </xs:complexType>
1588 </xs:element> 1588 </xs:element>
1589 <xs:element name="BroadcastEnvironmentChange">
1590 <xs:annotation>
1591 <xs:documentation>Schedules the BroadcastEnvironmentChange custom action for the current platform.</xs:documentation>
1592 <xs:appinfo>
1593 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
1594 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
1595 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1596 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="UI" />
1597 </xs:appinfo>
1598 </xs:annotation>
1599 </xs:element>
1600 <xs:element name="BroadcastSettingChange">
1601 <xs:annotation>
1602 <xs:documentation>Schedules the BroadcastSettingChange custom action for the current platform.</xs:documentation>
1603 <xs:appinfo>
1604 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
1605 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
1606 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1607 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="UI" />
1608 </xs:appinfo>
1609 </xs:annotation>
1610 </xs:element>
1611 <xs:element name="CheckRebootRequired">
1612 <xs:annotation>
1613 <xs:documentation>Schedules the CheckRebootRequired custom action for the current platform.</xs:documentation>
1614 <xs:appinfo>
1615 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
1616 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
1617 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1618 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="UI" />
1619 </xs:appinfo>
1620 </xs:annotation>
1621 </xs:element>
1622 <xs:element name="ExitEarlyWithSuccess">
1623 <xs:annotation>
1624 <xs:documentation>Schedules the ExitEarlyWithSuccess custom action for the current platform.</xs:documentation>
1625 <xs:appinfo>
1626 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
1627 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
1628 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1629 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="UI" />
1630 </xs:appinfo>
1631 </xs:annotation>
1632 </xs:element>
1633 <xs:element name="FailWhenDeferred">
1634 <xs:annotation>
1635 <xs:documentation>Schedules the FailWhenDeferred custom action for the current platform.</xs:documentation>
1636 <xs:appinfo>
1637 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
1638 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
1639 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1640 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="UI" />
1641 </xs:appinfo>
1642 </xs:annotation>
1643 <xs:element name="WaitForEvent">
1644 <xs:annotation>
1645 <xs:documentation>Schedules the WaitForEvent custom action for the current platform.</xs:documentation>
1646 <xs:appinfo>
1647 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
1648 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
1649 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1650 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="UI" />
1651 </xs:appinfo>
1652 </xs:annotation>
1653 </xs:element>
1654 <xs:element name="WaitForEventDeferred">
1655 <xs:annotation>
1656 <xs:documentation>Schedules the WaitForEventDeferred custom action for the current platform.</xs:documentation>
1657 <xs:appinfo>
1658 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
1659 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
1660 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1661 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="UI" />
1662 </xs:appinfo>
1663 </xs:annotation>
1664 </xs:element>
1665 <xs:element name="QueryWindowsDirectories">
1666 <xs:annotation>
1667 <xs:documentation>Schedules the QueryOsDirs custom action for the current platform.</xs:documentation>
1668 <xs:appinfo>
1669 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
1670 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
1671 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1672 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="UI" />
1673 </xs:appinfo>
1674 </xs:annotation>
1675 </xs:element>
1676 <xs:element name="QueryWindowsDriverInfo">
1677 <xs:annotation>
1678 <xs:documentation>Schedules the QueryOsDriverInfo custom action for the current platform.</xs:documentation>
1679 <xs:appinfo>
1680 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
1681 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
1682 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1683 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="UI" />
1684 </xs:appinfo>
1685 </xs:annotation>
1686 </xs:element>
1687 <xs:element name="QueryWindowsSuiteInfo">
1688 <xs:annotation>
1689 <xs:documentation>Schedules the QueryOsInfo custom action for the current platform.</xs:documentation>
1690 <xs:appinfo>
1691 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
1692 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
1693 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1694 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="UI" />
1695 </xs:appinfo>
1696 </xs:annotation>
1697 </xs:element>
1698 <xs:element name="QueryWindowsWellKnownSIDs">
1699 <xs:annotation>
1700 <xs:documentation>Schedules the QueryOsWellKnownSID custom action for the current platform.</xs:documentation>
1701 <xs:appinfo>
1702 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Product" />
1703 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
1704 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1705 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="UI" />
1706 </xs:appinfo>
1707 </xs:annotation>
1708 </xs:element>
1709
1589 <xs:attributeGroup name="SearchCommonAttributes"> 1710 <xs:attributeGroup name="SearchCommonAttributes">
1590 <xs:attribute name="Id" type="xs:string"> 1711 <xs:attribute name="Id" type="xs:string">
1591 <xs:annotation> 1712 <xs:annotation>