advsplash.txt 1.9 KB

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