Archive: Multiple components pages?


Multiple components pages?
This seems like the sort of question that must have been asked a thousand times, but I can't seem to find the answer. I'm completely new to NSIS, and I'm hoping someone can quickly point me in the right direction. What's the best way to create multiple components pages, each showing different components? I've read that this involves a show/hide routine, but I can't find an example script anywhere.

Also, is it possible to establish mutual exclusivity across different components pages? (If I have one components page offering users the choice of whether an element should appear in A or B, and a second components page determining whether an element should appear in B or C, I want B to be unselectable on the second page if it's already been chosen on the first. Does that make sense?)

Many thanks in advance for your help!


I think I should have been more specific when I described my mutual exclusivity question. The installer I'm working on will be installing multiple configuration files for a PC game, each of which moves an element of the in-game heads-up display to a different part of the screen. Essentially it gives people the option to move their compass to the far left or the health bar to the far right, that sort of thing, depending on which files they select.

I want to have a separate components page for each HUD element, laying out several possible choices for its location from which the user can select one. But if on page one the user elects to move the compass to the center, I want the option to move the health bar to the center to be greyed out on page two, to prevent conflicts. This seems intuitively like something that should be possibile to do, but like I said I'm completely new to NSIS (though not to scripting in general) and I haven't found a good example to study. Thanks again for your consideration!


This example has two installations in one installer:
http://nsis.sourceforge.net/Two_inst..._one_installer

It doesn't have two Components pages, but you can work it out yourself from there.

Basically for the first Components and InstFiles page you will need to hide and unselect the second group of Sections (so that only the first group of Sections are shown).

-Stu


That's a great help--thanks so much for taking the time to respond. I wonder if you can point me in the direction of an example script demonstrating complex mutual exclusivity or mutual exclusivity among more than two components? All the examples I can find use only two, and while these have been very instructive, I haven't been able to apply the logic to a situation where only one of five or six choices should be selectable.


Okay, I've figured out exclusivity among multiple elements--it was so easy it took me until just now to realize how easy it was. But what about mutual exclusivity between certain elements across section groups? So if I'm using radio buttons, say, and I have

g1o1
g1o2
g1o3

g2o1
g2o2
g2o3

and I need g2o2 to be unselectable if g1o2 is selected?

Thanks in advance for your help. I may be trying to force NSIS to do something it's not really suited for, but as I said before, it seems intuitively like I should be able to get this to work.