diff options
Diffstat (limited to 'src/WixToolset.Core/Compiler_2.cs')
-rw-r--r-- | src/WixToolset.Core/Compiler_2.cs | 113 |
1 files changed, 4 insertions, 109 deletions
diff --git a/src/WixToolset.Core/Compiler_2.cs b/src/WixToolset.Core/Compiler_2.cs index df4c037d..18a0366e 100644 --- a/src/WixToolset.Core/Compiler_2.cs +++ b/src/WixToolset.Core/Compiler_2.cs | |||
@@ -186,9 +186,6 @@ namespace WixToolset.Core | |||
186 | case "ComponentGroup": | 186 | case "ComponentGroup": |
187 | this.ParseComponentGroupElement(child, ComplexReferenceParentType.Unknown, null); | 187 | this.ParseComponentGroupElement(child, ComplexReferenceParentType.Unknown, null); |
188 | break; | 188 | break; |
189 | case "Condition": | ||
190 | this.ParseConditionElement(child, node.Name.LocalName, null, null); | ||
191 | break; | ||
192 | case "CustomAction": | 189 | case "CustomAction": |
193 | this.ParseCustomActionElement(child); | 190 | this.ParseCustomActionElement(child); |
194 | break; | 191 | break; |
@@ -228,6 +225,9 @@ namespace WixToolset.Core | |||
228 | case "InstanceTransforms": | 225 | case "InstanceTransforms": |
229 | this.ParseInstanceTransformsElement(child); | 226 | this.ParseInstanceTransformsElement(child); |
230 | break; | 227 | break; |
228 | case "Launch": | ||
229 | this.ParseLaunchElement(child); | ||
230 | break; | ||
231 | case "MajorUpgrade": | 231 | case "MajorUpgrade": |
232 | this.ParseMajorUpgradeElement(child, contextValues); | 232 | this.ParseMajorUpgradeElement(child, contextValues); |
233 | break; | 233 | break; |
@@ -1235,31 +1235,7 @@ namespace WixToolset.Core | |||
1235 | id = this.Core.CreateIdentifier("pme", objectId, tableName, sddl); | 1235 | id = this.Core.CreateIdentifier("pme", objectId, tableName, sddl); |
1236 | } | 1236 | } |
1237 | 1237 | ||
1238 | foreach (var child in node.Elements()) | 1238 | this.Core.ParseForExtensionElements(node); |
1239 | { | ||
1240 | if (CompilerCore.WixNamespace == child.Name.Namespace) | ||
1241 | { | ||
1242 | switch (child.Name.LocalName) | ||
1243 | { | ||
1244 | case "Condition": | ||
1245 | if (null != condition) | ||
1246 | { | ||
1247 | var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | ||
1248 | this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName)); | ||
1249 | } | ||
1250 | |||
1251 | condition = this.ParseConditionElement(child, node.Name.LocalName, null, null); | ||
1252 | break; | ||
1253 | default: | ||
1254 | this.Core.UnexpectedElement(node, child); | ||
1255 | break; | ||
1256 | } | ||
1257 | } | ||
1258 | else | ||
1259 | { | ||
1260 | this.Core.ParseExtensionElement(node, child); | ||
1261 | } | ||
1262 | } | ||
1263 | 1239 | ||
1264 | if (!this.Core.EncounteredError) | 1240 | if (!this.Core.EncounteredError) |
1265 | { | 1241 | { |
@@ -1537,20 +1513,6 @@ namespace WixToolset.Core | |||
1537 | this.Core.Write(ErrorMessages.CannotAuthorSpecialProperties(sourceLineNumbers, id.Id)); | 1513 | this.Core.Write(ErrorMessages.CannotAuthorSpecialProperties(sourceLineNumbers, id.Id)); |
1538 | } | 1514 | } |
1539 | 1515 | ||
1540 | var innerText = this.Core.GetTrimmedInnerText(node); | ||
1541 | if (null != value) | ||
1542 | { | ||
1543 | // cannot specify both the value attribute and inner text | ||
1544 | if (!String.IsNullOrEmpty(innerText)) | ||
1545 | { | ||
1546 | this.Core.Write(ErrorMessages.IllegalAttributeWithInnerText(sourceLineNumbers, node.Name.LocalName, "Value")); | ||
1547 | } | ||
1548 | } | ||
1549 | else // value attribute not specified, use inner text if any. | ||
1550 | { | ||
1551 | value = innerText; | ||
1552 | } | ||
1553 | |||
1554 | if ("ErrorDialog" == id.Id) | 1516 | if ("ErrorDialog" == id.Id) |
1555 | { | 1517 | { |
1556 | this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Dialog, value); | 1518 | this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Dialog, value); |
@@ -2092,11 +2054,6 @@ namespace WixToolset.Core | |||
2092 | 2054 | ||
2093 | if (multiStringValue == null) | 2055 | if (multiStringValue == null) |
2094 | { | 2056 | { |
2095 | multiStringValue = Common.GetInnerText(node); | ||
2096 | } | ||
2097 | |||
2098 | if (multiStringValue == null) | ||
2099 | { | ||
2100 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); | 2057 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); |
2101 | } | 2058 | } |
2102 | 2059 | ||
@@ -2683,12 +2640,6 @@ namespace WixToolset.Core | |||
2683 | } | 2640 | } |
2684 | } | 2641 | } |
2685 | 2642 | ||
2686 | // Get the condition from the inner text of the element. | ||
2687 | if (condition == null) | ||
2688 | { | ||
2689 | condition = this.Core.GetConditionInnerText(child); | ||
2690 | } | ||
2691 | |||
2692 | if (customAction && "Custom" == actionName) | 2643 | if (customAction && "Custom" == actionName) |
2693 | { | 2644 | { |
2694 | this.Core.Write(ErrorMessages.ExpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Action")); | 2645 | this.Core.Write(ErrorMessages.ExpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Action")); |
@@ -3154,11 +3105,6 @@ namespace WixToolset.Core | |||
3154 | 3105 | ||
3155 | if (privilege == null) | 3106 | if (privilege == null) |
3156 | { | 3107 | { |
3157 | privilege = Common.GetInnerText(node); | ||
3158 | } | ||
3159 | |||
3160 | if (privilege == null) | ||
3161 | { | ||
3162 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); | 3108 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); |
3163 | } | 3109 | } |
3164 | 3110 | ||
@@ -3520,11 +3466,6 @@ namespace WixToolset.Core | |||
3520 | 3466 | ||
3521 | if (argument == null) | 3467 | if (argument == null) |
3522 | { | 3468 | { |
3523 | argument = this.Core.GetTrimmedInnerText(node); | ||
3524 | } | ||
3525 | |||
3526 | if (argument == null) | ||
3527 | { | ||
3528 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); | 3469 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); |
3529 | } | 3470 | } |
3530 | 3471 | ||
@@ -3860,11 +3801,6 @@ namespace WixToolset.Core | |||
3860 | } | 3801 | } |
3861 | } | 3802 | } |
3862 | 3803 | ||
3863 | if (condition == null) | ||
3864 | { | ||
3865 | condition = this.Core.GetConditionInnerText(node); | ||
3866 | } | ||
3867 | |||
3868 | if (null == id) | 3804 | if (null == id) |
3869 | { | 3805 | { |
3870 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); | 3806 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); |
@@ -3957,29 +3893,6 @@ namespace WixToolset.Core | |||
3957 | this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, sequenceValue, "execute", "ui", "both")); | 3893 | this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, sequenceValue, "execute", "ui", "both")); |
3958 | break; | 3894 | break; |
3959 | } | 3895 | } |
3960 | //if (0 < sequenceValue.Length) | ||
3961 | //{ | ||
3962 | // var sequenceType = Wix.Enums.ParseSequenceType(sequenceValue); | ||
3963 | // switch (sequenceType) | ||
3964 | // { | ||
3965 | // case Wix.SequenceType.execute: | ||
3966 | // sequences = new string[] { "InstallExecuteSequence" }; | ||
3967 | // break; | ||
3968 | // case Wix.SequenceType.ui: | ||
3969 | // sequences = new string[] { "InstallUISequence" }; | ||
3970 | // break; | ||
3971 | // case Wix.SequenceType.first: | ||
3972 | // firstSequence = true; | ||
3973 | // // default puts it in both sequence which is what we want | ||
3974 | // break; | ||
3975 | // case Wix.SequenceType.both: | ||
3976 | // // default so no work necessary. | ||
3977 | // break; | ||
3978 | // default: | ||
3979 | // this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, sequenceValue, "execute", "ui", "both")); | ||
3980 | // break; | ||
3981 | // } | ||
3982 | //} | ||
3983 | break; | 3896 | break; |
3984 | case "Value": | 3897 | case "Value": |
3985 | value = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); | 3898 | value = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); |
@@ -3995,11 +3908,6 @@ namespace WixToolset.Core | |||
3995 | } | 3908 | } |
3996 | } | 3909 | } |
3997 | 3910 | ||
3998 | if (condition == null) | ||
3999 | { | ||
4000 | condition = this.Core.GetConditionInnerText(node); | ||
4001 | } | ||
4002 | |||
4003 | if (null == id) | 3911 | if (null == id) |
4004 | { | 3912 | { |
4005 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); | 3913 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); |
@@ -4528,19 +4436,6 @@ namespace WixToolset.Core | |||
4528 | id = this.Core.CreateIdentifier("scp", shortcutId, key.ToUpperInvariant()); | 4436 | id = this.Core.CreateIdentifier("scp", shortcutId, key.ToUpperInvariant()); |
4529 | } | 4437 | } |
4530 | 4438 | ||
4531 | var innerText = this.Core.GetTrimmedInnerText(node); | ||
4532 | if (!String.IsNullOrEmpty(innerText)) | ||
4533 | { | ||
4534 | if (String.IsNullOrEmpty(value)) | ||
4535 | { | ||
4536 | value = innerText; | ||
4537 | } | ||
4538 | else // cannot specify both the value attribute and inner text | ||
4539 | { | ||
4540 | this.Core.Write(ErrorMessages.IllegalAttributeWithInnerText(sourceLineNumbers, node.Name.LocalName, "Value")); | ||
4541 | } | ||
4542 | } | ||
4543 | |||
4544 | if (String.IsNullOrEmpty(value)) | 4439 | if (String.IsNullOrEmpty(value)) |
4545 | { | 4440 | { |
4546 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); | 4441 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); |