Archive: Please Check This Tiny Attachment, Several Bugs or Several Mistakes?


Please Check This Tiny Attachment, Several Bugs or Several Mistakes?
The following bugs on this script are:

1. Upon running testa is deselected.
2. Upon running testb APPEARS selected but is not (open to see).
3. SectionGroups are not hidden.

!include "MUI.nsh"
!define MUI_COMPONENTSPAGE_SMALLDESC
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES

!define PRODUCT_NAME "example09875"
OutFile "${PRODUCT_NAME}.exe"

SectionGroup "testa"
Section /O "prog1" SEC01
StrCpy $R0 DoProg1 Yes
SectionEnd

Section /O "prog2" SEC02
StrCpy $R0 DoProg2 Yes
SectionEnd
SectionGroupEnd

SectionGroup "testb"
Section /O "prog3" SEC03
StrCpy $R0 DoProg3 Yes
SectionEnd

Section /O "prog4" SEC04
StrCpy $R0 DoProg4 Yes
SectionEnd
SectionGroupEnd

SectionGroup "-hidden1"
Section "-DoProg4"
SectionGetFlags ${SEC04} $R0
StrCmp $R0 0 End
DetailPrint "Installing Section 4"
End:
SectionEnd

Section "-DoProg3"
SectionGetFlags ${SEC03} $R0
StrCmp $R0 0 End
DetailPrint "Installing Section 3"
End:
SectionEnd
SectionGroupEnd

SectionGroup "-hidden2"
Section "-DoProg2"
SectionGetFlags ${SEC02} $R0
StrCmp $R0 0 End
DetailPrint "Installing Section 2"
End:
SectionEnd

Section "-DoProg1"
SectionGetFlags ${SEC01} $R0
StrCmp $R0 0 End
DetailPrint "Installing Section 1"
End:
SectionEnd
SectionGroupEnd
Are thee bugs or blame to my own fault?

I can see a point in not hiding a SectionGroup as I found no options for it in the help file. /e ! etc.

What about the other two?


1. testa is deselected, as you used the /o switch
2. remove the strcpy command from the sections, i guess these are leftovers from your previous script


..and what's the point in using SectionGroups anyway?


  1. testa should be deselected, all of the sections in the group are deselected.
  2. That's the section group is first section bug in 2.05.
  3. It's impossible to create a such group hidden like that. If you want to do that manually, you'll have to remove the group end marker too.

1. I must be smoking crack. I cannot believe I didn't take notice to /0.
2. note to self: get familiar with bug tracker
2a. Is this bug squashed and available in a fix on cvs?
3. I pretty much knew this was the case once I noticed I couldn't hide it any way I tried.

Yathosho, I am trying to get something done with my already existing script using the attachment on this thread only as an example. I already use plenty of Sectiongroups and wanted to manipulate it all as little as possible.

Thanks Yathosho and Kichik for your time and help on this.