diff options
| author | Bob Arnson <bob@firegiant.com> | 2025-05-19 22:17:08 -0400 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2025-05-28 18:04:34 -0700 |
| commit | d0639445af3b754019fa60e380b59e2857956fd9 (patch) | |
| tree | d8c9bdb054bb3ff0bd35f368c4ce5fa47d02750b /src/ext/Firewall/wixext | |
| parent | 5fddbd9e9449d64f405acad0ea285e5889224eac (diff) | |
| download | wix601.tar.gz wix601.tar.bz2 wix601.zip | |
Send all tables to extension decompilers.wix601
Also fix Firewall decompiler to decompile all possible Firewall tables.
Fixes https://github.com/wixtoolset/issues/issues/9070
Diffstat (limited to 'src/ext/Firewall/wixext')
| -rw-r--r-- | src/ext/Firewall/wixext/FirewallDecompiler.cs | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/ext/Firewall/wixext/FirewallDecompiler.cs b/src/ext/Firewall/wixext/FirewallDecompiler.cs index 4fafc0a0..dbfc882e 100644 --- a/src/ext/Firewall/wixext/FirewallDecompiler.cs +++ b/src/ext/Firewall/wixext/FirewallDecompiler.cs | |||
| @@ -4,8 +4,6 @@ namespace WixToolset.Firewall | |||
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 7 | using System.Reflection; | ||
| 8 | using System.Security; | ||
| 9 | using System.Xml.Linq; | 7 | using System.Xml.Linq; |
| 10 | using WixToolset.Data; | 8 | using WixToolset.Data; |
| 11 | using WixToolset.Data.WindowsInstaller; | 9 | using WixToolset.Data.WindowsInstaller; |
| @@ -83,7 +81,7 @@ namespace WixToolset.Firewall | |||
| 83 | string[] addresses = ((string)row[2]).Split(','); | 81 | string[] addresses = ((string)row[2]).Split(','); |
| 84 | if (addresses.Length == 1) | 82 | if (addresses.Length == 1) |
| 85 | { | 83 | { |
| 86 | switch(addresses[0]) | 84 | switch (addresses[0]) |
| 87 | { | 85 | { |
| 88 | case "*": | 86 | case "*": |
| 89 | firewallException.Add(new XAttribute("Scope", "any")); | 87 | firewallException.Add(new XAttribute("Scope", "any")); |
| @@ -482,20 +480,25 @@ namespace WixToolset.Firewall | |||
| 482 | /// <param name="tables">Collection of all tables.</param> | 480 | /// <param name="tables">Collection of all tables.</param> |
| 483 | private void FinalizeFirewallExceptionTable(TableIndexedCollection tables) | 481 | private void FinalizeFirewallExceptionTable(TableIndexedCollection tables) |
| 484 | { | 482 | { |
| 485 | if (tables.TryGetTable("Wix5FirewallException", out var firewallExceptionTable)) | 483 | var possibleTableNames = new List<string>() { "WixFirewallException", "Wix4FirewallException", "Wix5FirewallException", }; |
| 484 | |||
| 485 | foreach (var tableName in possibleTableNames) | ||
| 486 | { | 486 | { |
| 487 | foreach (var row in firewallExceptionTable.Rows) | 487 | if (tables.TryGetTable(tableName, out var firewallExceptionTable)) |
| 488 | { | 488 | { |
| 489 | var xmlConfig = this.DecompilerHelper.GetIndexedElement(row); | 489 | foreach (var row in firewallExceptionTable.Rows) |
| 490 | |||
| 491 | var componentId = row.FieldAsString(8); | ||
| 492 | if (this.DecompilerHelper.TryGetIndexedElement("Component", componentId, out var component)) | ||
| 493 | { | ||
| 494 | component.Add(xmlConfig); | ||
| 495 | } | ||
| 496 | else | ||
| 497 | { | 490 | { |
| 498 | this.Messaging.Write(WarningMessages.ExpectedForeignRow(row.SourceLineNumbers, firewallExceptionTable.Name, row.GetPrimaryKey(), "Component_", componentId, "Component")); | 491 | var xmlConfig = this.DecompilerHelper.GetIndexedElement(row); |
| 492 | |||
| 493 | var componentId = row.FieldAsString(8); | ||
| 494 | if (this.DecompilerHelper.TryGetIndexedElement("Component", componentId, out var component)) | ||
| 495 | { | ||
| 496 | component.Add(xmlConfig); | ||
| 497 | } | ||
| 498 | else | ||
| 499 | { | ||
| 500 | this.Messaging.Write(WarningMessages.ExpectedForeignRow(row.SourceLineNumbers, firewallExceptionTable.Name, row.GetPrimaryKey(), "Component_", componentId, "Component")); | ||
| 501 | } | ||
| 499 | } | 502 | } |
| 500 | } | 503 | } |
| 501 | } | 504 | } |
