![]() |
INSTDIR vs Component
Hi All -
Does anyone know how to have the choice of the installation directory for each component I got in the code? Is there an easy way to proceed using the standard Page or do I have to create a custom one? |
Adding some precision:
How can I have in a Directory Page several lines corresponding of the install path of the different components selected in the Component Page? |
There's at least two simple ways you could do this... both require you to put multiple Directory pages behind the Components page.
The following is assuming you're using the Modern UI. It's a bit untested, but should be fine. PHP Code:
Another method, where you wouldn't require multiple directory variables, would be to put the actual file installation/operation instructions in the Directory pages' Post functions. This is less desirable for various reasons - mostly the log display won't be right. If you don't care about that, though, it might be easier to work with as all the code corresponding to a particular directory is right there in the directory handling functions. -------------------------------------------------- Lastly, you could make a custom page with multiple directory fields. This would look cleaner (having a user go through 5 directory pages, for example, would be a bit ick), but also require much more work (think hiding fields if the components aren't selected, still have to store multiple directory variables, etc.) |
To specifically answer your second post : yes, you'd have to create a custom page.
I've done one with two directories myself, and it's not impossible, but it's not supersimple either :) The most limiting factor is dialog real-estate. You'd need a bigger dialog if you want a whole bunch of directory fields. That, or put up with a relatively ugly page. |
| All times are GMT. The time now is 04:44. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.