flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [Flex JS] How to create a SWC library file
Date Tue, 19 Jan 2016 14:21:48 GMT


On 1/19/16, 3:53 AM, "OK" <OKrueger@edscha.com> wrote:

>Andy Dufilie wrote
>> I think there is a bug where the -fb switch must be specified last.
>>Also,
>> are you sure your parameters have correct spacing and quotation marks?
>
>Many thanks for this!
>
>After I changed the order of the arguments as you said I've got following
>error:
>--------------------------------------------------------------------------
>-------------------------
>unable to open 'C:\Users\kruegola\Adobe Flash Builder
>4.7\PureMVCForFlexJS/src/PureMVCForFlexJS.as'.
>--------------------------------------------------------------------------
>-------------------------
>
>Cause this file is not there, I've just created an empty AS3 class and
>name
>it "PureMVCForFlexJS.as".
>After this my modified "External tool (FalconJX...) compiles without any
>errors (See log at the end) but there's no .swc file inside my lib project
>:-(
>
>Now I'm totally lost again, sorry for annoying you...

No problem.  It actually helps us make sure we aren't making bad
assumptions and points out where we need better documentation, so thanks
for being a guinea pig.

So the external tool with "(FalconJX..)" in the name is for creating
applications like MXMLC, and the one with "COMPC" is for creating the
equivalent of a SWC, which is just a folder of .JS files.

What the Ant scripts do further is run the Falcon compiler's version of
COMPC (the regular Flex SDK's version of COMPC won't work here) to package
the .JS files into the SWC via the -include-file option.  The FalconJX
cross-compiler knows to look inside SWCs for files under js/out as well as
in folders specified via -sdk-js-lib, so this step is what keeps folks
from having to add the -sdk-js-lib option to their "(FalconJX..)" external
tools params and makes SWCs a single file deliverable for a library.

So, once you got the clean cross-compile via the "COMPC" external tool,
the next step is to either use copy of the "(FalconJX.." external tool
with the additional -sdk-js-lib option on your app, or specify all of
those JS files as include-files and clean and rebuild your library project
and use an unmodified "(FalconJX.." external tool on the app.  But no need
to run the "(FalconJX.." external tool on the library project.

Hope that makes things a bit clearer.

-Alex

Mime
View raw message