Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Licensing (http://forums.winamp.com/showthread.php?t=233700)

Tanerax 21st December 2005 13:21

Licensing
 
Is there a way to have license data displayed only if a particular component is selected for installation?

Tanerax 21st December 2005 14:05

I managed to get logic to run based off what was selected during installation but is it possible to load a "License" dialog in a function. Tried to use the normal !insertmacro but it contains a PageEx command which is not allowed to be used in a function. I can't seem to get this dialog to load properly... Any Suggestions?

iceman_k 21st December 2005 14:23

Use the SectionFlagIsSet macro (from Sections.nsh) with the ${SF_SELECTED} bit to determine if your component is selected.
In the pre-function for the license page, if the component is selected, call Abort- that will skip the license page.
See the example in NSIS Help Section 4.5.3.

Tanerax 21st December 2005 18:17

Essentially what we are trying to have occur is having a licensing window appear after the component selection. If a certain component is selected it has a separate license for it. So when the user clicks next from the selection a licensing window for this particular component appears. This is where it gets tricky, we want it so the user has a "I accept" / "I decline" radiobutton selection and regardless of what they select a "Next" button not disabled that will allow them to continue from there having it either install the component if they accepted or not install if they declined.

iceman_k 21st December 2005 18:33

I think you will have to create a custom page using InstallOptions for this.

kichik 22nd December 2005 16:15

Or some plug-in that'll catch WM_COMMAND messages passed to the license dialog and filter them so NSIS will not disable the Next button.

Tanerax 22nd December 2005 19:12

Thanks a bunch. The InstallOptions was exactly what i needed. Just need to find a way to manipulate the "components" list after they selected it.


All times are GMT. The time now is 04:57.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.