Better example

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1710 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-11-15 12:06:10 +00:00
parent e5550dac1d
commit e4e675537d

View file

@ -5,20 +5,22 @@ OutFile "BgImage Test.exe"
XPStyle on
Section
BgImage::Init /NOUNLOAD /FILLSCREEN "${NSISDIR}\Contrib\Icons\modern.bmp"
# the plugins dir is automatically deleted when the installer exits
InitPluginsDir
File /oname=$PLUGINSDIR\modern.bmp "${NSISDIR}\Contrib\Icons\modern.bmp"
File /oname=$PLUGINSDIR\checks1.bmp "${NSISDIR}\Contrib\Icons\checks1.bmp"
BgImage::Init /NOUNLOAD /FILLSCREEN $PLUGINSDIR\modern.bmp
MessageBox MB_OK "Next image?"
BgImage::SetImage /NOUNLOAD /FILLSCREEN "${NSISDIR}\Contrib\Icons\checks1.bmp"
BgImage::SetImage /NOUNLOAD /FILLSCREEN $PLUGINSDIR\checks1.bmp
FindFirst $0 $1 $WINDIR\Media\*.wav
StrCmp $0 "" skipSound
moreSounds:
StrCmp $1 "" noMoreSounds
BgImage::Sound /NOUNLOAD $WINDIR\Media\$1
# the sound is played asynchoronsly so NSIS can keep working while it plays
# we don't want the message box to appear while playing so we give it a little time to play alone
Sleep 500
BgImage::Sound /NOUNLOAD /WAIT $WINDIR\Media\$1
MessageBox MB_YESNO "Another sound?" IDNO noMoreSounds
FindNext $0 $1
Goto moreSounds