hooklee
19th May 2005 16:02 UTC
Required space depends on File System
As we know, when there are a large number of small files, the required (I mean, actually occupied) space will be much different for different file systems. The following is my case with 34,498 files:
real size: 574,837,643 bytes
occupied size in a NTFS drive: 659,107,840 bytes
occupied size in a FAT32 drive: 1,005,731,840 bytes
occupied size in a FAT16 drive: not available for me, but should be even larger than 1,005,731,840 bytes
Since the occupied spaces are so different, I want to show the size of required space in my NSIS installer in a correct way. Is there a way to do so?
BTW, I noticed that this problem is seldom focused for almost all installers, though it is actually very important for many large installers.
deguix
19th May 2005 20:41 UTC
It's better to use this only if you want to show the real size, not the size that will be on disk:
- To make the size not to be detected by NSIS, put "File" commands inside functions, and call them to the respective sections of files.
- To increase the size of a section, just use "AddSize" instruction with the desired value in KBs. (I think this is funny: if you put a negative value, the required size goes up to 4095.5GB! Would be also better if there had the conversion of 1024 gigabytes into 1 terabyte.)
hooklee
20th May 2005 04:34 UTC
The problem is that I have to frequently invoke SectionSetSize command to change the size of each section when the user change $INSTDIR (by judging the file system of the target drive). If there is an automatical way to do so, it will be perfect.