From 0f65aaaca2faf1b6fc233c445216d547f08c6fa5 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Tue, 5 Nov 2019 19:27:06 -0500 Subject: Move creation of hidden properties... ...for deferred CAs with HideTarget="yes" to the MSI backend where it belongs. --- .../Bind/CreateSpecialPropertiesCommand.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/CreateSpecialPropertiesCommand.cs') diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CreateSpecialPropertiesCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CreateSpecialPropertiesCommand.cs index e6c089a1..8f769904 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CreateSpecialPropertiesCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CreateSpecialPropertiesCommand.cs @@ -20,9 +20,9 @@ namespace WixToolset.Core.WindowsInstaller.Bind public void Execute() { // Create lists of the properties that contribute to the special lists of properties. - SortedSet adminProperties = new SortedSet(); - SortedSet secureProperties = new SortedSet(); - SortedSet hiddenProperties = new SortedSet(); + var adminProperties = new SortedSet(); + var secureProperties = new SortedSet(); + var hiddenProperties = new SortedSet(); foreach (var wixPropertyRow in this.Section.Tuples.OfType()) { @@ -42,6 +42,15 @@ namespace WixToolset.Core.WindowsInstaller.Bind } } + // Hide properties for in-script custom actions that have HideTarget set. + var hideTargetCustomActions = this.Section.Tuples.OfType().Where( + ca => ca.Hidden + && (ca.ExecutionType == CustomActionExecutionType.Deferred + || ca.ExecutionType == CustomActionExecutionType.Commit + || ca.ExecutionType == CustomActionExecutionType.Rollback)) + .Select(ca => ca.Id.Id); + hiddenProperties.UnionWith(hideTargetCustomActions); + if (0 < adminProperties.Count) { var tuple = new PropertyTuple(null, new Identifier(AccessModifier.Private, "AdminProperties")); -- cgit v1.2.3-55-g6feb