Archive: Nsis and the installation temporary space


Nsis and the installation temporary space
Hi,
I have a question of how nsis work.
When I began to work with nsis, I read on the french chm
help file. (Chap1 introduction)
"Les installations de NSIS ne vont pas essayer de se décompresser elles-mêmes trois fois, en indiquant à l'utilisateur de "bien vouloir patienter". Elles vont au but, et font leur travail."
Which could be translated in english: "The intallation made with nsis doesn't try to uncompress her self three times,
And during this this time, the user only add a wainting message. The installer do only what they need to do."

I interprete that like nsis doesn't need a lot of temporary space to installed it.

I have a big sepup (I think), The archive take 100 MB with
the LZMA /Solid compressor. The installation took 650 MB on my hard drive, And The installation contain ~12000 files.

I want installed it on the PC with poor available free space.

In my Case 900 MB
On the panel when I choose the install path, the installer
accept the path.
During the installation, I have an extract error.
If I made the installation on another PC with a lot of available free space, before clic on the finish button,
I Have 500 MB extra space ( temporary file I hope).
The space is removed after the clic on the finish button.

So My question....
How the setup work during the installation ?
Could it be possible to know the temporary space to
unaccept drive with poor free space ?
Maybe I make something wrong in nsi file ....


thanks.


I continue my investigation,
and during the installation,
nsis create a temporary directory, in my case
C:\Documents and Settings\MyName\Local Settings\Temp\nsv73.tmp
and a temporary file, in my case:
C:\Documents and Settings\MyName\Local Settings\Temp\nsv72.tmp
before the install panel and the real install of files,
the size of this files is 0K. The directory contain the uncompressed files. My banners, and the plugins used by my setup.

During the installation, the tmp size file increase drasticaly. in my case the file size grow up to 378 Mb.
I don't know if it's normal. if it's how nsis work or it's a bug.
I made my setup with setCompressor /solid lzma.
Maybe it's for that ? Maybe it's due to the solid option ?

Other information, I use NSIS 2.08
I watch the NSIS 2.09 ChangeLog,and I dont see a fix of this
type of problem.


thanks


note: The bzip2 /solid don't use a temporary file to uncompress files.
The temporary contain only plugins and bmp.

Is it a specification of LZMA Algorithm ?
In this case, it's a a de-advantage of the LZMA, if we need the double of place for the installation :(,
In my case my setup increase from 107 MB in LZMA to 187 MB in BZIP2. I hope it's just a bug, I like so much my setup with
LZMA :)


It's not only for LZMA, it's for all solid installers. Search the forum for the words solid and you should find some threads that explain this. Basically, this file exists so the installer won't have to decompress your entire installer multiple times.


When compiler parses your script it found files in this order:
a, b, c, d, e, f
and store it into archive.
But when script executes, it uses files in order, f.e.:
a, b, f, c, e, d
When you use solid compression, unpacker need to unpack files "c, d, e" before it unpack file "f".
So unpacker keeps that files in temp folder for not to return back to unpacking "c" when script reference to it.
All you need is to carefully place references to files in you script. There is some disscussions in this forum about this, and AFAIR even in documentation.


thanks, I try to test without solid option for compressor.
And I have a error with lzma, I test it with all the other combination (bzip2,; bzip2 /solid, zlib, zlib /solid, and lzma /solid, all work fine)
but for lzma alone, I have this error:
File: "myFile" [compress]Error: add_db_data() - compress() failed(initialization failed [-2])
and it a little file (a makefile 2 or 3 KB....


I think it's the SetCompressorDictSize is maybe too short.
in my projectFile, I increase to 16MB the dic size.
And I relaunch my setup generation with makensis.
The compressor take more files but I have the same message to another files.
I increase again the Dic Size to 32 Mb, and I the message:
File: "xxxxx.h" [compress]
and nothing more. If I made a top, my cpu do absolutly nothing. Another Thing I use nsis 2.09 under Linux.


Please attach a complete example, with all the files needed to reproduce this. Also try upgrading to 2.09.


Initialization error fixed. It was failing because the threads were not properly cleaned up. It's a good thing pthread_detach is mentioned in the man page for pthread_create.

Patch attached.

Thanks for your report.