0
votes

I've recently stopped using winzip self extractors with my install4j installer, in favor of packing all my resources inside the install4j installer. The problem I am attempting to solve is that winzip doesn't support installers larger than 2gb. 7zip supports installers up to 4gb in size, but install4j can bundle our resources for us, so it just seems like the right direction to go to remove the unnecessary dependency on winzip/7zip self-extractor.

Using the same template file to bundle my resources seems to work on a smaller (200mb) exe, while a 2.2gb exe gives me the error during the 'Extracting files ...' step of 'An error orccurred while trying to read the source file: 0.dat'.

I tried comparing the operations performed using Process Monitor in my working installer vs my failing installer. I managed to find where the differences happen, in the failed installer it attempts to access 0.dat and cannot find it. In the working installer, it does not attempt to access 0.dat, and just opens a read lock to the bundle exe. Just prior to this in both cases, it's running code from i4jruntime.jar, so something in the code at the same point is causing my installers to perform differently based on their contents. The only thing I can think of is that my installer is failing to extract it's resources into the user directory because of the file size.

I've inspected the user directory in my temp directory at the point in the crash, and it appears the 2.2gb zip I've included is there.

After making several different installers of varying sizes, it seems to happen consistently once I surpass 2gb installer exe size.

1
Indeed, this is a limitation. We have planned to lift this for install4j 6 at the end of 2014. - Ingo Kegel

1 Answers

0
votes

Instead of including my install files as 'Custom Code & Resources', I've included them using the Install4j 'Distribution Tree'. This fixed my problems related to the above crash.

Also, it looks like in Install4j 6, there is actually a hard limit at 4gb now for the installer size. Where as in Install4j 5, there was no limit and some of the more massive installers I experimented with (larger than 5gb) would actually cause the process to run out of memory and crash before finishing.