diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-12-06 11:40:44 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-12-06 11:40:44 -0800 |
| commit | b1e662bd480241ea914f0f3d6bd174d9ffd03f5f (patch) | |
| tree | aeaaca9fa9054006e5c190b7256bb57f1ff342b6 /src/WixToolset.Core.WindowsInstaller | |
| parent | 5ba862bfa618c89a563d555e8ce7b44a904df406 (diff) | |
| download | wix-b1e662bd480241ea914f0f3d6bd174d9ffd03f5f.tar.gz wix-b1e662bd480241ea914f0f3d6bd174d9ffd03f5f.tar.bz2 wix-b1e662bd480241ea914f0f3d6bd174d9ffd03f5f.zip | |
Fix cab creation using explicit Media element
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs index f426b96d..1f2cee74 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs | |||
| @@ -58,7 +58,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 58 | var mediaTemplateTable = this.Section.Tuples.OfType<WixMediaTemplateTuple>().ToList(); | 58 | var mediaTemplateTable = this.Section.Tuples.OfType<WixMediaTemplateTuple>().ToList(); |
| 59 | 59 | ||
| 60 | // If both tables are authored, it is an error. | 60 | // If both tables are authored, it is an error. |
| 61 | if ((mediaTemplateTable != null && mediaTemplateTable.Count > 0) && (mediaTable != null && mediaTable.Count > 1)) | 61 | if (mediaTemplateTable.Count > 0 && mediaTable.Count > 1) |
| 62 | { | 62 | { |
| 63 | throw new WixException(WixErrors.MediaTableCollision(null)); | 63 | throw new WixException(WixErrors.MediaTableCollision(null)); |
| 64 | } | 64 | } |
| @@ -73,7 +73,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 73 | 73 | ||
| 74 | filesByCabinetMedia.Add(mergeModuleMediaRow, new List<FileFacade>(this.FileFacades)); | 74 | filesByCabinetMedia.Add(mergeModuleMediaRow, new List<FileFacade>(this.FileFacades)); |
| 75 | } | 75 | } |
| 76 | else if (null == mediaTemplateTable) | 76 | else if (mediaTemplateTable.Count == 0) |
| 77 | { | 77 | { |
| 78 | this.ManuallyAssignFiles(mediaTable, this.FileFacades, filesByCabinetMedia, mediaRows, uncompressedFiles); | 78 | this.ManuallyAssignFiles(mediaTable, this.FileFacades, filesByCabinetMedia, mediaRows, uncompressedFiles); |
| 79 | } | 79 | } |
| @@ -266,8 +266,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 266 | // When building a product, if the current file is not to be compressed or if | 266 | // When building a product, if the current file is not to be compressed or if |
| 267 | // the package set not to be compressed, don't cab it. | 267 | // the package set not to be compressed, don't cab it. |
| 268 | if (SectionType.Product == this.Section.Type && | 268 | if (SectionType.Product == this.Section.Type && |
| 269 | (!facade.File.Compressed.Value || | 269 | ((!facade.File.Compressed.HasValue && !this.FilesCompressed) || |
| 270 | (!facade.File.Compressed.HasValue && !this.FilesCompressed))) | 270 | (facade.File.Compressed.HasValue && !facade.File.Compressed.Value))) |
| 271 | { | 271 | { |
| 272 | uncompressedFiles.Add(facade); | 272 | uncompressedFiles.Add(facade); |
| 273 | } | 273 | } |
