Installshield12 command line mode compilation Project Summary-Emma friendship sponsorship repost

Source: Internet
Author: User

Original post address:

Http://blog.csdn.net/emma_he/archive/2010/05/24/5620723.aspx

 

 

Compile and generate the installation package in command line mode, which saves the trouble of opening InstallShield IDE (which is very slow ~), Especially when the number of projects is large, the number of files to be modified is small, and the number of files to be updated is high.

1. The help document of is12 clearly describes how to compile the project using the command line method.

Using iscmdbld.exe to build a release from the command line use iscmdbld.exe to compile a release in the command line.

Iscmdbld.exe has many command line parameters:

Parameter
Description
 
-A <product configuration>
This parameter specifies the product configuration for the release. if it does not exist, it is created. although this parameter is not required, you should include it if you are including the parameter for the release name.

This parameter identifies the compiled productconfiguration, which corresponds to the product configuration in the release view in the IDE.
 
-B <build location>
The fully qualified path to the folder where you want the output folders and files to be placed. UNC paths are acceptable. the built installation's files will be located in the disk images \ disk1 subfolder of the location that you specify.

This parameter is optional. If it is left unspecified, the build will place the build package and files in the directory specified in the file locations Tab Of the Options dialog box.

Enclose long file names in quotation marks.

This parameter identifies the location of the compiled installation package, but note that this path does not directly put the installation package, but corresponds to a series of folders in productconfiguration, with the same structure as the release path of IDE.
 
-C <release configuration>
This parameter is specific to Windows Installer projects. it allows you to specify whether your release is compressed into one file or remains uncompressed in multiple files. the valid arguments for this parameter are comp and uncomp. to specify that your release be compressed into one file, use the comp argument. if you do not want your release compressed, use the uncomp argument.

This parameter is not applicable in installscript projects and is ignored. for basic MSI and installscript MSI projects, the parameter is optional.

If the parameter is omitted for a release that already exists, the configuration is based on what was specified in the InstallShield interface. If the parameter is omitted for a new release, the files remain uncompressed.

This parameter indicates whether to compress the generated installation package
 
-D
Use this parameter to provide a Preprocessor define as if it has been specified in the product configuration "Preprocessor defines" property. This parameter can be specified multiple times, one per Preprocessor define. For example:

Iscmdbld.exe-D variablename = Value

This parameter identifies a pre-edit command, which is equivalent to the "Preprocessor defines" attribute in the productconfiguration of the release view. A pre-compiled constant is set here, in the script of the project, you can use the # If # endif statement to determine the pre-edit command and make corresponding judgments.
 
-E <Y/n>
For Windows Installer-based projects, this parameter specifies whether you want to create a setup.exe along with your installation. Specify-e y to build setup.exe or-e n to just create an installation.

This parameter is used in a Windows Installer-based project to identify whether to generate an EXE or only generate an installation information.

For Merge Module projects, the meaning of-E is different from Windows Installer-based projects. specifying-e n will cause the merge module to be built and then copied to the merge modules folder. specifying-e y will cause the Merge Module to only be built but not copied to the merge modules folder.
 
-F <release flags>
Use this parameter to specify any release flags that you wocould like to include in your release. Separate multiple flags with commas.

This parameter is equivalent to the "Release flags" parameter in the "productconfiguration" in the "Release View". This parameter is used together with "Release flags" in the feature. You can choose to compile a feature with the same release flag, to compile different versions, you do not need to create another project.
 
-I <. ini file path>
Instead of passing all of your parameters on the command line, you can include them all in an initialization (. INI) file and call that file from the command line. for more information, see passing command-line parameters in. INI file.

Absolute and relative paths are acceptable.

Enclose long file names in quotation marks.
 
-L
Use this parameter to override a PATH variable as if it had been specified in the test value column of the PATH variables view. this parameter can be specified multiple times, one per PATH variable override. for example:

Iscmdbld.exe-l variablename = "C: \ path"
 
-M <. Cub File Name>
Allows you to validate the built. MSI package.
 
-N
Specify this parameter if you do not want setup. rul compiled as part of the build process.

Note: If you are building from the command line and specifying. INI file with the build settings, you can specify the following in the [project] section of. INI file, instead of adding the-n command line build flag:

[Project]

Compilescript = No

Like the command-line build flag, this ensures that setup. rul is not compiled as part of the build process.
 
-P <project location>
Pass the path to the project (. ISM) file. this path can be fully qualified, relative, or just the file name. if only the project file name is passed, the file is retrieved relative to the current working directory. for example:

Iscmdbld.exe-P "C: \ My InstallShield 12 projects \ myproject1 \ myproject1.ism"

