Compiler variables & Include script command

Got a problem you cannot solve? Try here.
andrejzr
Posts: 68
Joined: Sun Jun 25, 2006 9:17 am

Compiler variables & Include script command

Postby andrejzr » Sun Jun 25, 2006 2:27 pm

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

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Sun Jun 25, 2006 3:02 pm

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.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

andrejzr
Posts: 68
Joined: Sun Jun 25, 2006 9:17 am

Postby andrejzr » Mon Jun 26, 2006 12:40 am

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?

Gareth Owen
Posts: 149
Joined: Fri Oct 21, 2005 8:42 am
Location: UK

Postby Gareth Owen » Mon Jun 26, 2006 1:36 am

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. :)

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Mon Jun 26, 2006 5:39 pm

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.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 239 guests