Build Robot Configurations

19 Feb 2004 13:38

See Also
Wiki Page

Build Robot

Development Environment

Build XML document

Package XML document

Configuration XML Document

Configuration Overrides Document

Please refer to more information regarding configurations.

The configuration overrides XML document aka "configuration map" specifies the various attributes of VC++ projects.  This document is stored in build/configmap.xml by default but its location can be specified in the build options document.

Placing information in this file is optional and in most cases is not necessary.   You need to add entries to this file if your project strays from the standard project settings listed below, or, say, you want to build your component with Win32 Release MinSize instead of MinDependency.


Multiple Project Types in one Build-Doc Document

This document delineates between VC++ and Java projects.  However, it is possible to build Java and VC++ projects at the same time.  Specify all of the configurations in the build-options document and add <Configuration> elements to all of the <Build> elements in order to associate configuration names with build tasks.


Deriving Makefile Targets and Script Parameters from Configuration Names

The configuration map document is handy for avoiding redundant <Build> elements in the Build-Doc document.  Without configuration mapping, the <Build> elements be identical except for the <Configuration>, <Targets>, and <Parameters> elements.

The toolkit provides a makefile infrastructure for building Java projects.  Two of the most common makefile targets are alldebug (debug builds) and all (release builds). The makefiles are described further in the Development Environment documentation.

alldebug and/or all can be specified via <Configuration> elements in the build-options document.  By default these configuration names are passed directly to makefiles as a makefile target.

Alternatively, the configuration map document can map configurations specified in the build-options document to actual makefile targets.  When the build robot determines that it needs to build a project using a makefile, it looks to see if <Targets> exists in the <Build> element of the Build-Doc document.  If not, the configuration name is used as the makefile target.

The configuration mapping file also allows script parameters to be specified for each configuration, via <Parameters>.


Standard VC++ and vs.NET Project Settings

The build robot assumes that all projects use standard settings.  The standard settings are, for the most part, the defaults when creating a project via the Project Wizard.  If a project doesn't follow these standards, it must be listed in the configuration document described above.

vs.NET SLN files allow you to accomplish similar functionality to the configuration mapping file.  For example, for a particular "meta-configuration" name, you can specify which configuration is actually built for a particular project (e.g., vcproj file).  It is recommended that you use the SLN mapping features as much as possible before resorting to the configuration mapping features in the build robot.

Targets

  • The project's target has exactly the same name as its (DSP) file, minus the extension
    • Strings.dsp builds Strings.exe
    • Globals.dsp builds Globals.dll

Resource

  • The resource (.rc) file has the same as the name as the project (DSP) file
    • n_foo.dsp's resource file is n_foo.rc
  • The resource header file is named resource.h

Configurations

  • Standard configuration names:
    • Win32 Debug
    • Win32 Unicode Debug
    • Win32 Release
    • Win32 Release Symbols
    • Win32 Release MinSize
    • Win32 Release MinDependency
    • Win32 Unicode Release
    • Win32 Unicode Release Symbols
    • Win32 Unicode Release MinSize
    • Win32 Unicode Release MinDependency
  • If a project doesn't have Unicode, Symbols, MinSize, or MinDependency, that's OK.   The build robot locates the appropriate project.

Directories

  • "Intermediate" and "output" directories point to the same location
  • Output directory is located in a subdirectory of the project file's directory
  • Configuration Name Directory
    Win32 Debug Debug
    Win32 Unicode Debug DebugU
    Win32 Release Release
    Win32 Release MinSize ReleaseMinSize
    Win32 Release MinDependency ReleaseMinDependency
    Win32 Unicode Release ReleaseU
    Win32 Unicode Release MinSize ReleaseUMinSize
    Win32 Unicode Release MinDependency ReleaseUMinDependency