Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Open Video Ads

How to Build the Release

This tutorial provides a quick guide as to how to build the OVA for AS3 release. It covers the build script that compiles the OVA for AS3 source into a pre-compiled SWC library.

1. How to Download the Framework

The OVA for AS3 framework is available in both compiled library (SWC) and source formats on the OVA Developer Site.

The OVA for AS3 product is only provided in one packaged format - that format includes both the compiled library and source distribution.

1.1 Download the Distribution

To download the release package from the OVA Developer Site:

1.2 Checkout the Distribution from Subversion

To checkout the source distribution directly from the subversion repository:

svn checkout http://anonymous@developer.longtailvideo.com/svn/trunk/ova.as3

2. How to Deploy the Framework

The framework can either be used as a compiled flash library (SWC) or in it's native source format.

3. The Build Process

The OVA for AS3 build process uses Ant.

Three forms of the OVA SWC can be built via the ant build scripts:

The components that are "excluded" by the minimal build can be customised via the build.properties file found in the distribution build directory.

Note: If you build a "release" or "minimal" version of the OVA SWC that excludes the debug functions, any subsequent builds of OVA for Flowplayer or OVA for JW5 must also be "release" builds that exclude the "debug" functions otherwise the compiler will throw a "cannot find debug methods" style error message.

3.1 Customising the Build Properties

Before OVA for AS3 (or any OVA product) can be built, a number of environmental variables need to be set in the build.properties file that is located in the distribution `build directory.

For OVA for AS3, the FLEX_DIR variable is the only mandatory entry that needs to be set. It must point to the base directory of your Flex SDK install so that the compilers etc. can be located by the OVA build scripts.

FLEX_DIR = /Applications/flex_sdk_3

If you are intending on building an OVA product that uses OVA for AS3 (i.e. OVA for Flowplayer or OVA for JW Player) and you have not located the source for those products relative to the OVA for AS3 package, you can customise the locations of these products via the build.properties file. The default values in the file are:

OVA_JW5_BUILD_DIR = ../../ova.jwplayer.5x
OVA_FLOWPLAYER_BUILD_DIR = ../../ova.flowplayer
OVA_VPAID_BUILD_DIR = ../../ova.vpaid.ads

Finally, if you intend to build a "minimal" version of the OVA SWC, you can customise the components that are excluded in the build via the following variables in the build.properties file:

INCLUDE_CONNECTORS = false
INCLUDE_CALLBACKS = false
INCLUDE_BUTTONS = false

INCLUDE_CONNECTORS refers to those components that provide "custom ad server" implementations. If these are excluded, the only ad server/tag type that can be used in your OVA config is "direct"/"static ad tags", excluding types such as "OpenX", "AdTech", "OASIS" etc.

INCLUDE_CALLBACKS refers to the code in the OVA Library that triggers OVA Javascript callbacks. Excluding this component ensures that no Javascript callbacks are implemented.

INCLUDE_BUTTONS refers to the embedded default button images for the Skip Ad and Overlay close buttons. Excluding these components means that you have to use custom formats for these features when configuring OVA.

3.2 Building the OVA SWC

To build OVA for AS3 use the following command from the OVA for AS3 build directory:

ant <command>

where command can be any one of the following instructions:

Typically, to build the default version of the OVA SWC (that includes all components including debug), the following ant command is used:

ant build

To build and deploy the default OVA SWC to the OVA for Flowplayer and/or OVA for JW5 build workspaces, the following ant command is used:

ant deploy

Alternatively, if you wish to build and deploy a "release" version of the OVA SWC (that excludes debug), use:

ant deploy-release

And finally, if a "minimal" version of the OVA SWC is to be built and distributed to the OVA for Flowplayer and/or OVA for JW5 workspaces, use:

ant deploy-minimal

Upon the successful completion of a build task, you should see something that appears as follows:

ps-macbook-pro:build paulschulz$ ant deploy-minimal
Buildfile: /Users/paulschulz/workspace/ova/lt-svn/trunk/ova.as3/build/build.xml

build-minimal:
     [echo] Building the 'minimal' version of the OVA for AS3 SWC...
     [exec] Loading configuration file /Applications/flex_sdk_3/frameworks/flex-config.xml
     [exec] /Users/paulschulz/workspace/ova/lt-svn/trunk/ova.as3/dist/minimal/ova-as3-1.0.1.swc (278900 bytes)
     [echo] Build complete.

deploy-minimal:
     [echo] Deploying the 'minimal' SWC 'ova-as3-1.0.1.swc' to the specified OVA product directories...
     [copy] Copying 1 file to /Users/paulschulz/workspace/ova/lt-svn/trunk/ova.jwplayer.5x/lib
     [copy] Copying 1 file to /Users/paulschulz/workspace/ova/lt-svn/trunk/ova.flowplayer/lib
     [copy] Copying 1 file to /Users/paulschulz/workspace/ova/lt-svn/trunk/ova.vpaid.ads/lib
     [echo] Deployment complete.

BUILD SUCCESSFUL
Total time: 10 seconds
ps-macbook-pro:build paulschulz$

The OVA for AS3 build scripts will only deploy the library to OVA product areas that exist so if you only have OVA for JW5 installed, the OVA SWC will only be copied to that product's lib directory.