- NSIS Discussion
- Migration to NSIS2 & MUI - Questions and Suggestions
Archive: Migration to NSIS2 & MUI - Questions and Suggestions
AndiG
5th December 2002 08:28 UTC
Migration to NSIS2 & MUI - Questions and Suggestions
Hello,
I've been following NSIS since 1.2 and now trying to port my installers to the latest NSIS2 with ModernUI which is quite fancy. However, I quickly ran into the following problems and suggestions:
1. Display an options to install software for one/all users- could this be integrated ie. into the component selection page?
In previous NSIS I've use an .onNextPage to pop up a dialog box to ask. I've tried to implement this in the event for the directory selection page- but the callback function is already defined by MUI, do I need to put my message box into the system.nsh?
2. If finish page is used, it's no longer possible to verifiy the installation details (bacl button is disabled)- intended or my mistake?
3. Would it be possible to get a component selection page that does not contain the description pane? If no descriptions are specified, it currently stays empty instead of vanishing.
4. The Polish.nsh file seems to be missing MUI_TEXT_STARTMENU_WINDOWTITLE.
5. Not MUI-related: can I still have required sections that *are* displayed, but where the checkmark cannot be removed (as the first section previously was)
I hope I'm making sense and you guys can shed some light this...
Cheers,
Andi
kichik
5th December 2002 10:52 UTC
1) In b0 there is no callback function that is called after you move from a page and before that page is destroyed. You will have to use an InstallOptions page which will actually look better than a message box IMHO.
2) The back button is disabled on purpose. If you want the install details to stay until the user click the next button define MUI_FINISHPAGE_NOAUTOCLOSE before you inlude the Modern UI system.nsh. I will make sure it goes into the docs too...
3) You will have to make your own UI for that. It's actually very easy. Just download Resource Hacker, open up modern.exe or modern2.exe with it and edit whatever you want. Save as, lets say modern-nodesc.exe and then define MUI_UI as the path to it before you include System.nsh. That one is in the MUI readme.
4) Our Polish translator hasn't sent a new translation yet... :(
5) Use SectionIn RO.
matini
5th December 2002 11:08 UTC
ModernUI without description
Well, I always keep a copy of the modified Modern2.exe for my
installers that needn't descriptions. Here it is:
AndiG
5th December 2002 14:52 UTC
Kichik, thank you for the advice. Only one comment for now:
1) Would be OK, but can this be achived on an existing page (ie. the shortcuts page)? I agree with not using messages boxes (therefore the final page is very good), but then again you don't want to increase the number of unnessesary clicks.
Cheers,
Andi
kichik
5th December 2002 15:01 UTC
For the shortcuts page you will have to write your own Page commands (define MUI_CUSTOMPAGECOMMANDS) call StartMenu yourself and add a MessageBox after its call.
You need to click on a message box or no enter to skip it too ;)
RIV@NVX
5th December 2002 16:00 UTC
Will that AndiG's UI be included with next version of NSIS?
Joost Verburg
5th December 2002 16:27 UTC
I'll make a modern3.exe without description.
AndiG
10th December 2002 15:56 UTC
Joost,
thank you for modern3,
kichik,
I'm still not entirely sure- I understand it's not possible to add a checkbox to any existing page, right? They need to be clicked, too, but only if you disagree with the standard...
Do you think an "Install for All Users" checkbox (optional) would be a good enhancement for NSIS, status automatically determining the where to install (reg keys, as you can do now wit scripting) and able to be queried via scripting language?
Cheers,
Andi
AndiG
11th December 2002 08:36 UTC
Not sure this makes sense, but I'm not really happy with MUI_FINISHPAGE_NOAUTOCLOSE.
My preferred behaviour would be that I get to the finish page automatically and can still go back to the installer progress page (Back button on final not disabled). Saves one click and the interested users can still go back.
Makes sense?
Andi
kichik
11th December 2002 15:04 UTC
Do you think an "Install for All Users" checkbox (optional) would be a good enhancement for NSIS, status automatically determining the where to install (reg keys, as you can do now wit scripting) and able to be queried via scripting language?
It's not that hard to do it right now, I don't think there should be an option for another page that does only it. All you need to do is create an InstallOptions page that asks the user where he wants it. Then according to it use SetShellVarContext and you are set. SetShellVarContext will make sure all of the NSIS variables ($PROGRAMFILES, $STARTMENU etc.) will point to the right place. For the registry keys you will have to use a variable to store either HKLM or HKCU and use it in every registry function.
Makes sense?
I will think about it.
AndiG
11th December 2002 15:18 UTC
kichik,
not another page (installoptions), but rather incorporate it into one of the existing pages :)
Cheers,
Andi
kichik
11th December 2002 15:27 UTC
Which page were you thinking about?
AndiG
14th December 2002 09:25 UTC
Mhhm. Not entirely sure- maybe the Shortcusts page? I'm wondering though- how do other installers handle this?
Cheers,
Andi
kichik
14th December 2002 20:19 UTC
Most of the installers I have seen have a seperate page for it, I think.