diff options
| author | Bob Arnson <bob@firegiant.com> | 2020-05-08 14:28:33 -0400 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2020-05-08 14:34:12 -0400 |
| commit | d2da673f3b2676663748efe359389e0553609dcf (patch) | |
| tree | 6b7fd32883547245a8dcb505df1724fad6d7b2b2 /src | |
| parent | db3c7998c80523d8a059f7a9c3214dbc5c8c1e23 (diff) | |
| download | wix-d2da673f3b2676663748efe359389e0553609dcf.tar.gz wix-d2da673f3b2676663748efe359389e0553609dcf.tar.bz2 wix-d2da673f3b2676663748efe359389e0553609dcf.zip | |
Add `IBindContext.SuppressLayout` to suppress cab generation.
And some cleanup.
Diffstat (limited to 'src')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs | 21 | ||||
| -rw-r--r-- | src/WixToolset.Core/BindContext.cs | 2 | ||||
| -rw-r--r-- | src/WixToolset.Core/Linker.cs | 28 |
3 files changed, 26 insertions, 25 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs index 489fdacb..5b401a0c 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs | |||
| @@ -45,10 +45,12 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 45 | this.ExpectedEmbeddedFiles = context.ExpectedEmbeddedFiles; | 45 | this.ExpectedEmbeddedFiles = context.ExpectedEmbeddedFiles; |
| 46 | this.FileSystemExtensions = context.FileSystemExtensions; | 46 | this.FileSystemExtensions = context.FileSystemExtensions; |
| 47 | this.Intermediate = context.IntermediateRepresentation; | 47 | this.Intermediate = context.IntermediateRepresentation; |
| 48 | this.IntermediateFolder = context.IntermediateFolder; | ||
| 48 | this.OutputPath = context.OutputPath; | 49 | this.OutputPath = context.OutputPath; |
| 49 | this.OutputPdbPath = context.PdbPath; | 50 | this.OutputPdbPath = context.PdbPath; |
| 50 | this.PdbType = context.PdbType; | 51 | this.PdbType = context.PdbType; |
| 51 | this.IntermediateFolder = context.IntermediateFolder; | 52 | this.SuppressLayout = context.SuppressLayout; |
| 53 | |||
| 52 | this.SubStorages = subStorages; | 54 | this.SubStorages = subStorages; |
| 53 | this.Validator = validator; | 55 | this.Validator = validator; |
| 54 | 56 | ||
| @@ -186,18 +188,15 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 186 | } | 188 | } |
| 187 | } | 189 | } |
| 188 | 190 | ||
| 189 | if (!this.Intermediate.HasLevel(Data.WindowsInstaller.IntermediateLevels.PartiallyBound)) | 191 | // Sequence all the actions. |
| 190 | { | 192 | { |
| 191 | // Sequence all the actions. | 193 | var command = new SequenceActionsCommand(this.Messaging, section); |
| 192 | { | 194 | command.Execute(); |
| 193 | var command = new SequenceActionsCommand(this.Messaging, section); | 195 | } |
| 194 | command.Execute(); | ||
| 195 | } | ||
| 196 | 196 | ||
| 197 | { | 197 | { |
| 198 | var command = new CreateSpecialPropertiesCommand(section); | 198 | var command = new CreateSpecialPropertiesCommand(section); |
| 199 | command.Execute(); | 199 | command.Execute(); |
| 200 | } | ||
| 201 | } | 200 | } |
| 202 | 201 | ||
| 203 | #if TODO_PATCHING | 202 | #if TODO_PATCHING |
diff --git a/src/WixToolset.Core/BindContext.cs b/src/WixToolset.Core/BindContext.cs index 1c456a9f..3d7563c6 100644 --- a/src/WixToolset.Core/BindContext.cs +++ b/src/WixToolset.Core/BindContext.cs | |||
| @@ -53,5 +53,7 @@ namespace WixToolset.Core | |||
| 53 | public IEnumerable<string> SuppressIces { get; set; } | 53 | public IEnumerable<string> SuppressIces { get; set; } |
| 54 | 54 | ||
| 55 | public bool SuppressValidation { get; set; } | 55 | public bool SuppressValidation { get; set; } |
| 56 | |||
| 57 | public bool SuppressLayout { get; set; } | ||
| 56 | } | 58 | } |
| 57 | } | 59 | } |
diff --git a/src/WixToolset.Core/Linker.cs b/src/WixToolset.Core/Linker.cs index 4c4c6063..98232901 100644 --- a/src/WixToolset.Core/Linker.cs +++ b/src/WixToolset.Core/Linker.cs | |||
| @@ -263,9 +263,9 @@ namespace WixToolset.Core | |||
| 263 | // if the directory table contains references to standard windows folders | 263 | // if the directory table contains references to standard windows folders |
| 264 | // mergemod.dll will add customactions to set the MSM directory to | 264 | // mergemod.dll will add customactions to set the MSM directory to |
| 265 | // the same directory as the standard windows folder and will add references to | 265 | // the same directory as the standard windows folder and will add references to |
| 266 | // custom action to all the standard sequence tables. A problem will occur | 266 | // custom action to all the standard sequence tables. A problem will occur |
| 267 | // if the MSI does not have these tables as mergemod.dll does not add these | 267 | // if the MSI does not have these tables as mergemod.dll does not add these |
| 268 | // tables to the MSI if absent. This code adds the tables in case mergemod.dll | 268 | // tables to the MSI if absent. This code adds the tables in case mergemod.dll |
| 269 | // needs them. | 269 | // needs them. |
| 270 | this.activeOutput.EnsureTable(this.tableDefinitions["CustomAction"]); | 270 | this.activeOutput.EnsureTable(this.tableDefinitions["CustomAction"]); |
| 271 | this.activeOutput.EnsureTable(this.tableDefinitions["AdminExecuteSequence"]); | 271 | this.activeOutput.EnsureTable(this.tableDefinitions["AdminExecuteSequence"]); |
| @@ -938,9 +938,9 @@ namespace WixToolset.Core | |||
| 938 | 938 | ||
| 939 | // DisplaySectionComplexReferences("--- section's complex references before flattening ---", sections); | 939 | // DisplaySectionComplexReferences("--- section's complex references before flattening ---", sections); |
| 940 | 940 | ||
| 941 | // Step 1: Gather all of the complex references that are going participate | 941 | // Step 1: Gather all of the complex references that are going to participate |
| 942 | // in the flatting process. This means complex references that have "grouping | 942 | // in the flatting process. This means complex references that have "grouping |
| 943 | // parents" of Features, Modules, and, of course, Groups. These references | 943 | // parents" of Features, Modules, and, of course, Groups. These references |
| 944 | // that participate in a "grouping parent" will be removed from their section | 944 | // that participate in a "grouping parent" will be removed from their section |
| 945 | // now and after processing added back in Step 3 below. | 945 | // now and after processing added back in Step 3 below. |
| 946 | foreach (var section in sections) | 946 | foreach (var section in sections) |
| @@ -949,7 +949,7 @@ namespace WixToolset.Core | |||
| 949 | for (var i = section.Tuples.Count - 1; i >= 0; --i) | 949 | for (var i = section.Tuples.Count - 1; i >= 0; --i) |
| 950 | { | 950 | { |
| 951 | // Only process the "grouping parents" such as FeatureGroup, ComponentGroup, Feature, | 951 | // Only process the "grouping parents" such as FeatureGroup, ComponentGroup, Feature, |
| 952 | // and Module. Non-grouping complex references are simple and | 952 | // and Module. Non-grouping complex references are simple and |
| 953 | // resolved during normal complex reference resolutions. | 953 | // resolved during normal complex reference resolutions. |
| 954 | if (section.Tuples[i] is WixComplexReferenceTuple wixComplexReferenceRow && | 954 | if (section.Tuples[i] is WixComplexReferenceTuple wixComplexReferenceRow && |
| 955 | (ComplexReferenceParentType.FeatureGroup == wixComplexReferenceRow.ParentType || | 955 | (ComplexReferenceParentType.FeatureGroup == wixComplexReferenceRow.ParentType || |
| @@ -974,7 +974,7 @@ namespace WixToolset.Core | |||
| 974 | section.Tuples.RemoveAt(i); | 974 | section.Tuples.RemoveAt(i); |
| 975 | 975 | ||
| 976 | // Remember the mapping from set of complex references with a common | 976 | // Remember the mapping from set of complex references with a common |
| 977 | // parent to their section. We'll need this to add them back to the | 977 | // parent to their section. We'll need this to add them back to the |
| 978 | // correct section in Step 3. | 978 | // correct section in Step 3. |
| 979 | if (!parentGroupsSections.TryGetValue(parentTypeAndId, out var parentSection)) | 979 | if (!parentGroupsSections.TryGetValue(parentTypeAndId, out var parentSection)) |
| 980 | { | 980 | { |
| @@ -1003,7 +1003,7 @@ namespace WixToolset.Core | |||
| 1003 | // DisplaySectionComplexReferences("\r\n\r\n--- section's complex references middle of flattening ---", sections); | 1003 | // DisplaySectionComplexReferences("\r\n\r\n--- section's complex references middle of flattening ---", sections); |
| 1004 | 1004 | ||
| 1005 | // Step 2: Loop through the parent groups that have nested groups removing | 1005 | // Step 2: Loop through the parent groups that have nested groups removing |
| 1006 | // them from the hash table as they are processed. At the end of this the | 1006 | // them from the hash table as they are processed. At the end of this the |
| 1007 | // complex references should all be flattened. | 1007 | // complex references should all be flattened. |
| 1008 | var keys = parentGroupsNeedingProcessing.Keys.ToList(); | 1008 | var keys = parentGroupsNeedingProcessing.Keys.ToList(); |
| 1009 | 1009 | ||
| @@ -1023,7 +1023,7 @@ namespace WixToolset.Core | |||
| 1023 | 1023 | ||
| 1024 | // Step 3: Finally, ensure that all of the groups that were removed | 1024 | // Step 3: Finally, ensure that all of the groups that were removed |
| 1025 | // in Step 1 and flattened in Step 2 are added to their appropriate | 1025 | // in Step 1 and flattened in Step 2 are added to their appropriate |
| 1026 | // section. This is where we will toss out the final no-longer-needed | 1026 | // section. This is where we will toss out the final no-longer-needed |
| 1027 | // groups. | 1027 | // groups. |
| 1028 | foreach (var parentGroup in parentGroups.Keys) | 1028 | foreach (var parentGroup in parentGroups.Keys) |
| 1029 | { | 1029 | { |
| @@ -1057,7 +1057,7 @@ namespace WixToolset.Core | |||
| 1057 | /// Recursively processes the group. | 1057 | /// Recursively processes the group. |
| 1058 | /// </summary> | 1058 | /// </summary> |
| 1059 | /// <param name="parentTypeAndId">String combination type and id of group to process next.</param> | 1059 | /// <param name="parentTypeAndId">String combination type and id of group to process next.</param> |
| 1060 | /// <param name="loopDetector">Stack of groups processed thus far. Used to detect loops.</param> | 1060 | /// <param name="loopDetector">Stack of groups processed thus far. Used to detect loops.</param> |
| 1061 | /// <param name="parentGroups">Hash table of complex references grouped by parent id.</param> | 1061 | /// <param name="parentGroups">Hash table of complex references grouped by parent id.</param> |
| 1062 | /// <param name="parentGroupsNeedingProcessing">Hash table of parent groups that still have nested groups that need to be flattened.</param> | 1062 | /// <param name="parentGroupsNeedingProcessing">Hash table of parent groups that still have nested groups that need to be flattened.</param> |
| 1063 | private void FlattenGroup(string parentTypeAndId, Stack<string> loopDetector, Dictionary<string, List<WixComplexReferenceTuple>> parentGroups, Dictionary<string, IntermediateSection> parentGroupsNeedingProcessing) | 1063 | private void FlattenGroup(string parentTypeAndId, Stack<string> loopDetector, Dictionary<string, List<WixComplexReferenceTuple>> parentGroups, Dictionary<string, IntermediateSection> parentGroupsNeedingProcessing) |
| @@ -1082,7 +1082,7 @@ namespace WixToolset.Core | |||
| 1082 | if (loopDetector.Contains(childTypeAndId)) | 1082 | if (loopDetector.Contains(childTypeAndId)) |
| 1083 | { | 1083 | { |
| 1084 | // Create a comma delimited list of the references that participate in the | 1084 | // Create a comma delimited list of the references that participate in the |
| 1085 | // loop for the error message. Start at the bottom of the stack and work the | 1085 | // loop for the error message. Start at the bottom of the stack and work the |
| 1086 | // way up to present the loop as a directed graph. | 1086 | // way up to present the loop as a directed graph. |
| 1087 | var loop = String.Join(" -> ", loopDetector); | 1087 | var loop = String.Join(" -> ", loopDetector); |
| 1088 | 1088 | ||
| @@ -1096,7 +1096,7 @@ namespace WixToolset.Core | |||
| 1096 | return; // bail | 1096 | return; // bail |
| 1097 | } | 1097 | } |
| 1098 | 1098 | ||
| 1099 | // Check to see if the child group still needs to be processed. If so, | 1099 | // Check to see if the child group still needs to be processed. If so, |
| 1100 | // go do that so that we'll get all of that children's (and children's | 1100 | // go do that so that we'll get all of that children's (and children's |
| 1101 | // children) complex references correctly merged into our parent group. | 1101 | // children) complex references correctly merged into our parent group. |
| 1102 | if (parentGroupsNeedingProcessing.ContainsKey(childTypeAndId)) | 1102 | if (parentGroupsNeedingProcessing.ContainsKey(childTypeAndId)) |
| @@ -1132,7 +1132,7 @@ namespace WixToolset.Core | |||
| 1132 | } | 1132 | } |
| 1133 | 1133 | ||
| 1134 | // Add the children group's complex references to the parent | 1134 | // Add the children group's complex references to the parent |
| 1135 | // group. Clean out any left over groups and quietly remove any | 1135 | // group. Clean out any left over groups and quietly remove any |
| 1136 | // duplicate complex references that occurred during the merge. | 1136 | // duplicate complex references that occurred during the merge. |
| 1137 | referencesToParent.AddRange(allNewChildComplexReferences); | 1137 | referencesToParent.AddRange(allNewChildComplexReferences); |
| 1138 | referencesToParent.Sort(ComplexReferenceComparision); | 1138 | referencesToParent.Sort(ComplexReferenceComparision); |
| @@ -1219,7 +1219,7 @@ namespace WixToolset.Core | |||
| 1219 | } | 1219 | } |
| 1220 | 1220 | ||
| 1221 | // We need to flatten the nested PayloadGroups and PackageGroups under | 1221 | // We need to flatten the nested PayloadGroups and PackageGroups under |
| 1222 | // UX, Chain, and any Containers. When we're done, the WixGroups table | 1222 | // UX, Chain, and any Containers. When we're done, the WixGroups table |
| 1223 | // will hold Payloads under UX, ChainPackages (references?) under Chain, | 1223 | // will hold Payloads under UX, ChainPackages (references?) under Chain, |
| 1224 | // and ChainPackages/Payloads under the attached and any detatched | 1224 | // and ChainPackages/Payloads under the attached and any detatched |
| 1225 | // Containers. | 1225 | // Containers. |
