- NSIS Discussion
- Problem with the banner
Archive: Problem with the banner
arfgh
8th March 2007 02:04 UTC
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
arfgh
8th March 2007 13:11 UTC
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 !!!
kichik
8th March 2007 18:57 UTC
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.
arfgh
8th March 2007 21:12 UTC
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.
arfgh
8th March 2007 23:41 UTC
How can i see this last file of the compressed solid block i am using at first ?
Red Wine
9th March 2007 05:35 UTC
You may use ReserveFile as kichik suggested.
arfgh
9th March 2007 09:24 UTC
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.
Red Wine
9th March 2007 09:31 UTC
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 ;)
kichik
9th March 2007 11:23 UTC
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.
arfgh
10th March 2007 14:08 UTC
Red Wine
can i Reservefile for the 2 plugins i am using ?
can this solve the problem ?
Red Wine
10th March 2007 15:39 UTC
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"
arfgh
11th March 2007 18:23 UTC
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 ?
arfgh
13th March 2007 21:51 UTC
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
kichik
14th March 2007 19:50 UTC
Have you tried moving .onInit? That's the easiest solution available.
arfgh
15th March 2007 20:34 UTC
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 ?
kichik
18th March 2007 17:43 UTC
But did you move .onInit to the top of the script file?
arfgh
19th March 2007 14:18 UTC
Yes, the .onInit is after the first parameters as for example...
Name blabla.exe
compression lzma
.onInit
....
...
...
...
Section
HideWindow
....
...here the code
kichik
19th March 2007 19:25 UTC
Attach the complete script. It'd be easiest to see what's wrong this way.