Archive: need an installer to do this....


need an installer to do this....
ok, i used nsis in the past, but im trying to do something i have never done before.

im looking to make an installer choose items in a certain way.

the User has to choose to install some options and other applications. the options are as follows...

Writes:

the user must choose one or the other default option would be OFF!
and then annother set of options

Mods:the user must choose one of them, the default option would be normal.


then the applications are as followsapplication1 and application2 can enable and dissable, they dont need to be checked, but if they are, i want those files to be extracted when choosen.
application3 will be the default application, so it will be grayed out and will automaticly be extracted, but i want it in the list so the user knows the size of file being installed is.

each application will have a description and a size.
application1 will be 3mb, application2 will be 100kb, and application3 will be 60mb

i want to try this with the modren gui.. but im unsure what the best way to go about this, let alone how to go about it.

i have read alot of documentation but cant find what im looking for (likly im just blind or i dont comprehend how its type).

anyone up for helping :) thanks in advance!

Have a look at the one-section.nsi example in the NSIS\Examples folder.


see, thats the problem, i read that but it doesnt do what i want.

i have 3 GROUPS and in each GROUP i want something differnt done.

GROUP0 is manditory so its not really an issue.

GROUP1
choose
Selection1
OR
Selection2

GROUP2
choose
Selection1
OR
Selection2
OR
Selection3
BUT only ONE of the three!

GROUP3
choose either Selection1 or Selection2
Both can be selected or NOT selected, or one selected and not the other, it doesnt matter - its whatever the eu wants in group3.


In all the examples it doesnt tell me how to do this. and when i do try and do this it messes things up and it selects multiple options and i dont want that (in group2 at least it does).


Section !Required
SectionIn RO
SectionEnd

SectionGroup /e "FastWrites" group1
Section "Writes OFF" sec1
SectionEnd
Section "Writes ON" sec2
SectionEnd
SectionGroupEnd

SectionGroup /e "mod" group2
Section "Normal" sec3
SectionEnd
Section "9500" sec4
SectionEnd
Section "9800SE" sec5
SectionEnd
SectionGroupEnd

SectionGroup /e "Applications" group3
Section "Tools" sec6
SectionEnd
Section "res" sec7
SectionEnd
SectionGroupEnd


i have the basic layout done, now i need them to work correctly inside each group! as explained above!

I'm not quite sure what the problem is...


Section !Required
SectionIn RO
SectionEnd

SectionGroup /e "FastWrites" group1
Section "Writes OFF" sec1
SectionEnd
Section /o "Writes ON" sec2
SectionEnd
SectionGroupEnd

SectionGroup /e "mod" group2
Section "Normal" sec3
SectionEnd
Section /o "9500" sec4
SectionEnd
Section /o "9800SE" sec5
SectionEnd
SectionGroupEnd

SectionGroup /e "Applications" group3
Section "Tools" sec6
SectionEnd
Section "res" sec7
SectionEnd
SectionGroupEnd

Function .onInit

StrCpy $1 ${sec1} ; Group 1 - Option 1 is selected by default
StrCpy $2 ${sec3} ; Group 2 - Option 1 is selected by default

FunctionEnd

Function .onSelChange

!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${sec1}
!insertmacro RadioButton ${sec2}
!insertmacro EndRadioButtons

!insertmacro StartRadioButtons $2
!insertmacro RadioButton ${sec3}
!insertmacro RadioButton ${sec4}
!insertmacro RadioButton ${sec5}
!insertmacro EndRadioButtons

FunctionEnd


Stu

OK, the problem is this... they are in groups ie "sectionGroup" and that will have negitave effect on what i want.

i need to make each section seperate so the end user knows that there are three selections ie
-write
-Mod
-app

if i use sectiongroup then this causes the problem im having where it will select multiple choices when i dont want it to in the first two catigories (its perfect for the third catigory).

how would i make the first two catigories (sectiongroups) without the sectiongroup feature of selecting multiple options? i want it to be a section that expands but not to select multiple options at once, just one option at a time.

So im looking for a way to make it look like 3 differnt catigories, but without using the attributes of sectiongroup cmd. i tried to use SubSection also, but that does the same thing as sectiongroup essentially.


Oh I see now sorry. The only way to prevent this is to detect when the section group check state has changed (in .onSelChange) and then either check one of the sections or uncheck all.

I can have a go at this if I have time tonight, otherwise it might have to be tomorrow (it's Saturday night after all!)

Stu


ahh! thank you very much! the weekend is a time for fun, and i plan to try and have fun aswell! so take ur time, but please dont forget :P

much appreciation!


I had a go at this today but it isn't possible. NSIS checks the child nodes after the .onSelChange function so setting their check state there is pointless. All I can suggest is that you post a feature request to disable parent check features and allow for parent node check boxes to be hidden or disabled, or you use the EmbeddedLists plug-in which has these features (although today I'm going to add a NoCheckBox attribute to hide check boxes.)

Stu


I have updated EmbeddedLists to support DisableCheck=3. This hides a check box completely when the check bitmap is being used.

Stu


I had a hard time following this thread, so I hope I got it right that you're looking for a solution to the dreaded section group click while using the RadioButton macro. All you need to do is check if the section group is selected and unselect it. See the following thread for an example:

http://forums.winamp.com/showthread.php?postid=1965086

BTW, by reading the first post in this thread, I'd say you're better off with a custom page with real radio buttons that'd better explain the user what exactly he has to select.


thank you very much. i will try that out. and if it doesnt work, i will try out my other options.


Should have guessed that considering that's how EmbeddedLists disables check boxes (when not using a check bitmap).

Stu