flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <christofer.d...@c-ware.de>
Subject Re: [FlexJS] Dual branch
Date Fri, 10 Mar 2017 15:17:07 GMT
Hi Alex,

So I adjusted the native examples poms in your dual branch … now it seems to build successfully
with maven.


Am 07.03.17, 17:29 schrieb "Alex Harui" <aharui@adobe.com>:

    On 3/7/17, 4:36 AM, "Christofer Dutz" <christofer.dutz@c-ware.de> wrote:
    >Hi guys and especially Alex,
    >I would like to ask you to give a short summary at what you changed in
    >the dual branch. I don’t quite know as to what I should be looking for to
    >make Maven support to match.
    >Could you please summarize what new compiler options/arguments, which
    >new/changed/obsolete compilation runs and how the packaging should have
    >Right now, I still see swc and js-swc as output of the compilation. I
    >would expect one single swc to come out and this to contain two
    >catalog.xml … ist that correct?
    The goal of dual was just to get two "stacks" of SWCs (one for SWF, one
    for JS) to work in the compiler.  Merging the two swcs into one and
    renaming catalog.xml and library.swf is for later.  Getting two "stacks"
    to work sets the foundation for merging later by first proving that we can
    in fact produce runnable SWFs and JS from separate stacks and that having
    two stacks allows us to find platform dependencies in our code.
    So, there are still two SWCs produced from each frameworks/projects
    folder.  However, instead of calling the JS oriented one a "typedefs" SWC,
    I changed it to be a "js" classifier because the JS swc is now used to
    build the JS app.  Before, the JS-oriented SWC was primarily used to
    generate downstream JS-oriented SWCs so the "typedefs" classifier made
    more sense.
    The default SWC is the same as before.  It contains a library.swf compiled
    with COMPILE::SWF,true and thus the code inside is used for linking into
    SWFs.  It contains the cross-complled JS output like before which was
    compiled with COMPILE::JS,true.  And it contains any defaults.css like
    The "js" SWC is a bit different.  It contains a library.swf compiled with
    COMPILE::JS,true just like before, but now it also contains the
    cross-compiled JS output (with COMPILE::JS, true) and any defaults.css.
    So it is more of a peer of the main SWC, it just has a different
    In order to do this, I still use CompileASMojo to build the default SWC.
    I think the main changes there are that I switched the name of
    compile-as-config.xml to compile-swf-config.xml, but more importantly, I
    switched the mojo to use the FlexJS version of compc because the compc
    from compiler-jx now can produce both SWF and JS output (by calling the
    compc from the compiler folder for SWF output).  So, CompileASMojo also
    learned how to filter artifacts and sort the js ones into js slots in the
    -config.xml file.
    The CompileJSMojo also now uses the compc from compiler-ix and filters
    artifacts a bit differently to produce the "js" swc.
    Then, once the framework is built, the CompileAppMojo now only needs one
    default execution since it now calls the compiler-ix version of MXMLC
    (MXMLJSC) which also now knows how to build both a SWF and JS output in
    one execution.  So I took the second execution that had
    outputJavaScript=true out of the pom.xml.
    The main new compiler option is -compiler.targets which takes a set of
    strings like "SWF, "JSFlex", "JS", "JSNode".  You can set compiler.targets
    to one or more of these to dictate what output you want.  Then in order to
    support that, lots of existing options got platform-specific options so
    there is now a js-external-library-path and swf-external-library-path as
    well as the old external-library-path option.  That way you can specify
    one -config.xml file for all output targets.
    I have essential obsoleted the -js-output-type parameter.  Folks should
    use -compiler.targets instead for building SWCs and apps. Js-output-type
    is still used by ASDoc though.
    I think that's about it, although I'm sure I forgot to mention something.
    I won't be too surprised if I did something that isn't with the Maven
    philosophy.  My main goal was to get MXMLJSC to output both SWF and JS so
    it would work better with most IDEs since most IDEs only know how to
    launch one compiler.  And that has nothing to do with Maven.  But once I
    got that working I decided that maybe Maven would prefer to have both
    outputs from one execution as well.
    >Thanks in advance,
    >      Chris

View raw message