Old 12th July 2005, 19:18   #1
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
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
Takhir is offline   Reply With Quote
Old 13th July 2005, 01:23   #2
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
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.
Comperio is offline   Reply With Quote
Old 13th July 2005, 07:19   #3
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
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?
Takhir is offline   Reply With Quote
Old 13th July 2005, 17:25   #4
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
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' )
Takhir is offline   Reply With Quote
Old 14th July 2005, 00:50   #5
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
Quote:
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.
Comperio is offline   Reply With Quote
Old 14th July 2005, 09:31   #6
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
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
Takhir is offline   Reply With Quote
Old 14th July 2005, 16:48   #7
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
Version 0.3 uses IImgCtx instead of IPicture to support more image formats. Updated wiki page
Takhir is offline   Reply With Quote
Old 15th July 2005, 00:46   #8
grahama
Senior Member
 
Join Date: Sep 2004
Location: Los Angeles
Posts: 223
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
grahama is offline   Reply With Quote
Old 15th July 2005, 00:57   #9
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
Agreed. Very cool!
Comperio is offline   Reply With Quote
Old 15th July 2005, 07:06   #10
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
Thanks! May be sometimes animation will be supported as well
Takhir is offline   Reply With Quote
Old 29th April 2006, 15:36   #11
jtweather
Junior Member
 
Join Date: Apr 2006
Posts: 16
Takhir, does the EBanner Plugin work with the InstallOptionsEx Plugin?

jtweather
jtweather is offline   Reply With Quote
Old 14th May 2006, 09:55   #12
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
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 is offline   Reply With Quote
Old 27th June 2006, 22:00   #13
dienjd
Senior Member
 
Join Date: Oct 2005
Posts: 189
Takhir,
I've noticed that images disappear when the installer window loses focus. Any ideas on preventing this?
dienjd is offline   Reply With Quote
Old 28th June 2006, 06:59   #14
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
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 is offline   Reply With Quote
Old 28th June 2006, 18:03   #15
dienjd
Senior Member
 
Join Date: Oct 2005
Posts: 189
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
dienjd is offline   Reply With Quote
Old 10th November 2007, 18:17   #16
desga2
Junior Member
 
Join Date: Oct 2007
Posts: 3
Question 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.info/kmeleon/Themes/SkipStone.zip

Any help is welcome, thanks.
desga2 is offline   Reply With Quote
Old 9th January 2018, 18:42   #17
Kyle_1988
Junior Member
 
Join Date: Jan 2018
Posts: 12
Why is there no ebanner.nsh file? NSIS keeps saying it can't find the plugin. Where do I put the dll so it can find it?
Kyle_1988 is offline   Reply With Quote
Old 9th January 2018, 18:50   #18
Kyle_1988
Junior Member
 
Join Date: Jan 2018
Posts: 12
To be clear, I've already put ebanner.dll in the plugins directory like I've done with other plugins, but NSIS still says it can't find it.

Does EBanner depend on some other plugin?
Kyle_1988 is offline   Reply With Quote
Old 10th January 2018, 03:19   #19
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,646
You must put it in the correct plug-in subdirectory when using NSIS v3.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump