Archive: Question about 2GB file limit


Question about 2GB file limit
Is there any way around this 2GB file limit? I have about 30,000 files (3.5GB) I want to include into my setup, but I found out that NSIS wont allow that. Are there any plans to remove the limit?

Also, does anyone know of any free install programs similar to NSIS? Thank you.


The current version of Inno Setup doesn't have a 2GB limit.


You could also package up some or all of those 30,000 files into an archive such as a zip or even a self extracting exe, then call it from you nsis script. If you use a zip, just get PkZip, which is command line program that you can include and call from nsis, or use WinAce to make a self extracting exe archive. Good luck.


Use 7-zip (http://www.7-zip.org). It's the lzma compression that NSIS uses (and it's the best out there!)

You'd have to grab the 7z.exe command-line program, extract it onto the user's system before installation and then exec using nsExec::Exec.

PKZip is terribly old and doesn't support long file names (only DOS). If you use Zip then use unzip.exe (it's much better). Just search via Google.

-Stu


It also depends on the compression ratio. If you can compress those files (using non-solid compression) into an archive of less than 2GB, it's possible.

However, creating such huge files is generally not a good idea. I recommend you to keep the data in separate files.

But never create files larger than 2GB, unless you only want to support the most recent Windows versions. Most older file systems have a 2GB file limit.


I zipped my 3.5GB files into 1.87 on ZIP. NSIS somehow still has problems compiling that. I just used Inno Setup and it compressed all of that to 1.45GB with LZMA. Quite a good compression ratio, and the setup is flawless. Is NSIS's optimal compression LZMA as well?


The default compression is bzip2 (I think).

Use:
SetCompress lzma

If you weren't using lzma already (and it's come to 3.5GB) then you should scrap compressing it in Zip first and compress it straight into the installer in lzma.

-Stu


You should get a special build from the website with non-solid LZMA compression. Otherwise you will have a 2GB limit for uncompressed data as well.


I have a 3.5 Gb install DVD and I use zip file with ZIPDLL in MUI lines format as following:

----------
!include "ZipDll.nsh"
----------
!insertmacro ZIPDLL_EXTRACT "$EXEDIR\_ROTW-UI\Rotw-ui.zip" "$INSTDIR\UI" "<ALL>"
----------
(there is about 20 lines !insertmacro like this)

It works fine


Why use Zip files when you can use 7z (lzma)? You'd atleast half the size of those Zip's altogether.

-Stu


Because my files are in zip format and in different and very specific folders. I can't mix them. As you know, I am a rooky and I try before to write program to find options with documentation and clear examples.

It takes 8 mn to install this 3.5Gb compressed files. That's not too long. And if another solution can't save enough place to use a CD instead of a DVD, its interest is minored.


But if I can find a better solution, I take it. May be next time I need to save a lot of place on a CD.


It takes 8 mn to install this 3.5Gb compressed files
That's quite a long time to install 3.5GB's data. It only took me about ~2 mins to install my 3.5GB. What are your system specs?

Mine is

3200+ (2.2Ghz)
256MB DDR400
40GB IDE (System)
300GB SCSI (Storage)

Thanks guys.

Also, I would like to see NSIS support 2GB+ in the near future. Where can I request such a feature? I would like to know if NSIS developers would consider this in a later version.

My system is
Dell XPS 3.1 Ghz
1Gb memory
2x230 Gb SATA
external IOMEGA multi-format DVD writer (USB 2.0)

But my install program executes first 2 others specific install patches programs.
May be also than zip files are not the best compressed way to use with NSIS.


Have you tried lzma? Your system has a lot of useful memory. I'm jelous.


sorry! But I need this kind of system to run simulator and have good fps rate.

No I have not tried Izma, but I 'll try it soon.