Page 1 of 1

Injecting Product Version + Revision Code via CLI Compile

Posted: Fri Nov 17, 2006 9:44 am
by H4nd0
I want to be able to inject a new product version and force the regeneration of the revision code when compiling via the CLI.

Is this possible? Or is there an environment variable that can be overriden?

TIA,

James

Posted: Fri Nov 17, 2006 9:51 am
by MichaelNesmith
James,

The CLI build tool has a parameter that will generate a new revision code for you upon command line build.

As for getting a new product code, you can take care of this as well - just use a compiler variable for that field, and when building from the command line, provide a new GUID for that variable as a command line parameter for the CLI build tool.

Posted: Wed Nov 22, 2006 8:34 am
by H4nd0
Not revision code.

I want to be able to pass in our product when we build.

For example:

miabuild.exe ... VERSION=2.0.1234

So I don't have to go back and edit the project everytime we have an internal build revision number.

Also ... how do you actually access command line variables from within MSI script?

Posted: Wed Nov 22, 2006 11:20 am
by MichaelNesmith
So I think I already answered that - use compiler variables in your product version field.

You can read the command line from MSIcode using the CMDLINE pre-defined variable.

Posted: Fri Nov 24, 2006 4:06 am
by H4nd0
Thanks Michael ... do you have an example of how to use CMDLINE and split up the name/var pairs?

Posted: Fri Nov 24, 2006 7:54 am
by MichaelNesmith
Check the pre-built update script, which parses the command line. Basically, you use the If command with the Contains parameter, or the Parse String command.