Archive: Create Install over then 2 gb


Create Install over then 2 gb
Hi!
How can create install, size > 2 GB????


From what I gather it is in there for legacy reasons for Win9x compatability. But it is 2007 now and I am not all that bothered about Win9x users.

Is this just a limit you have set in the NSIS source?

What would be the implications of removing it? Just effect Win9x users? If so I might hack the source myself. I think having installers over 2 GB (surely all modern games are way over 2GB) is more useful than WIn9x support.


Hey..my little cous. has Win95 for learning propurses... :)
I use his OS as test machine :p

Yep, there are a few Win 9x out there.


I understand that there are some Win9x out there however surely it is best for flexability of the person writing the installer to choose rather than have limits specifically set in NSIS.

I am doing an installer for a game and I can see the 2GB limit going over and frankly Win9x users we do not care about as they will have old hardware anyway. It is unlikely that a Win9x user will be suitable for installers that are over 2GB in size.


The limit isn't there for Windows 9x users. It's just there, waiting to be removed.


Question
Can you not have a small installer executable and use .cab files for the hundreds of gigabytes you wish to install? I'm sure I read somewhere that NSIS works with .cab files...


Here's a topic on how to use external programs to install more than 2GB.

I would also like that 2GB limit to be removed. I am another user trying to make installers over that limit. The best idea I had is to have the installer span over different files, like a typical compressing program. This way we could even have Windows show the icon and version tab on properties.


Originally posted by kichik
The limit isn't there for Windows 9x users. It's just there, waiting to be removed.
Well that told me. :)

I suppose that is what you get for searching the forums for the answer and re-quoting them from NSIS mods ;)

http://forums.winamp.com/showthread....53#post1611153

;)

Anyway I think there are file size limits. Hunted around the web & found this:

Win32
FAT16 for Win9x/ME, max file size = 2GB - 1byte
FAT16 for WinNT/2000, max file size = 4GB - 1byte
FAT32 for Win9x/ME/2000, max file size = 4GB - 1byte
NTFS for WinNT/2000/XP/2003, max file size = 16,384GB - 1byte

So could apply to some Win9x users using FAT16!

Been looking for the 2GB limit in the source but nothing yet.

Any pointers?

BTW from the (old) release notes

v1.1n (3/11/01)
* Made add_data_compress and GetCompressedDataFromDataBlock use a slightly more efficient form (1 byte per block is saved, maximum file size is now 2gb instead of 4gb)

Is that related?


oh, how sad. in 2001 it was decided to reduce by half the maximum size :(

(4GB would be enough for my installation needs)


The limitation comes from usage of 32-bit integers. 2^32 is 4gb, 2^31 is 2gb. The limit is all over the source. Search for `int` and you'll "find" it.


Thanks LOL nice and easy then.

"It's just there, waiting to be removed."

That sounds funny now! :)

If that wasn't enough there are 3295 occurrences of 'int'! ;)

So when it goes above this size it is just basically a integer overflow and it crashes out.

Seriously it must only be 1 (or a few) occurrences of int that represent the total file size.

I am thinking a check for very increment in total file size to see if the total is say over 1GB (checking if it is over 1GB will not work as it will be the overflow) Then minus 1,048,576 (1GB) from the total file size and increase a new GB filesize counter by 1.

So there will be integers for the over filesize.

filesize_mod – the modulus reminder of actually total size in bytes by 1,048,576 (1GB)
filesize_whole – the whole number integers of the amount of GB's (1,048,576 bytes)

Total size = (filesize_whole* 1,048,576) + filesize_mod

thoughts?


Doing that you've just reimplemented __int64 with the downside of not supporting single files over 2gb.

That, however, won't be enough. Everything that references files or data in the installer must also be converted so it can point that far. Every point to everything else might also need updating unless you set a limit on the header size as well.

It also brings the question of backward compatibility. Nothing that reads installers will work. Not so much "our problem", but still something to consider.


Ummh yeah there are a few things to consider.

How standard is _int64? I don't know too much about the ultra long integer types as I have never had a reason to ever use them.

(Do all compliers support this? (I suppose it will be only for you to compile it so it won't to too much of a problem))

Hence why I my solution tried to avoid them (and I always think of the hardest way to do thing *sigh* ;) ).

Ummh I know what you mean that every file that references the total-size (or whatever it is called ATM) integer. But surely there will not be that many? How many times is it called upon?

I would presume this counter (is it more than a counter?) only used when you add a new file to the installer in the compile stage. If that is the case it can only occur in a couple of lines.

True the backwards compatibility is a problem and it will break things the GUI readers like Venis, that I use. Or would it? I don't know enough about what they do I suppose they read it when the compile by NSIS is complete. Now it would be 2 variables.

(filesize_whole* 1,048,576) "." (filesize_mod/1,048,576) GB total size

Ummh more thought required in the backwards compatibility stakes but like you say not so much "our problem".

The limit is something that will become more problematic in the future as more people expect to be able to do it. So I imagine it would have to be addressed at some point as more people want 2GB installers.


Can developers all the same will make refusal from Windows 9x - let users 9x use old versions NSIS.
I am make installs of computer games and the limit in 2 Гб simply kills me!
Or start up developers will make the version without restrictions on installation volume


MaxDELETE, I already said it has nothing to do with Windows 9x.

Rovastar, with GCC you have to use long long but it's essentially the same. That can be solved with a simple #ifdef.

The problem is not only with code handling the total file size, but also with code that references anything that has to do with an offset into the installer data which can suddenly grow over the 32-bit limit. The display and the counter is the least of our worries in this case.


Whether it is possible to expect, what NSIS can create archives more than 2 GB? If is not present, it is necessary to search for another installer :(.
Though they are (Createinstall for example), but their possibilities do not suit me :(


Why don't you use the CABSetup plug-in?

That way you can enjoy the power and flexibility of NSIS, but still install more than 2GB with your installer.

Note that even Microsoft's MSI based installers are hard-pressed to exceed 4GB - they use the same tool as CABSetup does to create to disk sets in the Media table). I don't think I have seen a MSI > 2 GB although it *is* possible.

Even most game installs (where multi-gigabyte installs are common), usually use a product like InstallShield or Windows Installer that store the actual data in "cabinets" outside of the installer the user runs.

Duncan