aboutsummaryrefslogtreecommitdiff
path: root/src/ext
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2022-11-07 23:05:41 -0800
committerRob Mensching <rob@firegiant.com>2022-11-08 00:19:10 -0800
commit86146e8c044a1aea2ea162701b1fc344d19e4dc3 (patch)
tree766bcea3c3a1c6dbb89e8156325324d44b56b1aa /src/ext
parent55d1af260bc383dab269fbf0f371c2b1d84a3fed (diff)
downloadwix-86146e8c044a1aea2ea162701b1fc344d19e4dc3.tar.gz
wix-86146e8c044a1aea2ea162701b1fc344d19e4dc3.tar.bz2
wix-86146e8c044a1aea2ea162701b1fc344d19e4dc3.zip
Very minor cleanup
Diffstat (limited to 'src/ext')
-rw-r--r--src/ext/Http/wixext/HttpCompiler.cs3
-rw-r--r--src/ext/Iis/wixext/IIsCompiler.cs4
-rw-r--r--src/ext/NetFx/wixext/NetFxCompiler.cs2
-rw-r--r--src/ext/Util/wixext/UtilCompiler.cs15
4 files changed, 12 insertions, 12 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":