|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Aug 2008
Posts: 19
|
Hi everyone,
Purpose of my Installeur I'm preparing an installer with the ability to install an application available in 2 versions. Principles to follow For each version, I have dedicated files, and dedicated settings (different network card settings for example). I'd like to offer the user to have 2 choices only: - Install type Development - Install type Operation_only For each choice, I wrote 2 dedicated sections, for which file path, settings and targets are different. So, I have 4 sections: - Section Development_File - Section Development_Settings - Section Operation_File - Section Operation_Settings So, for Install type Development, the user should only see the sections Development_File & Development_Settings, the 2 others should be hidden. He can select or unselect 0, 1 or both of these 2 components. Based on the same idea, if he chooses Install type Operation_only, the 2 Development related sections will be hidden and he will be able to choose among the 2 Operation sections available only. Problem I spent quite some time now, reading the NSIS documentations, examples with install type, or using radio butrtons with slection/unselection macros, but I can't fin a way to properly do this. Either I see all 4 sections, or I have no selection options available... I tried also with SectionIn, but I can't figure out how it works... So, if one of you have some remarks, comments and especially some help to provide me, I would be very happy! Thanks in advance, within |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,840
|
There's no need to hide sections, you can simply make the Op sections and Dev sections mutually exclusive.
1. Make two sectiongroups. One containing Dev_File and Dev_Settinsg, and one containing Op_File and Op_Settings. http://nsis.sourceforge.net/Docs/Chapter4.html#4.6.1.5 2. In .onInit, enable the default sections and disable the others (use the macros in Sections.nsh). Also, set a variable to store this selection state (Op or Dev). 3. In .onSelChange: code: That's all. |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Aug 2008
Posts: 19
|
MSG, that looks promising.
I will look how to make section groups. I am not sure there are real "default" sections, just Dev or Ope. If you mean, making one of these 2 as default, I guess it means it is the "on startup" selection of install type... Thanks for your help! Will come back when done. |
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,840
|
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Aug 2008
Posts: 19
|
I am back with some feedback as promised.
Method worked perfectly as you mentioned, MSG. To summarize, I did add the 2 sebsections: code: I defined a varibale to follow: code: and in on.Init function I added the following lines at the end to have the Dev sections to be selected by default: code: |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|