SupSuper
2nd July 2004 16:19 UTC
SelectSection doesn't work
i'm using the SelectSection macro from the "Sections.nsh" header included with NSIS to manually select/unselect sections (using a custom InstallOptions page instead of the Components page) but it doesn't work. This is the code I use:
ReadINIStr $R0 "$PLUGINSDIR\demo_select.ini" "Field 2" "State"
StrCmp $R0 "1" xcomdemo check
xcomdemo: !insertmacro SelectSection XcomDemoSec
check:
ReadINIStr $R0 "$PLUGINSDIR\demo_select.ini" "Field 3" "State"
StrCmp $R0 "1" tftddemo end
tftddemo: !insertmacro SelectSection TFTDDemoSec
end:
So... what am I doing wrong?
deguix
2nd July 2004 16:44 UTC
You can't put different commands on the same line. So split up the labels from !insertmacro SelectSection.
SupSuper
2nd July 2004 17:32 UTC
Originally posted by deguix
You can't put different commands on the same line. So split up the labels from !insertmacro SelectSection.
i've always done it without problems.
and... it still doesn't work :(
Yathosho
2nd July 2004 20:43 UTC
have you included Sections.nsh ?
kichik
2nd July 2004 22:02 UTC
Deguix, a label and a command can be on the same line.
There are two problems I see. First, Sections.nsh macros can not control InstallOptions pages. Second, XcomDemoSec is the define name, use ${XcomDemoSec}.
deguix
3rd July 2004 06:30 UTC
Deguix, a label and a command can be on the same line.
I said that because I never used it, and that lately I'm not using NSIS as often as before.
SupSuper
3rd July 2004 20:24 UTC
Originally posted by kichik
Deguix, a label and a command can be on the same line.
There are two problems I see. First, Sections.nsh macros can not control InstallOptions pages. Second, XcomDemoSec is the define name, use ${XcomDemoSec}.
First, it's the InstallOptions page that controls the macros. Second, thanks, it works now :)