diff options
author | Rob Mensching <rob@firegiant.com> | 2019-05-09 08:57:43 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2019-05-09 08:57:43 -0700 |
commit | fbc081741b9923868ebf4aeb98f1e678f5fb6d97 (patch) | |
tree | 1578d641b25a3cf0ac4d8d6b02ab45a1999aca76 /src | |
parent | 3b1848368ffe8220973b12de2f76fdc8c0114683 (diff) | |
download | wix-fbc081741b9923868ebf4aeb98f1e678f5fb6d97.tar.gz wix-fbc081741b9923868ebf4aeb98f1e678f5fb6d97.tar.bz2 wix-fbc081741b9923868ebf4aeb98f1e678f5fb6d97.zip |
Update to latest tools and changes from those tools
Diffstat (limited to 'src')
-rw-r--r-- | src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj | 11 | ||||
-rw-r--r-- | src/test/WixToolsetTest.Util/WixToolsetTest.Util.v3.ncrunchproject | 5 | ||||
-rw-r--r-- | src/wixext/UtilCompiler.cs | 112 | ||||
-rw-r--r-- | src/wixlib/packages.config | 2 | ||||
-rw-r--r-- | src/wixlib/util.wixproj | 4 |
5 files changed, 64 insertions, 70 deletions
diff --git a/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj b/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj index 8fe8d640..294844ac 100644 --- a/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj +++ b/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- 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 | <!-- 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. --> |
3 | 3 | ||
4 | <Project Sdk="Microsoft.NET.Sdk"> | 4 | <Project Sdk="Microsoft.NET.Sdk"> |
@@ -23,7 +23,10 @@ | |||
23 | </ItemGroup> | 23 | </ItemGroup> |
24 | 24 | ||
25 | <ItemGroup> | 25 | <ItemGroup> |
26 | <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" PrivateAssets="all" /> | 26 | <PackageReference Include="WixToolset.Core" Version="4.0.*" /> |
27 | <PackageReference Include="WixToolset.Core.Burn" Version="4.0.*" /> | ||
28 | <PackageReference Include="WixToolset.Core.WindowsInstaller" Version="4.0.*" /> | ||
29 | <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" /> | ||
27 | </ItemGroup> | 30 | </ItemGroup> |
28 | 31 | ||
29 | <ItemGroup> | 32 | <ItemGroup> |
@@ -32,7 +35,7 @@ | |||
32 | 35 | ||
33 | <ItemGroup> | 36 | <ItemGroup> |
34 | <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" /> | 37 | <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" /> |
35 | <PackageReference Include="xunit" Version="2.4.0" /> | 38 | <PackageReference Include="xunit" Version="2.4.1" /> |
36 | <PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" /> | 39 | <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" /> |
37 | </ItemGroup> | 40 | </ItemGroup> |
38 | </Project> | 41 | </Project> |
diff --git a/src/test/WixToolsetTest.Util/WixToolsetTest.Util.v3.ncrunchproject b/src/test/WixToolsetTest.Util/WixToolsetTest.Util.v3.ncrunchproject new file mode 100644 index 00000000..7b5b2139 --- /dev/null +++ b/src/test/WixToolsetTest.Util/WixToolsetTest.Util.v3.ncrunchproject | |||
@@ -0,0 +1,5 @@ | |||
1 | <ProjectConfiguration> | ||
2 | <Settings> | ||
3 | <CopyReferencedAssembliesToWorkspace>True</CopyReferencedAssembliesToWorkspace> | ||
4 | </Settings> | ||
5 | </ProjectConfiguration> \ No newline at end of file | ||
diff --git a/src/wixext/UtilCompiler.cs b/src/wixext/UtilCompiler.cs index 3522d1fb..5adb5289 100644 --- a/src/wixext/UtilCompiler.cs +++ b/src/wixext/UtilCompiler.cs | |||
@@ -11,6 +11,7 @@ namespace WixToolset.Util | |||
11 | using System.Text.RegularExpressions; | 11 | using System.Text.RegularExpressions; |
12 | using System.Xml.Linq; | 12 | using System.Xml.Linq; |
13 | using WixToolset.Data; | 13 | using WixToolset.Data; |
14 | using WixToolset.Data.Tuples; | ||
14 | using WixToolset.Extensibility; | 15 | using WixToolset.Extensibility; |
15 | using WixToolset.Extensibility.Data; | 16 | using WixToolset.Extensibility.Data; |
16 | 17 | ||
@@ -146,9 +147,9 @@ namespace WixToolset.Util | |||
146 | /// <param name="parentElement">Parent element of element to process.</param> | 147 | /// <param name="parentElement">Parent element of element to process.</param> |
147 | /// <param name="element">Element to process.</param> | 148 | /// <param name="element">Element to process.</param> |
148 | /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param> | 149 | /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param> |
149 | public override ComponentKeyPath ParsePossibleKeyPathElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) | 150 | public override IComponentKeyPath ParsePossibleKeyPathElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) |
150 | { | 151 | { |
151 | ComponentKeyPath possibleKeyPath = null; | 152 | IComponentKeyPath possibleKeyPath = null; |
152 | 153 | ||
153 | switch (parentElement.Name.LocalName) | 154 | switch (parentElement.Name.LocalName) |
154 | { | 155 | { |
@@ -549,7 +550,7 @@ namespace WixToolset.Util | |||
549 | /// </summary> | 550 | /// </summary> |
550 | /// <param name="element">Element to parse.</param> | 551 | /// <param name="element">Element to parse.</param> |
551 | /// <param name="componentId">Identifier of parent component.</param> | 552 | /// <param name="componentId">Identifier of parent component.</param> |
552 | private ComponentKeyPath ParseEventSourceElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId) | 553 | private IComponentKeyPath ParseEventSourceElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId) |
553 | { | 554 | { |
554 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | 555 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
555 | string sourceName = null; | 556 | string sourceName = null; |
@@ -568,7 +569,7 @@ namespace WixToolset.Util | |||
568 | switch (attrib.Name.LocalName) | 569 | switch (attrib.Name.LocalName) |
569 | { | 570 | { |
570 | case "CategoryCount": | 571 | case "CategoryCount": |
571 | categoryCount = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | 572 | categoryCount = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int32.MaxValue); |
572 | break; | 573 | break; |
573 | case "CategoryMessageFile": | 574 | case "CategoryMessageFile": |
574 | categoryMessageFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 575 | categoryMessageFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
@@ -660,31 +661,34 @@ namespace WixToolset.Util | |||
660 | 661 | ||
661 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | 662 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); |
662 | 663 | ||
663 | int registryRoot = 2; // MsiInterop.MsidbRegistryRootLocalMachine | 664 | string eventSourceKey = $@"SYSTEM\CurrentControlSet\Services\EventLog\{logName}\{sourceName}"; |
664 | string eventSourceKey = String.Format(@"SYSTEM\CurrentControlSet\Services\EventLog\{0}\{1}", logName, sourceName); | 665 | Identifier id = this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, RegistryRootType.LocalMachine, eventSourceKey, "EventMessageFile", String.Concat("#%", eventMessageFile), componentId, false); |
665 | Identifier id = this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, eventSourceKey, "EventMessageFile", String.Concat("#%", eventMessageFile), componentId, false); | ||
666 | 666 | ||
667 | if (null != categoryMessageFile) | 667 | if (null != categoryMessageFile) |
668 | { | 668 | { |
669 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, eventSourceKey, "CategoryMessageFile", String.Concat("#%", categoryMessageFile), componentId, false); | 669 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, RegistryRootType.LocalMachine, eventSourceKey, "CategoryMessageFile", String.Concat("#%", categoryMessageFile), componentId, false); |
670 | } | 670 | } |
671 | 671 | ||
672 | if (CompilerConstants.IntegerNotSet != categoryCount) | 672 | if (CompilerConstants.IntegerNotSet != categoryCount) |
673 | { | 673 | { |
674 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, eventSourceKey, "CategoryCount", String.Concat("#", categoryCount), componentId, false); | 674 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, RegistryRootType.LocalMachine, eventSourceKey, "CategoryCount", String.Concat("#", categoryCount), componentId, false); |
675 | } | 675 | } |
676 | 676 | ||
677 | if (null != parameterMessageFile) | 677 | if (null != parameterMessageFile) |
678 | { | 678 | { |
679 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, eventSourceKey, "ParameterMessageFile", String.Concat("#%", parameterMessageFile), componentId, false); | 679 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, RegistryRootType.LocalMachine, eventSourceKey, "ParameterMessageFile", String.Concat("#%", parameterMessageFile), componentId, false); |
680 | } | 680 | } |
681 | 681 | ||
682 | if (0 != typesSupported) | 682 | if (0 != typesSupported) |
683 | { | 683 | { |
684 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, eventSourceKey, "TypesSupported", String.Concat("#", typesSupported), componentId, false); | 684 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, RegistryRootType.LocalMachine, eventSourceKey, "TypesSupported", String.Concat("#", typesSupported), componentId, false); |
685 | } | 685 | } |
686 | 686 | ||
687 | return new ComponentKeyPath() { Id = id.Id, Explicit = isKeyPath, Type = ComponentKeyPathType.Registry }; | 687 | var componentKeyPath = this.CreateComponentKeyPath(); |
688 | componentKeyPath.Id = id.Id; | ||
689 | componentKeyPath.Explicit = isKeyPath; | ||
690 | componentKeyPath.Type = PossibleKeyPathType.Registry; | ||
691 | return componentKeyPath; | ||
688 | } | 692 | } |
689 | 693 | ||
690 | /// <summary> | 694 | /// <summary> |
@@ -720,10 +724,10 @@ namespace WixToolset.Util | |||
720 | property = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 724 | property = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
721 | break; | 725 | break; |
722 | case "Sequence": | 726 | case "Sequence": |
723 | sequence = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | 727 | sequence = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int32.MaxValue); |
724 | break; | 728 | break; |
725 | case "Timeout": | 729 | case "Timeout": |
726 | timeout = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | 730 | timeout = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int32.MaxValue); |
727 | break; | 731 | break; |
728 | case "Target": | 732 | case "Target": |
729 | target = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 733 | target = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
@@ -789,7 +793,7 @@ namespace WixToolset.Util | |||
789 | } | 793 | } |
790 | break; | 794 | break; |
791 | case "TerminateProcess": | 795 | case "TerminateProcess": |
792 | terminateExitCode = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | 796 | terminateExitCode = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int32.MaxValue); |
793 | attributes |= 0x20; // CLOSEAPP_ATTRIBUTE_TERMINATEPROCESS | 797 | attributes |= 0x20; // CLOSEAPP_ATTRIBUTE_TERMINATEPROCESS |
794 | break; | 798 | break; |
795 | default: | 799 | default: |
@@ -1273,7 +1277,7 @@ namespace WixToolset.Util | |||
1273 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "User")); | 1277 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "User")); |
1274 | } | 1278 | } |
1275 | 1279 | ||
1276 | if (int.MinValue == permission) // just GENERIC_READ, which is MSI_NULL | 1280 | if (Int32.MinValue == permission) // just GENERIC_READ, which is MSI_NULL |
1277 | { | 1281 | { |
1278 | this.Messaging.Write(ErrorMessages.GenericReadNotAllowed(sourceLineNumbers)); | 1282 | this.Messaging.Write(ErrorMessages.GenericReadNotAllowed(sourceLineNumbers)); |
1279 | } | 1283 | } |
@@ -1427,7 +1431,7 @@ namespace WixToolset.Util | |||
1427 | iconFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 1431 | iconFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
1428 | break; | 1432 | break; |
1429 | case "IconIndex": | 1433 | case "IconIndex": |
1430 | iconIndex = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | 1434 | iconIndex = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int32.MaxValue); |
1431 | break; | 1435 | break; |
1432 | default: | 1436 | default: |
1433 | this.ParseHelper.UnexpectedAttribute(element, attrib); | 1437 | this.ParseHelper.UnexpectedAttribute(element, attrib); |
@@ -1481,7 +1485,7 @@ namespace WixToolset.Util | |||
1481 | 1485 | ||
1482 | if (!this.Messaging.EncounteredError) | 1486 | if (!this.Messaging.EncounteredError) |
1483 | { | 1487 | { |
1484 | CreateWixInternetShortcut(intermediate, section, sourceLineNumbers, componentId, directoryId, id, name, target, shortcutType, iconFile, iconIndex); | 1488 | this.CreateWixInternetShortcut(section, sourceLineNumbers, componentId, directoryId, id, name, target, shortcutType, iconFile, iconIndex); |
1485 | } | 1489 | } |
1486 | } | 1490 | } |
1487 | 1491 | ||
@@ -1495,7 +1499,7 @@ namespace WixToolset.Util | |||
1495 | /// <param name="id">Identifier of shortcut.</param> | 1499 | /// <param name="id">Identifier of shortcut.</param> |
1496 | /// <param name="name">Name of shortcut without extension.</param> | 1500 | /// <param name="name">Name of shortcut without extension.</param> |
1497 | /// <param name="target">Target URL of shortcut.</param> | 1501 | /// <param name="target">Target URL of shortcut.</param> |
1498 | public void CreateWixInternetShortcut(Intermediate intermediate, IntermediateSection section, SourceLineNumber sourceLineNumbers, string componentId, string directoryId, string shortcutId, string name, string target, InternetShortcutType type, string iconFile, int iconIndex) | 1502 | private void CreateWixInternetShortcut(IntermediateSection section, SourceLineNumber sourceLineNumbers, string componentId, string directoryId, string shortcutId, string name, string target, InternetShortcutType type, string iconFile, int iconIndex) |
1499 | { | 1503 | { |
1500 | // add the appropriate extension based on type of shortcut | 1504 | // add the appropriate extension based on type of shortcut |
1501 | name = String.Concat(name, InternetShortcutType.Url == type ? ".url" : ".lnk"); | 1505 | name = String.Concat(name, InternetShortcutType.Url == type ? ".url" : ".lnk"); |
@@ -1687,20 +1691,19 @@ namespace WixToolset.Util | |||
1687 | row.Set(4, sbSymbolicConstants.ToString()); | 1691 | row.Set(4, sbSymbolicConstants.ToString()); |
1688 | 1692 | ||
1689 | // Set up the application's performance key. | 1693 | // Set up the application's performance key. |
1690 | int registryRoot = 2; // HKLM | ||
1691 | string escapedName = UtilCompiler.FindPropertyBrackets.Replace(name, this.EscapeProperties); | 1694 | string escapedName = UtilCompiler.FindPropertyBrackets.Replace(name, this.EscapeProperties); |
1692 | string linkageKey = String.Format(@"SYSTEM\CurrentControlSet\Services\{0}\Linkage", escapedName); | 1695 | string linkageKey = String.Format(@"SYSTEM\CurrentControlSet\Services\{0}\Linkage", escapedName); |
1693 | string performanceKey = String.Format(@"SYSTEM\CurrentControlSet\Services\{0}\Performance", escapedName); | 1696 | string performanceKey = String.Format(@"SYSTEM\CurrentControlSet\Services\{0}\Performance", escapedName); |
1694 | 1697 | ||
1695 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, linkageKey, "Export", escapedName, componentId, false); | 1698 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, RegistryRootType.LocalMachine, linkageKey, "Export", escapedName, componentId, false); |
1696 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "-", null, componentId, false); | 1699 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, RegistryRootType.LocalMachine, performanceKey, "-", null, componentId, false); |
1697 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "Library", library, componentId, false); | 1700 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, RegistryRootType.LocalMachine, performanceKey, "Library", library, componentId, false); |
1698 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "Open", openEntryPoint, componentId, false); | 1701 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, RegistryRootType.LocalMachine, performanceKey, "Open", openEntryPoint, componentId, false); |
1699 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "Collect", collectEntryPoint, componentId, false); | 1702 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, RegistryRootType.LocalMachine, performanceKey, "Collect", collectEntryPoint, componentId, false); |
1700 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "Close", closeEntryPoint, componentId, false); | 1703 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, RegistryRootType.LocalMachine, performanceKey, "Close", closeEntryPoint, componentId, false); |
1701 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "IsMultiInstance", YesNoType.Yes == multiInstance ? "#1" : "#0", componentId, false); | 1704 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, RegistryRootType.LocalMachine, performanceKey, "IsMultiInstance", YesNoType.Yes == multiInstance ? "#1" : "#0", componentId, false); |
1702 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "Counter Names", sbCounterNames.ToString(), componentId, false); | 1705 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, RegistryRootType.LocalMachine, performanceKey, "Counter Names", sbCounterNames.ToString(), componentId, false); |
1703 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, registryRoot, performanceKey, "Counter Types", sbCounterTypes.ToString(), componentId, false); | 1706 | this.ParseHelper.CreateRegistryRow(section, sourceLineNumbers, RegistryRootType.LocalMachine, performanceKey, "Counter Types", sbCounterTypes.ToString(), componentId, false); |
1704 | } | 1707 | } |
1705 | 1708 | ||
1706 | // Reference InstallPerfCounterData and UninstallPerfCounterData since nothing will happen without them | 1709 | // Reference InstallPerfCounterData and UninstallPerfCounterData since nothing will happen without them |
@@ -2523,7 +2526,7 @@ namespace WixToolset.Util | |||
2523 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "User")); | 2526 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "User")); |
2524 | } | 2527 | } |
2525 | 2528 | ||
2526 | if (int.MinValue == permission) // just GENERIC_READ, which is MSI_NULL | 2529 | if (Int32.MinValue == permission) // just GENERIC_READ, which is MSI_NULL |
2527 | { | 2530 | { |
2528 | this.Messaging.Write(ErrorMessages.GenericReadNotAllowed(sourceLineNumbers)); | 2531 | this.Messaging.Write(ErrorMessages.GenericReadNotAllowed(sourceLineNumbers)); |
2529 | } | 2532 | } |
@@ -2694,7 +2697,7 @@ namespace WixToolset.Util | |||
2694 | string variable = null; | 2697 | string variable = null; |
2695 | string condition = null; | 2698 | string condition = null; |
2696 | string after = null; | 2699 | string after = null; |
2697 | int root = CompilerConstants.IntegerNotSet; | 2700 | RegistryRootType? root = null; |
2698 | string key = null; | 2701 | string key = null; |
2699 | string value = null; | 2702 | string value = null; |
2700 | YesNoType expand = YesNoType.NotSet; | 2703 | YesNoType expand = YesNoType.NotSet; |
@@ -2715,7 +2718,7 @@ namespace WixToolset.Util | |||
2715 | this.ParseCommonSearchAttributes(sourceLineNumbers, attrib, ref id, ref variable, ref condition, ref after); | 2718 | this.ParseCommonSearchAttributes(sourceLineNumbers, attrib, ref id, ref variable, ref condition, ref after); |
2716 | break; | 2719 | break; |
2717 | case "Root": | 2720 | case "Root": |
2718 | root = this.ParseHelper.GetAttributeMsidbRegistryRootValue(sourceLineNumbers, attrib, false); | 2721 | root = this.ParseHelper.GetAttributeRegistryRootValue(sourceLineNumbers, attrib, false); |
2719 | break; | 2722 | break; |
2720 | case "Key": | 2723 | case "Key": |
2721 | key = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 2724 | key = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
@@ -2764,7 +2767,7 @@ namespace WixToolset.Util | |||
2764 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Variable")); | 2767 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Variable")); |
2765 | } | 2768 | } |
2766 | 2769 | ||
2767 | if (CompilerConstants.IntegerNotSet == root) | 2770 | if (!root.HasValue) |
2768 | { | 2771 | { |
2769 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Root")); | 2772 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Root")); |
2770 | } | 2773 | } |
@@ -2834,7 +2837,7 @@ namespace WixToolset.Util | |||
2834 | } | 2837 | } |
2835 | 2838 | ||
2836 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixRegistrySearch", id); | 2839 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixRegistrySearch", id); |
2837 | row.Set(1, root); | 2840 | row.Set(1, (int)root); |
2838 | row.Set(2, key); | 2841 | row.Set(2, key); |
2839 | row.Set(3, value); | 2842 | row.Set(3, value); |
2840 | row.Set(4, (int)attributes); | 2843 | row.Set(4, (int)attributes); |
@@ -3044,10 +3047,10 @@ namespace WixToolset.Util | |||
3044 | rebootMessage = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 3047 | rebootMessage = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
3045 | break; | 3048 | break; |
3046 | case "ResetPeriodInDays": | 3049 | case "ResetPeriodInDays": |
3047 | resetPeriod = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | 3050 | resetPeriod = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int32.MaxValue); |
3048 | break; | 3051 | break; |
3049 | case "RestartServiceDelayInSeconds": | 3052 | case "RestartServiceDelayInSeconds": |
3050 | restartServiceDelay = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | 3053 | restartServiceDelay = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int32.MaxValue); |
3051 | break; | 3054 | break; |
3052 | case "SecondFailureActionType": | 3055 | case "SecondFailureActionType": |
3053 | secondFailureActionType = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 3056 | secondFailureActionType = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
@@ -3511,7 +3514,7 @@ namespace WixToolset.Util | |||
3511 | } | 3514 | } |
3512 | break; | 3515 | break; |
3513 | case "Sequence": | 3516 | case "Sequence": |
3514 | sequence = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue); | 3517 | sequence = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, Int16.MaxValue); |
3515 | break; | 3518 | break; |
3516 | case "Value": | 3519 | case "Value": |
3517 | value = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 3520 | value = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
@@ -3700,7 +3703,7 @@ namespace WixToolset.Util | |||
3700 | } | 3703 | } |
3701 | break; | 3704 | break; |
3702 | case "Sequence": | 3705 | case "Sequence": |
3703 | sequence = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue); | 3706 | sequence = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, Int16.MaxValue); |
3704 | break; | 3707 | break; |
3705 | case "Value": | 3708 | case "Value": |
3706 | value = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 3709 | value = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
@@ -3874,38 +3877,21 @@ namespace WixToolset.Util | |||
3874 | /// </summary> | 3877 | /// </summary> |
3875 | private class ParsedPerformanceCounter | 3878 | private class ParsedPerformanceCounter |
3876 | { | 3879 | { |
3877 | string name; | ||
3878 | string help; | ||
3879 | int type; | ||
3880 | string language; | ||
3881 | |||
3882 | internal ParsedPerformanceCounter(string name, string help, System.Diagnostics.PerformanceCounterType type, int language) | 3880 | internal ParsedPerformanceCounter(string name, string help, System.Diagnostics.PerformanceCounterType type, int language) |
3883 | { | 3881 | { |
3884 | this.name = name; | 3882 | this.Name = name; |
3885 | this.help = help; | 3883 | this.Help = help; |
3886 | this.type = (int)type; | 3884 | this.Type = (int)type; |
3887 | this.language = language.ToString("D3", CultureInfo.InvariantCulture); | 3885 | this.Language = language.ToString("D3", CultureInfo.InvariantCulture); |
3888 | } | 3886 | } |
3889 | 3887 | ||
3890 | internal string Name | 3888 | internal string Name { get; } |
3891 | { | ||
3892 | get { return this.name; } | ||
3893 | } | ||
3894 | 3889 | ||
3895 | internal string Help | 3890 | internal string Help { get; } |
3896 | { | ||
3897 | get { return this.help; } | ||
3898 | } | ||
3899 | 3891 | ||
3900 | internal int Type | 3892 | internal int Type { get; } |
3901 | { | ||
3902 | get { return this.type; } | ||
3903 | } | ||
3904 | 3893 | ||
3905 | internal string Language | 3894 | internal string Language { get; } |
3906 | { | ||
3907 | get { return this.language; } | ||
3908 | } | ||
3909 | } | 3895 | } |
3910 | } | 3896 | } |
3911 | } | 3897 | } |
diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index f3d424e1..251c740a 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config | |||
@@ -1,5 +1,5 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <packages> | 2 | <packages> |
3 | <package id="Nerdbank.GitVersioning" version="2.1.65" developmentDependency="true" targetFramework="net40" /> | 3 | <package id="Nerdbank.GitVersioning" version="2.1.65" developmentDependency="true" targetFramework="net40" /> |
4 | <package id="WixToolset.MSBuild" version="4.0.0-build-0005" developmentDependency="true" targetFramework="net40" /> | 4 | <package id="WixToolset.MSBuild" version="4.0.0-build-0043" developmentDependency="true" targetFramework="net40" /> |
5 | </packages> \ No newline at end of file | 5 | </packages> \ No newline at end of file |
diff --git a/src/wixlib/util.wixproj b/src/wixlib/util.wixproj index a55e64fb..3af40366 100644 --- a/src/wixlib/util.wixproj +++ b/src/wixlib/util.wixproj | |||
@@ -1,7 +1,7 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- 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 | <!-- 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. --> |
3 | <Project DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0"> | 3 | <Project DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0"> |
4 | <Import Project="..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props')" /> | 4 | <Import Project="..\..\packages\WixToolset.MSBuild.4.0.0-build-0043\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0043\build\WixToolset.MSBuild.props')" /> |
5 | <Import Project="..\FindLocalWix.props" /> | 5 | <Import Project="..\FindLocalWix.props" /> |
6 | <PropertyGroup> | 6 | <PropertyGroup> |
7 | <ProjectGuid>{1ACFFEFD-505A-41A5-ACBF-A02B7B473AA2}</ProjectGuid> | 7 | <ProjectGuid>{1ACFFEFD-505A-41A5-ACBF-A02B7B473AA2}</ProjectGuid> |
@@ -46,7 +46,7 @@ | |||
46 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | 46 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
47 | </PropertyGroup> | 47 | </PropertyGroup> |
48 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" /> | 48 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" /> |
49 | <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props'))" /> | 49 | <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0043\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0043\build\WixToolset.MSBuild.props'))" /> |
50 | </Target> | 50 | </Target> |
51 | <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" /> | 51 | <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" /> |
52 | </Project> | 52 | </Project> |