Friday, January 28, 2011

Build Automation and IDE Script

Build Automation and IDE Script are two very useful, powerful features of REAL Studio. Each can be used to automate certain parts of your app build process, saving you time.

*Build Automation is used when you want to make changes and you have a single build of your app. 

*IDE Script is used when building your app generates more than 1 build.

Here is an example of an IDE Script that creates 2 builds of a Mac app. It gives a different name to each build and changes a constant value. This code is entered into the IDE Script window available from the File menu. The code assumes that you have an app class property named DebugMode. The Build Automation item in the project window does not need to change for this code to work.

dim AppPath as string
PropertyValue("App.MacOSXAppName") = "Release Build"
ConstantValue("App.DebugMode") = "False"
BuildWin32 = False
BuildLinux = False
BuildMacMachOUniversal = True
AppPath = BuildApp(8,False)
PropertyValue("App.MacOSXAppName") = "Debug Build"
ConstantValue("App.DebugMode") = "True"
AppPath = BuildApp(8,False)

That's it. Now you have 2 builds, each with a different value for the DebugMode constant.

The IDE Script documentation can be found here.

Please remember that both of these are features of REAL Studio Enterprise and Web Editions.

No comments: