Adding a Custom Build Tool
Use the Build Tools dialog box to add custom tools that will be executed during a project build. You can also associate a custom build tool with specific files. This topic describes both of these operations, as well as disassociating a build tool from a file.
For example, you might add a perl tool on the Build Tools dialog box. After you use the Object Inspector to associate the file myfile.pl with the perl custom build tool, the perl tool is executed on myfile.pl whenever you build the project.
Note: You cannot associate a custom build tool with a .pas file (these files are handled only by the Delphi compiler).
To create a custom build tool
- Choose Tools > Build Tools.
- Click New. A new tool is added to the Tools list, with the name CustomTool<n>.
- In the Name field, enter a more specific name for the tool. For example, if you are adding perl as a build tool, you would enter
- (Optional) In Description, enter a description of the tool and its purpose.
- In Commands, enter the commands that the tool is to execute. For example,
perl $(inputfilename)which expands to the full path to the file in the project that you have associated with this custom tool. You can use any of the macros that are displayed in the Macros field.
- Click OK.
To associate a custom build tool with a specific file
- In the Projects Window, select the file that you want to associate with a custom build tool. For example, for the
perlcustom build tool, you might select myfile.pl.
- In the Object Inspector, locate the Custom Build Tool field:
- Click the dropdown arrow for Custom Build Tool and choose the tool that you want to associate with the selected file. For example, for the file myfile.pl, choose the
perlcustom build tool.
To disassociate a custom build tool from a file
- In the Projects Window, select the file that you want to disassociate from a custom build tool.
- In the Object Inspector, clear the value field for Custom Build Tool.