-
Notifications
You must be signed in to change notification settings - Fork 2
Home
This is an Open Tools API plug-in for the RAD Studio IDE that allows you to run command-line applications before and after the compilation of your projects. It also provides the ability to zip your projects files into an archive on each compile/build and manage the application's version information.
The supported IDEs are as follows:
- CodeGear RAD Studio 2009
- Embarcadero RAD Studio 2010
- Embarcadero RAD Studio XE to XE8
- Embarcadero RAD Studio 10 Seattle to 11.0 Alexandria
For information on installing this expert please refer to my post Compiling and Installing my experts and wizards...
The tool detects error codes being returned from the command-line programs and will stop with a failure message IF the ERRORLEVEL is greater than 0 (zero).

An example of the messages that are output.
Output from the command-line applications is captured and placed in the Build Message window along with all the compiler messages. Green messages are successful runs and red messages are failures (These colours can be re-configured in the Message Fonts dialogue).
Note: The zipping functionality requires a base directory from which all files are zipped if you are using relative paths. The default WinZip settings use relative paths so you must specify a directory sufficiently towards the root of the drive to avoid WinZip complaining about ".." relative paths when you open the archive.
This dialogue allows you to enable or disable various parts of the Integrated Testing Helpers functionality for the whole of the project group (all projects in the group).

- Enable: This enables or disables ALL options for ALL projects in the project group;
- Before Compilation Tools: This enables or disables the running of tools before a project is compiled for ALL projects in the project group;
- After Compilation Tools: This enables or disables the running of tools after a project is compiled for ALL projects in the project group;
- Zipping of Project Files: This enables or disables the zipping of the project files for ALL projects in the project group;
- Increment Build on Successful Compilation: This enables or disables the incrementation of the project build number after a successful compilation of ALL projects in the project group;
- Build Project Version Information Resource: This enables or disables the building of the project's version information resource for ALL projects in the project group;
- Copy Project Version Information: This enables or disables the copying of build number information from one project to another for ALL projects in the project group.
This dialogue allows you to configure the global options that affect the way the application is configured and is applicable to all projects.

- Group Messages into their own tab - This places the messages that are output by the add-in and the external tools, to be output into a dedicated message tab rather than among the standard compiler messages;
- Auto-Scroll Messages - This option scrolls the message view to the last message automatically as they are added;
- Zip Executable - Here you can now specify the command line archiving executable you wish to use to "Zip" the project information;
-
Zip Parameters - Here you can now specify the archiving parameters to be passed to the above executable. There are three macros that are expanded by the system and they are as follows:
-
$REPSONSEFILE$ This is the file name containing a list of all the files to be zipped which is created by the Integrated Testing Helper. Used in combination with the @ switch of WinZip or 7Zip; -
$ZIPFILE$ This is the name of the zip file specified for the current compiling project's archive (see Zip Options); -
$FILELIST$ This inserts a space-separated list of double-quoted files names into the command line for zipping.
-
- Switch to Messages after a Successful Compile - This option switches to the helper messages if the last compile was successful;
- Clear Messages After Period of Time (seconds) - This allows the message list to be cleared if the last compile was more than the specified period of time ago. If you do not want the messages cleared set this to 0 (zero).
This list view allows you to assign IDE shortcuts to all the actions that the Integrated Testing Helper defines in the IDE.
To assign a shortcut, select the action in the list, enter the shortcut in the shortcut edit control below by pressing the shortcut combination you want to use and then pressing the Assign button.
These settings are stored in a single INI file named ITHelper#### Settings for USERNAME on COMPUTER.ini in your Application Data directory under your profile.
This dialogue allows you to specify various options for the specified project you are compiling.

