AnimGif plug-in: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(8 intermediate revisions by 3 users not shown)
Line 5: Line 5:
Download:<br>
Download:<br>
<attach>AnimGif.zip</attach>
<attach>AnimGif.zip</attach>
<attach>AnimGifPe.zip</attach>


[http://forums.winamp.com/showthread.php?threadid=237737 Forum thread]
[http://forums.winamp.com/showthread.php?threadid=237737 Forum thread]
Line 10: Line 11:
== Description ==
== Description ==


AnimGif.dll is NSIS plug-in, displaying animated banner on the installer page. Not stops installer execution when banner is displayed. Banner is not clickable and it's is place limited with page (window) bottom. May be used in the page custom show/leave functions and on other (not page) windows with possible trasparency limitations.
AnimGif.dll is NSIS plug-in, displaying animated banner on the installer page. Based on the Juan Soulie code. Unfortunately, the base program fails on some images (very seldom): in this case, you can use AnimGifPe.zip variant based on the Oleg Bykov' PictureEx sample, which also supports static BMP and JPEG, but unpacks image very slowly. Plug-in not stops installer execution when banner is displayed. Banner is not clickable. May be used in the page custom show/leave functions and on other (not page) windows with possible transparency limitations.


== Command line (NSIS script) ==
== Command line (NSIS script) ==
Line 18: Line 19:
=== play DLL Function ===
=== play DLL Function ===


  AnimGif::play /NOUNLOAD [/ALIGN={LEFT|RIGHT|CENTER}] [/HWND=xxx] [/FIT=WIDTH|HEIGHT] [/BGCOL=xxx] FileName
  AnimGif::play /NOUNLOAD [/HALIGN=POSX] [/VALIGN=POSY] [/HWND=xxx] [/FIT=WIDTH|HEIGHT|BOTH] [/BGCOL=xxx] FileName


; /ALIGN
; /HALIGN
: Changes horizontal alignment for the image, default (no parameter) is center.
: image horizontal position in percents of width, default is 50 (center).
 
; /VALIGN
: image vertical position in percents of height, default is 100 (bottom).


; /HWND
; /HWND
: Sets target window. Default is current page '#32770' class child.
: target window, default (no parameter) is "#32770" child of $HWNDPARENT .
 


; /BGCOL
; /BGCOL
: Color to use for image trasparent areas. If not defined, plug-in attempts to extract value from target window, but this is not possible if window is hidden. Color value may be hex (starting with 0x) and decimal (first is not 0). Hex value will be used as RGB color, decimal - as Windows system color index in GetSysColor() API call, see MSDN. If value not specified and target window stays hidden (for example in custom 'Show' function), default COLOR_BTNFACE will be used.
: color to use for image transparent areas. If not defined, plug-in attempts to extract value from target window, but this is not possible if window is hidden. Color value may be hex (starting with 0x) and decimal (first is not 0). Hex value will be used as RGB color, decimal - as Windows system color index in GetSysColor() API call, see MSDN. If value not specified and target window stays hidden (for example in custom 'Show' function), default COLOR_BTNFACE will be used.


; /FIT
; /FIT
: Image stretch to occupy window width or height. For Welcome page left logo and screen dpi 120 mainly. Default - no stretch.
: image stretch to occupy window width or height. For Welcome page left logo and screen DPI 120 mainly. Default - no stretch.


; FileName
; FileName
Line 39: Line 44:
  AnimGif::stop
  AnimGif::stop


: Stops animation and cleares the screeen.
: Stops animation and clears the screen.
 
 


== Examples ==
== Examples ==
Line 53: Line 56:
AnimGif::stop
AnimGif::stop
Delete '$PLUGINSDIR\sample.gif'
Delete '$PLUGINSDIR\sample.gif'
Delete '$PLUGINSDIR\AnimGif.dll'
</highlight-nsis>
</highlight-nsis>


[[Category:Plugins]]
[[Category:Plugins]]

Latest revision as of 12:00, 14 March 2010

Author: Takhir (talk, contrib)


Links

Download:
AnimGif.zip (45 KB) AnimGifPe.zip (63 KB)

Forum thread

Description

AnimGif.dll is NSIS plug-in, displaying animated banner on the installer page. Based on the Juan Soulie code. Unfortunately, the base program fails on some images (very seldom): in this case, you can use AnimGifPe.zip variant based on the Oleg Bykov' PictureEx sample, which also supports static BMP and JPEG, but unpacks image very slowly. Plug-in not stops installer execution when banner is displayed. Banner is not clickable. May be used in the page custom show/leave functions and on other (not page) windows with possible transparency limitations.

Command line (NSIS script)

Plug-in DLL functions (entry points): play, stop

play DLL Function

AnimGif::play /NOUNLOAD [/HALIGN=POSX] [/VALIGN=POSY] [/HWND=xxx] [/FIT=WIDTH|HEIGHT|BOTH] [/BGCOL=xxx] FileName
/HALIGN
image horizontal position in percents of width, default is 50 (center).
/VALIGN
image vertical position in percents of height, default is 100 (bottom).
/HWND
target window, default (no parameter) is "#32770" child of $HWNDPARENT .


/BGCOL
color to use for image transparent areas. If not defined, plug-in attempts to extract value from target window, but this is not possible if window is hidden. Color value may be hex (starting with 0x) and decimal (first is not 0). Hex value will be used as RGB color, decimal - as Windows system color index in GetSysColor() API call, see MSDN. If value not specified and target window stays hidden (for example in custom 'Show' function), default COLOR_BTNFACE will be used.
/FIT
image stretch to occupy window width or height. For Welcome page left logo and screen DPI 120 mainly. Default - no stretch.
FileName
Image file name.

stop DLL Function

AnimGif::stop
Stops animation and clears the screen.

Examples

Package includes nsi script sample.

SetOutPath '$PLUGINSDIR'
File sample.gif
AnimGif::play /NOUNLOAD '$PLUGINSDIR\sample.gif'
; Add your page code here
AnimGif::stop
Delete '$PLUGINSDIR\sample.gif'