IDL Build Properties Page

build_properties_page.gif

The IDL Build Properties page controls a project's build properties. To set a project's run properties, refer to IDL Project Properties Page.

To display the IDL Build Properties page, expand the IDL Project Properties list item on the Project Properties dialog and select IDL Build Properties.

Property
Description
Default

Build in a separate IDL session

If this property is selected, IDL will execute all the project build commands in a IDL_IDLBRIDGE process (a child of the main IDL process).

This option allows you to build your project in a "clean" IDL session without needing to use the .RESET_SESSION executive command in your active IDL session. (In fact, if this property is selected, the value of the Execute .RESET_SESSION before building project property is ignored.)

See Solving Build Order Problems for a complete discussion of these options.

See Project Build Concepts for details.

Unselected

Execute .RESET_SESSION before building project

If this property is selected and the Build in a separate IDL session property is not selected, the .RESET_SESSION executive command is run in the main IDL process at the start of the project build.

Unselected

Use default IDL project build process

If this property is selected, the standard project build process is used. The standard build process can be modified by using the properties collected under this radio button. This build method is adequate for many projects. See Project Build Concepts for more information.

You must either select this property or the Use a custom build command property.

Selected

Restore save files from referenced projects

If this property is selected, all SAVE files that are created by referenced projects are restored.

This property is enabled only when the Use default IDL project build process property is selected.

Selected

Execute IDL Command before compiling project files

If this property is selected, the contents of the text box will be executed as an IDL command before the project files are compiled.

For example, your project requires data generated by another IDL program as input, and this data must be further processed by IDL before it can be used. You could create the batch file preprocessing that calls the other program and contains the IDL data processing calls. You could then run this batch file before the project build by entering the following text:

@preprocessing 

Unselected

Compile Project Files

If this property is selected, the build process will compile all the PRO files in the project and restore project SAVE files that contain IDL routines.

Click Configure Project Compile Order to open the Compile Order Page. This property page allows you to control the order in which the project files are compiled.

Selected

Execute RESOLVE_ALL

If this property is selected, the IDL command RESOLVE_ALL, /CONTINUE_ON_ERROR will be executed as part of the IDL build process.

See RESOLVE_ALL for more information.

Selected

Execute IDL Command after compiling project files

If this property is selected, the contents of the text box will be executed as an IDL command after the project files are compiled.

For example, you might create a batch file named postprocessing to move or rename the compiled files. You could then run this batch file after the project build by entering the following text:

@postprocessing 

Unselected

Use a custom build command

If this property is selected, the text in the associated text box will be executed as an IDL command, and will serve as the project build code. The build command is often an IDL procedure that contains the additional build code.

This build method gives you complete control over the build process, but requires that you make sure all required routines are compiled. See Using a Custom Build Command for a complete discussion.

You may select either Use a custom build command or Use default IDL project build process.

Unselected

Create a save file

If this property is selected, an IDL SAVE file is created to hold the result of the build process. When this property is selected, the License the save file property is also enabled.

The name of the resulting SAVE file is displayed in the associated text box. By default, the SAVE file is created in the project directory (represented by a dot in the path), the base name of the file is the same as the project, and the extension is.sav. Click Browse to modify the default location or filename.

Selected

License the save file

If you purchased an IDL Developer's Kit license from ITT Visual Information Solutions, you can select this property and the Create a save file property to create a licensed SAVE file. (See Embedded Licensing for additional details.)

This option is disabled if you do not have a Developer's Kit license.

Unselected

Create build script in editor...

If you click this button, a project build script is generated and inserted inside a new Workbench editor. The content of this script is based upon the build properties selected on the IDL Build Properties page.

See Create Build Script in Editor for a detailed explanation of what is included in the project build script.

N/A

Create Build Script in Editor

The IDL Build Properties page contains the button Create build script in editor.... Clicking this button generates a project build script that is inserted inside a new Workbench editor. The content of the script is based upon the build properties selected on the IDL Build Properties page.

The generated file is a batch file that contains IDL commands. These commands are the same as those used by the project build process. For example, if the Compile Project Files property is not selected, the resulting build script will not contain any commands to compile or restore the project files.

This feature uses the build project property values that are currently applied. If any of the property values on the IDL Build Properties page are modifed, the button is disabled until you click Apply, or reopen the page after clicking OK or Cancel.

The newly-created batch file is placed in a Workbench editor as an unsaved file. You must save it to preserve it after the IDL Workbench exits. At this point, you can use the batch file however you see fit. For example, you could use it as a complete IDL batch file, or you could utilize parts of it to construct your own custom project build command. For more information about IDL batch files, refer to Overview of Batch Files. See Use a custom build command for more information about that property.

A generated build script consists of multiple sections, with each corresponding to a different build property. Consider the following example build script:

; Restore save files from referenced projects 
RESTORE, 'C:\IDLworkspace\Project\newproject.sav' 
 
; Execute the Pre-compile command 
print, 'Pre Compile Command' 
 
; Compile project files 
.COMPILE 'C:\a.pro' 
.COMPILE 'C:\IDLworkspace\Default\new_file1.pro' 
 
; Restore file C:\IDLworkspace\Default\usefulstuff.sav 
_IDLDT$_BUILD$_TEMP_SAVEFILE=OBJ_NEW('IDL_Savefile', $ 
   'C:\IDLworkspace\Default\usefulstuff.sav') 
IF (N_ELEMENTS(_IDLDT$_BUILD$_TEMP_SAVEFILE->Names(/PROCEDURE)), $ 
   + N_ELEMENTS(_IDLDT$_BUILD$_TEMP_SAVEFILE->Names(/FUNCTION)), $ 
   GT 0) THEN RESTORE, 'C:\IDLworkspace\Default\usefulstuff.sav' 
OBJ_DESTROY, _IDLDT$_BUILD$_TEMP_SAVEFILE 
DELVAR, _IDLDT$_BUILD$_TEMP_SAVEFILE 
 
; Resolve all routines 
RESOLVE_ALL, /CONTINUE_ON_ERROR 
 
; Execute the post-compile command 
print, 'Post Compile Command' 
 
; Create the project save file 
SAVE, /ROUTINES, FILENAME='C:\IDLworkspace\Default\default.sav', $ 
   /VERBOSE, /EMBEDDED 

The following table describes the sections of the preceeding build script:

Section
Description

Restore save files from referenced projects

The block includes a RESTORE command for each project reference. The parameter to the RESTORE command will be the full path to the build process output save file for the project in question.

Execute the Pre-compile command

This command is taken from the Execute IDL Command before compiling project files property on the IDL Build Properties page.

Compile project files

Each IDL source file has a .COMPILE command with a full filepath parameter.

Each IDL SAVE file has a code block that:

  • Creates an IDL_Savefile object
  • Restores the SAVE file only if it contains IDL routines
  • Destroys the IDL_Savefile object and variable name

The order in which the files are compiled or restored is determined by the Compile Order Page.

Resolve all routines

Adds the RESOLVE_ALL, /CONTINUE_ON_ERROR command to the script.

Execute the post-compile command

This command is taken from the Execute IDL Command after compiling project files property on the IDL Build Properties page.

Create the project save file

The SAVE command is used to create the SAVE file, where:

  • The ROUTINES keyword specifies that IDL routines are being compiled and saved.
  • The FILENAME keyword is set to the full path of the output SAVE file.
  • The VERBOSE keyword specifies that IDL should print messages generated by the Save operation.
  • The EMBEDDED keyword is set if the License the save file property is selected.

A few more notes about generated build scripts: