ameer
25th August 2007 13:26 UTC
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?
JasonFriday13
25th August 2007 13:57 UTC
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.
ameer
25th August 2007 14:09 UTC
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...(:-(
JasonFriday13
25th August 2007 14:48 UTC
Here. I whipped up an example script for you.
Afrow UK
25th August 2007 21:25 UTC
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
ameer
27th August 2007 12:34 UTC
I got it. Thank you very much Jason & Stu,
I have used the sample code provided by Jason. It's working now