From dfcd6728a9d56ac37a5daa8cbedabbf10c333773 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 27 Sep 2022 15:03:47 -0700 Subject: Introduce PatchFilterMap to remove Row.SectionId A Row's SectionId is not set correctly in most scenarios. It was only really needed for the old section-based patch filtering. As section-base patch filtering was replaced in favor of the more logical filter generation, Row.SectionId was archaic and mostly outdated/wrong data. --- .../wix/WixToolset.Data/WindowsInstaller/Row.cs | 31 ---------------------- .../WindowsInstaller/Xsd/objects.xsd | 2 -- .../BaseWindowsInstallerBackendBinderExtension.cs | 7 +++++ .../IWindowsInstallerBackendBinderExtension.cs | 8 ++++++ 4 files changed, 15 insertions(+), 33 deletions(-) (limited to 'src/api') diff --git a/src/api/wix/WixToolset.Data/WindowsInstaller/Row.cs b/src/api/wix/WixToolset.Data/WindowsInstaller/Row.cs index f44082d3..cbb47492 100644 --- a/src/api/wix/WixToolset.Data/WindowsInstaller/Row.cs +++ b/src/api/wix/WixToolset.Data/WindowsInstaller/Row.cs @@ -52,17 +52,6 @@ namespace WixToolset.Data.WindowsInstaller /// The row transform operation. public RowOperation Operation { get; set; } - /// - /// Gets or sets wether the row is a duplicate of another row thus redundant. - /// - public bool Redundant { get; set; } - - /// - /// Gets or sets the SectionId property on the row. - /// - /// The SectionId property on the row. - public string SectionId { get; set; } - /// /// Gets the source file and line number for the row. /// @@ -276,8 +265,6 @@ namespace WixToolset.Data.WindowsInstaller bool empty = reader.IsEmptyElement; RowOperation operation = RowOperation.None; - bool redundant = false; - string sectionId = null; SourceLineNumber sourceLineNumbers = null; while (reader.MoveToNextAttribute()) @@ -287,12 +274,6 @@ namespace WixToolset.Data.WindowsInstaller case "op": operation = (RowOperation)Enum.Parse(typeof(RowOperation), reader.Value, true); break; - case "redundant": - redundant = reader.Value.Equals("yes"); - break; - case "sectionId": - sectionId = reader.Value; - break; case "sourceLineNumber": sourceLineNumbers = SourceLineNumber.CreateFromEncoded(reader.Value); break; @@ -301,8 +282,6 @@ namespace WixToolset.Data.WindowsInstaller var row = table.CreateRow(sourceLineNumbers); row.Operation = operation; - row.Redundant = redundant; - row.SectionId = sectionId; // loop through all the fields in a row if (!empty) @@ -364,16 +343,6 @@ namespace WixToolset.Data.WindowsInstaller writer.WriteAttributeString("op", this.Operation.ToString().ToLowerInvariant()); } - if (this.Redundant) - { - writer.WriteAttributeString("redundant", "yes"); - } - - if (null != this.SectionId) - { - writer.WriteAttributeString("sectionId", this.SectionId); - } - if (null != this.SourceLineNumbers) { writer.WriteAttributeString("sourceLineNumber", this.SourceLineNumbers.GetEncoded()); diff --git a/src/api/wix/WixToolset.Data/WindowsInstaller/Xsd/objects.xsd b/src/api/wix/WixToolset.Data/WindowsInstaller/Xsd/objects.xsd index 5d95a59c..94909032 100644 --- a/src/api/wix/WixToolset.Data/WindowsInstaller/Xsd/objects.xsd +++ b/src/api/wix/WixToolset.Data/WindowsInstaller/Xsd/objects.xsd @@ -96,8 +96,6 @@ - - diff --git a/src/api/wix/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs b/src/api/wix/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs index a54f05fc..0b31cdd7 100644 --- a/src/api/wix/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs +++ b/src/api/wix/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs @@ -62,6 +62,13 @@ namespace WixToolset.Extensibility { } + /// + /// See + /// + public virtual void FinalizePatchFilterIds(WindowsInstallerData data, IDictionary rowToFilterId, string filterIdPrefix) + { + } + /// /// See /// diff --git a/src/api/wix/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs b/src/api/wix/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs index 067745c2..fdf753c7 100644 --- a/src/api/wix/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs +++ b/src/api/wix/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs @@ -29,6 +29,14 @@ namespace WixToolset.Extensibility /// The finalized intermediate section. void SymbolsFinalized(IntermediateSection section); + /// + /// Extension can process the filter ids applied to rows when processing patches. + /// + /// The WindowsInstallerData with rows to apply filters to. + /// The mapping that applies a filter id to a row. + /// The prefix to use applying additional filters to rows. + void FinalizePatchFilterIds(WindowsInstallerData data, IDictionary rowToFilterId, string filterIdPrefix); + /// /// Finds an existing cabinet that contains the provided files. /// -- cgit v1.2.3-55-g6feb