PDA

View Full Version : Creating build via command line



sks2004
06-24-2005, 10:24 AM
Release type = web, compiled into one Setup.exe

When creating a build from the command line, it seems there isn't a method of setting the Optimize Size value to 'Yes' (true). Compression can be set via the -c COMP switch, but that doesn't help.

For a sample Web-release project, when I build via the IDE, and set Optimize Size value to 'Yes', the Setup.exe = 5400K.

For a sample Web-release project, when I build via the command line (IsCmdBld or IsSaBld), and set the -c COMP and -e y switches, the Setup.exe = 7400K.

RobertDickau
06-24-2005, 10:37 AM
For settings not exposed though iscmdbld, you can use the Automation interface to modify the project file before building.

sks2004
06-24-2005, 10:44 AM
I was playing with that earlier...and I have a question; How do you set things up for a non-existing Product Config/Release? It seems as if a Product Config and Release must exist, to be able to manipulate the settings.


Dim pProject As ISWiProject

Set pProject = New ISWiProject
pProject.OpenProject "c:\installshield_projects\Test_Setup\TY2005\Test_TY2005.ism", False

Dim pProdConfig As ISWiProductConfig

Dim pRelease As ISWiRelease
Set pRelease = pProdConfig.ISWiReleases.Item("release")
pRelease.Compressed = True
pRelease.OptimizeSize = True
pRelease.SetupEXE = True
pRelease.CacheWebDownload = True
pRelease.DelayMSIEngineReboot = True
pRelease.ReleaseFlags ("release")
pRelease.Build

pProject.SaveProject
pProject.CloseProject

MartinMarkevics
06-24-2005, 11:31 AM
The ISWIProject object has a AddProductConfig method and the ISWIProductConfig object has a AddRelease method that you can use to create new Product Configurations\Releases respectively.

sks2004
06-24-2005, 12:29 PM
Can you post a some sample VB/VBScript code?

MartinMarkevics
06-24-2005, 12:35 PM
Something like the following should work (note: I didn't try the code below so there could be some typos, but you get the idea):

Dim pProject As ISWiProject
Set pProject = New ISWiProject

pProject.OpenProject "c:\installshield_projects\Test_Setup\TY2005\Test_TY2005.ism", False

Dim pProdConfig As ISWiProductConfig
Set pProdConfig = pProject.AddProductConfig("YourProductConfigName")

Dim pRelease As ISWiRelease
Set pRelease = pProdConfig .AddRelease("YourReleaseName")

' Do some stuff with pRelease here

sks2004
06-24-2005, 01:04 PM
Yes, that got me going! Thank you.

One more question; how can I set the Setup Prerequisites Location?
I don't see this listed within...although almost everything seems to be.

sks2004
06-24-2005, 02:47 PM
There appears to be a problem with the Automation interface. When I set methods to certain values from within VB or VBScript, these values are not set.


Dim pProject
Dim pProdConfig
Dim pRelease

set pProject = CreateObject("IswiAuto11.ISWiProject")
'change the library name from IswiAuto11 to SAAuto11.

'Open the Project, as ReadOnly-False...make the Project writeable
pProject.OpenProject "C:\InstallShield_Projects\Test_Setup\Test_TY2005\Test_TY2005.ism", False

'SUse the new 'Product Configuration'
Set pProdConfig = pProject.AddProductConfig("Test Configuration4")

'Set the name of the new 'Release'
Set pRelease = pProdConfig.AddRelease("Test Release4")


pRelease.Compressed = True
pRelease.OptimizeSize = True
pRelease.SetupEXE = True
pRelease.CacheWebDownload = True
pRelease.DelayMSIEngineReboot = True
pRelease.WinNTMSIEngineURL = "http://www.installengine.com/Msiengine20"
pRelease.MSIEngineLocation = eelWeb
pRelease.MsiEngineVersion = eev20
pRelease.InstallScriptEngineLocation = eelSetupExe
pRelease.CacheWebDownload = True
pRelease.ReleaseFlags = "release"
pRelease.SuppressLauncherWarning = True
pRelease.Build

pProject.SaveProject
pProject.CloseProject

Set pProject=Nothing
When I launch the IDE and view the Release's property values:

MSIEngineLocation=Copy from source, not Download from web!
MsiEngineVersion=1.2, not 2.0!
InstallScriptEngineLocation=copy from source, not within Setup.exe!