My favorites | Sign in
Project Logo
                
Show all Featured wiki pages:
Preferences changelog
People details
Project owners:
  nimrod97

Flex Compiler SHell integration with Apache Ant

Current version 1.0.76

Post your feature requests here

How it works

  1. Download and install FCSHServer.
  2. Set environment variable FCSHServer={application directory, e.g. C:\Program File\Fcsh Server\}.
  3. Edit server.ini file: setup Flex SDK location (e.g. sdk=C:\Flex_sdk_3.0) or modify Flex Compiler SHell vmoptions

Application directory contains fcsh.jar file. So example ant build.xml is:

<?xml version="1.0" encoding="UTF-8"?>
<project name="project.main" basedir="." default="build">
    <property environment="env"/>
    <taskdef name="fcsh" classname="fcsh">
        <classpath>
            <pathelement location="${env.FCSHServer}/fcsh.jar"/>
        </classpath>
    </taskdef>

    <target name="build">
        <fcsh consoleencoding="cp866">
            <arg value="mxmlc"/>
            <arg value="-output=C:\target.swf"/>
            <arg value="-load-config+=C:\work\FLX\src\flex-config.xml"/>
        </fcsh>
    </target>
</project>

fcsh has optional attribute consoleencoding (useful when error message text is not in English), default value is "cp866" for Cyrillic. Supported enodings.

Ant tries to connect to the FCSHServer (localhost:40000), on fail it tries to launch FCSHserver again, if connection fails after 5 retries BuildException is thrown.

All subsequent builds will reuse compiler cache.

c:\work\google.code\fcsh.ant\test>ant
Buildfile: build.xml

build:
     [fcsh] Server is not responding. Probably it is stopped. Trying to launch...
     [fcsh] Server started
     [fcsh] Trying to connect... Attempt 0 of 5
     [fcsh] Server is up!
     [fcsh] Command: mxmlc -locale en_US -output=C:\realworld.swf -load-config+=C:\work\realworld\FLX\src\flex-config.xml
     [fcsh] fcsh: Assigned 1 as the compile target id
     [fcsh] Loading configuration file C:\work\3.3\frameworks\flex-config.xml
     [fcsh] Loading configuration file C:\work\realworld\FLX\src\flex-config.xml
     [fcsh] C:\realworld.swf (1072748 bytes)
     [fcsh] (fcsh)

     [fcsh] Awesome!

BUILD SUCCESSFUL
Total time: 8 seconds
c:\work\google.code\fcsh.ant\test>ant
Buildfile: build.xml

build:
     [fcsh] Command: mxmlc -locale en_US -output=C:\realworld.swf -load-config+=C:\work\realworld\FLX\src\flex-config.xml
     [fcsh] Loading configuration file C:\work\3.3\frameworks\flex-config.xml
     [fcsh] Loading configuration file C:\work\realworld\FLX\src\flex-config.xml
     [fcsh] Nothing has changed since the last compile. Skip...
     [fcsh] C:\realworld.swf (1072743 bytes)
     [fcsh] (fcsh)

     [fcsh] Awesome!

BUILD SUCCESSFUL
Total time: 1 second
c:\work\google.code\fcsh.ant\test>

FCSHServer adds tray icon, right click to see menu:









Hosted by Google Code