...
I have this little program of mine that consists of two parts: the server side and the client side. I wrote this script to let the user choose between the server and the client to install:
Now, what I want to do is this: when the user selects either client or server, the other section becomes read-only (i.e. you have to install either client or server, or both of them), so I wrote this .onSelChange function:SectionGroup "MyApp"
Section "MyApp client" cli
/*
Client files
*/
SectionEnd
Section "MyApp server" ser
/*
Server files
*/
SectionEnd
SectionGroupEnd
The problem is when the user deselects either server or client option, the whole section group becomes read-only and the user can not change his decision now. It seems that SectionSetFlags command somehow affects both sections at the same time. How can I make it work properly?Function .onSelChange
SectionGetFlags cli $1
SectionGetFlags ser $2
IntOp $R1 $1 & 0x1
IntOp $R2 $2 & 0x1
IntCmp $R1 0x0 client_unselected
IntCmp $R2 0x0 server_unselected
Abort
client_unselected:
IntOp $2 $2 | 0x11
SectionSetFlags ser $2
Abort
server_unselected:
IntOp $1 $1 | 0x11
SectionSetFlags cli $1
Abort
FunctionEnd
Thanks.