diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-07-10 21:25:44 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-07-10 22:10:26 +1000 |
commit | f866ab77f8fd0790f4d6628f54dcdf0bd66fccb6 (patch) | |
tree | b3705d3655e678003d4fce590e7c5cb1c836778e /src/wixext/Symbols | |
parent | af43f098d7d7cc0fe21c7d7b0fe991763e9cae07 (diff) | |
download | wix-f866ab77f8fd0790f4d6628f54dcdf0bd66fccb6.tar.gz wix-f866ab77f8fd0790f4d6628f54dcdf0bd66fccb6.tar.bz2 wix-f866ab77f8fd0790f4d6628f54dcdf0bd66fccb6.zip |
Change the DetectSHA2Support element to WindowsFeatureSearch. This will make it easier to add support for other Windows features in the future.
Diffstat (limited to 'src/wixext/Symbols')
-rw-r--r-- | src/wixext/Symbols/UtilSymbolDefinitions.cs | 10 | ||||
-rw-r--r-- | src/wixext/Symbols/WixDetectSHA2SupportSymbol.cs | 33 | ||||
-rw-r--r-- | src/wixext/Symbols/WixWindowsFeatureSearchSymbol.cs | 47 |
3 files changed, 52 insertions, 38 deletions
diff --git a/src/wixext/Symbols/UtilSymbolDefinitions.cs b/src/wixext/Symbols/UtilSymbolDefinitions.cs index ae9c4c81..5f062676 100644 --- a/src/wixext/Symbols/UtilSymbolDefinitions.cs +++ b/src/wixext/Symbols/UtilSymbolDefinitions.cs | |||
@@ -20,12 +20,12 @@ namespace WixToolset.Util | |||
20 | User, | 20 | User, |
21 | UserGroup, | 21 | UserGroup, |
22 | WixCloseApplication, | 22 | WixCloseApplication, |
23 | WixDetectSHA2Support, | ||
24 | WixFormatFiles, | 23 | WixFormatFiles, |
25 | WixInternetShortcut, | 24 | WixInternetShortcut, |
26 | WixRemoveFolderEx, | 25 | WixRemoveFolderEx, |
27 | WixRestartResource, | 26 | WixRestartResource, |
28 | WixTouchFile, | 27 | WixTouchFile, |
28 | WixWindowsFeatureSearch, | ||
29 | XmlConfig, | 29 | XmlConfig, |
30 | XmlFile, | 30 | XmlFile, |
31 | } | 31 | } |
@@ -84,9 +84,6 @@ namespace WixToolset.Util | |||
84 | case UtilSymbolDefinitionType.WixCloseApplication: | 84 | case UtilSymbolDefinitionType.WixCloseApplication: |
85 | return UtilSymbolDefinitions.WixCloseApplication; | 85 | return UtilSymbolDefinitions.WixCloseApplication; |
86 | 86 | ||
87 | case UtilSymbolDefinitionType.WixDetectSHA2Support: | ||
88 | return UtilSymbolDefinitions.WixDetectSHA2Support; | ||
89 | |||
90 | case UtilSymbolDefinitionType.WixFormatFiles: | 87 | case UtilSymbolDefinitionType.WixFormatFiles: |
91 | return UtilSymbolDefinitions.WixFormatFiles; | 88 | return UtilSymbolDefinitions.WixFormatFiles; |
92 | 89 | ||
@@ -102,6 +99,9 @@ namespace WixToolset.Util | |||
102 | case UtilSymbolDefinitionType.WixTouchFile: | 99 | case UtilSymbolDefinitionType.WixTouchFile: |
103 | return UtilSymbolDefinitions.WixTouchFile; | 100 | return UtilSymbolDefinitions.WixTouchFile; |
104 | 101 | ||
102 | case UtilSymbolDefinitionType.WixWindowsFeatureSearch: | ||
103 | return UtilSymbolDefinitions.WixWindowsFeatureSearch; | ||
104 | |||
105 | case UtilSymbolDefinitionType.XmlConfig: | 105 | case UtilSymbolDefinitionType.XmlConfig: |
106 | return UtilSymbolDefinitions.XmlConfig; | 106 | return UtilSymbolDefinitions.XmlConfig; |
107 | 107 | ||
@@ -115,7 +115,7 @@ namespace WixToolset.Util | |||
115 | 115 | ||
116 | static UtilSymbolDefinitions() | 116 | static UtilSymbolDefinitions() |
117 | { | 117 | { |
118 | WixDetectSHA2Support.AddTag(BurnConstants.BundleExtensionSearchSymbolDefinitionTag); | 118 | WixWindowsFeatureSearch.AddTag(BurnConstants.BundleExtensionSearchSymbolDefinitionTag); |
119 | } | 119 | } |
120 | } | 120 | } |
121 | } | 121 | } |
diff --git a/src/wixext/Symbols/WixDetectSHA2SupportSymbol.cs b/src/wixext/Symbols/WixDetectSHA2SupportSymbol.cs deleted file mode 100644 index b518ba3b..00000000 --- a/src/wixext/Symbols/WixDetectSHA2SupportSymbol.cs +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
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.Util | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Util.Symbols; | ||
7 | |||
8 | public static partial class UtilSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixDetectSHA2Support = new IntermediateSymbolDefinition( | ||
11 | UtilSymbolDefinitionType.WixDetectSHA2Support.ToString(), | ||
12 | new IntermediateFieldDefinition[0], | ||
13 | typeof(WixDetectSHA2SupportSymbol)); | ||
14 | } | ||
15 | } | ||
16 | |||
17 | namespace WixToolset.Util.Symbols | ||
18 | { | ||
19 | using WixToolset.Data; | ||
20 | |||
21 | public class WixDetectSHA2SupportSymbol : IntermediateSymbol | ||
22 | { | ||
23 | public WixDetectSHA2SupportSymbol() : base(UtilSymbolDefinitions.WixDetectSHA2Support, null, null) | ||
24 | { | ||
25 | } | ||
26 | |||
27 | public WixDetectSHA2SupportSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilSymbolDefinitions.WixDetectSHA2Support, sourceLineNumber, id) | ||
28 | { | ||
29 | } | ||
30 | |||
31 | public IntermediateField this[GroupSymbolFields index] => this.Fields[(int)index]; | ||
32 | } | ||
33 | } | ||
diff --git a/src/wixext/Symbols/WixWindowsFeatureSearchSymbol.cs b/src/wixext/Symbols/WixWindowsFeatureSearchSymbol.cs new file mode 100644 index 00000000..9a43692c --- /dev/null +++ b/src/wixext/Symbols/WixWindowsFeatureSearchSymbol.cs | |||
@@ -0,0 +1,47 @@ | |||
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.Util | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Util.Symbols; | ||
7 | |||
8 | public static partial class UtilSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixWindowsFeatureSearch = new IntermediateSymbolDefinition( | ||
11 | UtilSymbolDefinitionType.WixWindowsFeatureSearch.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixWindowsFeatureSearchSymbolFields.Type), IntermediateFieldType.String), | ||
15 | }, | ||
16 | typeof(WixWindowsFeatureSearchSymbol)); | ||
17 | } | ||
18 | } | ||
19 | |||
20 | namespace WixToolset.Util.Symbols | ||
21 | { | ||
22 | using WixToolset.Data; | ||
23 | |||
24 | public enum WixWindowsFeatureSearchSymbolFields | ||
25 | { | ||
26 | Type, | ||
27 | } | ||
28 | |||
29 | public class WixWindowsFeatureSearchSymbol : IntermediateSymbol | ||
30 | { | ||
31 | public WixWindowsFeatureSearchSymbol() : base(UtilSymbolDefinitions.WixWindowsFeatureSearch, null, null) | ||
32 | { | ||
33 | } | ||
34 | |||
35 | public WixWindowsFeatureSearchSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilSymbolDefinitions.WixWindowsFeatureSearch, sourceLineNumber, id) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public IntermediateField this[WixWindowsFeatureSearchSymbolFields index] => this.Fields[(int)index]; | ||
40 | |||
41 | public string Type | ||
42 | { | ||
43 | get => this.Fields[(int)WixWindowsFeatureSearchSymbolFields.Type].AsString(); | ||
44 | set => this.Set((int)WixWindowsFeatureSearchSymbolFields.Type, value); | ||
45 | } | ||
46 | } | ||
47 | } | ||