aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs40
1 files changed, 28 insertions, 12 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs
index 4e053c12..0642d217 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs
@@ -66,6 +66,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
66 // Ignored. 66 // Ignored.
67 break; 67 break;
68 68
69 case TupleDefinitionType.WixMediaTemplate:
70 this.AddWixMediaTemplateTuple((WixMediaTemplateTuple)tuple, output);
71 break;
72
69 case TupleDefinitionType.MustBeFromAnExtension: 73 case TupleDefinitionType.MustBeFromAnExtension:
70 this.AddTupleFromExtension(tuple, output); 74 this.AddTupleFromExtension(tuple, output);
71 break; 75 break;
@@ -126,11 +130,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind
126 row.Value = tuple.Value; 130 row.Value = tuple.Value;
127 } 131 }
128 132
129 private void AddWixActionTuple(WixActionTuple actionRow, Output output) 133 private void AddWixActionTuple(WixActionTuple tuple, Output output)
130 { 134 {
131 // Get the table definition for the action (and ensure the proper table exists for a module). 135 // Get the table definition for the action (and ensure the proper table exists for a module).
132 TableDefinition sequenceTableDefinition = null; 136 TableDefinition sequenceTableDefinition = null;
133 switch (actionRow.SequenceTable) 137 switch (tuple.SequenceTable)
134 { 138 {
135 case SequenceTable.AdminExecuteSequence: 139 case SequenceTable.AdminExecuteSequence:
136 if (OutputType.Module == output.Type) 140 if (OutputType.Module == output.Type)
@@ -191,31 +195,43 @@ namespace WixToolset.Core.WindowsInstaller.Bind
191 195
192 // create the action sequence row in the output 196 // create the action sequence row in the output
193 var sequenceTable = output.EnsureTable(sequenceTableDefinition); 197 var sequenceTable = output.EnsureTable(sequenceTableDefinition);
194 var row = sequenceTable.CreateRow(actionRow.SourceLineNumbers); 198 var row = sequenceTable.CreateRow(tuple.SourceLineNumbers);
195 199
196 if (SectionType.Module == this.Section.Type) 200 if (SectionType.Module == this.Section.Type)
197 { 201 {
198 row[0] = actionRow.Action; 202 row[0] = tuple.Action;
199 if (0 != actionRow.Sequence) 203 if (0 != tuple.Sequence)
200 { 204 {
201 row[1] = actionRow.Sequence; 205 row[1] = tuple.Sequence;
202 } 206 }
203 else 207 else
204 { 208 {
205 bool after = (null == actionRow.Before); 209 bool after = (null == tuple.Before);
206 row[2] = after ? actionRow.After : actionRow.Before; 210 row[2] = after ? tuple.After : tuple.Before;
207 row[3] = after ? 1 : 0; 211 row[3] = after ? 1 : 0;
208 } 212 }
209 row[4] = actionRow.Condition; 213 row[4] = tuple.Condition;
210 } 214 }
211 else 215 else
212 { 216 {
213 row[0] = actionRow.Action; 217 row[0] = tuple.Action;
214 row[1] = actionRow.Condition; 218 row[1] = tuple.Condition;
215 row[2] = actionRow.Sequence; 219 row[2] = tuple.Sequence;
216 } 220 }
217 } 221 }
218 222
223 private void AddWixMediaTemplateTuple(WixMediaTemplateTuple tuple, Output output)
224 {
225 var table = output.EnsureTable(this.TableDefinitions["WixMediaTemplate"]);
226 var row = (WixMediaTemplateRow)table.CreateRow(tuple.SourceLineNumbers);
227 row.CabinetTemplate = tuple.CabinetTemplate;
228 row.CompressionLevel = tuple.CompressionLevel;
229 row.DiskPrompt = tuple.DiskPrompt;
230 row.VolumeLabel = tuple.VolumeLabel;
231 row.MaximumUncompressedMediaSize = tuple.MaximumUncompressedMediaSize;
232 row.MaximumCabinetSizeForLargeFileSplitting = tuple.MaximumCabinetSizeForLargeFileSplitting;
233 }
234
219 private void AddTupleFromExtension(IntermediateTuple tuple, Output output) 235 private void AddTupleFromExtension(IntermediateTuple tuple, Output output)
220 { 236 {
221 foreach (var extension in this.BackendExtensions) 237 foreach (var extension in this.BackendExtensions)