diff options
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs index 65958d0a..57861502 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs | |||
| @@ -146,7 +146,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 146 | break; | 146 | break; |
| 147 | 147 | ||
| 148 | case TupleDefinitionType.Shortcut: | 148 | case TupleDefinitionType.Shortcut: |
| 149 | this.AddTupleDefaultly(tuple, output, true); | 149 | this.AddShortcutTuple((ShortcutTuple)tuple, output); |
| 150 | break; | 150 | break; |
| 151 | 151 | ||
| 152 | case TupleDefinitionType.TextStyle: | 152 | case TupleDefinitionType.TextStyle: |
| @@ -338,11 +338,21 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 338 | 338 | ||
| 339 | private void AddDirectoryTuple(DirectoryTuple tuple, Output output) | 339 | private void AddDirectoryTuple(DirectoryTuple tuple, Output output) |
| 340 | { | 340 | { |
| 341 | var shortName = GetMsiFilenameValue(tuple.SourceShortName, tuple.SourceName); | ||
| 342 | var targetName = GetMsiFilenameValue(tuple.ShortName, tuple.Name); | ||
| 343 | |||
| 344 | if (String.IsNullOrEmpty(targetName)) | ||
| 345 | { | ||
| 346 | targetName = "."; | ||
| 347 | } | ||
| 348 | |||
| 349 | var defaultDir = String.IsNullOrEmpty(shortName)? targetName : shortName + ":" + targetName; | ||
| 350 | |||
| 341 | var table = output.EnsureTable(this.TableDefinitions["Directory"]); | 351 | var table = output.EnsureTable(this.TableDefinitions["Directory"]); |
| 342 | var row = table.CreateRow(tuple.SourceLineNumbers); | 352 | var row = table.CreateRow(tuple.SourceLineNumbers); |
| 343 | row[0] = tuple.Id.Id; | 353 | row[0] = tuple.Id.Id; |
| 344 | row[1] = tuple.ParentDirectoryRef; | 354 | row[1] = tuple.ParentDirectoryRef; |
| 345 | row[2] = tuple.DefaultDir; | 355 | row[2] = defaultDir; |
| 346 | } | 356 | } |
| 347 | 357 | ||
| 348 | private void AddEnvironmentTuple(EnvironmentTuple tuple, Output output) | 358 | private void AddEnvironmentTuple(EnvironmentTuple tuple, Output output) |
| @@ -447,7 +457,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 447 | var table = output.EnsureTable(this.TableDefinitions["Media"]); | 457 | var table = output.EnsureTable(this.TableDefinitions["Media"]); |
| 448 | var row = (MediaRow)table.CreateRow(tuple.SourceLineNumbers); | 458 | var row = (MediaRow)table.CreateRow(tuple.SourceLineNumbers); |
| 449 | row.DiskId = tuple.DiskId; | 459 | row.DiskId = tuple.DiskId; |
| 450 | row.LastSequence = tuple.LastSequence; | 460 | row.LastSequence = tuple.LastSequence ?? 0; |
| 451 | row.DiskPrompt = tuple.DiskPrompt; | 461 | row.DiskPrompt = tuple.DiskPrompt; |
| 452 | row.Cabinet = tuple.Cabinet; | 462 | row.Cabinet = tuple.Cabinet; |
| 453 | row.VolumeLabel = tuple.VolumeLabel; | 463 | row.VolumeLabel = tuple.VolumeLabel; |
| @@ -695,6 +705,28 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 695 | row[12] = tuple.Description; | 705 | row[12] = tuple.Description; |
| 696 | } | 706 | } |
| 697 | 707 | ||
| 708 | private void AddShortcutTuple(ShortcutTuple tuple, Output output) | ||
| 709 | { | ||
| 710 | var table = output.EnsureTable(this.TableDefinitions["Shortcut"]); | ||
| 711 | var row = table.CreateRow(tuple.SourceLineNumbers); | ||
| 712 | row[0] = tuple.Id.Id; | ||
| 713 | row[1] = tuple.DirectoryRef; | ||
| 714 | row[2] = GetMsiFilenameValue(tuple.ShortName, tuple.Name); | ||
| 715 | row[3] = tuple.ComponentRef; | ||
| 716 | row[4] = tuple.Target; | ||
| 717 | row[5] = tuple.Arguments; | ||
| 718 | row[6] = tuple.Description; | ||
| 719 | row[7] = tuple.Hotkey; | ||
| 720 | row[8] = tuple.IconRef; | ||
| 721 | row[9] = tuple.IconIndex; | ||
| 722 | row[10] = (int)tuple.Show; | ||
| 723 | row[11] = tuple.WorkingDirectory; | ||
| 724 | row[12] = tuple.DisplayResourceDll; | ||
| 725 | row[13] = tuple.DisplayResourceId; | ||
| 726 | row[14] = tuple.DescriptionResourceDll; | ||
| 727 | row[15] = tuple.DescriptionResourceId; | ||
| 728 | } | ||
| 729 | |||
| 698 | private void AddTextStyleTuple(TextStyleTuple tuple, Output output) | 730 | private void AddTextStyleTuple(TextStyleTuple tuple, Output output) |
| 699 | { | 731 | { |
| 700 | var styleBits = tuple.Bold ? WindowsInstallerConstants.MsidbTextStyleStyleBitsBold : 0; | 732 | var styleBits = tuple.Bold ? WindowsInstallerConstants.MsidbTextStyleStyleBitsBold : 0; |
