Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 16th October 2002, 07:48   #1
shantanu_gadgil
Member
 
Join Date: Aug 2002
Location: Pune, India
Posts: 72
better method of creating the installer EXE ?

When NSIS is creating the installer EXE, I think it first creates this in the TEMP directory and then moves it to the specified place.

Isn't this a round-about way of doing it ? Why doesn't NSIS start "outputting" the installer EXE in the final place itself.

Wouldn't this be a spacesaver (and hence time saver) ?
- Shantanu
shantanu_gadgil is offline   Reply With Quote
Old 16th October 2002, 15:58   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
That's not true. There is only one fopen (build.cpp:1361) and it opens the output file directly, it doesn't create it in the temporary directory and then moves to the output directory.

code:
FILE *fp = fopen(build_output_filename,"w+b");

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 17th October 2002, 13:43   #3
shantanu_gadgil
Member
 
Join Date: Aug 2002
Location: Pune, India
Posts: 72
You know why I was saying what I was saying...because when I tried to create a huge installer with the following code...
-----cut------
Name crap_trial
OutFile setup.exe
SetCompress off
InstallDir "C:\XYZ"
Section -
SetOutPath "$INSTDIR"
File /r "C:\Program Files\*.*"
SectionEnd
-----cut--------

...I got an error message which said...

------cut----------
Internal compiler error #12345: error mmapping datablock to 34257021.

Note: you may have one or two (large) stale temporary file(s)
left in your temporary directory (Generally this only happens on Windows 9x).
-------- cut ------

BTW, this error was for NSIS version 1.98.

I know the error says that this will happen on Win 9x systems. What is the problem ?
shantanu_gadgil is offline   Reply With Quote
Old 17th October 2002, 15:43   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
Well, the data block is saved is a memory mapped file which means it creates a temporary file and maps needed parts to memory. This is done so the data block will be able to grow bigger than your memory. I don't really know what is the problem with Windows 9x, but I guess it has a bug which causes it not to delete those temporary files.
The data block can't be directly written to the output file because the headers size is not yet known and moving the data block around in the file will take a lot of time.

There is a size limit on the installer which is:
Quote:
Installers can be as large as 2GB (theoretically -- when building on Win9x the limit seems to be around 500MB, however building on NT then installing on Win9x works with larger sizes)
You probably got that error because you crossed this limit.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 19th October 2002, 12:14   #5
shantanu_gadgil
Member
 
Join Date: Aug 2002
Location: Pune, India
Posts: 72
I don't know if I crossed the limit...

the installer crashed when it was trying to compress the AVI files(video codec Indeo 5) of Age of Empires. Out of these, the biggest is ~39 MB.

BTW, would the amount of main memory and VM size matter. The machine where the Win9x error was caused has 64MB RAM running Win98 SE. VM is fixed at 128 MB.

- Shantanu
shantanu_gadgil is offline   Reply With Quote
Reply
Go Back   Winamp 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