0 Replies Latest reply on Aug 16, 2006 9:32 AM by OdysseusLevy

    Ant build script for mxmlc

    OdysseusLevy Level 1
      We use ant to do our builds. This is the build target that I came up with to initiate mxmlc builds:

      <uptodate property="dashboard.uptodate" targetfile="${site}/html/dashboard/dashboard.swf" >
      <srcfiles dir= "${origin}/mxml" includes="**/*.mxml,**/*.as"/>

      <!-- make mxml modules -->
      <target name="dashboard" unless="dashboard.uptodate">
      <java fork="true" jar="flex20/lib/mxmlc.jar" failonerror="true" >
      <arg line="-headless-server=true"/>
      <arg line="-load-config flex20/frameworks/flex-config.xml"/>
      <arg line="-licenses.license charting XXXXXXXXXX"/>
      <arg line="-file-specs ${origin}/mxml/dashboard.mxml"/>

      <copy file="${origin}/mxml/dashboard.swf" todir="${site}/html/dashboard"/>

      Here are some notes/explanations about this script:

      * I use the uptodate target to determine whether or not a build is needed
      * If you are using charting, the licenses.license flag tells mxmlc to not put in the "Chart Trial" watermark, otherwise
      you don't need this argument
      * I use the headless-server argument because we build on a linux server with no gui (I'm actually not sure if this is required though)
      * For some reason the mxmlc compiler can not find the font .ser file unless we specifically set it in the flex-config.xml file. Simply pointing it at "winFonts.ser" seemed to do the trick (the path is relative to the frameworks directory).