Archive: Embedded Banner plug-in


Embedded Banner plug-in
Plug-in shows image (bmp, jpeg, gif are supported) on the bottom of installer' page and plays sound (if necessary :) ). I know this is possible with custom page, may be such plug-in was even wrote earlier (I not found it in archive), but vbgunz' idea looked funny for me and I spent about hour merging 2 other plug-ins code (NewAdvSplash and Marquee). Tested on XP only.
'stop' entry point (call) is optional, plug-in can auto-destroy image on the dialog exit. Image is not clickable and it's position is fixed (dialog bottom). Result looks simple for usage (attached). If this will appear to be interesting, I'll create wiki page and upload VS project.
Link to file http://nsis.sourceforge.net/mediawik...72/EBanner.zip


This looks very promising.

I could even see using this to replace certain message boxes for things like "invalid directory" and such that get called during page leave functions.


In most cases only 3-rd version looks good. So the question - what features to add to the second build :) ?

1. Image auto-scale down if it is wider then page 'child dialog' (IMHO scale up may looks ugly). May be this is not important if NSIS dialog size is fixed (or how it works with fixed-size banners on the top of page?), but default dialog size in Windows depends on system font size.
2. /align=left or right.
3. Better auto-stop on page exit (+ IDABORT). Because I am not sure when Parent window receives WM_CLOSE, may be on the final exit only (plug-in paints on the 'child' dialog window inside parent one).
4. May be cross-page 'keep alive' instead of 'auto-stop' on the page change? If Parent window is the same during installation (and we attached plug-in to it's wndproc) it is possible to understand during wm_paint handling that old 'child' window was lost and to find new one. But I am not sure - INSTFILES looks the only good place for big banner.
4. And finally - what else?


EBanner plug-in - version 0.2
Option /ALIGN={LEFT|RIGHT}
Image scale down (if it is too big).
Image may be changed without plug-in unload with next 'show' call. Empty string as file name ("") cleares image but not stops sound (if any). The same with 'play' entry point - empty sound file name stops playing (tested with 'winamp media file' :) )


Image auto-scale down if it is wider then page 'child dialog' (IMHO scale up may looks ugly). May be this is not important if NSIS dialog size is fixed (or how it works with fixed-size banners on the top of page?), but default dialog size in Windows depends on system font size.
Scaling images up or down both seem reasonable. But I also agree that scaling up makes images look ugly, so I can accept your approach. (My opinion is that utimately, the developer should have to take some responsibility to ensure that his/her installation make them looks good.)

One thing that might be cool would be a "fade-in/fade-out" effect for Windows 2000/XP. And along those same lines, perhaps a way to specify the transparency of the entire image. (Thinking along the lines of the AdvSplash plugin). Unfortunately, I'm not much of a full-fledged programmer, so I'll leave it up to whether or not this something you want to tackle.

Overall, I think this plugin is still very good.

IPicture interface I used in EBanner plug-in paints gif images with transparency ;)
Fade-in/out effectes in the AdvSplash based on the 'layered' window attributes, which looks not(?) applicable to child window. Or this not worked in my test and this is why I removed child window at all and now plugin paints directly on the installer page. AplhaBlend is posiible way, but I need to make it working with IPicture hdc. May be later...
wiki page


Version 0.3 uses IImgCtx instead of IPicture to support more image formats. Updated wiki page


Wow Takhir :)
this is very cool...
I was using MSIBANNER, but this looks like a step up....
;
side note:
my girlfriend's brother just climbed to the top of Mt Elbrus located in Russian republics of Karachay-Cherkess and Kabardin-Balkar. Pictures were very cool...
g


Agreed. Very cool!


Thanks! May be sometimes animation will be supported as well :)


Takhir, does the EBanner Plugin work with the InstallOptionsEx Plugin?

jtweather


Sorry, I was offline 2 weeks (1000 km bike trip ;) )
I guess Yes, AFAIK IOEx uses the same child window for extended controls set. Any case you can use /HWND= parameter to set target window.


Takhir,
I've noticed that images disappear when the installer window loses focus. Any ideas on preventing this?


I re-tested last (ebanner.dll June 21, 2006) and previous version (February) on XP and 2003, both included examples (Example.nsi and FullBg.nsi), works correct. WM_PAINT should work both with focus and without this. What precisely you do? Script? Did you tested this on big display intervals (Sleep 10000) ?


Takhir,
Sorry about that. I thought I was using a recent version of the plug-in, but I just re-downloaded, and the newest version does not have this problem :)


png image not showed with the plugin.
Hi all people,
I have problems to do work EBanner plugin in my Nsis script.
The png image isn't showed in preview page (second page) of my installer. This page is make with InstallOptions plugin as custom page.

If i use a bmp file without EBanner plugin preview image is showed but i like change the image to png file for less installer package size.

I think that i tried all possibles methods for showed preview image with EBanner plugin without positives results.

You can download the script files from here:
http://two.xthost*******kmeleon/Themes/SkipStone.zip

Any help is welcome, thanks.