Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 25th August 2007, 12:26   #1
ameer
Junior Member
 
ameer's Avatar
 
Join Date: Jul 2007
Location: India
Posts: 30
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?
ameer is offline   Reply With Quote
Old 25th August 2007, 12:57   #2
JasonFriday13
Senior Member
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: Taranaki, New Zealand
Posts: 400
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.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 25th August 2007, 13:09   #3
ameer
Junior Member
 
ameer's Avatar
 
Join Date: Jul 2007
Location: India
Posts: 30
Angry

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...(:-(
ameer is offline   Reply With Quote
Old 25th August 2007, 13:48   #4
JasonFriday13
Senior Member
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: Taranaki, New Zealand
Posts: 400
Here. I whipped up an example script for you.
Attached Files
File Type: nsi sectionskip.nsi (1.3 KB, 313 views)

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 25th August 2007, 20:25   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
To make it simple, you can use ${If}/${Unless} ${SectionIsSelected}:

code:
!include LogicLib.nsh

Page Custom CustomPageShow CustomPageLeave

... Sections here ...

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

...



Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 27th August 2007, 11:34   #6
ameer
Junior Member
 
ameer's Avatar
 
Join Date: Jul 2007
Location: India
Posts: 30
I got it. Thank you very much Jason & Stu,

I have used the sample code provided by Jason. It's working now
ameer is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump