Archive: Complete Walkthrough


Complete Walkthrough
Fist of all, I must thank all Winamp Community members for their help. I'm very new to NSIS, actually I just started learning c# 2 weeks ago. I'm making a chatroom program (similar to IRC). The program has 2 ini files. The installer needs to ask a few questions about the enduser's preference (font size, font color...), and write to those ini files according to the answers.

My questions:
- How to create multiple dialogs using InstallOptions
- How to show specific questions according to their answer of the previous questions. like dir and subdirs (ie. if the 1st question they answered windows the 2nd question would be internet explor...)
- How to pass the answers to variables [then output them into the ini files (i think i know how to do this part)]

The reason I have to create an installer for this program is that my program has to be distributed on CDs. (It's a school project, why does it have to be so professional?):confused:

Thanks, Any help would be greatly appreciated.


MultIni4 helps you create multiple IO pages that come one after the other, just read its comments in the file itself.
In the onCustomPage function you can just not show the page (not call IO) if the last answer said you don't have to. Use StrCmp to compare the answer to something. StrCmp $4 "don't show" for example...


can someone show me an example of how to pass the data of the selected field to variables ?

in iniA.ini i have 2 fields

[Field 1]
Type=radioButton
text=Server Side Install
left=0
right=300
top=0
bottom=15
state=0

[Field 2]
Type=radioButton
text=Client Side Install
left=0
right=300
top=15
bottom=30
state=1

- If the user selects field 2, goto install dir selection page then copy files.
- If the user selects field 1. the program should prompt another dialog [iniB.ini] asking for what type of server


[Field 1]
Type=radioButton
text=IIS
left=0
right=300
top=0
bottom=15
state=0

[Field 2]
Type=radioButton
text=Apache for windows
left=0
right=300
top=15
bottom=30
state=1

After that there will be a 3rd dialog asking for server path. iniC.ini

[Field 1]
Type=textbox
text=Root Folder
left=0
right=300
top=0
bottom=15

The last task is to copy the files and gather these user inputs to create setup.ini

[setup]
server_type =
root_folder =

Edited: iniB and iniC can be presented on the same page.
is there a feature that dynamically disable a textbox according to the selected radio button


I successfully created the dialogs using MultIni4. But i still have trouble with the rest. please give me a more detailed example. I am a newbie, but Im learning fast. Thanks:up: NSIS is the best! The more I use it, the more I like it.


Suggestion:

It would be better if someone could add a FAQ section for most requested features with examples.

If no one wants to do it, i will once i'm familiar enough with the program.


I have already created a FAQ...

This question is basically the same as this one. Please have a look at it, and if you still don't understand don't hesitate to ask again.


I saw that post yesterday when i did a search in the forums.:p

I don't understand how the radiobutton works, should i compare it to 1 to see if it's enabled? I have 2 radiobuttons on the same dialog they can't have the same name.:igor:

How do I go from iniA to iniC (skip iniB) base on the user's choice?

Thanks.


http://forums.winamp.com/showthread....hreadid=110274


what about the radiobuttons? how do i can it with a value. (NOTE: i have 2 of them on the same page)


It would be great if you guys could make the installoptions.nsi example in Modern UI folder (CVS) more advance. Include dialogs with radiobuttons and textboxes, not just a label. Plus the page skipping feature.

Actaully thats the only example NSIS lacks, there's an example for everything else why not make one for IO page skipping?;) I know I'm asking too much but I'm sure a lot of people will be benefited from this example.


From InstallOptions readme file:

State (optional) Specifies the state of the control. This is updated when the user closes the window, so you can read from it from NSIS. For edit texts and dir and file request boxes, this is the string that is specified. For radio button and check boxes, this can be '0' or '1' (for unchecked or checked).
I hope this answers your question.