Kinesis SoftwareKineticFusion

[Show Table of Contents]

8 Working With RVML Documents

[Hide Table of Contents]

8.6 Automating the Build Process

8.6.1 Use the command line arguments

For simple development environments with a small number of RVML documents, it may be sufficient to use a simple shell script that launches the KineticFusion RVML compiler. The script file should define all the configuration settings for KineticFusion using '-D' options to the java command. It is more efficient when KineticFusion compiles multiple RVML documents in the same execution due to the caching features of the ActionScript 2.0 compiler.

8.6.2 Use Ant

Ant is a very powerful application that allows you to automate all aspects of building an SWF. Class files can be checked out of source code control, and modification data can be checked to see what SWF movies need to be rebuilt.

There are two ways of calling KineticFusion from within an Ant project file: running within the same JVM as the Ant application, or using a new JVM instance. Running KineticFusion in the Ant JVM

Using the Ant JVM and invoking java without the 'fork' attribute set. Note: KineticFusion requires that all class path elements required to find and run the application must already be defined in the CLASSPATH environment variable before running Ant i.e. the java classpath used by Ant must include KFDeveloper.jar and the KineticFusion installation 'config' folder where the KineticFusion configuration files are stored.

<target name="kineticfusion.inline" depends="">
      <java classname="com.kinesis.KineticFusion">
          <arg value="-r"/> 
          <arg value="-f"/>
          <arg value="myRVML.rvml"/> 
          <arg value="-o"/>
          <arg value="mySWF.swf"/> 
                  Illustrates how to define KineticFusion properties 
                                 from within Ant targets
          <sysproperty key="kinesis.actionscript.systemClassPath" 
          <sysproperty key="kinesis.actionscript.userClassPath" 
</target> Running KineticFusion in an External JVM

Alternatively, a new JVM process can be created which allows all class path components to be defined inline. Note that this technique takes much more resources as a new JVM instance is created every time:

<target name="kineticfusion.fork">
      <java classname="com.kinesis.KineticFusion" fork="true">
          <arg value="-check"/> 
          <arg value="mx.controls.SimpleButton"/> 
          <sysproperty key="kinesis.actionscript.systemClassPath" 
        <sysproperty key="kinesis.actionscript.userClassPath" 
              <pathelement path="${java.class.path}"/>
              <pathelement location="${kf.installdir}/KFDeveloper.jar"/>
            <pathelement location="${kf.installdir}/config"/>