Archive: InstallOptions Help on Script


InstallOptions Help on Script
Well This isnt near finnished as theirs to fundimental features i havent a clue how to do nor can i find anything on them so here we go:

** This May Also Help All You Newbies Like Me :D **

right well this is an insatller using Modern UI (modified) and using InstallOptions, Compiled on Beta 4 CVS from 20 June 2003.

The Idea is that say you make an addon to a game where theres a 2002 version but theres a 2004 version coming out soon and u have a beta of it and develop a new version to work on the 2004 game because the why in which the 2002 version did things are now changed and to save the user custom selecting the version you use a custom page where it has 2002 Version and a 2004 Version check box. The user then can select the 2002 version if they have the Game Version and then the next page is the Components page But the custom page should auto validate the users choice on its page and select the installtype + it should only allow for one box to be checked.

Problem 1:
All Check boxes can be checked :eek: , How do you validate or allow for one only or say at least like say the same as Validate the Component page using .onSelChange

Problem 2:
Dont know how to make the custom page select or set a install type/ auto select the components.

If these features are not able to be done could they be dont for next release? as i would realy like to do this as it means that way you could bypass the component page making it easier for some people who dont know how to select installtypes and the .onSelChange as a flaw where that it will auto slect one of the options and if you select the other it will allow for both Options to be checked so theirs a bug for ya.

Link For Example of what is wanted as i cannot directly link em:
http://gunny2.*************/

Files Attached and based of the InstallOptions.nsi Example


First of all, use RadioButtons for the different game installs (and add Flags=GROUP to your first RadioButton Field).
Then, you need to create a leave function on your InstallOptions page.

This is done like so:

Page CreaterFunction LeaveFunction Title


Now, on your leave function you should read the values from your InstallOptions INI file.

Function LeaveFunction
!insertmacro MUI_INSTALLOPTIONS_READ "$R0" "myiofile.ini" "Field 1" "State"
##Field 1 is the Install 2002 RadioButton
##If Field 1 is not selected, then the other RadioButton must be
##selected!
StrCmp $R0 1 install2002 install2004
install2002:
##Do stuff here##

install2004:
##Do other stuff here##


Now, to set InstTypes, there is a new addition to NSIS added not long ago.
See Chapter4.html#4.9.13.5 of the NSIS documentation for SectionSetInstTypes

-Stu

ah rolf lol thx Afrow RadioButton works only one can be ticked thx dude now just to get the set section install type to work and it would be a great example of install options and a great thing for usage.


thx again i ow u one :D ( hows about a cold one, a beer that is ) dont know why i didnt try a Radiobutton before i m such a tit ;)


We were all t*ts at one time...

I'm not sure now if SectionSetInstTypes is the right thing to use for this.
Kichik will know (he was partly if not all to do with the command)

-Stu :)


If the user already selects the required option in the custom page why would you need the components page? If you do want to show the components page anyway there is a new command called SetCurInstType which only works when the components page is shown.

...and the .onSelChange as a flaw where that it will auto slect one of the options and if you select the other it will allow for both Options to be checked so theirs a bug for ya.
Can you rephrase that please?