home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 March / CMCD0304.ISO / Software / Freeware / Programare / nullsoft / nsis20.exe / Contrib / AdvSplash / advsplash.txt < prev    next >
Text File  |  2003-11-16  |  2KB  |  53 lines

  1. AdvSplash.dll - small (5.5k), simple plugin that lets you throw 
  2. up a splash screen in NSIS installers with cool fading effects (win2k/xp)
  3. and transparency.
  4.  
  5. To use:
  6.  
  7. Create a .BMP file of your splash screen.
  8. (optional) Create a .WAV file to play while your splash screen shows.
  9.  
  10. Add the following lines to your .NSI file:
  11.  
  12. Function .onInit
  13.   SetOutPath $TEMP
  14.   File /oname=spltmp.bmp "my_splash.bmp"
  15.  
  16. ; optional
  17. ; File /oname=spltmp.wav "my_splashshit.wav"
  18.  
  19.   advsplash::show 1000 600 400 -1 $TEMP\spltmp
  20.  
  21.   Pop $0 ; $0 has '1' if the user closed the splash screen early,
  22.          ; '0' if everything closed normal, and '-1' if some error occured.
  23.  
  24.   Delete $TEMP\spltmp.bmp
  25. ;  Delete $TEMP\spltmp.wav
  26. FunctionEnd
  27.  
  28. Calling format
  29.         advsplash::show Delay FadeIn FadeOut KeyColor FileName
  30.  
  31. Delay - length to show the screen for (in milliseconds)
  32. FadeIn - length to show the fadein scene (in ms) (not included in Delay)
  33. FadeOut - length to show the fadeout scene (in ms) (not included in Delay)
  34. KeyColor - color used for transparency, could be any RGB value 
  35.         (for ex. R=255 G=100 B=16 -> KeyColor=0xFF6410), 
  36.         use KeyColor=-1 if there is no transparent color at your image.
  37. FileName - splash bitmap filename (without the .bmp). The BMP file used will be 
  38.         this parameter.bmp, and the wave file used (if present) will be this 
  39.         parameter.wav.
  40.  
  41. (If you already have an .onInit function, put that in it)
  42.  
  43. Note 1: fadein/fadeout supported only on win2k/winxp systems, all other systems
  44. will show simple splash screen with Delay = Delay + FadeIn + FadeOut. Also, I've
  45. noted my winXP uses no transparent color at 16 bpp, so at bpps lower than 32
  46. for images with transparent color no fading effect will occur.
  47.  
  48. Note 2: the return value of splash is 1 if the user closed the splash 
  49. screen early (pop it from the stack)
  50.  
  51. -Justin
  52. Converted to a plugin DLL by Amir Szekely (kichik)
  53. Fading and transparency by Nik Medved (brainsucker)