Archive: function .oninitEnd is never called in Win98SE


function .onGUIEnd is never called
I updated via CVS on last friday.

c:\program files\nsis\contrib\bgimage\example.nsi

doesn't work right here.
I am running Win98SE with latest updates.

This problem is that the .onGUIEnd function is never called.
I put a messageBox in the function to determine this.

If I move the bgimage::destroy command to the last Section then the example works. Of course, the problem with this workaround is that if the install is aborted, then the bgimage.dll is not deleted.

this alternative works, but will not be called if install is cancelled...
Section -Ghost ; last section
bgImage::destroy
SectionEnd

this is the code in Example.nsi. It does not work...
Function .onGUIEnd
bgImage::destroy
FunctionEnd

Lilla


.onGUIEnd is always called. The problem is that MessageBox doesn't work because $HWNDPARENT is invalid as the window no longer exists. What made you think .onGUIEnd isn't called in the first place?


bgImage Example doesn't work...
kichik, thanks for your reply and explanation about why Messagebox from .onGuiEnd function cannot be used. It makes sense. So let me try again to describe the problem.

The problem is that the following example doesn't work. The install window remains on the screen (including the bgimage) when the install finishes.

c:\program files\nsis\contrib\bgimage\example.nsi

I am running Win98SE with latest updates.

If I move the bgimage::destroy command to the last Section then the example works. Of course, the problem with this workaround is that if the install is aborted, then bgimage.dll is not deleted.

this code is in Example.nsi. It does not work...
Function .onGUIEnd
bgImage::destroy
FunctionEnd

this code works, but PROBLEM is that it will not be called if install is cancelled... thus, bgImage.dll is left in the temp folder.
Section -Ghost ; last section
bgImage::destroy
SectionEnd

Lilla


Try this one please. Keep the destroy call in .onGUIEnd of course.


Lilla?


Kichik, I tried compiling the BgImage\Example.nsi script on my Win98SE system after replacing {NSIS}\Plugins\BgImage.dll with the version you posted earlier in this thread.

When I ran the example, it ended with the installer window (showing "Completed") superimposed on the "A Desert for Mike" screen. When I clicked the "Close" button in the installer window, the installer window disappeared leaving "A Desert for Mike" filling my screen (my desktop was completely hidden).

I changed the example.nsi by inserting the "-Ghost" section Lilla mentioned, recompiled and ran the modified example: this time I only saw "A Desert for Mike" for a fraction of second (and when I clicked the "Close" button, the installer window went away leaving my desktop in view).


Thanks, fixed.

Just when you start thinking that checking a plug-in 10 times on three different systems will do... tsk tsk tsk :(