Old 19th May 2005, 15:02   #1
hooklee
Junior Member
 
Join Date: Apr 2005
Location: China
Posts: 30
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.
hooklee is offline   Reply With Quote
Old 19th May 2005, 19:41   #2
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
It's better to use this only if you want to show the real size, not the size that will be on disk:
  1. To make the size not to be detected by NSIS, put "File" commands inside functions, and call them to the respective sections of files.
  2. 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.)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 20th May 2005, 03:34   #3
hooklee
Junior Member
 
Join Date: Apr 2005
Location: China
Posts: 30
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.
hooklee is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump