aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2019-10-23 12:48:22 -0700
committerRob Mensching <rob@firegiant.com>2019-10-23 12:50:08 -0700
commit534d79c4434c4a165f4d82ddf033fa43768c3357 (patch)
treefc90f5bfbabccea568aebda65e64f1e524d7c3c2
parent83722a63311ba516889ff0af8510a7740e01a4c2 (diff)
downloadwix-534d79c4434c4a165f4d82ddf033fa43768c3357.tar.gz
wix-534d79c4434c4a165f4d82ddf033fa43768c3357.tar.bz2
wix-534d79c4434c4a165f4d82ddf033fa43768c3357.zip
Remove BootstrapperApplicationData generally in favor of Unreal
-rw-r--r--src/WixToolset.Data/Tuples/WixCustomRowTuple.cs6
-rw-r--r--src/WixToolset.Data/Tuples/WixCustomTableTuple.cs10
-rw-r--r--src/WixToolset.Data/WindowsInstaller/TableDefinition.cs34
3 files changed, 19 insertions, 31 deletions
diff --git a/src/WixToolset.Data/Tuples/WixCustomRowTuple.cs b/src/WixToolset.Data/Tuples/WixCustomRowTuple.cs
index ec73c1b8..c51089e8 100644
--- a/src/WixToolset.Data/Tuples/WixCustomRowTuple.cs
+++ b/src/WixToolset.Data/Tuples/WixCustomRowTuple.cs
@@ -27,6 +27,8 @@ namespace WixToolset.Data.Tuples
27 27
28 public class WixCustomRowTuple : IntermediateTuple 28 public class WixCustomRowTuple : IntermediateTuple
29 { 29 {
30 public const char FieldSeparator = '\x85';
31
30 public WixCustomRowTuple() : base(TupleDefinitions.WixCustomRow, null, null) 32 public WixCustomRowTuple() : base(TupleDefinitions.WixCustomRow, null, null)
31 { 33 {
32 } 34 }
@@ -48,5 +50,7 @@ namespace WixToolset.Data.Tuples
48 get => (string)this.Fields[(int)WixCustomRowTupleFields.FieldData]; 50 get => (string)this.Fields[(int)WixCustomRowTupleFields.FieldData];
49 set => this.Set((int)WixCustomRowTupleFields.FieldData, value); 51 set => this.Set((int)WixCustomRowTupleFields.FieldData, value);
50 } 52 }
53
54 public string[] FieldDataSeparated => this.FieldData.Split(FieldSeparator);
51 } 55 }
52} \ No newline at end of file 56}
diff --git a/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs b/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs
index cf4e60db..2ef2b88d 100644
--- a/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs
+++ b/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs
@@ -22,7 +22,7 @@ namespace WixToolset.Data
22 new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Sets), IntermediateFieldType.String), 22 new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Sets), IntermediateFieldType.String),
23 new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Descriptions), IntermediateFieldType.String), 23 new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Descriptions), IntermediateFieldType.String),
24 new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Modularizations), IntermediateFieldType.String), 24 new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Modularizations), IntermediateFieldType.String),
25 new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.BootstrapperApplicationData), IntermediateFieldType.Number), 25 new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Unreal), IntermediateFieldType.Number),
26 }, 26 },
27 typeof(WixCustomTableTuple)); 27 typeof(WixCustomTableTuple));
28 } 28 }
@@ -44,7 +44,7 @@ namespace WixToolset.Data.Tuples
44 Sets, 44 Sets,
45 Descriptions, 45 Descriptions,
46 Modularizations, 46 Modularizations,
47 BootstrapperApplicationData, 47 Unreal,
48 } 48 }
49 49
50 public class WixCustomTableTuple : IntermediateTuple 50 public class WixCustomTableTuple : IntermediateTuple
@@ -131,10 +131,10 @@ namespace WixToolset.Data.Tuples
131 set => this.Set((int)WixCustomTableTupleFields.Modularizations, value); 131 set => this.Set((int)WixCustomTableTupleFields.Modularizations, value);
132 } 132 }
133 133
134 public bool BootstrapperApplicationData 134 public bool Unreal
135 { 135 {
136 get => (bool)this.Fields[(int)WixCustomTableTupleFields.BootstrapperApplicationData]; 136 get => (bool)this.Fields[(int)WixCustomTableTupleFields.Unreal];
137 set => this.Set((int)WixCustomTableTupleFields.BootstrapperApplicationData, value); 137 set => this.Set((int)WixCustomTableTupleFields.Unreal, value);
138 } 138 }
139 } 139 }
140} 140}
diff --git a/src/WixToolset.Data/WindowsInstaller/TableDefinition.cs b/src/WixToolset.Data/WindowsInstaller/TableDefinition.cs
index bc7fb537..ee8ab0c1 100644
--- a/src/WixToolset.Data/WindowsInstaller/TableDefinition.cs
+++ b/src/WixToolset.Data/WindowsInstaller/TableDefinition.cs
@@ -4,7 +4,7 @@ namespace WixToolset.Data.WindowsInstaller
4{ 4{
5 using System; 5 using System;
6 using System.Collections.Generic; 6 using System.Collections.Generic;
7 using System.Collections.ObjectModel; 7 using System.Linq;
8 using System.Xml; 8 using System.Xml;
9 9
10 /// <summary> 10 /// <summary>
@@ -24,14 +24,12 @@ namespace WixToolset.Data.WindowsInstaller
24 /// <param name="name">Name of table to create.</param> 24 /// <param name="name">Name of table to create.</param>
25 /// <param name="columns">Column definitions for the table.</param> 25 /// <param name="columns">Column definitions for the table.</param>
26 /// <param name="unreal">Flag if table is unreal.</param> 26 /// <param name="unreal">Flag if table is unreal.</param>
27 /// <param name="bootstrapperApplicationData">Flag if table is part of UX Manifest.</param> 27 public TableDefinition(string name, IEnumerable<ColumnDefinition> columns, bool unreal = false)
28 public TableDefinition(string name, ColumnDefinition[] columns, bool unreal = false, bool bootstrapperApplicationData = false)
29 { 28 {
30 this.Name = name; 29 this.Name = name;
31 this.Unreal = unreal; 30 this.Unreal = unreal;
32 this.BootstrapperApplicationData = bootstrapperApplicationData;
33 31
34 this.Columns = columns; 32 this.Columns = columns.ToArray();
35 } 33 }
36 34
37 /// <summary> 35 /// <summary>
@@ -47,12 +45,6 @@ namespace WixToolset.Data.WindowsInstaller
47 public bool Unreal { get; private set; } 45 public bool Unreal { get; private set; }
48 46
49 /// <summary> 47 /// <summary>
50 /// Gets if the table is a part of the bootstrapper application data manifest.
51 /// </summary>
52 /// <value>Flag if table is a part of the bootstrapper application data manifest.</value>
53 public bool BootstrapperApplicationData { get; private set; }
54
55 /// <summary>
56 /// Gets the collection of column definitions for this table. 48 /// Gets the collection of column definitions for this table.
57 /// </summary> 49 /// </summary>
58 /// <value>Collection of column definitions for this table.</value> 50 /// <value>Collection of column definitions for this table.</value>
@@ -82,7 +74,7 @@ namespace WixToolset.Data.WindowsInstaller
82 } 74 }
83 75
84 // compare the table names 76 // compare the table names
85 int ret = String.Compare(this.Name, updated.Name, StringComparison.Ordinal); 77 var ret = String.Compare(this.Name, updated.Name, StringComparison.Ordinal);
86 78
87 // compare the column count 79 // compare the column count
88 if (0 == ret) 80 if (0 == ret)
@@ -91,10 +83,10 @@ namespace WixToolset.Data.WindowsInstaller
91 ret = Math.Min(0, updated.Columns.Length - this.Columns.Length); 83 ret = Math.Min(0, updated.Columns.Length - this.Columns.Length);
92 84
93 // compare name, type, and length of each column 85 // compare name, type, and length of each column
94 for (int i = 0; 0 == ret && this.Columns.Length > i; i++) 86 for (var i = 0; 0 == ret && this.Columns.Length > i; i++)
95 { 87 {
96 ColumnDefinition thisColumnDef = this.Columns[i]; 88 var thisColumnDef = this.Columns[i];
97 ColumnDefinition updatedColumnDef = updated.Columns[i]; 89 var updatedColumnDef = updated.Columns[i];
98 90
99 ret = thisColumnDef.CompareTo(updatedColumnDef); 91 ret = thisColumnDef.CompareTo(updatedColumnDef);
100 } 92 }
@@ -125,9 +117,6 @@ namespace WixToolset.Data.WindowsInstaller
125 case "unreal": 117 case "unreal":
126 unreal = reader.Value.Equals("yes"); 118 unreal = reader.Value.Equals("yes");
127 break; 119 break;
128 case "bootstrapperApplicationData":
129 bootstrapperApplicationData = reader.Value.Equals("yes");
130 break;
131 } 120 }
132 } 121 }
133 122
@@ -181,7 +170,7 @@ namespace WixToolset.Data.WindowsInstaller
181 } 170 }
182 } 171 }
183 172
184 return new TableDefinition(name, columns.ToArray(), unreal, bootstrapperApplicationData); 173 return new TableDefinition(name, columns.ToArray(), unreal);
185 } 174 }
186 175
187 /// <summary> 176 /// <summary>
@@ -199,12 +188,7 @@ namespace WixToolset.Data.WindowsInstaller
199 writer.WriteAttributeString("unreal", "yes"); 188 writer.WriteAttributeString("unreal", "yes");
200 } 189 }
201 190
202 if (this.BootstrapperApplicationData) 191 foreach (var columnDefinition in this.Columns)
203 {
204 writer.WriteAttributeString("bootstrapperApplicationData", "yes");
205 }
206
207 foreach (ColumnDefinition columnDefinition in this.Columns)
208 { 192 {
209 columnDefinition.Write(writer); 193 columnDefinition.Write(writer);
210 } 194 }