UNC paths are also acceptable. This is the only required parameter.

Enclose long file names in quotation marks.

This parameter is the only required parameter to identify the project to be compiled.

-Q1
Builds only the Windows Installer tables for your release. if you have not built this installation already, a new. MSI file is created, but no files are added to your installation. if you have built your installation already,. MSI file is updated when all the tables are built, but, again no files are transferred. ideally, this option is to be used to test the user interface of your installation.

-Q2
Builds the Windows Installer tables and refreshes files. this option rebuilds your. MSI file and updates the Files table, including any new or changed files in your installation. changed files are updated only if the size or time stamp differs from the copy already stored ded In the build. references to deleted files are removed from the installation, but the file remains in the build location. this type of build can be run only after a complete build has been completed MED, and it works only when the media is an uncompressed network image.

-Q3
Compiles only setup. rul and streams setup. Reflect into the binary table of the. MSI package, if one was previusly built.

This parameter does not upgrade the project. if your project was created with InstallShield developer 8 or earlier, you shoshould upgrade it to the latest version of InstallShield before using-Q3. for example, use-u to upgrade.
 
-R <release Name>
The release name as specified in the release wizard. you can use an existing release name or create a new one. although this parameter is not required, you should include it if you are including the flag for product deployments.

This parameter identifies the release version, release1, and release2 in the product configuration.
 
-S
This parameter allows you to build your release in silent mode. Silent builds are useful if you want to run the build without displaying any errors or warning messages.

This parameter is optional.

This parameter indicates that silent compilation does not display any compilation information.
 
-U
This parameter allows you to upgrade-but not build-your release. You can use this parameter to upgrade an installation project that you created Using InstallShield-Windows Installer Edition version 2.03 or earlier.
 
-W
This parameter treats warnings that occur during the build process as errors. Each warning increments the error count by one.

This parameter identifies warnings as errors.
 
-X
If you want the build to stop when it encounters an error, use the-x parameter. if you want the build to stop when it encounters a warning, use this parameter in conjunction with the-W parameter.

This parameter indicates that compilation stops when an error occurs.
 

A typical installation batch file, testis. bat

Echo this is a test Install Shield command line file
Set build = "D: \ Program Files \ Macrovision \ is12 \ System \ iscmdbld.exe"
Set package1 =-P "G: \ vault_iagea \ packingproject \ Application \ CANOPEN \ windows \ windowscanopen32 \ windowscanopen32.ism"
Set location =-B "G: \ is12 \ release"
% Build % package1 % LOCATION %-C comp-a "canopen1"-R "CANOPEN"
% Build % package1 % LOCATION %-C comp-a "build2"-R "release1"
% Build % package1 % LOCATION %-a "build2"-S
Pause

2.some limitations of this method were also found during the use of iscmdbld.exe. Before using command line compilation, you must set the information of the installation package in the IDE, for example, the installation package name, it is best to set the installation package in the form of parameters that cannot be modified.

3. During each installation package upgrade, in addition to replacing the installation file, you must modify the version of the installation package. The version will be reflected in the installation package name, installation interface, and installation package attributes ...... The parameter-y of explain is directly modified, but this parameter is not found in 12. Therefore, another method is used, changing project properties from the command line, you can use the command line method to modify project properties. The iswiproject object of the main channel's automation interface has many attributes, methods, and collections (what is this) that can be modified, these include:

 

Ocean goddess Press: Project name

Productname
All
Read-write Property
Gets or sets the product name.
 

Ocean goddess Press: Product Version Number

Productversion
All
Read-write Property
Contains the version number of the project as a string.
 

The VBScript, framework. vbs

 

Goddess of the Sea Press: Use vbs to modify the project version number

Set oproject = Createobject ("iswiauto12.iswiproject ")

Oproject. openproject "G: \ vault_iagea \ packingproject \ Application \ CANOPEN \ windows \ windowscanopen32 \ windowscanopen32.ism"

'Perform queries and changes here

Oproject. productversion = "111.11.111"
Oproject. productname = "adv window can"

Oproject. saveproject 'necessary only if modifying the project

Oproject. closeproject

Modifying this method is equivalent to modifying IDE in the attribute bar.

4. the last problem is the combination of VBScript and batch files. When VBScript calls batch files, you only need to add the following to framework. vbs:Code:

Dim objshell
Set objshell = wscript. Createobject ("wscript. Shell ")
Ireturn = objshell. Run ("cmd.exe/C" "G: \ is12 \ testis. Bat", 1, true)

 

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/emma_he/archive/2010/05/24/5620723.aspx

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.