The available build steps are: Copy Files and Run Script.
Right now, Build Automation is a feature of Real Studio Web and Enterprise editions, but starting with Real Studio 2012 Release 2, it will be available to everyone.
Copy FilesUse this step to copy files that your application needs to a location it can easily find at run-time. You can copy files to a variety of locations, but the most common are Bundle Parent folder and the Resources folder.
The Bundle Parent folder copies the specified files alongside your built application (or application bundle on OS X). You might do this for certain types of support files.
But more typically, you will use the Resources folder. This copies the specified files to a Resources folder that is alongside the built application. On OS X, it uses the Resources folder within the application bundle.
You can copy any file that you want your application to have available when it runs. This could be help files, pictures that you do not want included in the project or really anything. It is particularly useful with web applications so that you can make sure any other files needed for the web app are included in the same folder.
To add a Copy Files build step, use Project -> Add -> Build Automation -> Copy Files. Then you can click the small circle icon for the Files property to open the Files dialog and drag the files you want to copy to it.
In order for a build step to work, you have to add it to the Build Automation section of the project. In this section there are entries for each target platform and below them a "Build" entry. This allows you to have separate steps that do different things for each platform and to have steps that run before your application is built and steps that run after it is built.
Scripts that copy files should run after the application is built, so you would copy it after the "Build" entry.
|Build Automation in Project List|
Run ScriptThe Script build step allows you to run an IDE Script, which are powerful ways to control the IDE and run external tools.
Here's one thing you might find useful: Saving your project automatically when you click Run.
To do this, add a new Script step to your project (Project -> Add -> Build Automation -> New IDE Script). Click on the Script property to open the Edit Script dialog and enter this script:
This tells the IDE to save the current project.
In order for this build step to run *before* the build is done, you now need to drag it before the "Build" item in the Project List.
Another useful command for Run Script is DoShellCommand, which allows you to run a shell command. For example, with OS X you could use DoCommandShell to code sign your application after it is built:
DoShellCommand "codesign -f -s ""Developer ID Application: YourName"" ""YourRealStudioApp.app"""
I hope you find some great uses for Build Automation!