Navigation:  Actions > Embarcadero/Borland >

Make Delphi / C++Builder / RAD Studio Action

Previous pageReturn to chapter overviewNext page

The Make Delphi / C++Builder / RAD Studio custom actions create a step to build Embarcadero / Borland Delphi, C++Builder, RAD Studio, C#Builder, and Turbo projects and groups. It has been tested with Delphi, C++Builder, RAD Studio, Turbo, and Borland Developer Studio product versions 5 thru 23 (12.0) and may also work with other versions.

 

This action processes individual project or multi-project group files.  When building .dpr and .bpg files, it invokes the command-line compiler (dcc32.exe) for each project; for .bdsproj, .bdsgroup files (Delphi 8, 2005, and 2006), it invokes the Delphi/BDS command-line compiler (bds.exe) for the project or group specified, and for .dproj .cbproj, and .groupproj (Delphi 2007 and later) files, it invokes MSBuild (msbuild.exe) for the project or group specified.  All build output from the compiler is logged.  If any errors occur while building, the error output is logged and the action fails.

 

Notes:

If Visual Build doesn't detect that this product is installed when first run, this action will not be displayed (existing steps will still be displayed in the Step panes and will build normally).  To show all hidden actions, right-click in the Actions pane and choose Show Hidden.
See the Embarcadero sample for example of the Make Delphi and Make C++Builder actions.
Use the Make Delphi Prism action for building Delphi Prism projects and solutions.
This action uses the highest installed version of Delphi it can find.  To call another version when multiple versions are installed, specify the rsvars.bat path and/or Delphi/MSBuild executable in the override fields on the Options tab.

 

Project/Group Tab

 

Versions Tab

 

Properties Tab

 

Options Tab

 

Advanced Tab

 

Remote Tab

 

 

Version/Property Handling

For each project that is processed, if any values are specified on the Versions or Properties tabs, the following logic is performed before building the project:

 

Project files:

Versions/properties are added/updated in the project file.

 

Win32 Delphi projects:

If the Update DOF checkbox is checked, the .dof file is updated with any settings from the step, the Include Version Info setting is enabled, and the Auto-Increment flag is updated to match the step settings (enabled if the step is set to increment versions).  This step applies only for Delphi 7 and earlier.
If the project file does not contain a directive to include its .res file ({$R *.res} or {$R ProjectFile.res}), the reference is added.

 

Projects that reference or contain a ProjectFile.res file:

A custom RC file named <ProjectFile>.vrc in the project directory with a VERSIONINFO resource is created/updated if it differs from the values specified in the step.
If the associated <ProjectFile>.vres file doesn't exist or is older than the .vrc file, <ProjectFile>.vrc is compiled to <ProjectFile>.vres with the Borland resource compiler (BRCC32.exe).
If ProjectFile.res does not exist, does not contain a VERSIONINFO resource, or the VERSIONINFO resource information is not up-to-date, the file is created/updated with the VERSIONINFO resource from <ProjectFile>.vres.

 

.NET projects:

Versions/properties are added/updated in the project's AssemblyInfo file and/or .dpr/.dpk file.

 

These steps ensure that the compiled executable contains the version information specified by the user, since the Delphi command-line compiler ignores any version property settings made in the IDE, and will also result in subsequent builds in the IDE matching the version/property settings configured in the Make Delphi step.

 

 

Troubleshooting

File not found errors (i.e.: Sample.dpr(8) Fatal: File not found: 'abc.dcu', and other errors relating to missing files) can occur when building a Delphi project or group even though the same projects compile correctly within the IDE.  This is not due to issues with Visual Build, but rather with the Borland Delphi command-line compiler behavior.  When building projects from the IDE, the directories defined in Environment Options are used.  However when the command-line compiler (dcc32.exe) is invoked, these directory definitions are not used, and must be defined elsewhere.  See the following entries in the Delphi Help file for additional information:  Dcc32.exe, Dcc32.cfg, Compiler Directives, Directory Options.