Archive: Hidden section bug


Hidden section bug
I have posted problem on SourceForge:
http://sourceforge.net/tracker/index...49&atid=373085
Issue: 1817989

But I think I was not understood. I want to discuss this problem here. Since I still think it's a bug.
I repeat problem description:

OutFile "install.exe"
Page components
InstType "qa"
InstType "prod"
SectionGroup "qa" qa
Section "" qaclean
SectionIn "1"
SectionEnd
Section "mod1" mod1
SectionIn "1"
SectionEnd
Section "mod2" mod2
SectionIn "1"
SectionEnd
Section "" qadeploy
SectionIn "1"
SectionEnd
SectionGroupEnd
Function .onSelChange
SectionGetFlags ${qaclean} $0
SectionGetFlags ${qadeploy} $1
MessageBox MB_OK "qaclean: $0 qadeploy $1"
FunctionEnd


In installer I see sections:
mod1 and mod2, section qaclean and qadeploy are hidden.
I want hidden section to be selected if any of my visible sections are selected.
------------------------------
I still think it's high priority bug.
In current implementation you can have 2 different results
with the same visual selection.

situation 1:
1) Inst Type Qa selected.
2) I extend section and deselect mod1.
3) Visually I see that Qa - partially selected, one mod2 section selected.
4) Nsis will install, mod2 + qaclean + qadeploy

Situation 2:
1) Inst Type Qa selected.
2) I extend section and deselect mod1 and mod2.
3) Select mod2.
3) Visually I see that Qa - partially selected, one mod2 section selected. Same as in situation 1
4) Nsis will install, mod2 only.

As you see with the same visual selection Nsis will install different sections. I think it'a a bug and to fix it I had to write my own .onSelChnage function.

In current implementation you are correctly deselect hidden section if all visible have been deselected.
But you select hidden section back only if I select all section from Installation type. This is bug. You should select hidden section when any of visible section in current installation type selected.


What do you think?


Hidden sections are automatically selected only if the section group is completely selected. This is by design and isn't actually affected by the fact they're hidden.

What you are looking for is different. You simply want to have the two last sections selected if any of the first two are selected. That's what .onSelChange or some later processing of the section selection is for.


I understand your logic and .onSelChnage is what I used to achieve behavior I need.

I just saying that in current implementation if you use hidden section and allow Custom Install type, Nsis might install different groups with the same visual selection.

If this is by design, then it is wrong design. Or you should add warning: "do not use hidden section if custom install type allowed, or use .onSelChnage to control this behavior".

From user point of view I gave same type of input to Nsis, but receive different results.

If you think it's Ok, it's fine with me. I fixed it for myself. I just noticed it by accident, just watching how much space required with my selection. I was lucky to find it before I send it to customers. But I see it could be easily missed by someone.