How to include additional compiler arguments when using mxmlc ant task?

Flex Builder allows you to set additional compiler options in the compiler options in the properties. He sets the argument;

-services ".../services-config.xml"

Is there a way to set the same argument when using the ant mxmlc task?

Greetings

Mike

+3
source share
5 answers

You can specify it as an attribute in the mxmlc task:

<mxmlc services="../services-config.xml"/>
+3
source

Not that I knew.

You can always use a task with subnets if you still cannot find it in the documents.

Example:

<exec executable="${mxmlc.exe}" dir="${basedir}">
    <arg line="-source-path '${flex2sdk.locale.dir}'" />
    <arg line="-locale en_US" />
</exec>
+3
source

, services ant, :

 <mxmlc file="path" output="path to output" >
       <compiler.services>${path-to-services}</compiler.services>
       <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
       <source-path path-element="${FLEX_HOME}/frameworks"/>
       <compiler.debug>false</compiler.debug>
       <compiler.context-root>/PATWeb</compiler.context-root>
 </mxmlc>
+1

:

<target name="compileApp">
<mxmlc file="src/app.mxml" 
...other options
services="[path to your services-config.xml]" 
context-root="[path to where your gateway file is]">
...
</target>

mxml... , .

0

mxmlc, . , Ant . :

<mxmlc file="Main.as" output="bin/app.swf">
    <load-config filename="${FLEX_HOME}/flex-config.xml" />
    <load-config filename="build/config.xml" />
</mxmlc>

, build/config.xml, , flex-config.xml air-config.xml SDK ( ).

0

Source: https://habr.com/ru/post/1704196/


All Articles