lyz
15th December 2005 01:11 UTC
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
lyz
15th December 2005 01:33 UTC
Well. Figured out the fix: declare sec2 with "/o" parameter, which means uncheck by default.
lyz
kichik
15th December 2005 18:29 UTC
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?
lyz
15th December 2005 22:14 UTC
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.
kichik
16th December 2005 11:11 UTC
It shows as custom because the first section (the hidden one) is unselected, but it's in the first installation type.