Old 15th September 2003, 10:46   #1
norial
Junior Member
 
Join Date: Apr 2003
Posts: 17
help button for pages needed

Hello,

it could be very helpful to add a 'help' button to each installation page with a user defined text. so all addditional infos could be placed in this text box. This help text must be opened by clicking on the button or pressing F1.

Or it's already possible? How?

regards
norial
norial is offline   Reply With Quote
Old 15th September 2003, 10:55   #2
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
You would have to modify the source code.

Usually the page text should give enough information, seperate help pages are not that user friendly.
Joost Verburg is offline   Reply With Quote
Old 15th September 2003, 11:16   #3
norial
Junior Member
 
Join Date: Apr 2003
Posts: 17
why not?

there is only place for a short text. and why additional info are not that user friendly?
normally noboby reads this text (normally reads any installastion text and klick only 'next') but sometimes a user needs a explination of some words or options.

regards
/norial
norial is offline   Reply With Quote
Old 15th September 2003, 14:28   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
You can do it with a plug-in too, but there is currently no way to do it just by script.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 15th September 2003, 14:31   #5
norial
Junior Member
 
Join Date: Apr 2003
Posts: 17
is any plugin available which insert a help/extra button in pages?
norial is offline   Reply With Quote
Old 15th September 2003, 14:37   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Not that I know of, you'd have to write one.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 25th September 2003, 16:40   #7
DrO
 
Join Date: Sep 2003
Posts: 27,873
is this the sort of thing you're looking for?

it is very basic (no config and a hacked around example) at the moment but if you click on the button or press f1 then a little window will pop up. if the 'info' window is already open then it will be brought back to be active again.

still working on how best to implement the setting of the button onto the pages and it's interacting with the running installer.

