In my last post, I expressed frustration with the fact that the MXMLC Ant task choked on the runtime-shared-library-path attributes.
Well, I decided to not use the MXMLC task and instead use Ant’s EXEC command to compile the app. Works like a charm. Therefore, I can only assume that there’s a bug in the MCMLC and COMPC tasks provided in the flexTasks.jar file in the Flex 3.5.0 SDK.
Here’s how my compile task looks now.
<exec dir="." executable="${FLEX_HOME}/bin/mxmlc.exe">
<arg value="${src.dir}/${main.application}" />
<arg value="-output=${build.dir}/${build.file}" />
<arg value="-incremental=false" />
<arg value="-locale=${locale}" />
<arg value="-library-path=${FLEX_HOME}/frameworks/locale/${locale}/rpc_rb.swc" />
<arg value="-library-path+=${FLEX_HOME}/frameworks/locale/${locale}/framework_rb.swc" />
<arg value="-library-path+=${FLEX_HOME}/frameworks/locale/${locale}/datavisualization_rb.swc" />
<arg value="-library-path+=${main.lib.dir}/applicationAPI.swc" />
<arg value="-library-path+=${common.lib.dir}/it_common.swc" />
<arg value="-library-path+=${framework.lib.dir}/common_framework.swc" />
<arg value="-source-path=${src.dir}" />
<arg value="-runtime-shared-library-path=${FLEX_HOME}/frameworks/libs/framework.swc,${web.root.dir}/lib/flex/${flex.build.number}/framework_${flex.build.number}.swz,${web.root.dir}/cross-domain.xml,${web.root.dir}/lib/flex/${flex.build.number}/framework_${flex.build.number}.swf,${web.root.dir}/cross-domain.xml" />
<arg value="-runtime-shared-library-path=${FLEX_HOME}/frameworks/libs/rpc.swc,${web.root.dir}/lib/flex/${flex.build.number}/rpc_${flex.build.number}.swz,${web.root.dir}/cross-domain.xml,${web.root.dir}/lib/flex/${flex.build.number}/rpc_${flex.build.number}.swf,${web.root.dir}/cross-domain.xml" />
<arg value="-runtime-shared-library-path=${FLEX_HOME}/frameworks/libs/datavisualization.swc,${web.root.dir}/lib/flex/${flex.build.number}/datavisualization_${flex.build.number}.swz,${web.root.dir}/cross-domain.xml,${web.root.dir}/lib/flex/${flex.build.number}/datavisualization_${flex.build.number}.swf,${web.root.dir}/cross-domain.xml" />
</exec>
Very happy that this works, so that we can upgrade the SDK to 3.5.0 and take advantage of the bug fixes.
3 Responses for "Flex runtime-shared-library-path solution"
But i use complier setting to put the merge to code instead of RSL
am i right doing or not
confirm please
Good, creative solution!
I’ve been thinking about it myself, but I don’t like how it ruins the cleanliness of my Ant build files.
Last three lines are particularly hard to digest, even though nothing complicated is happening there.
Hi.
Im working in a project, and we use this kind of solution to build fast and clean versions, it awesome. I got a little problem with this implementation, when I use a preloader class for the application, the preloadvars keeps quiet, i dont know why, the preload its not working as if you build your project using Flash Builder.
There is something that i miss up to include, or some parameter?
Leave a reply