Old 8th March 2004, 11:02   #1
misha.cn.ua
Junior Member
 
Join Date: Oct 2003
Location: Chernigiv, Ukraine
Posts: 17
Question A BIG problem during installation

I created an installation with NSIS 2.0, and founded, that it works as follows:
1. Create a zero size file in the destination directory.
2. Decompress file to %TEMP%.
3. Copy (!) file from %TEMP% to file, created at step 1.
4. Delete file in %TEMP%
5. Jump to step 1 with next file.

And now, imagine, I have 600Mb free on my drive C, and installing a single 500Mb file on it... The installer will allow to start installation, because there is enough free space, but then will give an error... and after this you say that NSIS does not suck...

PS: I am using Windows 2000 SP3.
misha.cn.ua is offline   Reply With Quote
Old 8th March 2004, 11:23   #2
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
That is the decompression cache for solid installers.

See http://nsis.sourceforge.net/download/special_builds/ if you don't want to use solid compression.
Joost Verburg is offline   Reply With Quote
Old 8th March 2004, 11:23   #3
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
That is the decompression cache for solid installers.

See http://nsis.sourceforge.net/download/special_builds/ if you don't want to use solid compression.
Joost Verburg is offline   Reply With Quote
Old 8th March 2004, 11:54   #4
misha.cn.ua
Junior Member
 
Join Date: Oct 2003
Location: Chernigiv, Ukraine
Posts: 17
Thanks.

But why not to decompress file directly to destination?
Why do you use temp? And why do you copy file, moving would be much faster.
misha.cn.ua is offline   Reply With Quote
Old 8th March 2004, 14:34   #5
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
It stores the decompressed data in one temp file, otherwise it would have to decompress everything again once something should be retrieved from another location.
Joost Verburg is offline   Reply With Quote
Old 10th March 2004, 05:31   #6
misha.cn.ua
Junior Member
 
Join Date: Oct 2003
Location: Chernigiv, Ukraine
Posts: 17
Ok, but how than such archivers, as WinRAR, 7-zip and others unpack solid archives?
misha.cn.ua is offline   Reply With Quote
Old 10th March 2004, 13:03   #7
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
They have no installer feature and only have to decompress things in one specific order.
Joost Verburg is offline   Reply With Quote
Old 11th March 2004, 10:40   #8
misha.cn.ua
Junior Member
 
Join Date: Oct 2003
Location: Chernigiv, Ukraine
Posts: 17
But NSIS also decompress in one specific order. And if it needs to skip some files, it must do the same thing as WinRAR does when you want to decompress only one file from solid archive.
I can't understand you. Why file must be decompressed to %TEMP%? Why not to use destination file as "cache"???
misha.cn.ua is offline   Reply With Quote
Old 11th March 2004, 12:50   #9
eccles
NSIS Dev
 
eccles's Avatar
 
Join Date: Sep 2001
Location: Leicester, UK
Posts: 193
Quote:
But NSIS also decompress in one specific order
Not necessarily so.

With Functions and conditional execution using StrCmp, etc. the order that files are decompressed can not be known at compile time.

The trouble is, with solid compression, it is not possible to go "backwards" when decompressing out of sequence. When a file is required out of order, NSIS would have to start decompressing from the beginning to find it. For large installers this could take a long time.

A cache of everything decompressed so far is kept in %temp% so that the installer never needs to decompress the same data more than once.

You can lead a man to knowledge, but you can't make him think!
eccles is offline   Reply With Quote
Old 11th March 2004, 13:35   #10
misha.cn.ua
Junior Member
 
Join Date: Oct 2003
Location: Chernigiv, Ukraine
Posts: 17
Thanks for explanation.

Than I think, the option to make non-solid installations *must* be in the main distribution of a NSIS. The compressors list must be something like "zlib, zlib solid, bzip2, bzip2 solid, lzma, lzma solid".
misha.cn.ua is offline   Reply With Quote
Old 14th March 2004, 06:51   #11
misha.cn.ua
Junior Member
 
Join Date: Oct 2003
Location: Chernigiv, Ukraine
Posts: 17
Please, tell me, if non-solid compression will be included in main NSIS distribution? Not everyone needs non-solid compression, but also not everyone wants solid compression.
misha.cn.ua is offline   Reply With Quote
Old 14th March 2004, 10:44   #12
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
You can download a build with non-solid compression from the website.

Of course a compiler setting would be a nice feature, it's already on the feature request list. However, there are many features people request so it might take some time before something like this will be added.
Joost Verburg is offline   Reply With Quote
Old 15th March 2004, 12:30   #13
misha.cn.ua
Junior Member
 
Join Date: Oct 2003
Location: Chernigiv, Ukraine
Posts: 17
Thanks.
misha.cn.ua is offline   Reply With Quote
Old 4th June 2004, 21:13   #14
lroathe
Junior Member
 
Join Date: Feb 2004
Posts: 12
This is a hidden problem of larger magnitude

All,

I've finally tracked down problems reported to me about bad installations to this very issue; I used LZMA for my compression (solid, from 2.0) and while my installations are very small (100MB, 180MB uncompressed) people often run out of HD space and the installer crashes.

I don't have the time to test for more info or put in a small HD and will just use the special build for LZMA non-solid for now, but this needs to be looked at further as it is an issue that negatively effects an otherwise solid install experience.
lroathe is offline   Reply With Quote
Old 5th June 2004, 16:25   #15
lroathe
Junior Member
 
Join Date: Feb 2004
Posts: 12
Follow up: I took one of my largest projects, which is 180MB on disk with 5,654 files in 500 folders. Using solid lzma compression the resulting installer is 100MB in size. Using non-solid compression, the resulting installer is 102MB in size.

As this project probably represents about the best case real-world example for solid compression yet only saves 2MB, I'd suggest that non-solid compression for lzma (not sure about bz2) be the default. I'd bet that at least 90% of the people creating installers would agree that a small increase in size is worth avoiding the problems the very large temporary file creates for customers... esp. when the customer runs out of disk space during the install; which can lead to a non-working hard drive and very (very) upset customers; I spent 3 hours on long distance with one walking him through recovering his HD after this happened.

Actually; the installer _really_ should check for enough free HD space before attempting to install. And if a temp file will be created, the max size of that temp file should be taken into account. (ie, install size = 200MB, temp file == 180MB, total free HD required == at least 380MB).
lroathe 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