note 1: the installer will hang if you press f1 with a messagebox open at the moment (not sure if i'm handling messages, etc correctly)

note 2: if the info window is open when the installer is closed then it likely to cause a crash

note 3: not all parts of the button will react at the moment due to it overlapping other controls on the dialog

basically this is just a test to see if it'll work and to check how the handling of the nsis window works for such a feature

-daz
Attached Files
File Type: zip helptest.zip (24.7 KB, 680 views)
DrO is offline   Reply With Quote
Old 26th September 2003, 21:03   #8
norial
Junior Member
 
Join Date: Apr 2003
Posts: 17
Hello daz,

Quote:
Originally posted by DrO
[B]is this the sort of thing you're looking for?
it's exactly what I need. Is this the first release ? You gave some extra infos about possible problems. Do you like to fix the problems?

I believe there only a few options needed. e.g button text, info text (formated? means normal text an bold or italic text).

thanks for your help
norial is offline   Reply With Quote
Old 27th September 2003, 15:49   #9
DrO
 
Join Date: Sep 2003
Posts: 27,873
glad i got the correct idea of what you meant
Quote:
Is this the first release ?
more of a test version to just see how feasible it is to do.

i should have a few more bits done by monday (bit busy with work and things at the moment).

will get it to be configurable but not entirely sure what you mean with the formatted bit.
do you mean the text will be normal or italic or bold
or
(normal and bold) or (normal and italic)?

parameters i'm likely to have for the next release will be:
button_position button_text info_text
e.g.
"0,0" "blah" "information is a killer"

note: "0,0" would put it in the top left corner (may make the button be autosized to the passed text length)

-daz
DrO is offline   Reply With Quote
Old 29th September 2003, 13:34   #10
DrO
 
Join Date: Sep 2003
Posts: 27,873
updated a few bits so that this is now more configurable to use ie font is taken from the installer, button can be repositioned, etc.

problem is that when a page is finished, the installer will crash if the 'end' function is used (don't use for the moment). posting more to see how the font placement, etc works on other systems.

-daz

ps
@the devs: when a page is changed, is the window proc being altered? asking since i can never get the 'end' function to successfully unsubclass the window - seems to be trying to access memory from where the dll was mapped into the address space even though i've restored the original window proc i had

thanks
DrO is offline   Reply With Quote
Old 29th September 2003, 13:37   #11
DrO
 
Join Date: Sep 2003
Posts: 27,873
ooops, forgot to attach
Attached Files
File Type: zip helpbutton2.zip (26.6 KB, 644 views)
DrO is offline   Reply With Quote
Old 29th September 2003, 14:06   #12
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Quote:
Originally posted by DrO
@the devs: when a page is changed, is the window proc being altered? asking since i can never get the 'end' function to successfully unsubclass the window - seems to be trying to access memory from where the dll was mapped into the address space even though i've restored the original window proc i had
There are two window procs, one for the outer dialog and one for the inner dialog. The problem you're having is probably caused by unloading the plug-in in the leave function which is called when processing a windows message. That message is sent to the dialog by no other but your own plug-in. When the control returns to your plug-in's code it's no longer there, and that causes the crash. Sub-classing is so wonderful, don't you think?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 29th September 2003, 14:26   #13
DrO
 
Join Date: Sep 2003
Posts: 27,873
Quote:
Sub-classing is so wonderful, don't you think?
i know what you mean

thought that might be the case. with plugins, the hwndParent is the outer dialog (which i'm hoping is right) since that's the one i've been subclassing.

in the code, i have in the start function the plugin using loadlibrary to keep the plugin loaded (removing the need for the /nounload) and then doing the required freelibrary in the end function after it all return values indicate i have unsubclassed the window.

will have a better look at the installer exe source later on i think to see better what's going on

thanks for the info kichik

-daz
DrO is offline   Reply With Quote
Old 3rd October 2003, 16:32   #14
DrO
 
Join Date: Sep 2003
Posts: 27,873
finally worked out how to get around the problems with the plugin crashing (window hooks, doh! but no more subclassing )

now it is possible to get a button onto any page and fixed the message deadlocks from the initial release when the installer was not the active window (messageboxes, etc). now it will allow the 'f1' to work when a messagebox is open.

will post the latest version soon (need some testing on other systems to make sure that the dll is freed correctly so the plugins directory of the installer can be correctly removed on close)
[would have posted it now but i brought the wrong version with me )

@kichik - the info was much appreciated found the message id for a page change which makes it able to automatically unhook a page without calling other functions, cheers for the pointer

-daz
DrO is offline   Reply With Quote
Old 4th October 2003, 15:26   #15
DrO
 
Join Date: Sep 2003
Posts: 27,873
latest version attached (check the example script on how to use)

works on 2k and 98 (just ran on the work machine and it crashes - NT4 )

can people please test so i can get an idea of what is / isn't wrong with the code, thanks

-daz
Attached Files
File Type: zip helpbutton v0.5a.zip (27.4 KB, 549 views)
DrO is offline   Reply With Quote
Old 12th October 2003, 16:08   #16
DrO
 
Join Date: Sep 2003
Posts: 27,873
attached is a test version of the dll, can people with NT systems test it please

it will put up messageboxes to show where in the startup process things are (also will beep when the dll is loaded and unloaded).

tried it on a NT test machine and now it does not crash but on loading it will cause the installer to exit immediately
(wierd how all other oses i've tried the code on work fine )

thanks
-daz

p.s. the code shown will cope with reading text and rtf files now by using /file=blah.rtf in the window text parameter (see earlier posts for an example script) and i'm working on html display.
just a pain that it's not running correctly with NT
Attached Files
File Type: zip helpbutton_debug.zip (4.1 KB, 591 views)
DrO is offline   Reply With Quote
Old 15th October 2003, 13:34   #17
DrO
 
Join Date: Sep 2003
Posts: 27,873
a few versions later and now the NT4 issue is fixed (see below for reason)

i'm putting the updated version up in a bit after i get a readme on how to use it done.

overall features are:[list=1][*]add a button onto a page where you want it to go (resizes to the text)[*]define your own button text e.g. "Help" or "Readme..."[*]show text you set in the script or use a file[*]support for plain text and rich text files[*]basic support of showing a html file (still need to correctly embed the window)[*]opens the window when pressing 'F1'[/list=1]the reasons for the crashing under NT4 where related to trying to hook the window in the dll which it doesn't seem to like doing when the hook function is in the dll calling it (though it works fine under all other oses tested ).

the reason for this was trying to drop the need for a /NOUNLOAD to be used for all calls but i guess it wasn't meant to be

now i've gone back to a hybrid of the earlier code which just subclasses BUT i've improved the handling so it will now cope with the 'show' function being called in the page's leave function (useful for getting a button shown once the install has completed )

-daz
DrO is offline   Reply With Quote
Old 15th October 2003, 15:58   #18
DrO
 
Join Date: Sep 2003
Posts: 27,873
new release, mmmmm tasty

attached is the latest version (both the dll and an example installer with it in use)

see above for what it can do and check out the example for an idea of how to use the plugin.

more info will be available soon (proper readme file and also an archive page -> off to do that now)

-daz

[edit]
now in the archive here so check it out for how to use the plugin
[/edit]
Attached Files
File Type: zip helpbutton_v0_7b_r.zip (32.5 KB, 544 views)

Last edited by DrO; 15th October 2003 at 16:50.
DrO is offline   Reply With Quote
Old 15th October 2003, 16:23   #19
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Good work!!!

-Stu
Afrow UK is offline   Reply With Quote
Old 15th October 2003, 22:55   #20
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Great, good job

But why is there no source code?

BTW, you can link directly to the attachment from the Archive, no need to link to the thread itself.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 16th October 2003, 07:17   #21
DrO
 
Join Date: Sep 2003
Posts: 27,873
Quote:
Originally posted by kichik
But why is there no source code?
forgot to bring the files with me will have it up for the next version + need to make it readable (other than by me )

forgot about a direct link (was trying to get at least something on the archive before leaving work), thanks for the pointer though

-daz
DrO is offline   Reply With Quote
Old 28th October 2003, 16:30   #22
DrO
 
Join Date: Sep 2003
Posts: 27,873
by the power of greyskull....

version 0.9 attached

changes to the plugin are:[list=1][*]fixed a few crash issues with related to string lengths [*]button is now hidden if no text is passed for the title[*]FULLY integrated webbrowser control (now it acts like the text window )[*]source code provided for your viewing pleasure[/list=1]the project assumes it is in .\contrib and the plugin will go into .\plugins for those of you interested and the example files are all in there too

-daz
Attached Files
File Type: zip helpbutton_v0_9.zip (74.0 KB, 3894 views)
DrO is offline   Reply With Quote
Old 10th December 2003, 15:10   #23
norial
Junior Member
 
Join Date: Apr 2003
Posts: 17
Re: by the power of greyskull....

Hello !

How can I use the Plugin with Modern UI
!insertmacro MUI_PAGE_WELCOME start

Function start
HelpButton::show /NOUNLOAD "246,231" "blah blah blah" "built to the power of the llama ^o^" "/html=$EXEDIR\winampmb.htm"
FunctionEnd

Gives an error: !insertmacro: macro "MUI_PAGE_WELCOME" requires 0 parameter(s), passed 1!

Must I modify system.nsh directly?
norial is offline   Reply With Quote
Old 10th December 2003, 15:46   #24
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
u need to define the function in other way:
code:
!define MUI_PAGE_CUSTOMFUNCTION_PRE start
!insertmacro MUI_PAGE_WELCOME
...

Comm@nder21 is offline   Reply With Quote
Old 20th May 2004, 10:19   #25
Mæster
Member
 
Join Date: Apr 2003
Location: Germany
Posts: 62
Send a message via ICQ to Mæster Send a message via AIM to Mæster
It seems there are still several "problems" of this plugin together with the Modern UI:

(1)The button is not displayed the XP styled way.
(2)It seems that every window-refresh unloads the button espeacially a refresh of an InstallOptions-Dialog, so u have to call the HelpButton::show - method at least in every show and leave-function.

Anyway - keep up the good work.
Hope there will be some new versions in the future.

Greez.
Mæster is offline   Reply With Quote
Old 1st April 2005, 13:07   #26
DrO
 
Join Date: Sep 2003
Posts: 27,873
there should be a 1.0 out in the next few days which adds in chm support, more control over the positioning of the window (for both the chm window and the one the plugin makes) plus a few other tweaks, etc.

there was the xp issue which may be sorted now as well (not too sure since i still don't have an xp install to run on myself but the last screenshot i got from a recent test build showed the button was xp themed *shrugs*

anyhoo, expect a v1.0 soon

-daz
DrO is offline   Reply With Quote
Old 9th April 2005, 13:20   #27
HansH
Junior Member
 
Join Date: Apr 2005
Location: Netherlands
Posts: 3
Quote:
Originally posted by DrO
there should be a 1.0 out in the next few days which adds in chm support, more control over the positioning of the window (for both the chm window and the one the plugin makes) plus a few other tweaks, etc.

anyhoo, expect a v1.0 soon

-daz
I was looking for just this feature (chm) and I found the 0.9 version, but no 1.0 version.

Any change of getting a 1.0 version ?

thx

Hans
HansH is offline   Reply With Quote
Old 9th April 2005, 14:58   #28
DrO
 
Join Date: Sep 2003
Posts: 27,873
i've been a bit side tracked with work so the 1.0 release is a few days behind. if i can i'll do it sunday night (depends on work and 'real life' giving me the time to sit down and do some coding ) otherwise it'll be monday night

-daz
DrO is offline   Reply With Quote
Old 10th April 2005, 11:12   #29
HansH
Junior Member
 
Join Date: Apr 2005
Location: Netherlands
Posts: 3
never mind, I can wait.
Sounds much better, 1.0 than 0.9

thx, Hans
HansH is offline   Reply With Quote
Old 10th April 2005, 20:34   #30
DrO
 
Join Date: Sep 2003
Posts: 27,873
Help Support plugin v1.0 RC1

download 1.0 RC1

archive reference page for 0.9 sytnax

main changes are that you can now use /help to use chm files e.g. "/help=${NSISDIR}\nsis.chm"

as well it's now possible to specify the top left corner of the window as "x,y" or center (centers in the middle of the desktop) or centerp (centers in the middle of the installer).

and also the size of the window can be set via "width,height" after the top left corner value.

until it's documented/tweaked any of the new parts not used need to be set as "" in the script where you'd otherwise place the information. depending on feedback, etc i'll potnetially modify this and i will update the help file about this in the next day or so

syntax example:
HelpButton::show /NOUNLOAD "232,231" "?" "" "/help=${NSISDIR}\nsis.chm" "" "" "centerp" "500,500"

this will place a '?' button to the left of one of the 'back' button in a classic UI installer and open the nsis.chm file centered over the installer window and 500x500 pixels in size

-daz
DrO is offline   Reply With Quote
Old 10th April 2005, 20:47   #31
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
could you please post at least the basic syntax??
Comm@nder21 is offline   Reply With Quote
Old 10th April 2005, 20:53   #32
DrO
 
Join Date: Sep 2003
Posts: 27,873
Comm@nder21: post editted now

-daz
DrO is offline   Reply With Quote
Old 10th April 2005, 21:08   #33
HansH
Junior Member
 
Join Date: Apr 2005
Location: Netherlands
Posts: 3
Two words, absolutely great !

thx for the quick response

Hans
HansH is offline   Reply With Quote
Old 11th April 2005, 13:14   #34
DrO
 
Join Date: Sep 2003
Posts: 27,873
HansH: cool, good to hear it's working for you. i've been trying to get to a 1.0 state with it for almost a year now so it's good to know the updates haven't screwed things up too much

-daz
DrO is offline   Reply With Quote
Old 2nd December 2005, 15:30   #35
os@multimed.dk
Guest
 
Posts: n/a
Question Window size using html

Using version 1.0RC1 (and older) I can't get the html helpwindow large enough. I'm using: HelpButton::show /NOUNLOAD "232,231" "?" "" "/html=xxx.html" "" "" "centerp" "800,800"
It's as if there is a max limit for the window size.
Is it possible to fix?
  Reply With Quote
Old 2nd December 2005, 17:30   #36
DrO
 
Join Date: Sep 2003
Posts: 27,873
there shouldn't be a limit with the size (from the plugin side of things). the only thing i can think of is that the html help window enforces a size limit itself but without looking into this i can't say for certain. will try and look at it over the weekend (and update the wiki page as well)

-daz
DrO is offline   Reply With Quote
Old 4th August 2010, 16:16   #37
theaskingman
Junior Member
 
Join Date: Jul 2010
Posts: 16
Has anyone tested this plugin with Windows 7/ Vista and the latest nsis version. 5 Years are a loooong time.
I will give it a try, or are there already any other possibilities to give the user an extra information window? (The user needs to choose between several installing options which can't be explained in the short description box)

The Help Button shows up after 3 seconds, don't know why it takes so long?
Does anyone has a complete documentation for 1.0 or could tell me what's important to set?

The screen size of the html is always the same, can't make it bigger. It's opened on the upper left corner of the desktop.

code:
Function helpCombo
HelpButton::show /NOUNLOAD "300,100" "?" "" "/html=c:\gps\gpsbabel.html" "" "" "centerp" "1024,768"
FunctionEnd



--> should open in the center of the installer window, but it's on upper left coprner of the desktop
--> should be 1024 x 768, but it's only about 150 x 150
--> using MUI2.nsh

Can I insert an html link instead of this help button, so that a browser window is opened? maybe this would be easier?

Last edited by theaskingman; 4th August 2010 at 16:52. Reason: first testing
theaskingman is offline   Reply With Quote
Old 4th August 2010, 17:07   #38
DrO
 
Join Date: Sep 2003
Posts: 27,873
i've never tested it on Vista/Win7 (no idea if anyone else has) but i don't think i've even got the source code for this anymore (and it'd need a complete re-code anyway to make it compatible with ansi and unicode installers that are now available). however it's been so long since i've done NSIS plug-in coding i don't think i'm going to have the time to make a new version.

as for the size limits it sounds like it's an issue with the plug-in's ability to control the html control (though i had thought it allowed for larger sizes when i'd developed it so maybe something with the IE web browser control has changed, dunno).

you might be able to make a link control with nsDialogs and go that way, am sure i'll be corrected if i'm wrong, heh

-daz
DrO is offline   Reply With Quote
Old 4th August 2010, 17:13   #39
theaskingman
Junior Member
 
Join Date: Jul 2010
Posts: 16
thanks for your quick answer!
Ok, that's good to know. I will try it with nsdialogs or the linker plugin.
theaskingman is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump