- NSIS Discussion
- SpiderBanner plugin
Archive: SpiderBanner plugin
JasonFriday13
11th August 2007 10:34 UTC
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.
Backland
11th August 2007 11:00 UTC
Looks good so far, I ran it a few times, and there were redraw problems with the header and status labels.
JasonFriday13
11th August 2007 13:45 UTC
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.
sag47
11th August 2007 16:59 UTC
how did you get the installation to loop around with pushing the finish button? NSIS src would be nice. thx
SAM
JasonFriday13
11th August 2007 18:26 UTC
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.
JasonFriday13
11th August 2007 18:30 UTC
I finally figured out the window problem. Here is another test version. And I didn't have to subclass the installer window :D .
Backland
11th August 2007 19:11 UTC
yep, that fixed it ;)
JasonFriday13
14th August 2007 12:07 UTC
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.
Backland
14th August 2007 14:27 UTC
I'm seeing the redraw issues again the last version...
JasonFriday13
15th August 2007 11:48 UTC
Yeah, I'm gonna have to look though the source code for the installoptions plugin, to see where the repainting routines are.
JasonFriday13
17th August 2007 11:37 UTC
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.
Backland
18th August 2007 04:46 UTC
Yeah its fixed, looks good :)
JasonFriday13
18th August 2007 10:03 UTC
Here are some more examples using the ISUI and the normal UI. Enjoy.
JasonFriday13
18th August 2007 10:04 UTC
Oops, forgot the attachment.
JasonFriday13
19th August 2007 05:21 UTC
This plugin is now available on the wiki.
http://nsis.sourceforge.net/SpiderBanner_plug-in
JasonFriday13
24th August 2007 09:50 UTC
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
Backland
26th August 2007 03:11 UTC
Keep it up, does it work fine with the new MUI2 beta?
JasonFriday13
26th August 2007 05:58 UTC
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.
JasonFriday13
21st October 2007 10:53 UTC
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
valentz142
12th November 2007 09:12 UTC
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.
JasonFriday13
12th January 2008 15:04 UTC
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]
JasonFriday13
12th January 2008 18:26 UTC
New version now available on wiki. Fixes bug no. 1 above.
http://nsis.sourceforge.net/SpiderBanner_plug-in
JasonFriday13
29th November 2010 04:09 UTC
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
mrphantuan
30th November 2010 08:29 UTC
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!
JasonFriday13
1st December 2010 10:47 UTC
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 ;) .