Archive: First Section always unchecked


First Section always unchecked
I've googled, I've searched, and cannot figure this out. I'm using NSIS 2.0b3 and a modern GUI. My first section is always unchecked, no matter what I seem to do, when doing test runs on my station.

The section is as follows:

Section "!${MUI_PRODUCT}" SEC_Exodus
SectionIn 1 RO

It shows up read-only, but not selected.

I'm basically using the nsi file provided to custom build your own Exodus installer (exodus.jabberstudio.com), a Jabber client. I'm new to NSIS (but painfully did this back in the day with InstallShield 2.0 and 3.0!). Any clues what I am not able to do this?

If I put another section in front of this one, it's selected, but the one above it is not selected, too.


Have you tried using

SectionIn RO

instead of

SectionIn 1 RO

Are you using more than one install type?


When you put the first type of installation, it will be selected (according to your code). If you have Installation Types, the first one will have this section selected, please see it. If not, post again...


Okay, I'm really foreign to this, so forgive me. Hopefully someone can shed light on this, as I don't fully understand types, but I think I'm using multiple installation types based on my interpretation.

Here's the NSI file that I'm starting from:

http://www.jabberstudio.org/cgi-bin/...ype=text/plain

There are multiple Sections within this. All it takes for me to lose the initial Section ("Exodus") as being checked is to remove the section coded as follows:

; BRANDING: Remove this section
Section "Daily updates" SEC_Bleed
SetOverwrite off
File "branding.xml"
SetOverwrite on
SectionEnd

Since I'm "branding" the install, I cut that code out. This causes the selected sections to change. I'm guessing there is code elsewhere that defines what is on/off.

I figured this out from trial & error seeing what changes I make cause the thing to fall apart.

I'm sure this is all due to a fundamental misunderstanding about installation types in NSIS, but I just started playing with this Monday. :-)

SF


If you are still unable to get this working, then upgrade to latest NSIS CVS (2.0b4), because this could have been an 2.0b3 bug.
Or, you could use
SectionSetFlags ${SecID} 1
in .onInit

-Stu


It's not a bug in b3, it's something you forgot to remove from the script. In .onInit some sections are unselected by their ID, including SEC_Bleed. Because you removed it, SEC_Bleed is not defined and is therefore treated as 0 which is the index of the first section. When the code tries to unselect SEC_Bleed it unselects the first section instead. Simply remove:

Push ${SEC_Bleed}
Call TurnOff

and any other instance of SEC_Bleed.


Bingo! :up:

I got it fixed up due to the references in .oninit. I was removing additional sections and the references in the sections were throwin the index off. Gratz! I was not getting much closer on my own.

NSIS is pretty cool, I'll be using it for some IT deployments now. Thanks gang!