This action allows you to automate the compilation of Delphi projects. FinalBuilder supports the following versions of Embarcadero/Codegear Delphi:
Set the compiler version you need from the "Compiler Version" section of the "Project" tab (see below.)
Many of the property pages for this action use properties which are identical to the properties in Delphi IDE. The properties on the Compiler, Linker, Directories and Version Info pages are described in the Delphi Help File. You may use FinalBuilder Variables in the Directories page but not on the Version Info page.
This action can also be used to maintain the version info for the selected Delphi project. When the AutoIncrement property (on the version info tab) is enabled, the version number properties (Major,Minor, Release and Build) are persisted to a file (yourproject.fbd) after the action runs (and after the AfterAction script event). These values will be restored when the project is loaded. If the action fails, the values are not persisted. This makes the AutoIncrement property function the same as it does in the Delphi IDE.
The options that are specific to FinalBuilder are provided on the Project property page, pictured above.
This is the path to the Delphi project, Delphi package or unit file you wish to compile. You must choose the .dpr or .dpk file for a project or package, not the .bdsproj/.dproj/.dof file (all of the latter are project settings files.)
The Delphi IDE maintains a file with the extension .dof, .bdsproj or .dproj with the project settings. Press this button to automatically populate all of the action's property pages with the settings from this file. You should do this when you first create the action. Once the settings are loaded, they will not be reloaded into FinalBuilder from the Delphi IDE unless you press this button again, or check the "Use Settings From Project File" option (see below.)
Check this option to have the manifest regenerated during the compile.
This is the path to the icon that will be used as the main icon for the application. When you select a project file, FinalBuilder checks to see if there is a resource file with the same name as the project (ie the default one generated by the Delphi IDE). If the file exists, FinalBuilder extracts the MAINICON resource and saves it in the same folder as mainicon.ico. This is needed for the resource compiler.
Choose the version of Delphi to use to compile.
Check this property (which is only enabled when the compiler version is D5) to work around the problem where the project compiles fine but no executable is produced. The will save having to work around it manually by adding a second action.
Check this property to use the EurekaLog compiler instead of Delphi. See the Using EurekaLog topic for more information.
Choose the platform to compile for. This selects the correct global library paths for the selected platform, and adds the platform output path. Only available for compiler greater than XE2.
Checking this box will cause FinalBuilder to ignore any settings made on the action's property pages, and instead always use the values from the project settings file. You can choose to apply this option only to certain groups of settings, any combination of Packages, Compiler, Linker, Directories and/or Version Info can be loaded from settings. Checking this option disables the relevant property page(s).
Check this option to have the project file update with the version information used in the compile.
Select which configuration of the project you want to build. (Delphi 2007 only)
Tells the command line compiler to rebuild all files in the project. This is checked by default. When not checked, the command line compiler will only recompile modified units.
When checked, FinalBuilder will regenerate the project resource file before compiling the project. It calls the Embarcadero Resource Compiler to do this. You should leave this option checked if you use version info in your project and change any version numbers between builds
Enable this option to update the package source with changes when the action runs.
This is the same as the equivalent option in the Delphi project options.
Select the starting directory for the action.
Enter any extra command line options to be passed to dcc32.exe.
You need write access to the directory you are compiling the project from, as FinalBuilder generates temporary .cfg file for the command line compiler to use.
When turned on the Delphi compiler will perform code optimisations. Examples of these are (but not limited to):
All optimization operations are considered "safe" and don't alter the meaning of the program.
When turned on stack frames are created for every procedure and function in the source code for the project. When turned off stack frames are only generated when they are required.
When turned on the compiler will generate floating point code which will protect again the FDIV flaw in Pentium processors. Some operating systems correct this issue system wide and therefore don't require this fix (Win95, WinNT, and higher).
Determines the maximum padding that can be used to align a field. Each setting has some extra side affects these are listed below;
Variables and typed constants are all aligned with optimal access in mind.
Determines whether the compiler generates code which checks the assignment of strings. This is only used by Delphi 2010 and earlier compilers.
Determines whether code will be placed inline or left as an external call. This option is only a suggestion to the compiler as some situations mean that code can not be made inline. The possible values for this options are;
On: The routine will be compiled as inline if the inline directive is used.
Off: The routine will not be compiled as inline, even if the inline directive is used.
Auto: The same as On. Added to this is that if the routine is 32 bytes or less in size it will also be compiled as inline.
When turned on the compiler will enforce type checking for short strings passed as variable parameters. This is really only important for Delphi code which uses short strings.
When turned on the compiler generates code in which all components of an AND and OR statement are evaluated. Therefore guarenteeing calling of each component on the statement.
When off the compiler generates code which short circuits the statements. This means when evaluated in left to right order, if the result of the statement has become apparent no more of the statement is called.
Determines whether Delphi Extended Syntax should be used or not. When enabled the following Delphi features are able to be used;
Determines how the compiler should treat the @ operator and compatibility of pointer types.
Controls the compilers interpretation of variable parameter strings. When disabled variable string parameters are not treated differently. When enabled variable string parameters are treated as open strings. Regardless of this setting OpenString identifier can be used at any-time.
Determines how the compiler interprets string types. When On this options will mean the compiler will use AnsiString, when off the compiler will use ShortString.
Controls as to whether the compiler will allow typed contants to be altered or not. When turned On constants are able to be assigned to. When Off constants are not able to be assigned to. In some older code this option is required for the code to compile, for newer projects its suggested to not enable this option.
Whether to keep the config generated for the compiler or not. When On this option means the action will keep the cfg file and rename it to <ProjectFile>.used or dcc32.used. The file will be placed in the same directory as the project file being compiled.
Enables or disabled the generation of documentation generation from XML documentation tags with in the source code.
When enabled all array and string indices are validated to be within the bounds of the variable. In addition all scalar and subrange variables are validated to within their bounds. Having this option enabled adds extra checking to the generated code, and therefore will execute slower.
When enabled all I/O procedures have code generated which checks for non-zero return results. When a non-zero return result is detected an EInOutError exception is raised.
When enabled the arithmetic operations of +, -, *, Abs, Sqr, Succ, Pred, Inc, and Dec are have results checked for overflowing the returned variables type. Having this option enabled adds extra checking to the generated code, and therefore will execute slower.
When enabled the compiler is signalled to generate debugging information which is maps object-code to address into the source text file. This information is stored in the unit file with unit object code. This does not affect the speed of generated code, however does cause the compilation process to take up more memory.
When enabled the compiler generates local symbol information. Local symbol information is the name and type of all local variables and constants in the a module. This information is stored in the unit file with unit object code. This does not affect the speed of generated code, however does cause the compilation process to take up more memory.
When enabled the compiler generates symbol reference information. This information is typically used by the Code Editor and the Project manager. Some other tools may require it.
In combination with the Reference Info option, this option simply limits the reference information generated to just when identifiers are defined. If turned off, information would be generated for when identifiers are defined and when they are referenced.
Determines whether the compiler should include assert generation or not. When turned On assert calls will be included into the generated code. When turned Off assert calls will be omitted from the generated code.
When turned on the compiler will switch to using the debug DCU path specified on the Directories tab.
Whether to report hints into the build log or not.
Whether to report warnings into the build log or not.
Set if hints should be treated as an error and cause the compilation to fail if found.
Set if warnings should be treat as an error and cause the compilation to fail if found.
If the compiler reports "implicitly imported into package" and this option is turned off then an error will be reported.
Linker can generate a map file which contains general segment information about the generated code. The options available are:
Tells the linker to to flag the applications .exe as a console mode application.
Tells the linker to generate a line-number table for each procedure for mapping source code to object-code.
Instructs the linker to place C++ style debug information into a separate TDS file with the same name as the project.
Instructs the linker to generate remote debug symbol information for generated code. These are .rsm files.
The description string for the generated executable. Only usable for executable and DLL generation.
Instructs the linker as to the initial committed size of the stack.
Instructs the linker as to the maximum reserved size of the stack.
Instructs the linker as to the default load address for an application, DLL, or package.
The directory to which generated binaries will be written. Whether this be a dll, dcu, or exe.
The directory to which all dcu files will be written. If left blank dcu files will be generated in the same location as the unit they relate to.
If enabled the compiler will be given the search path from the project settings of the supplied project. The search path supplied in this options dialog will be ignored.
The search path to give to the compiler. The search path is where the compiler will look for source files.
If enabled the compiler will be given the global library path instead of the library path specified in the action.
The paths in which the compiler will look for libraries.
The directory to which generated package files are written to.
The directory to which all dcp files will be written. If left blank then the global DCP output directory will be used.
If enabled the conditional defines listed in the project file will be used instead of the ones listed in the dialog.
The conditional defines which should be passed to the compiler. Each one should be separated with a semi-colon.
A list of name/value pairs that define unit name aliases. Useful for backwards compatibility and where units have either change name, or been merged into one larger unit.
Specify namespaces to automatically apply to uses clauses for unit names which belong to that scope. E.g. Specify FMX, so that FMX.Graphics can be specified as Graphics.
Instructs the compiler what it is meant to generate as output.
Generates the package and associated .dcu and .dcp files.
Generates C object files for linking with C programs.
Generates C++ object files for linking with C++ programs.
Includes the namespace information into the generated files.
Includes all symbol information into the generated files.
Adds the generation of .hpp files.
Generates all header files, package import files, and package static library files.
The directory that .bpi files are written.
The directory that .obj and .lib files are written.
The directory that .hpp files are written.
Whether the linker should include version information into the generated binary or not.
Whether to use a Property Set for the version information of the generated binary or not.
The major version number of the generated binary. Can be set directly, or taken from a supplied Property Set.
The minor version number of the generated binary. Can be set directly, or taken from a supplied Property Set.
The release version number of the generated binary. Can be set directly, or taken from a supplied Property Set.
The build version number of the generated binary. Can be set directly, or taken from a supplied Property Set.
Whether to automatically increase the build number portion of the Module Version Number or not. If the number is increased the value is updated into the action. The project will need to be saved so that this persists for the next execution.
Whether to use the version number specified by the Project Settings File or not. This is useful if the project file is to keep in lock step with releases from your build machine. Update the version numbers in the project settings and then use these to release the build.
A binary can be marked with a number of different attributes. These are namely;
Indicates that the project was compiled in debug mode.
Indicates that the version is a variation of the standard release.
Indicates that the project includes a dynamic-link library.
Indicates the version is not the commercially released product.
Indicates that the version was not built using standard release procedures
The primary language of the binary.
Determines the default text character set that is used in ANSI source code. This is used by the compiler in working out how to parse multibyte character strings. This typically includes;
The locale ID which relates to the code page selected.
All the version information which will be attached to the binary when its generated. These can either be sourced from the Project Settings, Property Set, or set directly in the dialog.
Where to update the version information to have the date of the action run included into the version information as the compile date.
Whether to automatically update the FileVersion string based on the FileVersion major, minor, release, and build numbers.
Whether to update the project settings file with the version information used in the compile. Project Settings will have to be checked back into version control if the project is under source control.
Whether to link the ProductVersion file in the version information to the FileVersion field. Typically used if the product has only one version number across all parts of the build.
Whether to automatically update the ProductVersion string based on the ProductVersion major, minor, release, and build numbers.
Writes the VersionInfo string to the Version Info Keys key in the Project Settings file.
The executable to use for compiling resources.
When the RC.EXE and Other options are chosen for the resource compiler their location on disk is required.
The way in which parameters should be passed to the resource compiler. The %1% variable will be replaced at runtime with the resource script file name.
Whether to include project resources in the resource compile or not.
Whether to include the manifest file in the compilation of the resources. If this option is selected the location of the manifest file to include needs to be supplied.
The location of the VCL styles to include in the resource compile. Leave blank if there are none to include.