Archive: Custom Pages for different sections


Custom Pages for different sections
Hello Friends,

My Installer has different sections. For one Section I need the user Input from User. For that It should display Custom Page. If user doesn't need that Component The Custom page should not display.

==============================
Section SecA SEC1
---
---
SectionEnd

Section SecB SEC1
---
---
<Here I Would like to Insert a New Page for User Input>
SectionEnd
===============================
we define all the Pages in the Top and the installer will show the Pages one by One.

Is there any Option to create\show the diaplogs\Pages w.r.t to Selected Cmponents\Sections?


In the leave function of the components page, you can check the sections to see if they are checked or not, and you can choose which pages to display based on it. All your custom pages should be defined in your installer, and skip the custom pages with Abort in the pre function as needed.


Thanks for Quick support, Can I have the sample code for this in Forum, or Developer Center. I have been searching for this in Discussions and in NSIS Dvelopment Center, but Failed...(:-(


Here. I whipped up an example script for you.


To make it simple, you can use ${If}/${Unless} ${SectionIsSelected}:

!include LogicLib.nsh

Page Custom CustomPageShow CustomPageLeave

... Sections here ...

Function CustomPageShow
${Unless} ${SectionIsSelected} ${SecID}
Abort
${EndUnless}
InstallOptions::...
FunctionEnd

...


Stu

I got it. Thank you very much Jason & Stu,

I have used the sample code provided by Jason. It's working now