diff options
author | Rob Mensching <rob@firegiant.com> | 2022-11-07 23:05:41 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2022-11-08 00:19:10 -0800 |
commit | 86146e8c044a1aea2ea162701b1fc344d19e4dc3 (patch) | |
tree | 766bcea3c3a1c6dbb89e8156325324d44b56b1aa | |
parent | 55d1af260bc383dab269fbf0f371c2b1d84a3fed (diff) | |
download | wix-86146e8c044a1aea2ea162701b1fc344d19e4dc3.tar.gz wix-86146e8c044a1aea2ea162701b1fc344d19e4dc3.tar.bz2 wix-86146e8c044a1aea2ea162701b1fc344d19e4dc3.zip |
Very minor cleanup
-rw-r--r-- | src/ext/Http/wixext/HttpCompiler.cs | 3 | ||||
-rw-r--r-- | src/ext/Iis/wixext/IIsCompiler.cs | 4 | ||||
-rw-r--r-- | src/ext/NetFx/wixext/NetFxCompiler.cs | 2 | ||||
-rw-r--r-- | src/ext/Util/wixext/UtilCompiler.cs | 15 | ||||
-rw-r--r-- | src/wix/WixToolset.Core/Compiler_Bundle.cs | 7 | ||||
-rw-r--r-- | src/wix/WixToolset.Core/LocalizationParser.cs | 4 |
6 files changed, 16 insertions, 19 deletions
diff --git a/src/ext/Http/wixext/HttpCompiler.cs b/src/ext/Http/wixext/HttpCompiler.cs index 6c572470..51fdfebc 100644 --- a/src/ext/Http/wixext/HttpCompiler.cs +++ b/src/ext/Http/wixext/HttpCompiler.cs | |||
@@ -81,7 +81,6 @@ namespace WixToolset.Http | |||
81 | string store = null; | 81 | string store = null; |
82 | string thumbprint = null; | 82 | string thumbprint = null; |
83 | var handleExisting = HandleExisting.Replace; | 83 | var handleExisting = HandleExisting.Replace; |
84 | string handleExistingValue = null; | ||
85 | 84 | ||
86 | foreach (var attrib in node.Attributes()) | 85 | foreach (var attrib in node.Attributes()) |
87 | { | 86 | { |
@@ -96,7 +95,7 @@ namespace WixToolset.Http | |||
96 | appId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 95 | appId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
97 | break; | 96 | break; |
98 | case "HandleExisting": | 97 | case "HandleExisting": |
99 | handleExistingValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 98 | var handleExistingValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
100 | switch (handleExistingValue) | 99 | switch (handleExistingValue) |
101 | { | 100 | { |
102 | case "replace": | 101 | case "replace": |
diff --git a/src/ext/Iis/wixext/IIsCompiler.cs b/src/ext/Iis/wixext/IIsCompiler.cs index cb573ad1..1fcf5f61 100644 --- a/src/ext/Iis/wixext/IIsCompiler.cs +++ b/src/ext/Iis/wixext/IIsCompiler.cs | |||
@@ -67,7 +67,6 @@ namespace WixToolset.Iis | |||
67 | { | 67 | { |
68 | case "Component": | 68 | case "Component": |
69 | var componentId = context["ComponentId"]; | 69 | var componentId = context["ComponentId"]; |
70 | var directoryId = context["DirectoryId"]; | ||
71 | 70 | ||
72 | switch (element.Name.LocalName) | 71 | switch (element.Name.LocalName) |
73 | { | 72 | { |
@@ -265,7 +264,6 @@ namespace WixToolset.Iis | |||
265 | } | 264 | } |
266 | } | 265 | } |
267 | 266 | ||
268 | |||
269 | if (null == id) | 267 | if (null == id) |
270 | { | 268 | { |
271 | id = this.ParseHelper.CreateIdentifier("crt", componentId, binaryRef, certificatePath); | 269 | id = this.ParseHelper.CreateIdentifier("crt", componentId, binaryRef, certificatePath); |
@@ -351,7 +349,7 @@ namespace WixToolset.Iis | |||
351 | 349 | ||
352 | if (null == id) | 350 | if (null == id) |
353 | { | 351 | { |
354 | id = this.ParseHelper.CreateIdentifier("wsc", webId); | 352 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); |
355 | } | 353 | } |
356 | 354 | ||
357 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | 355 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); |
diff --git a/src/ext/NetFx/wixext/NetFxCompiler.cs b/src/ext/NetFx/wixext/NetFxCompiler.cs index f3c91918..563cd19d 100644 --- a/src/ext/NetFx/wixext/NetFxCompiler.cs +++ b/src/ext/NetFx/wixext/NetFxCompiler.cs | |||
@@ -425,7 +425,7 @@ namespace WixToolset.Netfx | |||
425 | break; | 425 | break; |
426 | case "RollForward": | 426 | case "RollForward": |
427 | rollForward = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 427 | rollForward = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
428 | switch (rollForward.ToLower()) | 428 | switch (rollForward.ToLowerInvariant()) |
429 | { | 429 | { |
430 | case "latestmajor": | 430 | case "latestmajor": |
431 | rollForward = "LatestMajor"; | 431 | rollForward = "LatestMajor"; |
diff --git a/src/ext/Util/wixext/UtilCompiler.cs b/src/ext/Util/wixext/UtilCompiler.cs index d937b4f1..47f82ca6 100644 --- a/src/ext/Util/wixext/UtilCompiler.cs +++ b/src/ext/Util/wixext/UtilCompiler.cs | |||
@@ -1232,10 +1232,7 @@ namespace WixToolset.Util | |||
1232 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); | 1232 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); |
1233 | } | 1233 | } |
1234 | 1234 | ||
1235 | if (!element.Elements().Any()) | 1235 | var fileSharePermissionCount = 0; |
1236 | { | ||
1237 | this.Messaging.Write(ErrorMessages.ExpectedElement(sourceLineNumbers, element.Name.LocalName, "FileSharePermission")); | ||
1238 | } | ||
1239 | 1236 | ||
1240 | foreach (var child in element.Elements()) | 1237 | foreach (var child in element.Elements()) |
1241 | { | 1238 | { |
@@ -1245,6 +1242,7 @@ namespace WixToolset.Util | |||
1245 | { | 1242 | { |
1246 | case "FileSharePermission": | 1243 | case "FileSharePermission": |
1247 | this.ParseFileSharePermissionElement(intermediate, section, child, id); | 1244 | this.ParseFileSharePermissionElement(intermediate, section, child, id); |
1245 | ++fileSharePermissionCount; | ||
1248 | break; | 1246 | break; |
1249 | default: | 1247 | default: |
1250 | this.ParseHelper.UnexpectedElement(element, child); | 1248 | this.ParseHelper.UnexpectedElement(element, child); |
@@ -1257,6 +1255,11 @@ namespace WixToolset.Util | |||
1257 | } | 1255 | } |
1258 | } | 1256 | } |
1259 | 1257 | ||
1258 | if (fileSharePermissionCount == 0) | ||
1259 | { | ||
1260 | this.Messaging.Write(ErrorMessages.ExpectedElement(sourceLineNumbers, element.Name.LocalName, "FileSharePermission")); | ||
1261 | } | ||
1262 | |||
1260 | this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "Wix4ConfigureSmbInstall", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM64); | 1263 | this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "Wix4ConfigureSmbInstall", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM64); |
1261 | this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "Wix4ConfigureSmbUninstall", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM64); | 1264 | this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "Wix4ConfigureSmbUninstall", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM64); |
1262 | 1265 | ||
@@ -3521,7 +3524,7 @@ namespace WixToolset.Util | |||
3521 | } | 3524 | } |
3522 | break; | 3525 | break; |
3523 | case "SelectionLanguage": | 3526 | case "SelectionLanguage": |
3524 | string selectionLanguage = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 3527 | var selectionLanguage = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
3525 | switch (selectionLanguage) | 3528 | switch (selectionLanguage) |
3526 | { | 3529 | { |
3527 | case "XPath": | 3530 | case "XPath": |
@@ -3653,7 +3656,7 @@ namespace WixToolset.Util | |||
3653 | } | 3656 | } |
3654 | else | 3657 | else |
3655 | { | 3658 | { |
3656 | string actionValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 3659 | var actionValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
3657 | switch (actionValue) | 3660 | switch (actionValue) |
3658 | { | 3661 | { |
3659 | case "create": | 3662 | case "create": |
diff --git a/src/wix/WixToolset.Core/Compiler_Bundle.cs b/src/wix/WixToolset.Core/Compiler_Bundle.cs index b9cf8e82..1976117c 100644 --- a/src/wix/WixToolset.Core/Compiler_Bundle.cs +++ b/src/wix/WixToolset.Core/Compiler_Bundle.cs | |||
@@ -11,7 +11,6 @@ namespace WixToolset.Core | |||
11 | using WixToolset.Data; | 11 | using WixToolset.Data; |
12 | using WixToolset.Data.Burn; | 12 | using WixToolset.Data.Burn; |
13 | using WixToolset.Data.Symbols; | 13 | using WixToolset.Data.Symbols; |
14 | using WixToolset.Extensibility; | ||
15 | 14 | ||
16 | /// <summary> | 15 | /// <summary> |
17 | /// Compiler of the WiX toolset. | 16 | /// Compiler of the WiX toolset. |
@@ -278,7 +277,7 @@ namespace WixToolset.Core | |||
278 | case "ProviderKey": | 277 | case "ProviderKey": |
279 | this.ParseBundleProviderKeyAttribute(sourceLineNumbers, node, attrib); | 278 | this.ParseBundleProviderKeyAttribute(sourceLineNumbers, node, attrib); |
280 | break; | 279 | break; |
281 | // Unknown attributes were reported earlier. | 280 | // Unknown attributes were reported earlier. |
282 | } | 281 | } |
283 | } | 282 | } |
284 | else | 283 | else |
@@ -852,8 +851,6 @@ namespace WixToolset.Core | |||
852 | } | 851 | } |
853 | } | 852 | } |
854 | 853 | ||
855 | |||
856 | |||
857 | /// <summary> | 854 | /// <summary> |
858 | /// Parses a BundleCustomData element. | 855 | /// Parses a BundleCustomData element. |
859 | /// </summary> | 856 | /// </summary> |
@@ -1940,7 +1937,7 @@ namespace WixToolset.Core | |||
1940 | logPathVariable = String.Concat("WixBundleLog_", id.Id); | 1937 | logPathVariable = String.Concat("WixBundleLog_", id.Id); |
1941 | } | 1938 | } |
1942 | } | 1939 | } |
1943 | else if (logPathVariable != null) | 1940 | else if (logPathVariable != null) |
1944 | { | 1941 | { |
1945 | this.Core.Write(ErrorMessages.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "LogPathVariable", logPathVariable, "Transaction")); | 1942 | this.Core.Write(ErrorMessages.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "LogPathVariable", logPathVariable, "Transaction")); |
1946 | } | 1943 | } |
diff --git a/src/wix/WixToolset.Core/LocalizationParser.cs b/src/wix/WixToolset.Core/LocalizationParser.cs index 98e17fe5..995efe40 100644 --- a/src/wix/WixToolset.Core/LocalizationParser.cs +++ b/src/wix/WixToolset.Core/LocalizationParser.cs | |||
@@ -97,10 +97,10 @@ namespace WixToolset.Core | |||
97 | switch (attrib.Name.LocalName) | 97 | switch (attrib.Name.LocalName) |
98 | { | 98 | { |
99 | case "Codepage": | 99 | case "Codepage": |
100 | codepage = Common.GetValidCodePage(attrib.Value, true, false, sourceLineNumbers); | 100 | codepage = Common.GetValidCodePage(attrib.Value, allowNoChange: true, onlyAnsi: false, sourceLineNumbers); |
101 | break; | 101 | break; |
102 | case "SummaryInformationCodepage": | 102 | case "SummaryInformationCodepage": |
103 | summaryInformationCodepage = Common.GetValidCodePage(attrib.Value, true, false, sourceLineNumbers); | 103 | summaryInformationCodepage = Common.GetValidCodePage(attrib.Value, allowNoChange: true, onlyAnsi: false, sourceLineNumbers); |
104 | break; | 104 | break; |
105 | case "Culture": | 105 | case "Culture": |
106 | culture = attrib.Value; | 106 | culture = attrib.Value; |