diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/WixToolset.Core/Compiler.cs | 13 | ||||
| -rw-r--r-- | src/WixToolset.Core/Compiler_2.cs | 41 | ||||
| -rw-r--r-- | src/WixToolset.Core/Compiler_Module.cs | 50 | ||||
| -rw-r--r-- | src/WixToolset.Core/Compiler_PatchCreation.cs | 40 |
4 files changed, 9 insertions, 135 deletions
diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs index 8d110ac3..addb9750 100644 --- a/src/WixToolset.Core/Compiler.cs +++ b/src/WixToolset.Core/Compiler.cs | |||
| @@ -694,16 +694,6 @@ namespace WixToolset.Core | |||
| 694 | id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib); | 694 | id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib); |
| 695 | break; | 695 | break; |
| 696 | case "SourceFile": | 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 | } | ||
| 707 | sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 697 | sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib); |
| 708 | break; | 698 | break; |
| 709 | case "SuppressModularization": | 699 | case "SuppressModularization": |
| @@ -6252,9 +6242,6 @@ namespace WixToolset.Core | |||
| 6252 | case "Icon": | 6242 | case "Icon": |
| 6253 | this.ParseIconElement(child); | 6243 | this.ParseIconElement(child); |
| 6254 | break; | 6244 | break; |
| 6255 | case "IgnoreModularization": | ||
| 6256 | this.ParseIgnoreModularizationElement(child); | ||
| 6257 | break; | ||
| 6258 | case "Media": | 6245 | case "Media": |
| 6259 | this.ParseMediaElement(child, null); | 6246 | this.ParseMediaElement(child, null); |
| 6260 | break; | 6247 | break; |
diff --git a/src/WixToolset.Core/Compiler_2.cs b/src/WixToolset.Core/Compiler_2.cs index a3bc09b6..f55264e5 100644 --- a/src/WixToolset.Core/Compiler_2.cs +++ b/src/WixToolset.Core/Compiler_2.cs | |||
| @@ -4774,7 +4774,6 @@ namespace WixToolset.Core | |||
| 4774 | string argument = null; | 4774 | string argument = null; |
| 4775 | string command = null; | 4775 | string command = null; |
| 4776 | var sequence = CompilerConstants.IntegerNotSet; | 4776 | var sequence = CompilerConstants.IntegerNotSet; |
| 4777 | string target = null; | ||
| 4778 | string targetFile = null; | 4777 | string targetFile = null; |
| 4779 | string targetProperty = null; | 4778 | string targetProperty = null; |
| 4780 | 4779 | ||
| @@ -4796,10 +4795,6 @@ namespace WixToolset.Core | |||
| 4796 | case "Sequence": | 4795 | case "Sequence": |
| 4797 | sequence = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, Int16.MaxValue); | 4796 | sequence = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, Int16.MaxValue); |
| 4798 | break; | 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; | ||
| 4803 | case "TargetFile": | 4798 | case "TargetFile": |
| 4804 | targetFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 4799 | targetFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib); |
| 4805 | this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, targetFile); | 4800 | this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, targetFile); |
| @@ -4823,16 +4818,6 @@ namespace WixToolset.Core | |||
| 4823 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); | 4818 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); |
| 4824 | } | 4819 | } |
| 4825 | 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 | |||
| 4836 | if (null != targetFile && null != targetProperty) | 4821 | if (null != targetFile && null != targetProperty) |
| 4837 | { | 4822 | { |
| 4838 | this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFile", "TargetProperty")); | 4823 | this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFile", "TargetProperty")); |
| @@ -4842,11 +4827,6 @@ namespace WixToolset.Core | |||
| 4842 | 4827 | ||
| 4843 | if (YesNoType.Yes == advertise) | 4828 | if (YesNoType.Yes == advertise) |
| 4844 | { | 4829 | { |
| 4845 | if (null != target) | ||
| 4846 | { | ||
| 4847 | this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "Target")); | ||
| 4848 | } | ||
| 4849 | |||
| 4850 | if (null != targetFile) | 4830 | if (null != targetFile) |
| 4851 | { | 4831 | { |
| 4852 | this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "TargetFile")); | 4832 | this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "TargetFile")); |
| @@ -4880,22 +4860,19 @@ namespace WixToolset.Core | |||
| 4880 | this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Sequence", "Advertise", "no")); | 4860 | this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Sequence", "Advertise", "no")); |
| 4881 | } | 4861 | } |
| 4882 | 4862 | ||
| 4883 | if (null == target && null == targetFile && null == targetProperty) | 4863 | if (null == targetFile && null == targetProperty) |
| 4884 | { | 4864 | { |
| 4885 | this.Core.Write(ErrorMessages.ExpectedAttributesWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFile", "TargetProperty", "Advertise", "no")); | 4865 | this.Core.Write(ErrorMessages.ExpectedAttributesWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFile", "TargetProperty", "Advertise", "no")); |
| 4886 | } | 4866 | } |
| 4887 | 4867 | ||
| 4888 | if (null == target) | 4868 | string target = null; |
| 4869 | if (null != targetFile) | ||
| 4889 | { | 4870 | { |
| 4890 | if (null != targetFile) | 4871 | target = String.Concat("\"[#", targetFile, "]\""); |
| 4891 | { | 4872 | } |
| 4892 | target = String.Concat("\"[#", targetFile, "]\""); | 4873 | else if (null != targetProperty) |
| 4893 | } | 4874 | { |
| 4894 | 4875 | target = String.Concat("\"[", targetProperty, "]\""); | |
| 4895 | if (null != targetProperty) | ||
| 4896 | { | ||
| 4897 | target = String.Concat("\"[", targetProperty, "]\""); | ||
| 4898 | } | ||
| 4899 | } | 4876 | } |
| 4900 | 4877 | ||
| 4901 | if (null != argument) | 4878 | if (null != argument) |
| @@ -4903,7 +4880,7 @@ namespace WixToolset.Core | |||
| 4903 | target = String.Concat(target, " ", argument); | 4880 | target = String.Concat(target, " ", argument); |
| 4904 | } | 4881 | } |
| 4905 | 4882 | ||
| 4906 | var prefix = (null != progId ? progId : String.Concat(".", extension)); | 4883 | var prefix = progId ?? String.Concat(".", extension); |
| 4907 | 4884 | ||
| 4908 | if (null != command) | 4885 | if (null != command) |
| 4909 | { | 4886 | { |
diff --git a/src/WixToolset.Core/Compiler_Module.cs b/src/WixToolset.Core/Compiler_Module.cs index 2f926d82..d730ae5d 100644 --- a/src/WixToolset.Core/Compiler_Module.cs +++ b/src/WixToolset.Core/Compiler_Module.cs | |||
| @@ -181,9 +181,6 @@ namespace WixToolset.Core | |||
| 181 | case "Icon": | 181 | case "Icon": |
| 182 | this.ParseIconElement(child); | 182 | this.ParseIconElement(child); |
| 183 | break; | 183 | break; |
| 184 | case "IgnoreModularization": | ||
| 185 | this.ParseIgnoreModularizationElement(child); | ||
| 186 | break; | ||
| 187 | case "IgnoreTable": | 184 | case "IgnoreTable": |
| 188 | this.ParseIgnoreTableElement(child); | 185 | this.ParseIgnoreTableElement(child); |
| 189 | break; | 186 | break; |
| @@ -625,53 +622,6 @@ namespace WixToolset.Core | |||
| 625 | } | 622 | } |
| 626 | 623 | ||
| 627 | /// <summary> | 624 | /// <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 | |||
| 674 | /// <summary> | ||
| 675 | /// Parses an IgnoreTable element. | 625 | /// Parses an IgnoreTable element. |
| 676 | /// </summary> | 626 | /// </summary> |
| 677 | /// <param name="node">Element to parse.</param> | 627 | /// <param name="node">Element to parse.</param> |
diff --git a/src/WixToolset.Core/Compiler_PatchCreation.cs b/src/WixToolset.Core/Compiler_PatchCreation.cs index ddd07654..c1c593c2 100644 --- a/src/WixToolset.Core/Compiler_PatchCreation.cs +++ b/src/WixToolset.Core/Compiler_PatchCreation.cs | |||
| @@ -305,29 +305,9 @@ namespace WixToolset.Core | |||
| 305 | } | 305 | } |
| 306 | break; | 306 | break; |
| 307 | case "SourceFile": | 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 | } | ||
| 318 | sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 308 | sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib); |
| 319 | break; | 309 | break; |
| 320 | case "SourcePatch": | 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 | } | ||
| 331 | sourcePatch = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 311 | sourcePatch = this.Core.GetAttributeValue(sourceLineNumbers, attrib); |
| 332 | break; | 312 | break; |
| 333 | default: | 313 | default: |
| @@ -518,16 +498,6 @@ namespace WixToolset.Core | |||
| 518 | order = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, Int32.MinValue + 2, Int32.MaxValue); | 498 | order = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, Int32.MinValue + 2, Int32.MaxValue); |
| 519 | break; | 499 | break; |
| 520 | case "SourceFile": | 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 | } | ||
| 531 | sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 501 | sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib); |
| 532 | break; | 502 | break; |
| 533 | case "Validation": | 503 | case "Validation": |
| @@ -727,16 +697,6 @@ namespace WixToolset.Core | |||
| 727 | order = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, Int32.MinValue + 2, Int32.MaxValue); | 697 | order = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, Int32.MinValue + 2, Int32.MaxValue); |
| 728 | break; | 698 | break; |
| 729 | case "Source": | 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 | } | ||
| 740 | source = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 700 | source = this.Core.GetAttributeValue(sourceLineNumbers, attrib); |
| 741 | break; | 701 | break; |
| 742 | default: | 702 | default: |
