Adding runtime-library-path to flex build configuration using ant mxmlc task -


i'm trying build flex project, linking rlss. when setting project in flex builder, corresponding "build configuration" (that got adding -dump-config compiler options) generates (among other things) tag :

<runtime-shared-libraries>   <url>some-lib.swf</url>   <url>some-other-lib.swf</url> </runtime-shared-libraries> 

now, trying build project using mxmlc ant task, can't seem add reference share-library. thought have help, didin't:

<!-- skipping attributes don't think relevant ... --> <mxmlc ....>  ...  <runtime-shared-library-path> <url rsl-url="some-lib.swf"></url> <url rsl-url="some-other-lib.swf"></url>  </runtime-shared-library-path> </mxmlc> 

so missing here ?

thanks

you need specify path swc of custom libraries via "path-element" attribute on "runtime-shared-library-path" element , define "rsl-url" in "url" element points swf. note needed each custom rsl individually.

to achieve you'll need unpack swc , extract swf compiler can copy output folder.

there comment on post here describes how include mate framework rsl. added interesting part below.

first, have extract swf swc file yourself.

<macrodef name="create-rsl">   <attribute name="rsl-dir" />   <attribute name="swc-dir" />   <attribute name="swc-name" />   <sequential>     <unzip src="@{swc-dir}/@{swc-name}.swc" dest="@{rsl-dir}" >       <patternset>         <include name="library.swf" />       </patternset>     </unzip>     <move file="@{rsl-dir}/library.swf" tofile="@{rsl-dir}/@{swc-name}.swf"/>   </sequential> </macrodef>  <target name="extract-rsls">   <!-- third parties rsls -->   <create-rsl rsl-dir="${build.rsls.dir}" swc-dir="${lib.dir}" swc-name="mate" /> </target> 

then, need put swf file rsl:

<target name="compile">   <mxmlc file="${src.dir}/myapplication.mxml" output="${build.dir}/myapplication.swf" locale="${locale}" debug="false">     <!-- flex default compile configuration -->     <load-config filename="${flex.frameworks.dir}/flex-config.xml" />      <!-- main source path -->     <source-path path-element="${src.dir}" />      <runtime-shared-library-path path-element="${lib.dir}/mate.swc">       <url rsl-url="rsls/mate.swf" />     </runtime-shared-library-path>   </mxmlc> </target> 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -