diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-12-12 12:04:30 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-12-12 12:04:30 -0800 |
| commit | 6e9c25cb45cb59b4790ec3c32ee40d2077da521c (patch) | |
| tree | 399d8a5d9b222ef5a2865dd0c357981688a0ef3c | |
| parent | b71c36c6fdc44268de75540474c639b64e53f1b7 (diff) | |
| download | wix-6e9c25cb45cb59b4790ec3c32ee40d2077da521c.tar.gz wix-6e9c25cb45cb59b4790ec3c32ee40d2077da521c.tar.bz2 wix-6e9c25cb45cb59b4790ec3c32ee40d2077da521c.zip | |
Fix compression of files without file hashes
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/CabinetBuilder.cs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CabinetBuilder.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CabinetBuilder.cs index 2cbcc8e1..fde781a3 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CabinetBuilder.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CabinetBuilder.cs | |||
| @@ -164,22 +164,18 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 164 | string cabinetFileName = Path.GetFileName(cabinetWorkItem.CabinetFile); | 164 | string cabinetFileName = Path.GetFileName(cabinetWorkItem.CabinetFile); |
| 165 | string cabinetDirectory = Path.GetDirectoryName(cabinetWorkItem.CabinetFile); | 165 | string cabinetDirectory = Path.GetDirectoryName(cabinetWorkItem.CabinetFile); |
| 166 | 166 | ||
| 167 | //using (WixCreateCab cab = new WixCreateCab(cabinetFileName, cabinetDirectory, cabinetWorkItem.FileFacades.Count(), maxCabinetSize, cabinetWorkItem.MaxThreshold, cabinetWorkItem.CompressionLevel)) | 167 | var files = cabinetWorkItem.FileFacades |
| 168 | //{ | 168 | .Select(facade => facade.Hash == null ? |
| 169 | // foreach (FileFacade facade in cabinetWorkItem.FileFacades) | 169 | new CabinetCompressFile(facade.WixFile.Source.Path, facade.File.File) : |
| 170 | // { | 170 | new CabinetCompressFile(facade.WixFile.Source.Path, facade.File.File, facade.Hash.HashPart1, facade.Hash.HashPart2, facade.Hash.HashPart3, facade.Hash.HashPart4)) |
| 171 | // cab.AddFile(facade); | 171 | .ToList(); |
| 172 | // } | ||
| 173 | |||
| 174 | // cab.Complete(newCabNamesCallBackAddress); | ||
| 175 | //} | ||
| 176 | |||
| 177 | var files = cabinetWorkItem.FileFacades.Select(facade => new CabinetCompressFile(facade.WixFile.Source.Path, facade.File.File, facade.Hash.HashPart1, facade.Hash.HashPart2, facade.Hash.HashPart3, facade.Hash.HashPart4)).ToList(); | ||
| 178 | 172 | ||
| 179 | var cabinetCompressionLevel = (CabinetCompressionLevel)cabinetWorkItem.CompressionLevel; | 173 | var cabinetCompressionLevel = (CabinetCompressionLevel)cabinetWorkItem.CompressionLevel; |
| 180 | 174 | ||
| 181 | var cab = new Cabinet(cabinetPath); | 175 | var cab = new Cabinet(cabinetPath); |
| 182 | cab.Compress(files, cabinetCompressionLevel, maxCabinetSize, cabinetWorkItem.MaxThreshold); | 176 | cab.Compress(files, cabinetCompressionLevel, maxCabinetSize, cabinetWorkItem.MaxThreshold); |
| 177 | |||
| 178 | // TODO: Handle newCabNamesCallBackAddress from compression. | ||
| 183 | } | 179 | } |
| 184 | } | 180 | } |
| 185 | } | 181 | } |
