Yathosho
5th January 2010 23:39 UTC
What is it with those Splash plugins?
can't say i'm fully happen with any of them. i've been using AdvSplash for many years, but at some point (new NSIS or new OS), it will not display small bitmaps properly. in my example the used bitmap has only a height of 32 pixels, but the plugin will display it with a height of 38 pixels, the difference will be black (see attachment).
(i don't know when the plugin started to behave like this, but on a sidenote i also wanted to mention another issue with bitmaps i came across. earlier versions of nsis had no problem using rle-compressed bitmaps, new versions will display some gibberish instead.)
so, i've tried NewAdvSplash. that will display small bitmaps without a problem. however, when i use it with a splash-sound and the /BANNER option, it will always crash my installer once the splash stops showing. without the banner it works, but shows an ugly window caption for the fraction of a second. without sound it's also working perfectly. here's the code i'm using
newadvsplash::play /NOUNLOAD "$PLUGINSDIR\spltmp.wav"
newadvsplash::show /NOUNLOAD ##SPLASHTIME## 0 100 0xff00ff /BANNER "$PLUGINSDIR\spltmp.bmp"
newadvsplash::wait ;with or without this line - crashes!
newadvsplash::stop
unfortunately, NewAdvSplash isn't complete documented, so it could be the fault lies in this code. the third line is completely undocumented, but it was mentioned in one of the examples. leaving that line, will still result in a crash. any help?
meaningoflights
6th January 2010 03:48 UTC
I use advsplash too, does this code cause a crash on any of your PCs?
!include WinVer.nsh
!include x64.nsh
XPStyle on
;funky little splash fade in effect!
Function .onInit
# the plugins dir is automatically deleted when the installer exits
InitPluginsDir
File /oname=$PLUGINSDIR\splash.bmp "c:\myprog\logo.bmp"
#optional
#File /oname=$PLUGINSDIR\splash.wav "C:\myprog\sound.wav"
advsplash::show 4000 600 400 -1 $PLUGINSDIR\splash
Pop $0 ; $0 has '1' if the user closed the splash screen early,
; '0' if everything closed normal, and '-1' if some error occured.
Delete $PLUGINSDIR\splash.bmp
FunctionEnd
Or you may like to check other options like this:
http://forums.winamp.com/showthread....threadid=97048
Takhir
6th January 2010 07:03 UTC
I don't see 'wait' entry point in newadvsplash.dll. Very strange that you could compile this. Followinng works for me:
Name "NewAdvSplash.dll test"
OutFile "newadvsplash.exe"
!define IMG_NAME1 aist.gif
!include WinMessages.nsh
Function .onInit
; the plugins dir is automatically deleted when the installer exits
InitPluginsDir
SetOutPath "$PLUGINSDIR"
newadvsplash::play /NOUNLOAD "$EXEDIR\jc.mp3"
File ${IMG_NAME1}
newadvsplash::show /NOUNLOAD 3000 1000 500 -2 /BANNER "$PLUGINSDIR\${IMG_NAME1}"
Sleep 3000 ; not changes 4.5 sec of 'show time'. add your code instead of sleep
FunctionEnd
; MUI requires custom function definition
Function .onGUIInit
newadvsplash::stop /wait ; waits or exits immediately if finished, remove /wait to terminate now
Delete "$PLUGINSDIR\${IMG_NAME1}"
SetOutPath "$EXEDIR"
; plug-in requires this to be called in .onGUIInit
; if you use 'show' in the .onInit function with /BANNER key.
ShowWindow $HWNDPARENT ${SW_RESTORE}
FunctionEnd
Section
SectionEnd
Yathosho
6th January 2010 12:52 UTC
well, it's no longer crashing now, but only because i accidently left out the stop call. whenever i add it to my onGUIinit function, the installer crashes. also, i still get to see that window caption for a very short time (might be longer on slow cpus). according to process explorer, that caption it that of a program called consent.exe.
unlike my previous claim, this has nothing to do with the /BANNER option, but only happens when i use the plugin with a splash sound.
Yathosho
10th January 2010 00:03 UTC
so, is it wise to leave the stop function? or what can i do to get it work without crashing?
Takhir
10th January 2010 10:38 UTC
Flashing window is a sound player, even if started 'hidden' it appears for a short time.
I not found any problems with crashing in correct script (see above). Please publish sample script which causes crash. newadvsplash manual http://nsis.sourceforge.net/NewAdvSplash_plug-in
Yathosho
15th January 2010 17:36 UTC
try this
Takhir
16th January 2010 11:27 UTC
Yes, s. happens with wav (not mp3!) if sound is longer, them show time. This case MCI window instead of correct termination just crashes... OK, for wav sound attached dll should be fine, and no flashing MCI windows any more (but no mp3 as well). Please let me know if any problem occure.
Yathosho
17th January 2010 00:44 UTC
Originally posted by Takhir
Yes, s. happens with wav (not mp3!) if sound is longer, them show time.
are only certain bitrates supported? i tried a mono mp3 at 64 kbit and it behaves just like it did with a wave. anyway, with no mp3-support i can stick to the old AdvSplash and use compressed waves. thanks for your help!
Yathosho
21st March 2010 18:26 UTC
when you click the splash screen (to abort it), it will still wait for the remaining time set in the splash plugin