Add PackagePayload symbols, errors, and ComplexReferenceChildType.
#4183
Sean Hall committed
Feb 28, 2021 at 20:57 UTC
809df264ba5e5a5f1b60a596064768e9b63dc617
7 files changed
+215
-6
src/WixToolset.Data/ComplexReferenceChildType.cs
+3
@@ -37,6 +37,9 @@ namespace WixToolset.Data
37
/// <summary>PackageGroup child of complex reference.</summary>
38
PackageGroup,
39
40
+ /// <summary>PackagePayload child of complex reference.</summary>
41
+ PackagePayload,
42
+
43
/// <summary>PatchFamily child of complex reference.</summary>
44
PatchFamily,
45
src/WixToolset.Data/ErrorMessages.cs
+52
-6
@@ -493,6 +493,16 @@ namespace WixToolset.Data
493
return Message(sourceLineNumbers, Ids.ExpectedAttributeWithElement, "The {0} element must have attribute '{1}' when child element '{2}' is present.", elementName, attribute, childElementName);
494
}
495
496
+ public static Message ExpectedAttributeWithoutOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName)
497
+ {
498
+ return Message(sourceLineNumbers, Ids.ExpectedAttributeWithoutOtherAttributes, "The {0} element's {1} attribute was not found; it is required without attribute {2} present.", elementName, attributeName, otherAttributeName);
499
+ }
500
+
501
+ public static Message ExpectedAttributeWithoutOtherAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName1, string otherAttributeName2)
502
+ {
503
+ return Message(sourceLineNumbers, Ids.ExpectedAttributeWithoutOtherAttributes, "The {0} element's {1} attribute was not found; it is required without attribute {2} or {3} present.", elementName, attributeName, otherAttributeName1, otherAttributeName2);
504
+ }
505
+
506
public static Message ExpectedBinaryCategory(SourceLineNumber sourceLineNumbers)
507
{
508
return Message(sourceLineNumbers, Ids.ExpectedBinaryCategory, "The Column element specifies a binary column but does not have the correct Category specified. Windows Installer requires binary columns to specify their category as binary. Please set the Category attribute's value to 'Binary'.");
@@ -1499,6 +1509,11 @@ namespace WixToolset.Data
1509
return Message(sourceLineNumbers, Ids.MissingOrInvalidModuleInstallerVersion, "The merge module '{0}' from file '{1}' is either missing or has an invalid installer version. The value read from the installer version in module's summary information was '{2}'. This should be a numeric value representing a valid installer version such as 200 or 301.", moduleId, mergeModuleFile, productInstallerVersion);
1510
}
1511
1512
+ public static Message MissingPackagePayload(SourceLineNumber sourceLineNumbers, string packageId, string packageType)
1513
+ {
1514
+ return Message(sourceLineNumbers, Ids.MissingPackagePayload, "There is no payload defined for package '{0}'. This is specified on the {1}Package element or a child {1}PackagePayload element.", packageId, packageType);
1515
+ }
1516
+
1517
public static Message MissingTableDefinition(string tableName)
1518
{
1519
return Message(null, Ids.MissingTableDefinition, "Cannot find the table definitions for the '{0}' table. This is likely due to a typing error or missing extension. Please ensure all the necessary extensions are supplied on the command line with the -ext parameter.", tableName);
@@ -1539,6 +1554,21 @@ namespace WixToolset.Data
1554
return Message(sourceLineNumbers, Ids.MultipleIdentifiersFound, "Under a '{0}' element, multiple identifiers were found: '{1}' and '{2}'. All search elements under this element must have the same id.", elementName, identifier, mismatchIdentifier);
1555
}
1556
1557
+ public static Message MultiplePackagePayloads(SourceLineNumber sourceLineNumbers, string packageId, string packagePayloadId1, string packagePayloadId2)
1558
+ {
1559
+ return Message(sourceLineNumbers, Ids.MultiplePackagePayloads, "The package '{0}' has multiple PackagePayloads: '{1}' and '{2}'. This normally happens when the payload is defined on the package element and a child PackagePayload element.", packageId, packagePayloadId1, packagePayloadId2);
1560
+ }
1561
+
1562
+ public static Message MultiplePackagePayloads2(SourceLineNumber sourceLineNumbers)
1563
+ {
1564
+ return Message(sourceLineNumbers, Ids.MultiplePackagePayloads2, "The location of the package payload related to previous error.");
1565
+ }
1566
+
1567
+ public static Message MultiplePackagePayloads3(SourceLineNumber sourceLineNumbers)
1568
+ {
1569
+ return Message(sourceLineNumbers, Ids.MultiplePackagePayloads3, "The location of the package related to previous error.");
1570
+ }
1571
+
1572
public static Message MultiplePrimaryReferences(SourceLineNumber sourceLineNumbers, string crefChildType, string crefChildId, string crefParentType, string crefParentId, string conflictParentType, string conflictParentId)
1573
{
1574
return Message(sourceLineNumbers, Ids.MultiplePrimaryReferences, "Multiple primary references were found for {0} '{1}' in {2} '{3}' and {4} '{5}'.", crefChildType, crefChildId, crefParentType, crefParentId, conflictParentType, conflictParentId);
@@ -1634,6 +1664,16 @@ namespace WixToolset.Data
1664
return Message(sourceLineNumbers, Ids.OverridableActionCollision2, "The location of the action related to previous error.");
1665
}
1666
1667
+ public static Message PackagePayloadUnsupported(SourceLineNumber sourceLineNumbers, string packageType)
1668
+ {
1669
+ return Message(sourceLineNumbers, Ids.PackagePayloadUnsupported, "The {0}PackagePayload element can only be used for {0}Packages.", packageType);
1670
+ }
1671
+
1672
+ public static Message PackagePayloadUnsupported2(SourceLineNumber sourceLineNumbers)
1673
+ {
1674
+ return Message(sourceLineNumbers, Ids.PackagePayloadUnsupported2, "The location of the package related to previous error.");
1675
+ }
1676
+
1677
public static Message ParentElementAttributeRequired(SourceLineNumber sourceLineNumbers, string parentElement, string parentAttribute, string childElement)
1678
{
1679
return Message(sourceLineNumbers, Ids.ParentElementAttributeRequired, "The parent {0} element is missing the {1} attribute that is required for the {2} child element.", parentElement, parentAttribute, childElement);
@@ -1774,11 +1814,6 @@ namespace WixToolset.Data
1814
return Message(sourceLineNumbers, Ids.RelativePathForRegistryElement, "Cannot convert RelativePath into Registry elements.");
1815
}
1816
1777
- public static Message RemotePayloadUnsupported(SourceLineNumber sourceLineNumbers)
1778
- {
1779
- return Message(sourceLineNumbers, Ids.RemotePayloadUnsupported, "The RemotePayload element can only be used for ExePackage and MsuPackage payloads.");
1780
- }
1781
-
1817
public static Message ReservedNamespaceViolation(SourceLineNumber sourceLineNumbers, string element, string attribute, string prefix)
1818
{
1819
return Message(sourceLineNumbers, Ids.ReservedNamespaceViolation, "The {0}/@{1} attribute's value begins with the reserved prefix '{2}'. Some prefixes are reserved by the Windows Installer and WiX toolset for well-known values. Change your attribute's value to not begin with the same prefix.", element, attribute, prefix);
@@ -2024,6 +2059,11 @@ namespace WixToolset.Data
2059
return Message(sourceLineNumbers, Ids.UnexpectedElementWithAttribute, "The {0} element cannot have a child element '{1}' when attribute '{2}' is set.", elementName, childElementName, attribute);
2060
}
2061
2062
+ public static Message UnexpectedElementWithAttribute(SourceLineNumber sourceLineNumbers, string elementName, string childElementName, string attribute1, string attribute2, string attribute3, string attribute4)
2063
+ {
2064
+ return Message(sourceLineNumbers, Ids.UnexpectedElementWithAttribute, "The {0} element cannot have a child element '{1}' when any of attributes '{2}', '{3}', '{4}', or '{5}' are set.", elementName, childElementName, attribute1, attribute2, attribute3, attribute4);
2065
+ }
2066
+
2067
public static Message UnexpectedElementWithAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string childElementName, string attribute, string attributeValue)
2068
{
2069
return Message(sourceLineNumbers, Ids.UnexpectedElementWithAttributeValue, "The {0} element cannot have a child element '{1}' unless attribute '{2}' is set to '{3}'.", elementName, childElementName, attribute, attributeValue);
@@ -2661,7 +2701,6 @@ namespace WixToolset.Data
2701
InvalidModuleOrBundleVersion = 380,
2702
UnsupportedPlatformForElement = 381,
2703
MissingMedia = 382,
2664
- RemotePayloadUnsupported = 383,
2704
IllegalYesNoAlwaysValue = 384,
2705
TooDeeplyIncluded = 385,
2706
TooManyColumnsInRealTable = 386,
@@ -2680,6 +2719,13 @@ namespace WixToolset.Data
2719
UnknownSymbolType = 399,
2720
IllegalInnerText = 400,
2721
ExpectedAttributeWithValueWithOtherAttribute = 401,
2722
+ PackagePayloadUnsupported = 402,
2723
+ PackagePayloadUnsupported2 = 403,
2724
+ MultiplePackagePayloads = 404,
2725
+ MultiplePackagePayloads2 = 405,
2726
+ MultiplePackagePayloads3 = 406,
2727
+ MissingPackagePayload = 407,
2728
+ ExpectedAttributeWithoutOtherAttributes = 408,
2729
}
2730
}
2731
}
src/WixToolset.Data/Symbols/SymbolDefinitions.cs
+16
@@ -125,12 +125,16 @@ namespace WixToolset.Data
125
WixBundleCustomDataAttribute,
126
WixBundleCustomDataCell,
127
WixBundleExePackage,
128
+ WixBundleExePackagePayload,
129
WixBundleExtension,
130
WixBundleMsiFeature,
131
WixBundleMsiPackage,
132
+ WixBundleMsiPackagePayload,
133
WixBundleMsiProperty,
134
WixBundleMspPackage,
135
+ WixBundleMspPackagePayload,
136
WixBundleMsuPackage,
137
+ WixBundleMsuPackagePayload,
138
WixBundlePackage,
139
WixBundlePackageCommandLine,
140
WixBundlePackageExitCode,
@@ -568,21 +572,33 @@ namespace WixToolset.Data
572
case SymbolDefinitionType.WixBundleExePackage:
573
return SymbolDefinitions.WixBundleExePackage;
574
575
+ case SymbolDefinitionType.WixBundleExePackagePayload:
576
+ return SymbolDefinitions.WixBundleExePackagePayload;
577
+
578
case SymbolDefinitionType.WixBundleMsiFeature:
579
return SymbolDefinitions.WixBundleMsiFeature;
580
581
case SymbolDefinitionType.WixBundleMsiPackage:
582
return SymbolDefinitions.WixBundleMsiPackage;
583
584
+ case SymbolDefinitionType.WixBundleMsiPackagePayload:
585
+ return SymbolDefinitions.WixBundleMsiPackagePayload;
586
+
587
case SymbolDefinitionType.WixBundleMsiProperty:
588
return SymbolDefinitions.WixBundleMsiProperty;
589
590
case SymbolDefinitionType.WixBundleMspPackage:
591
return SymbolDefinitions.WixBundleMspPackage;
592
593
+ case SymbolDefinitionType.WixBundleMspPackagePayload:
594
+ return SymbolDefinitions.WixBundleMspPackagePayload;
595
+
596
case SymbolDefinitionType.WixBundleMsuPackage:
597
return SymbolDefinitions.WixBundleMsuPackage;
598
599
+ case SymbolDefinitionType.WixBundleMsuPackagePayload:
600
+ return SymbolDefinitions.WixBundleMsuPackagePayload;
601
+
602
case SymbolDefinitionType.WixBundlePackage:
603
return SymbolDefinitions.WixBundlePackage;
604
src/WixToolset.Data/Symbols/WixBundleExePackagePayloadSymbol.cs
new
+36
@@ -0,0 +1,36 @@
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
+
3
+namespace WixToolset.Data
4
+{
5
+ using WixToolset.Data.Symbols;
6
+
7
+ public static partial class SymbolDefinitions
8
+ {
9
+ public static readonly IntermediateSymbolDefinition WixBundleExePackagePayload = new IntermediateSymbolDefinition(
10
+ SymbolDefinitionType.WixBundleExePackagePayload,
11
+ new IntermediateFieldDefinition[]
12
+ {
13
+ },
14
+ typeof(WixBundleExePackagePayloadSymbol));
15
+ }
16
+}
17
+
18
+namespace WixToolset.Data.Symbols
19
+{
20
+ public enum WixBundleExePackagePayloadSymbolFields
21
+ {
22
+ }
23
+
24
+ public class WixBundleExePackagePayloadSymbol : IntermediateSymbol
25
+ {
26
+ public WixBundleExePackagePayloadSymbol() : base(SymbolDefinitions.WixBundleExePackagePayload, null, null)
27
+ {
28
+ }
29
+
30
+ public WixBundleExePackagePayloadSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixBundleExePackagePayload, sourceLineNumber, id)
31
+ {
32
+ }
33
+
34
+ public IntermediateField this[WixBundleExePackagePayloadSymbolFields index] => this.Fields[(int)index];
35
+ }
36
+}
src/WixToolset.Data/Symbols/WixBundleMsiPackagePayloadSymbol.cs
new
+36
@@ -0,0 +1,36 @@
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
+
3
+namespace WixToolset.Data
4
+{
5
+ using WixToolset.Data.Symbols;
6
+
7
+ public static partial class SymbolDefinitions
8
+ {
9
+ public static readonly IntermediateSymbolDefinition WixBundleMsiPackagePayload = new IntermediateSymbolDefinition(
10
+ SymbolDefinitionType.WixBundleMsiPackagePayload,
11
+ new IntermediateFieldDefinition[]
12
+ {
13
+ },
14
+ typeof(WixBundleMsiPackagePayloadSymbol));
15
+ }
16
+}
17
+
18
+namespace WixToolset.Data.Symbols
19
+{
20
+ public enum WixBundleMsiPackagePayloadSymbolFields
21
+ {
22
+ }
23
+
24
+ public class WixBundleMsiPackagePayloadSymbol : IntermediateSymbol
25
+ {
26
+ public WixBundleMsiPackagePayloadSymbol() : base(SymbolDefinitions.WixBundleMsiPackagePayload, null, null)
27
+ {
28
+ }
29
+
30
+ public WixBundleMsiPackagePayloadSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixBundleMsiPackagePayload, sourceLineNumber, id)
31
+ {
32
+ }
33
+
34
+ public IntermediateField this[WixBundleMsiPackagePayloadSymbolFields index] => this.Fields[(int)index];
35
+ }
36
+}
src/WixToolset.Data/Symbols/WixBundleMspPackagePayloadSymbol.cs
new
+36
@@ -0,0 +1,36 @@
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
+
3
+namespace WixToolset.Data
4
+{
5
+ using WixToolset.Data.Symbols;
6
+
7
+ public static partial class SymbolDefinitions
8
+ {
9
+ public static readonly IntermediateSymbolDefinition WixBundleMspPackagePayload = new IntermediateSymbolDefinition(
10
+ SymbolDefinitionType.WixBundleMspPackagePayload,
11
+ new IntermediateFieldDefinition[]
12
+ {
13
+ },
14
+ typeof(WixBundleMspPackagePayloadSymbol));
15
+ }
16
+}
17
+
18
+namespace WixToolset.Data.Symbols
19
+{
20
+ public enum WixBundleMspPackagePayloadSymbolFields
21
+ {
22
+ }
23
+
24
+ public class WixBundleMspPackagePayloadSymbol : IntermediateSymbol
25
+ {
26
+ public WixBundleMspPackagePayloadSymbol() : base(SymbolDefinitions.WixBundleMspPackagePayload, null, null)
27
+ {
28
+ }
29
+
30
+ public WixBundleMspPackagePayloadSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixBundleMspPackagePayload, sourceLineNumber, id)
31
+ {
32
+ }
33
+
34
+ public IntermediateField this[WixBundleMspPackagePayloadSymbolFields index] => this.Fields[(int)index];
35
+ }
36
+}
src/WixToolset.Data/Symbols/WixBundleMsuPackagePayloadSymbol.cs
new
+36
@@ -0,0 +1,36 @@
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
+
3
+namespace WixToolset.Data
4
+{
5
+ using WixToolset.Data.Symbols;
6
+
7
+ public static partial class SymbolDefinitions
8
+ {
9
+ public static readonly IntermediateSymbolDefinition WixBundleMsuPackagePayload = new IntermediateSymbolDefinition(
10
+ SymbolDefinitionType.WixBundleMsuPackagePayload,
11
+ new IntermediateFieldDefinition[]
12
+ {
13
+ },
14
+ typeof(WixBundleMsuPackagePayloadSymbol));
15
+ }
16
+}
17
+
18
+namespace WixToolset.Data.Symbols
19
+{
20
+ public enum WixBundleMsuPackagePayloadSymbolFields
21
+ {
22
+ }
23
+
24
+ public class WixBundleMsuPackagePayloadSymbol : IntermediateSymbol
25
+ {
26
+ public WixBundleMsuPackagePayloadSymbol() : base(SymbolDefinitions.WixBundleMsuPackagePayload, null, null)
27
+ {
28
+ }
29
+
30
+ public WixBundleMsuPackagePayloadSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixBundleMsuPackagePayload, sourceLineNumber, id)
31
+ {
32
+ }
33
+
34
+ public IntermediateField this[WixBundleMsuPackagePayloadSymbolFields index] => this.Fields[(int)index];
35
+ }
36
+}