Build Delphi Project

   

 

This action allows you to automate the compilation of Delphi projects. FinalBuilder supports the following versions of Embarcadero/Codegear Delphi:

 

Delphi 3, 4, 5, 6 & 7
Delphi 2005
Delphi 2006
Delphi 2007

 

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. Note that 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.

 

Delphi

 

The options that are specific to FinalBuilder are provided on the Project property page, pictured above.

 

Project File : This is the path to the Delphi project, Delphi package or unit file you wish to compile.  Note that 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.)

 

 

Load Settings From Project File : 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.)

 

 

Icon file : 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.

 

 

Compiler Version: Choose the version of Delphi to use to compile.

 

Work around Delphi 5 Compiler Bug :  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.

 

Use EurekaLog Compiler : Check this property to use the EurekaLog compiler instead of Delphi. See the Using EurekaLog topic for more information.

 

 

Use Settings from Project File :   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. Note that checking this option disables the relevant property page(s).

 

Project Config : (Delphi 2007 only) Select which configuration of the project you want to build.

 

 

Build All :  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.

 

Regenerate Resource :  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

 

Update Package Source : Enable this option to update the package source with changes when the action runs.

 

Build with runtime Packages : This is the same as the equivalent option in the Delphi project options.

 

Starting Dir : Select the starting directory for the action.

 

Extra Command Line Options : Enter any extra command line options to be passed to dcc32.exe.

 

 

NOTE:   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.

 

 

Scripting Info

 

The Action properties available via scripting are :

 

  property CompilerOpt : IDelphiCompilerOptions; // See the Compiler Options section below

  property ProjectFile : WideString;

   //version info stuff

  property IncludeVerInfo : WordBool;

  property AutoIncBuild : WordBool;

  property MajorVersion : integer;

  property MinorVersion : integer;

  property ReleaseVersion : integer;

  property BuildVersion : integer;

  property IsDebug : WordBool;

  property IsPreRelease : WordBool;

  property IsSpecial : WordBool;

  property IsPrivate : WordBool;

  property IsDLL  : WordBool;

  property Locale : integer;

  property CodePage : integer

  property VersionInfoKeys : WideString; // in the format :

 CompanyName=VSoft Technologies Pty Ltd

 FileDescription=FinalBuilder Core API

 FileVersion=0.0.1.541

 InternalName=FBCore10.bpl

 LegalCopyright=© 2000 - 2001 VSoft Technologies Pty Ltd

 LegalTrademarks=FinalBuilder™

 OriginalFilename=FBCore10.bpl

 ProductName=FinalBuilder™

 ProductVersion=1.0.0.0

 Comments=

 

  property BuildAll : WordBool;

  property CompilerVersion : integer; // D3 = 0, D4 = 1, D5 = 2, D6 = 3, D7 = 4, D2005 = 10, D2006 = 11, D2007 = 12

  property ExtraCommandline : WideString;;

  property IconFile : WideString;

  property RegenerateResource : WordBool;

  property WarningsAsError : WordBool;

  property HintsAsError : WordBool;

  property Packages : WideString

  property UsePackages : WordBool

 

Compiler Options

  property Optimisation : WordBool;

  property AlignFields : WordBool;

  property StackFrames : WordBool;

  property SafeDivide : WordBool;

  property VarStringChecks : WordBool;

  property BoolEval : WordBool

  property ExtendedSyntax : WordBool

  property TypedPointers : WordBool

  property OpenStrings : WordBool

  property HugeStrings : WordBool

  property AssignableConst : WordBool

  property RangeChecking : WordBool

  property IOChecking : WordBool

  property OverflowChecking : WordBool

  property DebugInfo : WordBool

  property LocalSymbols : WordBool

  property ReferenceInfo : WordBool

  property DefinitionsOnly : WordBool

  property Assertions : WordBool

  property UseDebugDCU : WordBool

  property ShowHints : WordBool

  property ShowWarnings : WordBool

  property Mapfile : integer // valid values are :   mfNone, mfSegments, mfPublics, mfDetailed

  property ConsoleApp : WordBool

  property IncludeTD32 : WordBool

  property IncludeRemoteSymbols : WordBool

  property LinkerOutput : integer; // valid values are loGenerateDCU, loGenerateCOBJ, loGenerateCPlusObj

  property IncludeNamespaces : WordBool

  property ExportAllSymbols : WordBool

  property MinStackSize : Cardinal

  property MaxStackSize : Cardinal

  property ImageBase : Cardinal

  property ExeDescription : WideString

  property OutputDir : WideString

  property UnitOutputDir : WideString

  property BPLOutputDir : WideString

  property DCPOutputDir : WideString

  property Conditionals : WideString

  property SearchPath : WideString

  property LibraryPath : WideString

  property UnitAliases : WideString

 

Action methods :

  procedure SetVersionInfoKey(name : WideString; Value : WideString);

  function GetVersionInfoKey(name : WideString) : WideString;