Build Configurations and Configuration Settings

As I mentioned earlier and you can see from the images on the previous pages, the Project Manager has a new Build Configurations node for every project (that is, in cases where you are working with a project group with multiple projects active). This node replaces the rather cumbersome separ ate window used to manage the build configuration in Delphi 2007. Using the node and its sub-nodes you can change the current build configuration with a double click, and execute an actual build directly on the given node.

By selecting either a specific build configuration or the main node, you can also add a new configuration. Depending on the item selected when you do the operation you'll create a main configuration or a sub-configuration. To be more precise, the node you pick determines the base configuration, since even the predefined configurations inherit their core settings from the Base configuration (which is the core configuration from which Debug and Release inherit). What do I mean by "inherit settings" from a configuration? Delphi 2009 has a new configuration management system, in which you can apply a setting to a specific configuration (like Debug or Release) or set an option that the two configurations don't specify but inherit from the Base configuration. In a specific configuration you can see the specific value and the one inherited from a base configuration in two consecutive lines, see if they match and change either one or the other (affecting also the specific configuration). This is achieved by expanding each configuration setting line by selecting the plus sign on the left. This is what you can get by expanding the three Runtime errors lines in the Delphi Compiler/Compiling page:

Modifying the setting in the Base configuration will affect also any other configuration which inherits from that setting.

In the Project Manager you can also select a build configuration and export its settings to an "option set" file. This is like saving a configuration template or skeleton to an external file, and the configuration will be linked to the file.

This makes it easy to move those same settings to a new or another existing project, as you can use the Project Manager (using the Apply Options Set local menu item while on a build configuration) or the Project Options dialog box (using the Apply Options button) to import a set of configuration options. In both cases Delphi opens up the Apply Option Set dialog box, in which you can pick a file and choose whether to keep the external configura tion file linked (so that a change in the file will be reflected in the projects using it) or simply merge the current settings using some priority rules:

Once you have created an external option set on a file, you can edit it from any project referring to it, using the Edit local menu of the Project Manager pane. This opens up the an editor containing a subset of the pages of the Project Options dialog box, as shown below:

The .OPTSET file is an XML file with a format similar to the .DPROJ format, again based on the MSBUILD XML format, and an OptionSet project type. In the specific example you can find in the ProjManagerTest folder, the Pro-jManagerTestOptionsSet.optset file has the following content:

<Project xmlns="http://.../msbuild/2003"> <PropertyGroup>

<DCC_RunTimeTypeInfo>true</DCC_RunTimeTypeInfo> </PropertyGroup> <ProjectExtensions>


</Borland.Personality> <Borland.ProjectType>OptionSet</Borland.ProjectType> <BorlandProject><Delphi.Personality/></BorlandProject> </ProjectExtensions> </Project>

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


  • petra
    What does the delphi option set save?
    8 months ago

Post a comment