- Extension Warning Exclusions - This option allows you to define a semi-colon (;) separated list of file wildcard (only the * is supported but in multiple positions) extensions for resource files you DO NOT want warnings about where they are not bound to the project using an RC file. NOTE: Even with these warnings disabled these resource files are still zipped to the archive.
- Increment Build On Compile - This increments the build number of the compiled project after a successful compilation.
- Copy Version Information From - This has been updated to reference an executable file rather than the target of another project in the project group. This then allows you to get the version number from another project executable even if it's compiled with another version of the compiler.
Due to problems with the Open Tools API in Delphi XE2, I have been forced to manage version information for the project manually. The reason for this is that although you can get the version information for a project in XE2 and change the value, these values do not end up in the compiled project UNLESS you open the project's options dialogue and press OK. If you don't do this, the changes are even lost of closing and saving the project.
- Enable ITHelper Version Control - This option enables the creation of a resource file managed by ITHelper. You need to ensure that the IDE does not include version information in the project's main resource as you will get duplicate version resource messages;
- The Major, Minor, Release and Build numbers refer to the version information and if this is enabled it is these numbers that are incremented or changed through the increment on compile and copy version information items above.
The table below allows you to specify additional version information. Note: The FileVersion items are automatically updated when the numbers above are changed.
- Include Resource In Project - This makes ITHelper add the resource files (RC), which it builds, to be included in the project and therefore managed by the project;
- Compile the Resource with BRC32 - This pre-compiles the RC file into a RES file. You only need to use this on early compilers where the IDE does not do this for you or where you want to manage the RES file manually;
- Resource Path Name (exc Ext) - This is the name of the resource (RC) file that ITHelper will create which will contain the version information and optionally be included in the project. You MUST not include the extension and you can specify relative paths (not full paths). The relativity is with respect to the main project file.
These project settings are stored in a ProjectName.ITHelper ini file in the same directory as the project.
The same dialogue is used for both the before and after tools. In this dialogue, you can configure command-line tools to be run before or after each project compilation.
For instance, you might want to run a set of unit tests before compiling the code (if you use project dependencies, this works well) and run deployment code after, say building a set-up programme for installation, after compilation.

If you press the Add button or select an existing item and press Edit you will be presented with the below dialogue for editing the information associated with a tool.

- Title - This is a descriptive title you can enter to help you understand what the tool does, especially if you run the same executable/batch files multiple times but for different reasons;
- Programme - This is the executable or batch file you want to run. It does not need double quotes if the file name has spaces;
- Parameters - These should be any parameters your executable or batch file requires to run. You do need to place double quotes around parameters that have spaces in them;
- Working Directory - This is the directory where the application should be run from and act as the applications current directory. This also does not need double-quotes for paths with spaces;
- Starting Window State - This is not applicable to this application.
The above dialogue allows the use of a number of macros that are expanded by the system. These have been implemented to allow the information to be more portable in line with moving all the project information into their own INI files alongside the project file. The available macros are as follows:
- {$PROJDRIVE$}: This is expanded to be the drive letter and colon of the project file;
- {$PROJPATH$}: This is expanded to be the drive and path of the project file with a trailing backslash.
This dialogue remembers its size and position separately for both the before and after tools.
Like the Project Options, this information is stored in an INI file with the extension .ITHelper alongside the project file.
This dialogue allows you to configure the zipping of all the project's files into a ZIP file using an external command line ZIP utility like WinZip or 7Zip. The command line ZIP utility is configured in the Global Options dialogue.

- Enable Zipping - This enables the zipping of the project's files after a successful compilation;
- Zip Path - This is a base path from which all relative paths in the zip file will be referenced;
- Zip Filename - This is the path to the zip file where you want the information to be archived;
- Additional Files - This is a list of filenames or patterns that can be used by the ZIP utility to add additional files to the zip archive that are not part of the project;
- Patterns to Exclude - This is a list of wildcard patterns that will be passed to the zipping utility and will be excluded from the zipping process.
This dialogue can accept the same macros that are defined in the Project Options dialogue.
This dialogue remembers its size and position.
Like the Project Options, this information is stored in an INI file with the extension .ITHelper alongside the project file.
This dialogue allows you to configure the fonts that are used for the messages that are output by the add-in during the various phases of the compilation process.
