Is it possible to change the name of the feature at runtime or at compile time?
I tried using variables, and at first it seemd that it worked. I defined two variables, $GROUP1$ and $GROUP2$. The components/features were defined in the script as:
Define Component: $GROUP1$
Define Component: $GROUP1$\\Program files
Define Component: $GROUP1$\\Samples
Define Component: $GROUP1$\\Help files
Define Component: $GROUP2$
Define Component: $GROUP2$\\Program files
Define Component: $GROUP2$\\Samples
Define Component: $GROUP2$\\Help files
By setting GROUP1 and GROUP2 variables at the beginning of the script, everything seemd to work - the list of components was properly displayed, etc.
But the command
Get Component $GROUP1$ Selection State into Variable SELECTED
did not work. If i changed the $GROUP1$ with the actual variable name, then it returned the correct value and correct files were installed, defined in the code block checking the SELECTED variable.
Is this a bug in "Get Component Selection State" command, or variables can not be used that way?
If variables can not be used, what is alternative to make the Component names configurable? It does not need to be configurable at runtime, but I would like to have one script that handles multiple product installations, that differ only in the product name. The install procedure is identical otherwise.
Renaming of Features at runtime
Another idea, that might be solution: maybe I should use compiler variables instead of normal variables. Would this be better?
Related to this, is the Project options the only way, where the compiler variables can be defined, and its values set?
Can be compiler variables defined in the script itself?
Can be compiler variables set in the script, or only in project options and command line?
Related to this, is the Project options the only way, where the compiler variables can be defined, and its values set?
Can be compiler variables defined in the script itself?
Can be compiler variables set in the script, or only in project options and command line?
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Hi Andrej,
I'm not sure what the problem with Get Component State was...it does resolve variables before checking the component's state.
However, the correct implementation for you is using compiler variables. Its a lot easier and cleaner that way! Its exactly what compiler variables were designed for, in fact.
The Project Options window is the only place where compiler variables may be defined. Once defined, you may set their values in the IDE, or when building from the command line using the form "VARIABLE=VALUE".
I'm not sure what the problem with Get Component State was...it does resolve variables before checking the component's state.
However, the correct implementation for you is using compiler variables. Its a lot easier and cleaner that way! Its exactly what compiler variables were designed for, in fact.
The Project Options window is the only place where compiler variables may be defined. Once defined, you may set their values in the IDE, or when building from the command line using the form "VARIABLE=VALUE".
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 166 guests