Old 18th July 2005, 10:30   #1
Urd
Junior Member
 
Join Date: May 2005
Posts: 5
one-section.nsi With Modern UI

Is there a way to modify the one-section.nsi code to be used with the modern UI while still having section descriptions? I tried this but it doesn't work. The idea is to have either group 1 and any or all of its sections or group 2 selected, not both.
code:
Function .onInit
StrCpy $1 ${SecDummy1}
FunctionEnd

Function .onSelChange
!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${SecDummy}
!insertmacro RadioButton ${SecDummy4}
!insertmacro EndRadioButtons
FunctionEnd

SubSection /e "Group 1" SecDummy

Section "Option 1" SecDummy1
SetOutPath "$INSTDIR"
IfFileExists "$INSTDIR\test.txt" 0 +2
Delete "$INSTDIR\test.txt"
File "test.txt"
SectionEnd

Section "Option 2" SecDummy2
SetOutPath "$INSTDIR"
IfFileExists "$INSTDIR\test.txt" 0 +2
Delete "$INSTDIR\test.txt"
File "test.txt"
SectionEnd

Section "Option 3" SecDummy3
SetOutPath "$INSTDIR"
IfFileExists "$INSTDIR\test.txt" 0 +2
Delete "$INSTDIR\test.txt"
File "test.txt"
SectionEnd

SubSectionEnd

Section /o "Group 2" SecDummy4
SetOutPath "$INSTDIR"
IfFileExists "$INSTDIR\test.txt" 0 +2
Delete "$INSTDIR\test.txt"
File "test.txt"
SectionEnd

!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
!insertmacro MUI_DESCRIPTION_TEXT ${SecDummy1} $(DESC_SecDummy1)
!insertmacro MUI_DESCRIPTION_TEXT ${SecDummy2} $(DESC_SecDummy2)
!insertmacro MUI_DESCRIPTION_TEXT ${SecDummy3} $(DESC_SecDummy3)
!insertmacro MUI_DESCRIPTION_TEXT ${SecDummy4} $(DESC_SecDummy4)
!insertmacro MUI_FUNCTION_DESCRIPTION_END

Urd is offline   Reply With Quote
Old 18th July 2005, 11:03   #2
glory_man
Senior Member
 
Join Date: Sep 2004
Location: Mogilev (Belarus)
Posts: 372
Why not? Add
code:
!include "MUI.nsh"

Change "Page components" -> !insertmacro MUI_PAGE_COMPONENTS
And after that add this line:
code:
!insertmacro MUI_LANGUAGE "English"
glory_man is offline   Reply With Quote
Old 18th July 2005, 14:03   #3
Urd
Junior Member
 
Join Date: May 2005
Posts: 5
I already have all of that. I have a working script, i just want to add the ability to use the one section function with the modern UI.
Attached Files
File Type: nsi 1.nsi (5.2 KB, 304 views)
Urd is offline   Reply With Quote
Old 18th July 2005, 21:05   #4
Urd
Junior Member
 
Join Date: May 2005
Posts: 5
Okay I got it to work but now I'm getting some weird selection problems where you can select the second group and 2 of the three subsections in group 1. Is there a way to make it so when group 1 is selected not all of its sub sections have to be and when group 2 is selected none of groups 1 sub sections can be selected?
Attached Files
File Type: nsi 1.nsi (5.7 KB, 282 views)
Urd is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump