Add `IBindContext.SuppressLayout` to suppress cab generation.
And some cleanup.
Bob Arnson committed
May 8, 2020 at 14:28 UTC
d2da673f3b2676663748efe359389e0553609dcf
3 files changed
+26
-25
src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
+10
-11
@@ -45,10 +45,12 @@ namespace WixToolset.Core.WindowsInstaller.Bind
45
this.ExpectedEmbeddedFiles = context.ExpectedEmbeddedFiles;
46
this.FileSystemExtensions = context.FileSystemExtensions;
47
this.Intermediate = context.IntermediateRepresentation;
48
+ this.IntermediateFolder = context.IntermediateFolder;
49
this.OutputPath = context.OutputPath;
50
this.OutputPdbPath = context.PdbPath;
51
this.PdbType = context.PdbType;
51
- this.IntermediateFolder = context.IntermediateFolder;
52
+ this.SuppressLayout = context.SuppressLayout;
53
+
54
this.SubStorages = subStorages;
55
this.Validator = validator;
56
@@ -186,18 +188,15 @@ namespace WixToolset.Core.WindowsInstaller.Bind
188
}
189
}
190
189
- if (!this.Intermediate.HasLevel(Data.WindowsInstaller.IntermediateLevels.PartiallyBound))
191
+ // Sequence all the actions.
192
{
191
- // Sequence all the actions.
192
- {
193
- var command = new SequenceActionsCommand(this.Messaging, section);
194
- command.Execute();
195
- }
193
+ var command = new SequenceActionsCommand(this.Messaging, section);
194
+ command.Execute();
195
+ }
196
197
- {
198
- var command = new CreateSpecialPropertiesCommand(section);
199
- command.Execute();
200
- }
197
+ {
198
+ var command = new CreateSpecialPropertiesCommand(section);
199
+ command.Execute();
200
}
201
202
#if TODO_PATCHING
src/WixToolset.Core/BindContext.cs
+2
@@ -53,5 +53,7 @@ namespace WixToolset.Core
53
public IEnumerable<string> SuppressIces { get; set; }
54
55
public bool SuppressValidation { get; set; }
56
+
57
+ public bool SuppressLayout { get; set; }
58
}
59
}
src/WixToolset.Core/Linker.cs
+14
-14
@@ -263,9 +263,9 @@ namespace WixToolset.Core
263
// if the directory table contains references to standard windows folders
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
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
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.
270
this.activeOutput.EnsureTable(this.tableDefinitions["CustomAction"]);
271
this.activeOutput.EnsureTable(this.tableDefinitions["AdminExecuteSequence"]);
@@ -938,9 +938,9 @@ namespace WixToolset.Core
938
939
// DisplaySectionComplexReferences("--- section's complex references before flattening ---", sections);
940
941
- // Step 1: Gather all of the complex references that are going participate
942
- // in the flatting process. This means complex references that have "grouping
943
- // parents" of Features, Modules, and, of course, Groups. These references
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
943
+ // parents" of Features, Modules, and, of course, Groups. These references
944
// that participate in a "grouping parent" will be removed from their section
945
// now and after processing added back in Step 3 below.
946
foreach (var section in sections)
@@ -949,7 +949,7 @@ namespace WixToolset.Core
949
for (var i = section.Tuples.Count - 1; i >= 0; --i)
950
{
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.
954
if (section.Tuples[i] is WixComplexReferenceTuple wixComplexReferenceRow &&
955
(ComplexReferenceParentType.FeatureGroup == wixComplexReferenceRow.ParentType ||
@@ -974,7 +974,7 @@ namespace WixToolset.Core
974
section.Tuples.RemoveAt(i);
975
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.
979
if (!parentGroupsSections.TryGetValue(parentTypeAndId, out var parentSection))
980
{
@@ -1003,7 +1003,7 @@ namespace WixToolset.Core
1003
// DisplaySectionComplexReferences("\r\n\r\n--- section's complex references middle of flattening ---", sections);
1004
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.
1008
var keys = parentGroupsNeedingProcessing.Keys.ToList();
1009
@@ -1023,7 +1023,7 @@ namespace WixToolset.Core
1023
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
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.
1028
foreach (var parentGroup in parentGroups.Keys)
1029
{
@@ -1057,7 +1057,7 @@ namespace WixToolset.Core
1057
/// Recursively processes the group.
1058
/// </summary>
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>
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)
@@ -1082,7 +1082,7 @@ namespace WixToolset.Core
1082
if (loopDetector.Contains(childTypeAndId))
1083
{
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.
1087
var loop = String.Join(" -> ", loopDetector);
1088
@@ -1096,7 +1096,7 @@ namespace WixToolset.Core
1096
return; // bail
1097
}
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
1101
// children) complex references correctly merged into our parent group.
1102
if (parentGroupsNeedingProcessing.ContainsKey(childTypeAndId))
@@ -1132,7 +1132,7 @@ namespace WixToolset.Core
1132
}
1133
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.
1137
referencesToParent.AddRange(allNewChildComplexReferences);
1138
referencesToParent.Sort(ComplexReferenceComparision);
@@ -1219,7 +1219,7 @@ namespace WixToolset.Core
1219
}
1220
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,
1224
// and ChainPackages/Payloads under the attached and any detatched
1225
// Containers.