Command line and #define

Started by
hawrylmj
, Jun 20 2003 23:00

1 reply to this topic

hawrylmj

hawrylmj

Members

2 posts

Posted 20 June 2003 - 23:00

Is there anyway to specifiy a #define statement as an argument to the command line? I have a single Installshield project which builds Demo and Normal versions of a project. There is a #define in the code which designates that the script should do Demo stuff. I want to (from the command line), specify that #define so I can put it in a buildscript.

Taco Bell

Taco Bell

IS6 Expert

Moderators

1,281 posts

Posted 23 June 2003 - 13:40

Yes, you can. The help says the following on the subject:

QUOTE

Defining constants from the command line

You can define InstallShield Script Compiler constants from the command line, instead of in the script, using the /D option. For example, the command line statement COMPILE /DMAX_BUF=150 /DMAX_LENGTH=255 SETUP.RUL is equivalent to the define statements shown below:

#define MAX_BUF 150 #define MAX_LENGTH 255

The following restrictions apply when defining constants from the command line:

You can define only numeric constants from the command line.

If you define a constant at the command line that you defined with a #define statement in the script, you will generate an error.

If you define a constant at the command line that you defined as a variable in the script, the value of the constant will be lost at run time.