Obsolete long-deprecated elements and attributes.
Bob Arnson committed
Nov 9, 2020 at 15:48 UTC
af854e4c8341cc90fb41c8b5122d4308574e8a9a
4 files changed
+9
-135
src/WixToolset.Core/Compiler.cs
-13
@@ -694,16 +694,6 @@ namespace WixToolset.Core
694
id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
695
break;
696
case "SourceFile":
697
- case "src":
698
- if (null != sourceFile)
699
- {
700
- this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile", "src"));
701
- }
702
-
703
- if ("src" == attrib.Name.LocalName)
704
- {
705
- this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "SourceFile"));
706
- }
697
sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
698
break;
699
case "SuppressModularization":
@@ -6252,9 +6242,6 @@ namespace WixToolset.Core
6242
case "Icon":
6243
this.ParseIconElement(child);
6244
break;
6255
- case "IgnoreModularization":
6256
- this.ParseIgnoreModularizationElement(child);
6257
- break;
6245
case "Media":
6246
this.ParseMediaElement(child, null);
6247
break;
src/WixToolset.Core/Compiler_2.cs
+9
-32
@@ -4774,7 +4774,6 @@ namespace WixToolset.Core
4774
string argument = null;
4775
string command = null;
4776
var sequence = CompilerConstants.IntegerNotSet;
4777
- string target = null;
4777
string targetFile = null;
4778
string targetProperty = null;
4779
@@ -4796,10 +4795,6 @@ namespace WixToolset.Core
4795
case "Sequence":
4796
sequence = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, Int16.MaxValue);
4797
break;
4799
- case "Target":
4800
- target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4801
- this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "TargetFile", "TargetProperty"));
4802
- break;
4798
case "TargetFile":
4799
targetFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4800
this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, targetFile);
@@ -4823,16 +4818,6 @@ namespace WixToolset.Core
4818
this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
4819
}
4820
4826
- if (null != target && null != targetFile)
4827
- {
4828
- this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Target", "TargetFile"));
4829
- }
4830
-
4831
- if (null != target && null != targetProperty)
4832
- {
4833
- this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Target", "TargetProperty"));
4834
- }
4835
-
4821
if (null != targetFile && null != targetProperty)
4822
{
4823
this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFile", "TargetProperty"));
@@ -4842,11 +4827,6 @@ namespace WixToolset.Core
4827
4828
if (YesNoType.Yes == advertise)
4829
{
4845
- if (null != target)
4846
- {
4847
- this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "Target"));
4848
- }
4849
-
4830
if (null != targetFile)
4831
{
4832
this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "TargetFile"));
@@ -4880,22 +4860,19 @@ namespace WixToolset.Core
4860
this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Sequence", "Advertise", "no"));
4861
}
4862
4883
- if (null == target && null == targetFile && null == targetProperty)
4863
+ if (null == targetFile && null == targetProperty)
4864
{
4865
this.Core.Write(ErrorMessages.ExpectedAttributesWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFile", "TargetProperty", "Advertise", "no"));
4866
}
4867
4888
- if (null == target)
4868
+ string target = null;
4869
+ if (null != targetFile)
4870
{
4890
- if (null != targetFile)
4891
- {
4892
- target = String.Concat("\"[#", targetFile, "]\"");
4893
- }
4894
-
4895
- if (null != targetProperty)
4896
- {
4897
- target = String.Concat("\"[", targetProperty, "]\"");
4898
- }
4871
+ target = String.Concat("\"[#", targetFile, "]\"");
4872
+ }
4873
+ else if (null != targetProperty)
4874
+ {
4875
+ target = String.Concat("\"[", targetProperty, "]\"");
4876
}
4877
4878
if (null != argument)
@@ -4903,7 +4880,7 @@ namespace WixToolset.Core
4880
target = String.Concat(target, " ", argument);
4881
}
4882
4906
- var prefix = (null != progId ? progId : String.Concat(".", extension));
4883
+ var prefix = progId ?? String.Concat(".", extension);
4884
4885
if (null != command)
4886
{
src/WixToolset.Core/Compiler_Module.cs
-50
@@ -181,9 +181,6 @@ namespace WixToolset.Core
181
case "Icon":
182
this.ParseIconElement(child);
183
break;
184
- case "IgnoreModularization":
185
- this.ParseIgnoreModularizationElement(child);
186
- break;
184
case "IgnoreTable":
185
this.ParseIgnoreTableElement(child);
186
break;
@@ -624,53 +621,6 @@ namespace WixToolset.Core
621
}
622
}
623
627
- /// <summary>
628
- /// Parses an ignore modularization element.
629
- /// </summary>
630
- /// <param name="node">XmlNode on an IgnoreModulatization element.</param>
631
- private void ParseIgnoreModularizationElement(XElement node)
632
- {
633
- var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
634
- string name = null;
635
-
636
- this.Core.Write(WarningMessages.DeprecatedIgnoreModularizationElement(sourceLineNumbers));
637
-
638
- foreach (var attrib in node.Attributes())
639
- {
640
- if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
641
- {
642
- switch (attrib.Name.LocalName)
643
- {
644
- case "Name":
645
- name = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
646
- break;
647
- case "Type":
648
- // this is actually not used
649
- break;
650
- default:
651
- this.Core.UnexpectedAttribute(node, attrib);
652
- break;
653
- }
654
- }
655
- else
656
- {
657
- this.Core.ParseExtensionAttribute(node, attrib);
658
- }
659
- }
660
-
661
- if (null == name)
662
- {
663
- this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
664
- }
665
-
666
- this.Core.ParseForExtensionElements(node);
667
-
668
- if (!this.Core.EncounteredError)
669
- {
670
- this.Core.AddSymbol(new WixSuppressModularizationSymbol(sourceLineNumbers, new Identifier(AccessModifier.Private, name)));
671
- }
672
- }
673
-
624
/// <summary>
625
/// Parses an IgnoreTable element.
626
/// </summary>
src/WixToolset.Core/Compiler_PatchCreation.cs
-40
@@ -305,29 +305,9 @@ namespace WixToolset.Core
305
}
306
break;
307
case "SourceFile":
308
- case "src":
309
- if (null != sourceFile)
310
- {
311
- this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "src", "SourceFile"));
312
- }
313
-
314
- if ("src" == attrib.Name.LocalName)
315
- {
316
- this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "SourceFile"));
317
- }
308
sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
309
break;
310
case "SourcePatch":
321
- case "srcPatch":
322
- if (null != sourcePatch)
323
- {
324
- this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "srcPatch", "SourcePatch"));
325
- }
326
-
327
- if ("srcPatch" == attrib.Name.LocalName)
328
- {
329
- this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "SourcePatch"));
330
- }
311
sourcePatch = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
312
break;
313
default:
@@ -518,16 +498,6 @@ namespace WixToolset.Core
498
order = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, Int32.MinValue + 2, Int32.MaxValue);
499
break;
500
case "SourceFile":
521
- case "src":
522
- if (null != sourceFile)
523
- {
524
- this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "src", "SourceFile"));
525
- }
526
-
527
- if ("src" == attrib.Name.LocalName)
528
- {
529
- this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "SourceFile"));
530
- }
501
sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
502
break;
503
case "Validation":
@@ -727,16 +697,6 @@ namespace WixToolset.Core
697
order = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, Int32.MinValue + 2, Int32.MaxValue);
698
break;
699
case "Source":
730
- case "src":
731
- if (null != source)
732
- {
733
- this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "src", "Source"));
734
- }
735
-
736
- if ("src" == attrib.Name.LocalName)
737
- {
738
- this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Source"));
739
- }
700
source = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
701
break;
702
default: