Archive: Bug in Components page?


Bug in Components page?
Hi guys,

have u ever seen this?

I have a very simple components page, with "Typical" install type and the custom one. And I've got 2 sections. sec1 is defined with "SectionIn 1", 1 being "typical" install. sec2 has no "SectionIn" defined, because I don't want it to show in "typical".

But when I actually run installer and hit the components page, the page has "typical" selected, but both sections are checked. If I switch to "custom" and back to "typical", sec2 now turns unchecked, which is the correct behavior. It sounds like a bug to me.

What can I do to fix it?
Thanks a lot,

lyz


Well. Figured out the fix: declare sec2 with "/o" parameter, which means uncheck by default.

lyz


The following works fine for me. The second section isn't selected by default, and the first installation type is selected.

Name blah
OutFile blah.exe

Page components
Page instfiles

XPStyle on

InstType 1

Section blah
SectionIn 1
SectionEnd

Section bah
SectionEnd
Which version of NSIS are you using?

Thanks kichik.

I finally tracked down the problem. It's with NSIS 2.02 (MUI). Also I have a hidden section with /o as the first section listed. Try this code:


!include "MUI.nsh"
!include "Sections.nsh"

Name "blah"
OutFile "blah.exe"

!insertmacro MUI_PAGE_COMPONENTS
InstType "Typical"
!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_LANGUAGE "English"


Section /o -hidden
SectionEnd


Section blah
SectionIn 1
SectionEnd

Section bah
SectionEnd


Latest NSIS also has a small problem with this code. "Custom" shows as the default install type when you hit the components page.

Thanks.


It shows as custom because the first section (the hidden one) is unselected, but it's in the first installation type.