Page 1 of 1

Compiler variables & Include script command

Posted: Sun Jun 25, 2006 2:27 pm
by andrejzr
Hello,

I would like to use compiler varible in the include script command. It looks like the parameter for the script file doesn't support compiler variables. Is this a "known issue" that will be resolved in the future, or is there any special reason, why this can not be implemented?

I know that I can use "Compiler variable if" commands, but this requires updates of the master script each time I add another configuration variant.

Regards
Andrej

Posted: Sun Jun 25, 2006 3:02 pm
by MichaelNesmith
Hi!

Include scripts are a project level setting - they are added to your project tree as seen in the Project Explorer window. It is not possible to conditionalize their inclusion.

You should try to account for the variances in your project in the included script, or conditionally choose the pre-built include scripts that you are using with the Include Script command.

What exactly prompted you to try to include different scripts? Maybe I can provide further guidance for finding a better solution.

Posted: Mon Jun 26, 2006 12:40 am
by andrejzr
Hi,

I have a product, that can be installed under different names. Idea that I had is to have a master script with all the logic, have a compiler variable that defines the product variant and based on this variable a proper script with is included with information about product names for example.

Adding a new variant of the product requres just creation of the new include script (with new product name) and running the master script with new valu for compiler variable.

That was my intention. What would be your prefered way of achieving this?

Posted: Mon Jun 26, 2006 1:36 am
by Gareth Owen
I did it the other way arround.

I have a master script that does all of the installation, But I have set up a number of different projects, for the different applications.

Each project has its own application name and GUID codes, but all of them just run the master script.

I do not know if this will help you, but it works for us. :)

Posted: Mon Jun 26, 2006 5:39 pm
by MichaelNesmith
Well, why not just dereference compiler variables directly?

For example, if your product name is X, store it in a compiler variable called PRODUCTNAME.

Then in your single, unified script, use #PRODUCTNAME# everywhere you would normally say X.

When building from the command line, just say "PRODUCTNAME=X".

I think you must not have been aware that compiler variables could be used in this way - please let me know if this solves your complex situation.