Archive: Newbi - MUI, Choose Components and Radiobutton


Newbi - MUI, Choose Components and Radiobutton
Hi,

First off, I am sure this is a really basic question but I can't seem to find a working solution in the forums, wiki or examples...

I am using modern UI and on the "Choose Components" page, I want to use radio buttons instead of check boxes...

I am sure I am just being dumb about something so any help is really appreciated!!!


Here is the script I am using:

;--------------------------------
;Include Modern UI

!include "MUI.nsh"
!include "Sections.nsh"

;--------------------------------
;General

; The name of the installer
Name "Test Install"

; The file to write
OutFile "setup.exe"

; The default installation directory
InstallDir "$PROGRAMFILES\Test\Test Install"


;--------------------------------
;Interface Settings

!define MUI_ABORTWARNING

;--------------------------------
;Pages

!insertmacro MUI_PAGE_LICENSE "License Agreement.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "English"

;--------------------------------


;--------------------------------

; The stuff to install
;Section "" ;No components page, name is not important

Section "Complete Distribution" SEC_Complete

; Put file there
File bre.ini

SectionEnd ; end the section


Section /o "BRE Only" SEC_BRE_Only

; Set output path to the installation directory.
SetOutPath $INSTDIR

; Put file there
File bre.ini


SectionEnd ; end the section


Function .onInit
StrCpy $1 ${SEC_Complete}
FunctionEnd

Function .onSelChange
!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${SEC_Complete}
!insertmacro RadioButton ${SEC_BRE_Only}
!insertmacro EndRadioButtons
FunctionEnd


See the included in installation folder NSIS\Contrib\Graphics\Checks.
You may design and add your own.


Red Wine,

Thanks for the quick reply. I took a look at that directory and only saw bmps. On the components page, I am just trying to use radio buttons (to make mutually exclusive selections) vs. a check box (which seems to be the default).

Thanks!

B


You may want to refer to the MUI documentation, especially about Interface Settings.
http://nsis.sourceforge.net/Docs/Mod...UI/Readme.html