Une fois, le flex sdk et les librairies, bundles installés, il faut ajouter les locales :
Se placer dans le FLEX_HOME/bin; et lancer les commandes suivantes (en fonction des langues désirées).
./copylocale en_US fr_FR
./copylocale en_US de_DE
./copylocale en_US it_IT
./copylocale en_US ja_JP
./copylocale en_US nl_NL
Voici, la tâche ANT.
<!-- =================================
target: flex.qtp.compile
================================= -->
<target name="flex.qtp.compile" description="permet la compilation avec QTP FLEX">
<echo>"FLEX_HOME = [${FLEX_HOME}]"</echo>
<property name="srcdir" location="${basedir}/../../mon-appli-flex"/>
<property name="webSrcDir" location="${basedir}/../orchestre-web"/>
<echo>"srcdir = [${srcdir}/src/main/flex/MonMainFlex.mxml]"</echo>
<echo>"webSrcDir = [${webSrcDir}/MonMainFlex.swf]"</echo>
<echo>[${webSrcDir}/WEB-INF/flex/services-config.xml]</echo>
<echo>[${FLEX_HOME}/frameworks/flex-config.xml]</echo>
<echo>[${FLEX_HOME}/frameworks]</echo>
<echo>[${QTP_HOME}/]</echo>
<echo>[${srcdir}/src/main/locales/{locale}]</echo>
<!-- compile .mxml into .swf -->
<echo>[${basedir}/../orchestre-web/WEB-INF/flex/services-config.xml]</echo>
<mxmlc file="${srcdir}/src/main/flex/MonMainFlex.mxml"
output="${webSrcDir}/MonMainFlex.swf"
context-root="monAppliFlex"
allow-source-path-overlap="true"
actionscript-file-encoding="UTF-8"
headless-server="true"
locale="fr_FR"
debug="false"
keep-generated-actionscript="false"
incremental="false"
compiler.services="${webSrcDir}/WEB-INF/flex/services-config.xml">
<!-- Get default compiler options. -->
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
<!-- List of path elements that form the roots of ActionScript class hierarchies. -->
<source-path path-element="${FLEX_HOME}/frameworks" />
<source-path path-element="${srcdir}/src/main/locales/{locale}" />
<source-path path-element="${FLEX_HOME}/frameworks/projects/automation/bundles/{locale}/src" />
<!-- List of SWC files or directories that contain SWC files. -->
<compiler.library-path dir="${srcdir}" append="true">
<include name="libs/CGFlexFwk-1.0.71.swc" />
<include name="libs/flexlib.swc" />
<include name="src/main/locales" />
</compiler.library-path>
<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
<include name="libs" />
<include name="../bundles/{locale}" />
</compiler.library-path>
<compiler.include-libraries dir="${QTP_HOME}/qtp" append="true">
<include name="automation.swc" />
<include name="automation_agent.swc" />
<include name="qtp.swc" />
</compiler.include-libraries>
<!-- definition du basename du bundle -->
<include-resource-bundles bundle="MonMainFlex.properties" />
</mxmlc>
</target>
Aucun commentaire:
Enregistrer un commentaire