PDA

View Full Version : ISCmdBld.exe questions:



NewsArchive
12-07-2001, 01:00 AM
I have created 3 product configurations for our product: CD-ROM, Network and
Web (no guesses for what each one does).

For each product configuration, I have created a Default release type with
all the correct default settings.

We plan to use ISCmdBld.exe to build all 3 configuration types as part of
our overnight builds.

I want to simply change three things at build time:

* When calling ISCmdBld.exe, I want to override the the Product Version
stored in the ISM file.This is going to have to be dynamic, and it's likely
that our build scripts which will call ISCmdBld.exe will have access to 3
%environment% variables, each containing Major|Minor|Build. How do I tell
ISCmdBld.exe that I want the Product Version to be xx.xx.xxxx from the
command-line? I can see you can override it on the Release property sheet,
but that's not good enough as it has to be "dynamic" at build time.

* I have a PathVariable in the project which points at the various
component source files that will be built in to the MSI; how do I change
this on the ISCmdBld.exe command line to point to the location on the build
computer (the one stored in the .ISM is from my development computer)?

* Distribution. It's highly likely we will want to copy our builds on to
an official build Server, once they are done on the build computer. The
Distribute view property sheet seems to let me do this, but how do I make
use of it's functionality at build time? does it get called after a command
line build, and how can I specify where the build gets copied to.

Many thanks.

Alastair

NewsArchive
12-07-2001, 01:00 AM
1) The End User Automation layer has functionality to change this. Refer to
the help on this and let us know if you have any questions.

2) Make it an environment path variable. Then from your build script do a
set MYPATHVARIABLE="C:\MyPath"

3) I am no too familiar with this feature. If it does not run the
distribute step automatically after building the release it probably should,
or there should be some command line option to tell it to do that. Until
then you would have to do this distribute from your build script.

Regards
David Thornley

"Alastair Cameron" <alastair.cameron@blueyonder.co.uk> wrote in message
news:3c11006a@news.installshield.com...
> I have created 3 product configurations for our product: CD-ROM, Network
and
> Web (no guesses for what each one does).
>
> For each product configuration, I have created a Default release type with
> all the correct default settings.
>
> We plan to use ISCmdBld.exe to build all 3 configuration types as part of
> our overnight builds.
>
> I want to simply change three things at build time:
>
> * When calling ISCmdBld.exe, I want to override the the Product Version
> stored in the ISM file.This is going to have to be dynamic, and it's
likely
> that our build scripts which will call ISCmdBld.exe will have access to 3
> %environment% variables, each containing Major|Minor|Build. How do I tell
> ISCmdBld.exe that I want the Product Version to be xx.xx.xxxx from the
> command-line? I can see you can override it on the Release property sheet,
> but that's not good enough as it has to be "dynamic" at build time.
>
> * I have a PathVariable in the project which points at the various
> component source files that will be built in to the MSI; how do I change
> this on the ISCmdBld.exe command line to point to the location on the
build
> computer (the one stored in the .ISM is from my development computer)?
>
> * Distribution. It's highly likely we will want to copy our builds on
to
> an official build Server, once they are done on the build computer. The
> Distribute view property sheet seems to let me do this, but how do I make
> use of it's functionality at build time? does it get called after a
command
> line build, and how can I specify where the build gets copied to.
>
> Many thanks.
>
> Alastair
>
>
>

