Archive: SpiderBanner plugin


SpiderBanner plugin
I have been working on this plugin for two or three months now. This is a test version so that the bugs (if any) are fixed. I have included my SimpleBg plugin with this test installer. I haven't posted on this forum in ages, so its good to be back.

For those who create plugins in C, I will share the basic idea behind the plugin. It displays a custom dialog with no border, and is a child of the parent window. Then the parent window is resized to fit the custom dialog. Much the same way the installer shows its pages. I had to subclass the progress bar and detail text so that I could show the info on my custom dialog.


Looks good so far, I ran it a few times, and there were redraw problems with the header and status labels.


Nope, I just didn't bother putting them in in the first place.

[edit] My plugin doesn't touch those fields, its purely MUI controlled.

[edit again] I have found a major issue with minimizing and restoring the window. Looks like I will have to subclass the installer window after all.


how did you get the installation to loop around with pushing the finish button? NSIS src would be nice. thx
SAM


It is this nice little trick with the SendMessage command:

SendMessage $HWNDPARENT "0x408" 1 0

The no. 1 is how many pages to skip. 2 skips two pages foward. -3 skips three pages back.


I finally figured out the window problem. Here is another test version. And I didn't have to subclass the installer window :D .


yep, that fixed it ;)


This is the final test version before I officially release this plugin. I will try my best to fix any bugs if you manage to find any.

I still have to write up the documentation and examples, but it shouldn't take that long.

I also managed to cut 512 bytes off the plugin by removing some hide and show routines. The plugin is now 6 kb :D.


I'm seeing the redraw issues again the last version...


Yeah, I'm gonna have to look though the source code for the installoptions plugin, to see where the repainting routines are.


Lets try this again. Here is the final test version before I officially release this plugin.

I have fixed the redraw problem, and in turn this also fixed another minor redraw problem.

[edit] Now I am going to take as much unneeded code out as I can to get the size down.


Yeah its fixed, looks good :)


Here are some more examples using the ISUI and the normal UI. Enjoy.


Oops, forgot the attachment.


This plugin is now available on the wiki.

http://nsis.sourceforge.net/SpiderBanner_plug-in


Fixed a minor bug. Now the Destroy function can be called in the leave function of the instfiles page, or if you feel like it, you can call it on the pre and show functions of the next page :D. Enjoy.

[Edit] This is the most advanced plugin I have ever coded for nsis. I've come a long way since the SysRestore plugin :) .[/edit]

http://nsis.sourceforge.net/SpiderBanner_plug-in


Keep it up, does it work fine with the new MUI2 beta?


It doesn't matter what interface you have, as long as you have an InstFiles page, and your installer isn't silent, this plugin will work with it. You can see this with the examples I posted earlier (default UI, MUI, ISUI). I doubt it will work with skinned UIs (eg, ExperienceUI), but you never know, it might work.


A new version has just been released. This version fixes the progress bar not working under Windows 98, and now the window is "hidden" (moved to the bottom right of the screen) while the dialog is being loaded. I noticed this bug after I saw the installing page on the parent before the dialog was being destroyed. It should be fixed now. Plus, the size is still 6kb :D. Wiki link below.

http://nsis.sourceforge.net/SpiderBanner_plug-in


Hi Jason,

It is a good plugin, anyway i found 2 bugs accidentally, normal user i believe won't do this.
Using example.nsi that provided in SpiderBanner_plugin.zip, here are the errors:
1. inserting "SpiderBanner::Show /NOUNLOAD $R0 $R1" again between "SpiderBanner::Show /NOUNLOAD $R0 $R1" and "SpiderBanner::Destroy" will close installer immediately

2. click and hold banner, until get MUI's finish page, release mouse, and could not click anything, until press CTRL+ALT+DEL and click cancel.

Hopefully could strengten your plugin.


Hello. Thanks for the reply.

1. This problem is easily fixed. I did this fix on one of my other plugins that needed it. A good programmer will never do the same thing twice with this plugin.

2. This problem is not with my plugin, but with nsis itself. Try it with this very simple test installer I have attached.

[edit]This is the script used:

Name "Test"
OutFile "Test.exe"

!include "MUI.nsh"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_LANGUAGE "English"

Section "Test"
DetailPrint "This is a test."
Sleep 1000
Sleep 1000
Sleep 1000
Sleep 1000
Sleep 1000
SectionEnd
[/edit]

New version now available on wiki. Fixes bug no. 1 above.

http://nsis.sourceforge.net/SpiderBanner_plug-in


Hi guys, I've been working on an update to my plugin, and there is a new version released on the wiki. Uses the new plugin api, which means NSIS 2.42 or higher is required. Next project is updating the InstallSpiderUI with the latest versions of my software and MUI2. Enjoy!

http://nsis.sourceforge.net/SpiderBanner_plug-in


Originally posted by JasonFriday13
Hello. Thanks for the reply.

1. This problem is easily fixed. I did this fix on one of my other plugins that needed it. A good programmer will never do the same thing twice with this plugin.

2. This problem is not with my plugin, but with nsis itself. Try it with this very simple test installer I have attached.

[edit]This is the script used:
Name "Test"
OutFile "Test.exe"

!include "MUI.nsh"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_LANGUAGE "English"

Section "Test"
DetailPrint "This is a test."
Sleep 1000
Sleep 1000
Sleep 1000
Sleep 1000
Sleep 1000
SectionEnd
[/edit]
Thanks you a lot!




Been tinkering around with unicode, and currently I have working ANSI and Unicode versions from the same source code :D. Currently in the process of updating all my plugins to support unicode, including InstallSpiderUI which will have a custom plugin containing code from 3 of my plugins. Watch this space ;) .