Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Bug in Components page? (http://forums.winamp.com/showthread.php?t=233194)

lyz 15th December 2005 00:11

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 00:33

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

lyz

kichik 15th December 2005 17:29

The following works fine for me. The second section isn't selected by default, and the first installation type is selected.
code:
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 21:14

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 10:11

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


All times are GMT. The time now is 05:58.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.