Archive: Problem with the banner


Problem with the banner
Yes

i am using the banner plugin to show some like for example

"Installation sucesfull"

and it work so fine. But sometimes before the banner it is showed, it appear in a so fast blink another banner telling

"Unpacking data 0%"

Of course i not like this not needed blink banner it appear.

Can someone tell me how prevent this banner not appear ?
i am using the last version of nsis and my installer is compressed with lzma

thx


nobody know how to disable this anomaly ?

let me tell more info about my script..

i not use code on the section because i dont want to show the default installer. I only want to show the final banner "installation succesfull", because my installers are not so big. 5 MB maximun.

Ths is the code how i use the banner. Tell me if is incorrect

Banner::show /NOUNLOAD 'Installation successfull !'
IntOp $0 $0 + 1
Sleep 10
StrCmp $0 100 0 -2
Banner::destroy
abort
FunctionEnd

Then all the code in into the .onInit
and there is where i use 2 plugins.. advsplash + banner
the problem is that internal banner from nsis it appear telling "Unpacking data 0%". And i dont know why this appear, because if i not use the banner plugin, it not appear.

Really strange... help !!!


It's because you're using solid compression and decompressing something located at the end of the compressed data block early in installer execution. This could happen if .onInit is located at the bottom of the script and it uses a plug-in. To solve it, .onInit should be moved, or ReserveFile should be used.

Files are added to the compressed data block as they're seen in the script. If a file appears last in the script, it'll be the last file on the data block. Because solid compression compresses the entire data block in one pass, it also has to decompress the entire data block to get to its end. Normally, files are decompressed as they're decompressed because both their extraction order and compression order matches. However, if for some reason, a piece of code which extracts a file is located at the bottom of the script and runs earlier than extraction code above it in the script, you get a delay at the first extraction. It has to decompress the entire block.


Well

i can insert all the code not on .onInit, but in this case the installer window it appear. Include if i use the HideWindow, a so fast blink of the installer window flash in and flash out.

For this reason i inserted all the code into the .onInit
I go to try to make the changes you told to see if i can prevent this "unpacking date" not appear.

But is so strange problem, because not allways happend.


How can i see this last file of the compressed solid block i am using at first ?


You may use ReserveFile as kichik suggested.


Well
i used the ReserveFile with a file it is in the end part of the solid block. But the "Unpacking Date" still appears. How i told, this nsis banner not come all the times.

At this time, the solution i found to preserve this, is insert all my installer code in a Section and leave the .onInit.
But doing that i get other issue with the HideWindow command.

Yes,i want to hide the installer window, but before the HideWindow it take effect, a so fast blink of the window installer is pop up with a so ugly effect.


Reserve all plugins (DLLs) you're using in your installer.

As for the fast blink you're referring in other post too, I'm not able to reproduce it or I'm not so fast to see it ;)


There's no need in moving the code into sections. All you have to do is move .onInit to the top of the script or use ReserveFile for the files used by .onInit on the top of the script.


Red Wine

can i Reservefile for the 2 plugins i am using ?
can this solve the problem ?


According to NSIS manual and to kichik's suggestion, either moving the .onInit function to the top of your script, or using ReserveFile must resolve your problem.

  ReserveFile "${NSISDIR}\Plugins\AdvSplash.dll"
ReserveFile "${NSISDIR}\Plugins\Banner.dll"

ok i tried that, but i got the same results.

Moving the code to the section the problem not appears, but, i got the popup window installer before the HideWindow not take effect.

some other suggests ?


in the section i have a messagebox in the near begin of the section. This messagebox it appear if the installer detect a file it exist on the destination path.

When that happend, is when the installer window it pop up so fast. This is the bug i want to solve.

please help


Have you tried moving .onInit? That's the easiest solution available.


if the code is on the .onInit, i just told what happend.

i cant prevent with any way the "unpacking data" it appear.

i used the reserveFile for the plugins and for the files. No succes. For this reason i moved all the code to the section. But there have this strange popup of the window installer.

some solution to that ?


But did you move .onInit to the top of the script file?


Yes, the .onInit is after the first parameters as for example...


Name blabla.exe
compression lzma

.onInit
....
...
...
...


Section
HideWindow
....
...here the code


Attach the complete script. It'd be easiest to see what's wrong this way.