Archive: Splash image makes installer "sluggish".


Splash image makes installer "sluggish".
Hi.

I thought I would add a splash image to my installer, and so I used code that I found here, and put it in .onInit:


InitPluginsDir
File /oname=$PLUGINSDIR\splash.bmp "splash.bmp"
advsplash::show 4000 640 480 -1 $PLUGINSDIR\splash
Pop $0


The problem is, that since I did this, upon opening the installer, a "Please wait while files are extracted"(or similar) messagebox pops up, and it takes maybe a minute for it to count from 0% to 100%, and then show the splash image.

If I remove the splash code, the installer opens immediately.

-If the splash thingy is making the installer this 'heavy', I can't say I think it's worth it.

The image is pretty small(in my opinion) at 640x480, but since it's a .bmp it's at over 1MB still.

I think I read somewhere that one could 'reserve' files, and that that would make the installer 'faster'. Does this apply here? Or would it only make it compile faster?
I'm using LZMA compression, if that's related.

It seems it has to extract the bitmap on load, and that this process takes maybe a minute.

So is there any way to speed this up?

Why isn't it possible to use a .jpg, btw?

Thanks. :)

you should try reducing the palette of the image to 8bit or lower.

using reservefile should speed up your installer, but make it much bigger.


Re: Splash image makes installer "sluggish".

Originally posted by John P.
I think I read somewhere that one could 'reserve' files, and that that would make the installer 'faster'. Does this apply here? Or would it only make it compile faster?
I'm using LZMA compression, if that's related.
This applies exactly to this situation. Use ReserveFile on the top of the script, right after SetCompressor lzma. You should reserve the bitmap.

Thanks for the replies, but it doesn't seem to change the fact that it takes 25 seconds to load the splash image on startup(I said a minute, but that was exaggerated - it just feels like 1 min).

I don't think a simple splash image justifies delaying the installer by ~30 seconds(counting the time the splash is visible).

I put SetCompressor at the top of the script like you said, just below !define VER_NAME, which is at the very top.

Like this:


!define VER_NAME "Name of my installer."

SetCompressor lzma
ReserveFile "splash.bmp"


-I'll try to make the image 'smaller' by lowering the color palette, unless there's something else I can do.

-Any way to stretch the splash to cover the entire screen, by the way, like I've seen some installers do?



UPDATE:

I managed to take the image size down from 1,20MB to 300KB by making it 8bit, but the installer still has to spend quite a few seconds extracting it on startup...

Oops, forgot advsplash.dll itself. You need to reserve it too.


Sorry for the late reply.

Just thought I'd reply to say thanks, it worked when I reserved the advsplash.dll as well.

Now the installer opens right away.

-If others read this thread later and have the same problem, I should add that to reserve the .dll file, I had to copy it from the NSIS plugins folder into my installer folder.


You don't have to move it, you can use:

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