Injecting Product Version + Revision Code via CLI Compile

Got a problem you cannot solve? Try here.
Post Reply
H4nd0
Posts: 92
Joined: Thu Nov 09, 2006 8:16 am
Location: Sydney, AU
Contact:

Injecting Product Version + Revision Code via CLI Compile

Post 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
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
H4nd0
Posts: 92
Joined: Thu Nov 09, 2006 8:16 am
Location: Sydney, AU
Contact:

Post 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?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
H4nd0
Posts: 92
Joined: Thu Nov 09, 2006 8:16 am
Location: Sydney, AU
Contact:

Post by H4nd0 »

Thanks Michael ... do you have an example of how to use CMDLINE and split up the name/var pairs?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Post Reply