PDA

View Full Version : Building from the command line question



NewsArchive
12-11-2001, 01:00 AM
Our build process is completely automated including the InstallShield
portion. We use a batch file to call the compiler and builder. Currently,
I have to manually modify a string variable in IS to get my version number
set for our product. I want to make this automated as well. How can I pass
a string from a command line build of the installer into the script. /d
only works with numbers.

Thanks.

NewsArchive
12-11-2001, 01:00 AM
Steve Cannon wrote:

> We use a batch file to call the compiler and builder. Currently, I have to
> manually modify a string variable in IS to get my version number set for our
> product.

I don't know how to do it with defines, but it's trivial to write a script in
Perl (or any other language) to automatically update the version number.
I do that for the builds I do here as a sort of pre-build step.

If batch files were powerful enough, you could even do it like that. The most
I've ventured to do with batch files though was to change attributes on files.

--Jason

NewsArchive
12-12-2001, 01:00 AM
Steve,

In my build script, I add 2 lines to setup.ini like this:

echo [Configuration] >>setup.ini
echo BuildNumber=%1 >>setup.ini

where %1 is set to my build number.

In InstallShield, I then grab this number at runtime like this...

// Build Number
GetProfString(SRCDIR ^ SETUP_INI_FILE, "Configuration", "BuildNumber",
buildNumber);

where SETUP_INI_FILE is "setup.ini" - the result is placed in the String
buildNumber.

Cheers,

Tom

"Steve Cannon" <scannon@austin.rr.com> wrote in message
news:3c169d36@news.installshield.com...
> Our build process is completely automated including the InstallShield
> portion. We use a batch file to call the compiler and builder.
Currently,
> I have to manually modify a string variable in IS to get my version number
> set for our product. I want to make this automated as well. How can I
pass
> a string from a command line build of the installer into the script. /d
> only works with numbers.
>
> Thanks.
>
>