wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
129 stars 36 forks source link

Embedding multiple CAB Files => E_FAIL #5453

Open punkbuster2003 opened 7 years ago

punkbuster2003 commented 7 years ago

If this issue is a bug:

3.11.0.1209

Visual Staudio 2010

4

Windows 7/Windows 10

I have an Installer with 150 Files. I build WIX Toolset from sourceon my Computer to get close to the error with debugging, The error happens in winterop.dll cabutil.cpp line 576 when calling the FCIAddFile method from cabinet.dll. it occurs when the file will be appended and the pcd->llBytesSinceLastFlush is greater than 2147483648 bytes. But as i understand my wxs and the documentation i am allowed to split in 64K Cabs at 2GB. What am i doing wrong that the installer is building a cab file with all files in it, and bevor it says it will use 13 cab files. I am using:

Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab3.cab'. Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab13.cab'. Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab2.cab'. Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab10.cab'. Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab12.cab'. Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab4.cab'. Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab1.cab'. Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab5.cab'. Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab9.cab'. Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab6.cab'. Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab7.cab'. Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab8.cab'. Creating cabinet 'C:\Users\holz\AppData\Local\Temp\kins4r25#cab11.cab'. Generating database.

light.exe : error LGHT0306: An error (E_FAIL) was returned while finalizing a CAB file. This most commonly happens when creating a CAB file with more than 65535 files in it. Either reduce the number of files in your installation package or split your installation package's files into more than one CAB file using the Media element. [F:\workspace\etuplaner\packages\ETUPlaner.msbuild]

barnson commented 7 years ago

What does your WiX media authoring look like? What are the sizes of your files?

punkbuster2003 commented 7 years ago

at first i used a custom media layout with diskid 1 to 11. afterwards i used the mediatemplate. both methods generate the same error. cabs

barnson commented 7 years ago

What does your MediaTemplate authoring look like?

punkbuster2003 commented 7 years ago

<MediaTemplate MaximumCabinetSizeForLargeFileSplitting="1024" EmbedCab="yes" /> i also tried <MediaTemplate /> and First try was `

    <Media Id="3" Cabinet="Data3.cab" EmbedCab="yes" VolumeLabel="DISK3" />
    <Media Id="4" Cabinet="Data4.cab" EmbedCab="yes" VolumeLabel="DISK4" />
    <Media Id="5" Cabinet="Data5.cab" EmbedCab="yes" VolumeLabel="DISK5" />
    <Media Id="6" Cabinet="Data6.cab" EmbedCab="yes" VolumeLabel="DISK6" />
    <Media Id="7" Cabinet="Data7.cab" EmbedCab="yes" VolumeLabel="DISK7" />
    <Media Id="8" Cabinet="Data8.cab" EmbedCab="yes" VolumeLabel="DISK8" />
    <Media Id="9" Cabinet="Data9.cab" EmbedCab="yes" VolumeLabel="DISK9" />
    <Media Id="10" Cabinet="Data10.cab" EmbedCab="yes" VolumeLabel="DISK10" />`

The result is always the error above

barnson commented 7 years ago

What happens if you try EmbedCab="no"?

punkbuster2003 commented 7 years ago

I tried everything in this direction. With embedcab and without. With package compressed and without. alwas the same error. maybe i repeat what i meant in my first post. The Problem occurs when all cab files are successfully build. Then another cab file will be build with alle 150 files. This cab file does not need to be build. The error can not be solved with media or mediatemplate. I think it is not possible to build a msi package with files greater than 2GB (uncompressed). That is the result of my debugging with the wix toolset. When i remove some files (under 2GB uncompressed) the package will be build succesfully.

barnson commented 7 years ago

You cannot build an .msi (with embedded cabs) that large. No single file greater than 2GB is supported.

I was able to build an .msi for 3GB worth of uncompressed files with 16 external cabs totaling 1.2GB, no problem.

punkbuster2003 commented 7 years ago

And how did you define this in your wxs?

punkbuster2003 commented 7 years ago

Another thing to know is that i am using wixlibs for my setup.

barnson commented 7 years ago

<MediaTemplate />

punkbuster2003 commented 7 years ago

Finally solved it. But i think this is a bug or it is not supported so i would expect an error message.

All files have been in wixlibs. All cab files where build as expected. But when the msi database will be generated, light takes all the files again and compresses them in the msi database. to solve it i used the wxs fragments from the wixlibs and build them with the main project and now everything is build successfully.