IDE Changes for XE2

From RAD Studio XE2
Jump to: navigation, search

Go Up to What's New in Delphi and C++Builder XE2

Cross-Platform Application Development

You use the IDE to perform basic configuration of cross-platform applications, as follows:

  • Delphi 64-bit Windows cross-platform application:
    Add and activate the 64-bit Windows target platform to your project. Then create a remote profile that describes the target platform, and assign the remote profile to the target platform in the Project Manager.
  • Delphi or C++Builder Mac OS X cross-platform application:
    Add and activate the OS X target platform to your project. Then create a remote profile that describes the target platform, and assign the remote profile to the target platform in the Project Manager.

For more information, see:

Cross-Platform Wizards

FireMonkey wizards:

  • You can create an application that uses the FireMonkey framework by using either of these commands:
  • Other FireMonkey wizards:
    • File > New > Other > Delphi (or C++Builder) Projects > Delphi (or C++Builder) Files > FireMonkey Form (available only from a FireMonkey application)

Platform-agnostic wizards (that is, wizards that can be used with any platform or framework):

The New Console Application wizard creates C++ console applications that can use either FireMonkey or VCL.
  • File > New > Other > Delphi (or C++Builder) Projects > Delphi (or C++Builder) Files > Data Module
  • File > New > Other > Delphi (or C++Builder) Projects > Delphi (or C++Builder) Files > Thread Object
  • Component > New Component, a redesign of New VCL Component Wizard that now gives you the choice of the FireMonkey platform

Project Manager Changes for Cross-Platform Applications

The following changes have been made to the Project Manager related to cross-platform application development:


Target Platforms Node Added to Project Manager

In the Project Manager, a Target Platforms node exists for any project type that potentially supports cross-platform applications.

When you create a new project, only the native platform (32-bit Windows) is listed as a target platform (the name of the active platform is boldfaced in the Project Manager). You add cross-platform targets for your application by using the new Target Platforms node. If your application has only targets the default Win32 platform, you do not need to make any changes in the Target Platforms node.

How to make the current project a cross-platform project

See more details.

  1. Add a target platform (right-click the Target Platforms node and click Add Platform):
  2. On the Select Platform dialog box, select the platform you want to add, and click OK:
    You can add the following platforms:
    • 32-bit Windows, the native platform and the default platform
    • 64-bit Windows
    • OS X (Mac)
    If you enable the checkbox for Make the selected platform active, skip the next step (activating a platform for the current project).
    Here is a fully populated Target Platforms node, with the three platforms: Win64, OS X, and Win32:
  3. To use a specific platform, you need to activate your chosen target platform: either double-click the platform (such as OS X) or right-click the platform and select Activate. The active platform is shown in boldface.
  4. Next steps:

New Output Folder in Project Manager

The new ProjOutput.png Output folder lists the files produced by the build, such as DCU and EXE files. You can display this virtual folder by right-clicking the Project Manager and selecting the new context menu command Show Project Output.

Platform-Specific Files are Displayed when the Target Platform is Selected

  • When the current target platform is Mac OS X, files for the Mac are enabled in the Project Manager, and files for Windows are grayed.
  • When the current target platform is Win32 or Win64, files for Windows are enabled, and files for Mac OS X are grayed.

For more information and platform-specific files in the Project Manager, see, Compiling and Building Cross-Platform Applications.

For a table of suppported file extensions, see File Extensions of Files Generated by RAD Studio.

New Platform Assistant (paserver) Required for Cross-Platform Applications

The Platform Assistant (paserver.exe on Windows, paserver on Mac OS X) is the new remote application server that enables cross-platform application development.

For more information, see Installing and Running the Platform Assistant on the Target Platform.

New Deployment Manager Useful for Deploying Applications that Use the Platform Assistant

The Deployment Manager provides a rich user interface for deploying cross-platform projects as well as native Win32 projects. In order to use the Deployment Manager, you must be using the Platform Assistant, which is used to coordinate cross-platform development and debugging.

Tools Options Changes

New Page: Remote Profiles

The new Remote Profiles page enables you to create and work with remote profiles. A remote profile is a set of properties that describe a target platform. Cross-platform applications use remote profiles for connecting to the target platform.

New Page: Project Upgrading

The new Project Upgrading page allows you to set options for opening existing projects in the IDE. See also Importing or Migrating Existing Projects into XE2.

New Option: HPP Output Directory (Delphi Library Page)

The HPP output directory setting applies to all Delphi projects that you create; it specifies the directory for .hpp files produced at compile time when C++ output is enabled. This new option is similar to the existing C/C++ .hpp output directory option on the Output - C/C++ page of Project Options, except that the Project Options setting applies only to the current project.

Project Options Changes

The following changes have been made in the Compiler-Related Project Options.

New: Target Options Appear at the Top of Compiler-Related Project Options Pages

Target Options have replaced the Build Configuration options field, located at the top of Project Options pages such as Delphi Compiler and C++ Compiler:


The new Target drop-down list includes each available configuration along with the target platforms associated with it.

