Archive: system.dll remains in $plugindir


system.dll remains in $plugindir

Function .onInit
InitPluginsDir
File /oname=$PLUGINSDIR\bass.dll "bass.dll"
File /oname=$PLUGINSDIR\winstart.mp3 "winstart.mp3"

System::Call /NOUNLOAD '${BASS_Init} (1, 44100,, r0,)'
System::Call /NOUNLOAD '${BASS_SampleLoad} (0, "$PLUGINSDIR\${MUSICNAME}", 0, 0, 1, 0) .r0'
System::Call /NOUNLOAD '${BASS_SamplePlay} (r0).r0'

;wait ~41 sec
Banner::show /NOUNLOAD "Startsequenz - bitte warten."
sleep 41000
Banner::destroy

;stop sound
System::Call '${BASS_Free}'
FunctionEnd

Function .onGUIEnd
Delete "$PLUGINSDIR\*.*"
RMdir "$PLUGINSDIR"
FunctionEnd


nsis 2.07

whats wrong?

(either a sleep 1000 in .onGuiend does not work)

#
theres no other code - thats all

Where're BASS_* defined? Attach a complete example.


;--------------------------------
; Base names definition (to be changed)

!define APP_NAME "winstart"
!define MUSICNAME "winstart.mp3"

;--------------------------------
; General Attributes

!include '${NSISDIR}\Contrib\BASS\Bass.nsh'

Name "${APP_NAME}"
OutFile "${APP_NAME}.exe"

ShowInstDetails nevershow
ShowUninstDetails nevershow

;automatically close the installer when done.
AutoCloseWindow true


;--------------------------------
; Installer Sections

Section
SectionEnd

;--------------------------------
; Installer Functions

Function .onInit
InitPluginsDir
File /oname=$PLUGINSDIR\bass.dll "bass.dll"
File /oname=$PLUGINSDIR\winstart.mp3 "winstart.mp3"

System::Call /NOUNLOAD '${BASS_Init} (1, 44100,, r0,)'
System::Call /NOUNLOAD '${BASS_SampleLoad} (0, "$PLUGINSDIR\${MUSICNAME}", 0, 0, 1, 0) .r0'
System::Call /NOUNLOAD '${BASS_SamplePlay} (r0).r0'

;wait ~41 sec
Banner::show /NOUNLOAD "Startsequenz - bitte warten."
sleep 41000
Banner::destroy

;stop sound
System::Call '${BASS_Free}'
FunctionEnd


Function .onGUIEnd
call delete
Delete "$PLUGINSDIR\*.*"
RMdir "$PLUGINSDIR"
FunctionEnd
;--------------------------------

Where's Bass.nsh? Attach a complete example, preferably with a minimal amount of code and external dependencies.


I know where the header comes from:

http://forums.winamp.com/showthread....17#post1318917

The header is quite old (I need to update it later). But I don't know what might be happening here. Maybe that's because you added other files to $PLUGINSDIR, or maybe the BASS_FREE needs a "?u" option attached to its end to unload the BASS.dll plugin, or even maybe to use System::Call "" after the BASS_FREE is called.


@deguix - thats right - that source. i never needed it till this week. formerly i used bassmod for mod files but i need mp3 now.

>> System::Call ''

that did it - to easy for me <lol>

Thx !