Fusioncube

The online journey of a technophile, by Steve Brownlee

Flex runtime-shared-library-path solution

Friday
Apr 9,2010

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.

Come on Flex team. You’re killing me here.

  • Filed under: flex
Thursday
Apr 8,2010

Seriously, folks.  Why do you keep changing the configuration of the runtime-shared-library-path compiler option??

Here’s how you configure a RSL in an ANT build script in Flex 3.3.0.  Don’t even get me started on how it took me to figure that out, because this is completely different from what’s in their documentation!!!!!

<runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/datavisualization.swc">
    <url rsl-url="${web.root.dir}/lib/flex/${flex.build.number}/datavisualization_${flex.build.number}.swz" />
    <url policy-file-url="${web.root.dir}/cross-domain.xml" />
    <url rsl-url="${web.root.dir}/lib/flex/${flex.build.number}/datavisualization_${flex.build.number}.swf" />
    <url policy-file-url="${web.root.dir}/cross-domain.xml" />
</runtime-shared-library-path>

I downloaded Flex 3.5.0 today and ran my build scripts, and what do I get spit back at me?

[mxmlc] command line: Error: configuration variable ‘runtime-shared-library-path’ requires a value for ‘rsl-url’

So you changed it AGAIN??  Come on!!!

Oh, and where do I find the documentation for how I need to write this configuration in 3.5.0?  Nowhere.  I just spent 2 hours scouring the Adobe site, and Googling to come up empty. Then I try the following configuration which is what’s in the public, published documentation about RSLs.

<runtime-shared-library-path>
    <path-element>${FLEX_HOME}/frameworks/libs/datavisualization.swc</path-element>
    <rsl-url>${web.root.dir}/lib/flex/${flex.build.number}/datavisualization_${flex.build.number}.swz</rsl-url>
    <policy-file-url>${web.root.dir}/cross-domain.xml</policy-file-url>
    <rsl-url>${web.root.dir}/lib/flex/${flex.build.number}/datavisualization_${flex.build.number}.swf</rsl-url>
    <policy-file-url>${web.root.dir}/cross-domain.xml</policy-file-url>
</runtime-shared-library-path>

Also doesn’t work.

So now I’m stuck not being able to compile my projects with our build automation tool.  Way to go guys.

I’m really fuming about this.

About Steve

I am a technologist, and have been ever since 1980 when I got my very first TRS-80 and programmed it to do my math homework. I love to share the gift of technology with others and show them the wonderful things it can do for them, and how they should not fear it, but embrace it.

Latest Tweets

  • 56 Light & Clean Website Designs Using A Minimalist Color Scheme | SpyreStudios http://t.co/vbUBSJC2
  • Ok... stayed up way too late trying out website designs for my wife's new nonprofit. The kids will be getting me u... — http://t.co/QrKh5iBI
  • Am I the only one who likes Google’s new privacy policy? http://t.co/qwcym5wH
  • All that time wasted learning the .NET framework - Fusioncube - http://t.co/krANoWmg
  • @marcesher libraries like Less only do what you tell them. You can make a mixin to do that, but it doesn't assume anything (which is good)

Subscribe

Entries (RSS)
Comments (RSS)