@joebigelow / wix-1 / commits / 6f1665ed

Fix handling of WixAction scheduling

Rob Mensching committed Dec 12, 2017 at 12:08 UTC 6f1665ed759b31bd095f186f9239232c653597cd
2 files changed +11 -11
src/WixToolset.Core/Compiler.cs
+1 -1
@@ -13462,7 +13462,7 @@ namespace WixToolset.Core
13462 }
13463 else
13464 {
13465 - var row = this.Core.CreateRow(childSourceLineNumbers, TupleDefinitionType.WixAction);
13465 + var row = this.Core.CreateRow(childSourceLineNumbers, TupleDefinitionType.WixAction, new Identifier($"{sequenceTable}/{actionName}", AccessModifier.Public));
13466 row.Set(0, sequenceTable);
13467 row.Set(1, actionName);
13468 row.Set(2, condition);
src/WixToolset.Core/Linker.cs
+10 -10
@@ -139,16 +139,12 @@ namespace WixToolset.Core
139 throw new WixException(WixErrors.MissingEntrySection(this.Context.ExpectedOutputType.ToString()));
140 }
141
142 - // Now that we know where we're starting from, create the section to hold the linked content.
143 - var resolvedSection = new IntermediateSection(find.EntrySection.Id, find.EntrySection.Type, find.EntrySection.Codepage);
144 - var allSymbols = find.Symbols;
145 -
142 // Add the missing standard action symbols.
147 - this.LoadStandardActionSymbols(resolvedSection, allSymbols);
143 + this.LoadStandardActionSymbols(find.EntrySection, find.Symbols);
144
145 // Resolve the symbol references to find the set of sections we care about for linking.
146 // Of course, we start with the entry section (that's how it got its name after all).
151 - var resolve = new ResolveReferencesCommand(find.EntrySection, allSymbols);
147 + var resolve = new ResolveReferencesCommand(find.EntrySection, find.Symbols);
148 resolve.BuildingMergeModule = (SectionType.Module == find.EntrySection.Type);
149
150 resolve.Execute();
@@ -174,7 +170,7 @@ namespace WixToolset.Core
170 var componentsToFeatures = new ConnectToFeatureCollection();
171 var featuresToFeatures = new ConnectToFeatureCollection();
172 var modulesToFeatures = new ConnectToFeatureCollection();
177 - this.ProcessComplexReferences(resolvedSection, sections, referencedComponents, componentsToFeatures, featuresToFeatures, modulesToFeatures);
173 + this.ProcessComplexReferences(find.EntrySection, sections, referencedComponents, componentsToFeatures, featuresToFeatures, modulesToFeatures);
174
175 if (Messaging.Instance.EncounteredError)
176 {
@@ -200,17 +196,21 @@ namespace WixToolset.Core
196 }
197
198 // resolve the feature to feature connects
203 - this.ResolveFeatureToFeatureConnects(featuresToFeatures, allSymbols);
199 + this.ResolveFeatureToFeatureConnects(featuresToFeatures, find.Symbols);
200
201 // start generating OutputTables and OutputRows for all the sections in the output
202 var ensureTableRows = new List<IntermediateTuple>();
203
208 - int sectionCount = 0;
204 + // Create the section to hold the linked content.
205 + var resolvedSection = new IntermediateSection(find.EntrySection.Id, find.EntrySection.Type, find.EntrySection.Codepage);
206 +
207 + var sectionCount = 0;
208 +
209 foreach (var section in sections)
210 {
211 sectionCount++;
212
213 - string sectionId = section.Id;
213 + var sectionId = section.Id;
214 if (null == sectionId && this.sectionIdOnRows)
215 {
216 sectionId = "wix.section." + sectionCount.ToString(CultureInfo.InvariantCulture);