Archive: ReserveFile with InitPluginsDir ?


ReserveFile with InitPluginsDir ?
I may have several misconceptions. Firstly, if a file is a DLL, not to reserve it, because you don't have to.

Secondly, that when files are in .onInit after InitPluginsDir, they also do not require insertion as a ReserveFile.

InitPluginsDir
SetOutPath "$PLUGINSDIR"
StrCmp $LANGUAGE 1031 +4
File "/oname=$PLUGINSDIR\modern-wizard.bmp" "tigws.bmp"
File "/oname=$PLUGINSDIR\fmodern-wizard.bmp" "tigfs.bmp"
Goto done
File "/oname=$PLUGINSDIR\modern-wizard.bmp" "tigwgs.bmp"
File "/oname=$PLUGINSDIR\fmodern-wizard.bmp" "tigfgs.bmp"

I remember reading about this, but I don't remember the answer. The thread was years ago.

The bmps are contained renamed in a $PLUGINSDIR folder inside the exe. It says they are LZMA:23 packed, whether I reserve the pre-renamed files or not.

Is there a time-tested way to define reserve files?

From time to time I see a flickering of the 'Loading ...' banner. The present installer is 10Mb. Reserving the images would increase the size by 500Kb. Non-solid compression however, increases the size to 13Mb. I can't tell if I'm rewarded by faster extraction. Downloading will certainly take longer. I'm guessing there's no chance of the bad banner.


Have you read what the manual has to say about ReserveFile?
http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.1.7


Yes. And I am no stranger to fiiles that appear in the wrong order in the script and must be extracted from the data block afterwards.

The images in .onInit are the first files to be extracted. The code copies two bmps to the temporary folder. It occasionally takes longer, and I glimpse the banner briefly. I hoped that defining the images as reserve files would allow the extraction to go quicker by including the images at the top of the compressed block. It increased the installer size. I'm unable to appreciate a difference in the rate at which the files are extracted.

How about setting SetCompress off for the ReserveFiles? I'm open for suggestions.


1 warning:
'SetCompress off' encountered, and in whole compression mode. Effectively ignored.