aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.Burn
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core.Burn')
-rw-r--r--src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs b/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs
index 84c02ac9..2a230a90 100644
--- a/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs
+++ b/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs
@@ -16,6 +16,8 @@ namespace WixToolset.Core.Burn.Bundles
16 16
17 internal class CreateBootstrapperApplicationManifestCommand 17 internal class CreateBootstrapperApplicationManifestCommand
18 { 18 {
19 private static readonly char[] ColonCharacter = new[] { ':' };
20
19 public CreateBootstrapperApplicationManifestCommand(IntermediateSection section, WixBundleTuple bundleTuple, IEnumerable<PackageFacade> chainPackages, int lastUXPayloadIndex, Dictionary<string, WixBundlePayloadTuple> payloadTuples, string intermediateFolder) 21 public CreateBootstrapperApplicationManifestCommand(IntermediateSection section, WixBundleTuple bundleTuple, IEnumerable<PackageFacade> chainPackages, int lastUXPayloadIndex, Dictionary<string, WixBundlePayloadTuple> payloadTuples, string intermediateFolder)
20 { 22 {
21 this.Section = section; 23 this.Section = section;
@@ -277,6 +279,51 @@ namespace WixToolset.Core.Burn.Bundles
277 writer.WriteEndElement(); 279 writer.WriteEndElement();
278 } 280 }
279 } 281 }
282
283 var dataTablesById = this.Section.Tuples.OfType<WixCustomTableTuple>()
284 .Where(t => t.Unreal && t.Id != null)
285 .ToDictionary(t => t.Id.Id);
286 var dataRowsByTable = this.Section.Tuples.OfType<WixCustomRowTuple>()
287 .GroupBy(t => t.Table);
288 foreach (var tableDataRows in dataRowsByTable)
289 {
290 var tableName = tableDataRows.Key;
291 if (!dataTablesById.TryGetValue(tableName, out var tableTuple))
292 {
293 // This should have been a linker error.
294 continue;
295 }
296
297 var columnNames = tableTuple.ColumnNames.Split('\t');
298
299 // We simply assert that the table (and field) name is valid, because
300 // this is up to the extension developer to get right. An author will
301 // only affect the attribute value, and that will get properly escaped.
302#if DEBUG
303 Debug.Assert(Common.IsIdentifier(tableName));
304 foreach (var columnName in columnNames)
305 {
306 Debug.Assert(Common.IsIdentifier(columnName));
307 }
308#endif // DEBUG
309
310 foreach (var rowTuple in tableDataRows)
311 {
312 writer.WriteStartElement(tableName);
313
314 //var rowFields = rowTuple.FieldDataSeparated;
315 foreach (var field in rowTuple.FieldDataSeparated)
316 {
317 var splitField = field.Split(ColonCharacter, 2);
318 if (splitField.Length == 2)
319 {
320 writer.WriteAttributeString(splitField[0], splitField[1]);
321 }
322 }
323
324 writer.WriteEndElement();
325 }
326 }
280 } 327 }
281 328
282 private WixBundlePayloadTuple CreateBootstrapperApplicationManifestPayloadRow(string baManifestPath) 329 private WixBundlePayloadTuple CreateBootstrapperApplicationManifestPayloadRow(string baManifestPath)