diff options
| author | Bob Arnson <bob@joyofsetup.com> | 2020-06-22 19:35:34 -0400 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2020-06-22 19:44:05 -0400 |
| commit | 461350c09839f1e59fb3dafe1a67e74bf152f803 (patch) | |
| tree | 210294861118294e6546b36c76ef3a0722fc44e5 /src/WixToolset.Core.WindowsInstaller | |
| parent | 5e07fe18b6d431ceb554297c575878ed4331470d (diff) | |
| download | wix-461350c09839f1e59fb3dafe1a67e74bf152f803.tar.gz wix-461350c09839f1e59fb3dafe1a67e74bf152f803.tar.bz2 wix-461350c09839f1e59fb3dafe1a67e74bf152f803.zip | |
If no Media or MediaTemplate is present, default to a MediaTemplate.
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs index b75956b4..773b3225 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs | |||
| @@ -59,6 +59,18 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 59 | throw new WixException(ErrorMessages.MediaTableCollision(null)); | 59 | throw new WixException(ErrorMessages.MediaTableCollision(null)); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | // If neither tuple is authored, default to a media template. | ||
| 63 | if (SectionType.Product == this.Section.Type && mediaTemplateTuples.Count == 0 && mediaTuples.Count == 0) | ||
| 64 | { | ||
| 65 | var mediaTemplate = new WixMediaTemplateTuple() | ||
| 66 | { | ||
| 67 | CabinetTemplate = "cab{0}.cab", | ||
| 68 | }; | ||
| 69 | |||
| 70 | this.Section.AddTuple(mediaTemplate); | ||
| 71 | mediaTemplateTuples.Add(mediaTemplate); | ||
| 72 | } | ||
| 73 | |||
| 62 | // When building merge module, all the files go to "#MergeModule.CABinet". | 74 | // When building merge module, all the files go to "#MergeModule.CABinet". |
| 63 | if (SectionType.Module == this.Section.Type) | 75 | if (SectionType.Module == this.Section.Type) |
| 64 | { | 76 | { |
