From 71c52d5af2293d3eb79882ce36b0411f81185c11 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 29 Nov 2017 22:03:26 -0800 Subject: Fix source path and cabinet processing --- .../Bind/CreateOutputFromIRCommand.cs | 42 +++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs') diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs index 85b3b25a..a19a53f1 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs @@ -44,9 +44,21 @@ namespace WixToolset.Core.WindowsInstaller.Bind this.AddFileTuple((FileTuple)tuple, output); break; + case TupleDefinitionType.Media: + this.AddMediaTuple((MediaTuple)tuple, output); + break; + + case TupleDefinitionType.Property: + this.AddPropertyTuple((PropertyTuple)tuple, output); + break; + case TupleDefinitionType.WixAction: this.AddWixActionTuple((WixActionTuple)tuple, output); - break; + break; + + case TupleDefinitionType.WixMedia: + // Ignored. + break; default: this.AddTupleDefaultly(tuple, output); @@ -76,6 +88,34 @@ namespace WixToolset.Core.WindowsInstaller.Bind row.Attributes = attributes; } + private void AddMediaTuple(MediaTuple tuple, Output output) + { + if (this.Section.Type != SectionType.Module) + { + var table = output.EnsureTable(this.TableDefinitions["Media"]); + var row = (MediaRow)table.CreateRow(tuple.SourceLineNumbers); + row.DiskId = tuple.DiskId; + row.LastSequence = tuple.LastSequence; + row.DiskPrompt = tuple.DiskPrompt; + row.Cabinet = tuple.Cabinet; + row.VolumeLabel = tuple.VolumeLabel; + row.Source = tuple.Source; + } + } + + private void AddPropertyTuple(PropertyTuple tuple, Output output) + { + if (String.IsNullOrEmpty(tuple.Value)) + { + return; + } + + var table = output.EnsureTable(this.TableDefinitions["Property"]); + var row = (PropertyRow)table.CreateRow(tuple.SourceLineNumbers); + row.Property = tuple.Property; + row.Value = tuple.Value; + } + private void AddWixActionTuple(WixActionTuple actionRow, Output output) { // Get the table definition for the action (and ensure the proper table exists for a module). -- cgit v1.2.3-55-g6feb