Old 30th June 2006, 08:50   #1
1123581321
Junior Member
 
Join Date: Jun 2006
Location: Beijing CN/Houston TX
Posts: 5
Send a message via AIM to 1123581321
skipping pages without MUI & WIKI example (almost have it)

Hey all,
Yes yes, I'm an NSIS newcomer and I'm pleased to say I've extensively searched for an answer to my issue with no avail!!! > so I feel I can rightfully post on the forum.
I'm Scott, by the way, and I'm writing an installer for my research-group's open-src platform (see http://warp.rice.edu)

Anyways, here goes with the issue:

I essentially need a multiple installer -- and I've figured it out (complete with using strings to make the default directory). The issue is in skipping the directory pages. For example, my code structure looks like this:

------------------------------------------------------------

!include "Sections.nsh"
...
...
Page Components
...
...
VAR Install_path1
PageEx directory
PageCallbacks skip_inst1 "" ""
DirVar $inst1_default
DirText "blah blah blah"
PageExEnd

VAR Install_path2
PageEx directory
PageCallbacks skip_inst2 "" ""
DirVar $inst2_default
DirText "blah blah blah"
PageExEnd

...
...

Function .onInit
...
StrCpy $inst1_default "C:\inst1"
StrCpy $inst2_default "C:\inst2"
FunctionEnd

...
...

Section "Install 1" inst1
SectionEnd
Section "Install 2" inst2
SectionEnd

...
...

Function skip_inst1
!insertmacro SectionFlagIsSet inst1 1 checked notchecked
notchecked: Abort
checked:
FunctionEnd

Function skip_inst2
!insertmacro SectionFlagIsSet inst2 1 checked2 notchecked2
notchecked2: Abort
checked2:
FunctionEnd

------------------------------------------------------------

OK, so this KIND of works, but not completely correctly. Which normally I'd say there must be a completely logical answer as to why, but what occurs is completely illogical to me. The problem:

If I uncheck inst1, it totally skips both inst1 AND inst2 install pages. That goes for any combination of checked boxes with inst1 UNCHECKED.

If I uncheck inst2, it still shows up...

I'd really like to somehow implement the page skipping in this way, because it would otherwise mean a fair amount of recoding the entire file. I feel I'm very close and this should somehow work...

Any thoughts/help would be appreciated!!! Thanks
-Scott
1123581321 is offline   Reply With Quote
Old 30th June 2006, 11:03   #2
1123581321
Junior Member
 
Join Date: Jun 2006
Location: Beijing CN/Houston TX
Posts: 5
Send a message via AIM to 1123581321
no ideas, eh? I've been hacking away at this one for a few days with no luck
1123581321 is offline   Reply With Quote
Old 30th June 2006, 11:17   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
!insertmacro SectionFlagIsSet inst1 1 checked notchecked
->
!insertmacro SectionFlagIsSet ${inst1} 1 checked notchecked


!insertmacro SectionFlagIsSet inst2 1 checked2 notchecked2
->
!insertmacro SectionFlagIsSet ${inst2} 1 checked2 notchecked2

You could have searched the forum for SectionFlagIsSet and you'd find the problem straight away.

-Stu
Afrow UK is offline   Reply With Quote
Old 30th June 2006, 11:24   #4
1123581321
Junior Member
 
Join Date: Jun 2006
Location: Beijing CN/Houston TX
Posts: 5
Send a message via AIM to 1123581321
wicked! will be checkin it out in a bit!

yeah I searched the forums, but for things like "multiple installations" "skipping pages" etc. etc. and I went through all pages! I can't believe I didn't think of searching for that function/looking for it.

Apologies -- and much thanks!
1123581321 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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