Archive: Custom Pages


Custom Pages
Hi,
i'm new to NSIS but i know how to make a basic modern GUI

Now i need to have custom pages.
I searched already for it, but i didn't understand the results well.

So i created a mockup of the custom page, and maybe you guys could help me with the code?

http://img92.imageshack.us/img92/5005/mockup1tp.png

I need at least 8 of this custom pages, because i'm creating a sort of customization application where the user should be able to see a preview of each feauture.

And how do i let the installer 'know' that the user selected for example on custom page 1 image A (so the installer installs the correct things), also i need to have a components page so that page must also know what the user selected.

Thanks in advance,
Aero


from the installoptions readme.html

Validate the input

If you want to validate the input on the page, for example, you want to check whether the user has filled in a textbox, use the leave function of the Page command and Abort when the validation has failed:
Function ValidateCustom

ReadINIStr $R0 "$PLUGINSDIR\test.ini" "Field 1" "State"
StrCmp $R0 "" 0 +3
MessageBox MB_ICONEXCLAMATION|MB_OK "Please enter your name."
Abort

FunctionEnd
you would be using some similar to this.

I'd suggest to take a look at InstallOptions examples (they are bundled with NSIS release) and make your self familiar enough with custom pages structure, and the way that InstallOptions serves your installation.
In general each custom page must have a unique custom ini, a unique create function and (when needed) a unique leave (validate) function.
Images if any, have to be extracted in $PLUGINSDIR along with the custom ini. :-)