flash - Flex Tasks // Mxmlc and native extension (ANE) -


i need setup continuous environment allowing build air apps, , have setup ant script compile flash package it.

i came across flex task mxmlc base tool build .swf.

i have setup base build file using tool, project uses .ane, , cannot them included swf compiles. end errors many classes unknown.

here build file:

<property     name="air_sdk_home" value="${basedir}/flex 4.6.0" />      <property     name="flex_home" value="${basedir}/flex 4.6.0" />     <property     name="flex_tasks" value="${flex_home}/ant/flextasks.tasks" />         <property     name="adt" value="${sdk}/bin/adt" />          <property     name="mxmlc" value="${sdk}/bin/amxmlc" />      <taskdef resource="flextasks.tasks" classpath="flextasks.jar"/>    <target name="compile">     <mxmlc file="${basedir}/src/main.as"         output="${basedir}/bin-debug/hr_2012_ipad.swf"         locale="en_us"         static-rsls="true"         accessible="true"         configname="airmobile"         debug="true"         failonerror="true"         fork="true"         maxmemory="512m">         <source-path path-element="${flex_home}/frameworks"/>         <source-path path-element="${basedir}/src"/>         <source-path path-element="${basedir}/gestouch"/>           <compiler.library-path dir="${basedir}/lib" />          <compiler.external-library-path dir="${basedir}" append="true">             <include name="lib/*" />         </compiler.external-library-path>          <library-path dir="${basedir}/lib" includes="*.swc,*.ane" append="true"/>         <library-path dir="${sdk}/frameworks/locale/en_us" includes="*.swc" append="true"/>      </mxmlc> </target> 

if has managed include .ane using mxmlc, love hear solution.

cheers guys!

adding path, .ane file name -external-library-path works me.

edit: in target may have change explicitly @ .ane file:

<compiler.external-library-path dir="${basedir}" append="true">    <include name="lib/yourextension.ane" /> </compiler.external-library-path> 

this how use (${compiler.arguments} optional - can use pass info compiler, example define labels conditional compilation this: config::debug_trace,true):

<target name="build" depends="set build type, copy extension packages, copy files building">         <exec executable="${mxmlc}" failonerror="true">             <arg line="                 ${compiler.arguments}                 +configname=airmobile                 -debug=${build.debug}                 -output ${app.builddir}/${app.name}.swf                 ${app.main.file}                  -source-path+=${app.sourcedir}                 -external-library-path+=${ext.extensiondir}/${ext.file}                 -library-path+=${app.libs}                 -incremental=true             "/>         </exec>     </target> 

this excerpt continuous environment build scripts wrote our book easy native extensions (the goal build of anes, app uses anes , install app on device single click).


Comments