Here is the Target list expanded for an application that targets only the default Win32 platforms:


The Target list includes all the currently supported and enabled platforms (all the targets that are currently enabled in the Target Platforms node of the Project Manager). And for each platform, the Target field lists all the supported configurations, including the following default configurations for each platform:

  • 32-bit Windows
    • All platforms
    • All Configurations
    • Release
    • Debug
  • 64-bit Windows
    • All platforms
    • All Configurations
    • Release
    • Debug
  • OS X
    • All platforms
    • All Configurations
    • Release
    • Debug

Your own custom build configurations are also listed. You can create build configurations and option sets for your multiplatform projects in the same way you do for native Win32 projects. For details, see Build Configurations Overview and Option Sets - Creating, Applying, Editing, and Deleting.

For information about setting options for cross-platform applications, see Activating the Target Platform and the Remote Profile. For general information, see Setting Project Options.

New Page: Application Appearance and Changes to the Application Page

The Title and Help File options have moved from the Application page to the new Project > Options > Application Appearance page, which sets custom styles and the default style for your application. The Icon option is still on the Application page. Both pages have Target Options that specify the target platform and build configuration for the settings.

Changes to Version Info Page

Help has been added about the Module version number that describes how to obtain version information about an application in three different ways: from Windows Explorer, or programmatically for a native Win32 application or for an emulated Win32 process running in a Win64 environment.

New -CE Option (Execution character set) on C++ Compiler Advanced Page

For C++ projects, the -CE option has been added to the Project > Options > C++ Compiler Advanced page to specify the Execution character set. The -CE (Character execution set) option is related to the -CP (Code Page) option.

For more information about the -CE and -CP options and their relationship, see C++ Compiler Advanced.

New Option on Project Properties: Run the C++ Compiler in a Separate Process

Project > Options > Project Properties now supports the option Run C++ compiler in a separate process. Enabling this option starts a separate compilation process, outside of the IDE, when you perform a Make or Build. This option is useful for compiling large projects that yield out-of-memory compiler errors when the compiler is run in-process (using the Make or Build command).

New Option: 'Generate static package library (.tlib)' on C++ Linker Page

For C++ packages, you can now specify Generate static package library (.lib) on the Project > Options > C++ Linker page.

Generating static package libraries with the C++ Linker

When the Generate static package library (.lib) option is set (this is the default), every Build or Make command does the following:

  1. Compiles any package by using the parameters required to produce a statically linkable package as well as a dynamic package.
  2. Produces a static library using TLIB.EXE, the Library Manager.

For more detailed information about this option, see C++ Linker.

Note: The recommended strategy for generating a static package library is to set the Generate static package library (.lib) option on the C++ Linker page. Although using the -Gl option for ILINK32 on the command line is supported, it does not perform both of the steps listed here, and might not produce reliable static package libraries.

Default Checkbox Removed from Project Options Pages

The Default checkbox that appeared at the lower edge of many Project Options pages has been removed from the product. If you want to specify options as the default for multiple projects, the suggested alternative is to use option sets instead.

API Implementation of Remote Profiles

The PlatformAPI unit contains interfaces for implementing your own remote profiles and remote profile manager:

  • IOTARemoteProfile
  • IOTARemoteProfileServices

The interfaces are self-documenting with comments in the code.

Template Libraries Restored

The Tools > Template Libraries command has been restored to the IDE.

Template libraries are XML files with the file extension .bdstemplatelib. You can create template libraries and use them as the basis for creating future projects.

For more information, see the following topics:

Code Editor Changes

Code Folding Added for XML Doc Comments

Code folding has been implemented for XML Doc comments (comments demarcated by a triple-slash, ///) in Delphi source code.

  • To fold the comments delimited by ///, right-click the Code Editor and select Fold > Doc Comments.
    All XML Doc comments disappear, leaving only code and other types of comments in the window.
  • To display all the XML Doc comments again, right-click the Code Editor and select Unfold > All.
  • To display only the one XML Doc comment that is nearest to the current location, right-click the Code Editor and select Unfold > Nearest.

In RAD Studio, database and DataSnap source files contain XML Doc comments. For examples, see the source files for Data.DBXCommon and Datasnap.DSCommonServer. Code Editor Context Menu contains a description of the various types of code blocks that you can fold and unfold.

For more information about XML Doc and XML Doc comments, see:

'Open File at Cursor' Now Uses Unit Scopes

Unit scopes are now used to help locate the correct file. Every project has a set of default unit scopes that the IDE can use to search for units if the unqualified unit name is not found. For example, if you right-click on "Controls.pas" and select Open File at Cursor from the context menu, the IDE searches for the unit-scoped name first (VCL.Controls.pas) and then looks for the unscoped unit name (Controls.pas). Then the IDE takes all the unit scopes defined for the project and in turn prepends each unit scope to the unit name, until either the file is found or there are no more unit scopes. For example, Rtl.Controls.pas, Vcl.Controls.pas, and so on.

For more information, see Unit Scope Names.

See Also