Build Events Tab

In this page you can specify commands to be executed in current build process. Events can be scheduled to be executed before build or after build.

Global builds events are executed for all builds from the list. If you want to have events defined only for a certain build, you must first select the build and then go to “Build Events” tab from the right side pane.

Creating a new event

It is possible to create Pre and Post build events.

Pre-Build Events

This type of events are executed before the actual package is being created. They can be useful to run commands whose results are used in the package building process, like always copy files from a location to ensure that you always have the latest files included in the project before starting the build process.

Post-Build Events

This type of events are executed after the actual package is being created. They can be useful to run commands that will be performed on the resulted package file, like renaming or copying it in a different location.

Use the “Add->Pre/Post-Build Event->New...” list context menu item in order to create a new event.

Also, you can create new events starting from some predefined templates. Just select one from “Add->Pre/Post-Build Event” context menu list. Available templates are:

  • File Copy... - Copies file <source_file> to <destination_file>.
  • File Move... - Moves file <source_file> to <destination_file>.
  • File Rename... - Ranames file <source_file> to <destination_file>.
  • Folder Removal... - Removes folder <folder_path>.
  • Run As... - Runs <application.exe> impersonating user <username>.

NoteYou need to substitute place holders <source_file> and <destination_file> with actual paths.

You can access the current build output path by using properties like AI_BUILD_OUTPUT_FILE or AI_BUILD_OUTPUT_FOLDER. These properties are available only during build-time and their localized versions have the two letter language ID appended (e.g. AI_BUILD_OUTPUT_FILE_FR for French). Also, it is highly recommended to include all paths in quotation marks (" ") since some of them can contain spaces of special characters.

Edit an event

Use the “Edit” list context menu item or press the Space key in order to edit an event.

Removing an event

Use the “Delete” list context menu item or press the Delete key in order to remove an event.

Specifying the events execution order

Use the “Move Up” / “Move Down” context menu item while an event is selected.

Examples

It is possible to define your own event that will be scheduled post or prior build:

Topics