Compile/Link Tab

InstallShield 2019 » Settings Dialog Box

The Compile/Link tab on the Settings dialog box lets you specify settings for compiling your script. These settings apply to Setup.rul and any files included in it.

Compile/Link Tab Settings

Setting

Description

Preprocessor Defines

Specify any preprocessor definitions. Use the following format, with no spaces before or after equal signs or commas:

MYVARIABLE1=123,MYVARIABLE2=456

You can test those types of constants in your script by using #if and #ifdef statements that control the flow of the script. For example, type MYVARIABLE in this box, and the code in the following #ifdef loop will be executed:

#ifdef MYVARIABLE

    // Commands

#endif

After you add or change a preprocessor definition in this box, you must compile your script for the addition or change to take effect.

Note • Many Windows API functions are declared in the header file ISRTWindows.h, which is automatically included when you include Ifx.h in your script. You can prevent the automatic definition of Windows APIs by placing the preprocessor constant ISINCLUDE_NO_WINAPI_H in the Preprocessor Defines box on the Compile/Link tab of the Settings dialog box.

Include Paths

Specify which directories InstallShield should search for source files that have been included in the main installation’s InstallScript code through #include statements.

Use the following guidelines for this setting:

To specify multiple paths, separate each one with a comma.
You can use any valid path variable in a path.
Do not use quotation marks to specify a path.
Since the current directory is not necessarily constant, do not use the dot (.) operator in the paths that you specify. Instead, use an explicit path variable such as <ISProjectFolder> to indicate a known folder location.
When InstallShield passes the values that you have specified in this setting to Compile.exe, InstallShield automatically parses the specified string to determine comma-delimited paths. In addition, InstallShield handles path variable replacement, surrounds the paths with quotation marks, and then passes each path separately to Compile.exe using multiple /i switches. However, if you separate the paths with semicolons instead of commas, InstallShield considers the specified paths as a single path, and it passes the single path string to the compiler as is. In this case, no path variable substitution or quotation mark additions occurs.

Note • InstallShield searches any paths that you specify before it searches the standard InstallShield paths. Thus, if two include files share the same name but one include file is in one of your custom include paths and one is in a standard InstallShield include path, InstallShield links to the include file in the custom include path, not the version in the standard InstallShield include path.

For more information, see #include.

Max Warnings

Specifies the maximum number of warning messages that are displayed.

Maximum Errors

Specifies the maximum number of error messages that are displayed.

Warning Level

Specifies the types of warnings that are displayed in the Output window.

None—Displays no warning messages.
Level 1—Displays any system warning message that InstallShield is unable to handle.
Level 2—Displays Level 1 messages, plus a message if string length exceeds the limit.
Level 3 (Default)—Displays all warning messages.

For more information, see Defining Constants Through the Compiler.

Compile before build

To compile your InstallScript automatically every time that you build a release, select this check box. Note the following behavior that occurs if you select this check box:

If you select the Refresh Build command on the Build menu, your script is recompiled only if changes have been made to it since the last compile.
If you select the Build <name of release> command on the Build menu, your script is recompiled, even if no changes have been made to it since the last compile.

Note • The compiled script is not copied to the disk images folder before the build begins because the build process automatically copies the compiled script to the folder during the build. If the script fails to compile because of compiler errors, the build does not continue.

Generate inline debugging information

If this check box is selected, debugging information is included in the compiled script file so a debugging information file is not needed.

If you want to debug an installation that includes an object that you have created, and you want to obtain debugging information from the object, you must have compiled the object's script with this check box selected.

Caution • Selecting this check box makes the compiled script larger and the installation slower, and it makes it easier for others to reverse engineer your code. Therefore, in most cases, it should not be used when you are creating your final installation for distribution to end users.

Warnings as errors

If warnings should be treated as errors (that is, if the installation should not be run if there were any compile warnings when the InstallScript was compiled), select this check box.

Additional Library Paths

Project • For InstallScript and InstallScript Object projects, InstallShield automatically searches for script libraries in the following directories at compile time:

<ISProductFolder>\Script\Ifx\Lib
<ISProductFolder>\Script\Isrt\Lib

For Basic MSI and InstallScript MSI projects, InstallShield automatically searches for script libraries in the following directories at compile time:

<ISProductFolder>\Script\Iswi\Lib
<ISProductFolder>\Script\Isrt\Lib

The aforementioned directories contain the libraries that define the built-in InstallScript functions and that are listed in the Libraries (.obl) box by default.

If you want InstallShield to search any additional directories that contain your own script libraries, you can specify the directory path in the Additional Library Paths box.

Use the following guidelines for this setting:

To specify multiple paths, separate each one with a comma.
You can use any valid path variable in a path.
Do not use quotation marks to specify a path.
Since the current directory is not necessarily constant, do not use the dot (.) operator in the paths that you specify. Instead, use an explicit path variable such as <ISProjectFolder> to indicate a known folder location.
When InstallShield passes the values that you have specified in this setting to Compile.exe, InstallShield automatically parses the specified string to determine comma-delimited paths. In addition, InstallShield handles path variable replacement, surrounds the paths with quotation marks, and then passes each path separately to Compile.exe using multiple /libpath switches. However, if you separate the paths with semicolons instead of commas, InstallShield considers the specified paths as a single path, and it passes the single path string to the compiler as is. In this case, no path variable substitution or quotation mark additions occurs.

Note • InstallShield searches any paths that you specify before it searches the standard InstallShield paths. Thus, if two libraries share the same name but one library is in one of your custom library paths and one is in a standard InstallShield library path, InstallShield links to the library in the custom library path, not the version in the standard InstallShield library path.

Libraries (.obl)

Specify the names of script libraries (compiled .obl files) to which you want the compiler to link. Separate each file with a comma.

Note • It is not necessary to include the path of each library, as long as either the path is identified explicitly in the Additional Library Paths box or the path is one of the built-in library paths that InstallShield automatically searches at compile time.

Project • The following built-in libraries are listed by default for InstallScript projects: ifx.obl,isrt.obl.

The following built-in libraries are listed by default for Basic MSI and InstallScript MSI projects: iswi.obl,isrt.obl.

The following built-in libraries are listed by default for InstallScript Object projects: ifxobject.obl,isrt.obl.

Additional built-in libraries may also be listed, depending on which views in InstallShield you use when you are developing your project.

See Also