NewsArchive
12-07-2001, 01:00 AM
I can answer 2 out of 3 problems. The first thing would be to investigate
Ant (http://jakarta.apache.org/ant) as a build tool since it will assist in
both cases.

To change properties dynamically at build time, you need to export your ism
file beforehand to an isv file (text based). I dynamically change a registry
key at buildtime to include the build date. Here is what I do:

1.Within Installshield, i set the registry key I want to dynamically change
as REPLACEBUILDNUMBER (I just need some unique text to replace every time).
2. Save the ism file to isv (export to text based)
From here on can be done all automated:
3. Use Ant's REPLACE task to search the text file for REPLACEBUILDNUMBER and
it replaces it with the current build date.
4. Convert the isv file to an ism file (see VB code below)
5. Use ISCmdBld from command line to build the ISM file.
6. Use Ant's REPLACE task to switch the current build date back to
REPLACEBUILDNUMBER so it can be used again next time.
A complete dynamic build using ISCmdBld & Ant.

For your second problem of moving the build after completion, just use Ant's
move tasks to move the files whereever you need after they've been built.

--------------------------------------------------------------------
'VB Code to convert an .ISV file to an .ISM file

' ISMConverter command line
' c:\ismconverter fullPathToIsvFilename fullPathToIsmFilename
--------------------------------------------------------------------
Attribute VB_Name = "mdlMain"
Option Explicit

Public Sub Main()
' get command lines
Dim params() As String
params = Split(Command$(), " ")

' prepare file names
Dim isvFileToConvert As String
isvFileToConvert = params(0)
Dim ismFileOutput As String
ismFileOutput = params(1)

' prepare the InstallShield object that does the conversion
Dim installShieldObj As Object
Set installShieldObj = CreateObject("ISWiAutomation.ISWiProject")

' create the binary version of the text project file
installShieldObj.ImportProject ismFileOutput, isvFileToConvert

' cleanup
Set installShieldObj = Nothing
End
End Sub
--------------------------------------------------------------------

"Alastair Cameron" <alastair.cameron@blueyonder.co.uk> wrote in message
news:3c11006a@news.installshield.com...
> I have created 3 product configurations for our product: CD-ROM, Network
and
> Web (no guesses for what each one does).
>
> For each product configuration, I have created a Default release type with
> all the correct default settings.
>
> We plan to use ISCmdBld.exe to build all 3 configuration types as part of
> our overnight builds.
>
> I want to simply change three things at build time:
>
> * When calling ISCmdBld.exe, I want to override the the Product Version
> stored in the ISM file.This is going to have to be dynamic, and it's
likely
> that our build scripts which will call ISCmdBld.exe will have access to 3
> %environment% variables, each containing Major|Minor|Build. How do I tell
> ISCmdBld.exe that I want the Product Version to be xx.xx.xxxx from the
> command-line? I can see you can override it on the Release property sheet,
> but that's not good enough as it has to be "dynamic" at build time.
>
> * I have a PathVariable in the project which points at the various
> component source files that will be built in to the MSI; how do I change
> this on the ISCmdBld.exe command line to point to the location on the
build
> computer (the one stored in the .ISM is from my development computer)?
>
> * Distribution. It's highly likely we will want to copy our builds on
to
> an official build Server, once they are done on the build computer. The
> Distribute view property sheet seems to let me do this, but how do I make
> use of it's functionality at build time? does it get called after a
command
> line build, and how can I specify where the build gets copied to.
>
> Many thanks.
>
> Alastair
>
>
>

NewsArchive
12-07-2001, 01:00 AM
I can answer 2 out of 3 problems. The first thing would be to investigate
Ant (http://jakarta.apache.org/ant) as a build tool since it will assist in
both cases.

To change properties dynamically at build time, you need to export your ism
file beforehand to an isv file (text based). I dynamically change a registry
key at buildtime to include the build date. Here is what I do:

1.Within Installshield, i set the registry key I want to dynamically change
as REPLACEBUILDNUMBER (I just need some unique text to replace every time).
2. Save the ism file to isv (export to text based)
From here on can be done all automated:
3. Use Ant's REPLACE task to search the text file for REPLACEBUILDNUMBER and
it replaces it with the current build date.
4. Convert the isv file to an ism file (see VB code below)
5. Use ISCmdBld from command line to build the ISM file.
6. Use Ant's REPLACE task to switch the current build date back to
REPLACEBUILDNUMBER so it can be used again next time.
A complete dynamic build using ISCmdBld & Ant.

For your second problem of moving the build after completion, just use Ant's
move tasks to move the files whereever you need after they've been built.

--------------------------------------------------------------------
'VB Code to convert an .ISV file to an .ISM file

' ISMConverter command line
' c:\ismconverter fullPathToIsvFilename fullPathToIsmFilename
--------------------------------------------------------------------
Attribute VB_Name = "mdlMain"
Option Explicit

Public Sub Main()
' get command lines
Dim params() As String
params = Split(Command$(), " ")

' prepare file names
Dim isvFileToConvert As String
isvFileToConvert = params(0)
Dim ismFileOutput As String
ismFileOutput = params(1)

' prepare the InstallShield object that does the conversion
Dim installShieldObj As Object
Set installShieldObj = CreateObject("ISWiAutomation.ISWiProject")

' create the binary version of the text project file
installShieldObj.ImportProject ismFileOutput, isvFileToConvert

' cleanup
Set installShieldObj = Nothing
End
End Sub
--------------------------------------------------------------------

"Alastair Cameron" <alastair.cameron@blueyonder.co.uk> wrote in message
news:3c11006a@news.installshield.com...
> I have created 3 product configurations for our product: CD-ROM, Network
and
> Web (no guesses for what each one does).
>
> For each product configuration, I have created a Default release type with
> all the correct default settings.
>
> We plan to use ISCmdBld.exe to build all 3 configuration types as part of
> our overnight builds.
>
> I want to simply change three things at build time:
>
> * When calling ISCmdBld.exe, I want to override the the Product Version
> stored in the ISM file.This is going to have to be dynamic, and it's
likely
> that our build scripts which will call ISCmdBld.exe will have access to 3
> %environment% variables, each containing Major|Minor|Build. How do I tell
> ISCmdBld.exe that I want the Product Version to be xx.xx.xxxx from the
> command-line? I can see you can override it on the Release property sheet,
> but that's not good enough as it has to be "dynamic" at build time.
>
> * I have a PathVariable in the project which points at the various
> component source files that will be built in to the MSI; how do I change
> this on the ISCmdBld.exe command line to point to the location on the
build
> computer (the one stored in the .ISM is from my development computer)?
>
> * Distribution. It's highly likely we will want to copy our builds on
to
> an official build Server, once they are done on the build computer. The
> Distribute view property sheet seems to let me do this, but how do I make
> use of it's functionality at build time? does it get called after a
command
> line build, and how can I specify where the build gets copied to.
>
> Many thanks.
>
> Alastair
>
>
>

NewsArchive
12-07-2001, 01:00 AM
I can answer 2 out of 3 problems. The first thing would be to investigate
Ant (http://jakarta.apache.org/ant) as a build tool since it will assist in
both cases.

To change properties dynamically at build time, you need to export your ism
file beforehand to an isv file (text based). I dynamically change a registry
key at buildtime to include the build date. Here is what I do:

1.Within Installshield, i set the registry key I want to dynamically change
as REPLACEBUILDNUMBER (I just need some unique text to replace every time).
2. Save the ism file to isv (export to text based)
From here on can be done all automated:
3. Use Ant's REPLACE task to search the text file for REPLACEBUILDNUMBER and
it replaces it with the current build date.
4. Convert the isv file to an ism file (see VB code below)
5. Use ISCmdBld from command line to build the ISM file.
6. Use Ant's REPLACE task to switch the current build date back to
REPLACEBUILDNUMBER so it can be used again next time.
A complete dynamic build using ISCmdBld & Ant.

For your second problem of moving the build after completion, just use Ant's
move tasks to move the files whereever you need after they've been built.

--------------------------------------------------------------------
'VB Code to convert an .ISV file to an .ISM file

' ISMConverter command line
' c:\ismconverter fullPathToIsvFilename fullPathToIsmFilename
--------------------------------------------------------------------
Attribute VB_Name = "mdlMain"
Option Explicit

Public Sub Main()
' get command lines
Dim params() As String
params = Split(Command$(), " ")

' prepare file names
Dim isvFileToConvert As String
isvFileToConvert = params(0)
Dim ismFileOutput As String
ismFileOutput = params(1)

' prepare the InstallShield object that does the conversion
Dim installShieldObj As Object
Set installShieldObj = CreateObject("ISWiAutomation.ISWiProject")

' create the binary version of the text project file
installShieldObj.ImportProject ismFileOutput, isvFileToConvert

' cleanup
Set installShieldObj = Nothing
End
End Sub
--------------------------------------------------------------------

"Alastair Cameron" <alastair.cameron@blueyonder.co.uk> wrote in message
news:3c11006a@news.installshield.com...
> I have created 3 product configurations for our product: CD-ROM, Network
and
> Web (no guesses for what each one does).
>
> For each product configuration, I have created a Default release type with
> all the correct default settings.
>
> We plan to use ISCmdBld.exe to build all 3 configuration types as part of
> our overnight builds.
>
> I want to simply change three things at build time:
>
> * When calling ISCmdBld.exe, I want to override the the Product Version
> stored in the ISM file.This is going to have to be dynamic, and it's
likely
> that our build scripts which will call ISCmdBld.exe will have access to 3
> %environment% variables, each containing Major|Minor|Build. How do I tell
> ISCmdBld.exe that I want the Product Version to be xx.xx.xxxx from the
> command-line? I can see you can override it on the Release property sheet,
> but that's not good enough as it has to be "dynamic" at build time.
>
> * I have a PathVariable in the project which points at the various
> component source files that will be built in to the MSI; how do I change
> this on the ISCmdBld.exe command line to point to the location on the
build
> computer (the one stored in the .ISM is from my development computer)?
>
> * Distribution. It's highly likely we will want to copy our builds on
to
> an official build Server, once they are done on the build computer. The
> Distribute view property sheet seems to let me do this, but how do I make
> use of it's functionality at build time? does it get called after a
command
> line build, and how can I specify where the build gets copied to.
>
> Many thanks.
>
> Alastair
>
>
>