For sure, the builds are not very robust.  They only handle a few configs that 
we use.

"ant all" was intended to bring down everything else after you somehow got the 
royale-asjs sources.  So yes, it definitely cheats and clones git repos into 
sibling folders etc.  It was supposed to make it easier to get started.  I 
think people still use it.  Might still be useful when there are compiler 
changes.  There seem to be many fewer compiler changes these days so maybe less 
useful.  I never used it.  I just have all 3 repos and run ant or maven where 
needed.

Once you get things up and building and have the compiler and typedefs copied 
into royale-asjs, then ROYALE_HOME should reference royale-asjs and things 
should be relative to it.  The compiler should be in the js folder.  And then 
if you make a change to royale-asjs, you should be able to just get away with 
"ant" in the SWC folder that changed and occasional "ant" at royale-asjs to 
build dependent SWCs.  Copying the compiler in wasn't my favorite choice, but 
folks wanted it so they could use the repo as a valid SDK in a legacy Flex IDE.

Looks like you were trying to run the compiler from outside the tree of sources 
you changed.  I don't think we had folks who were doing that, and I’m not sure 
if it will turn into a support hassle to support it.  Hopefully you got it all 
figured out in your changes.  The expectation was that you would have just 
copied the compiler into the tree of sources you were changing, which should 
have only required specifying the _REPO variables and not the _HOME ones.

But hey, if it all works, then great, and thanks!

-Alex

On 11/30/20, 4:56 PM, "Edward Stangler" <estang...@bradmark.com> wrote:

    
    Just one last comment (to hopefully make it easier to follow) from me on 
this, and then I'll shut up.
    
    I previously mentioned (in my actual setup):
    
    
    set 
MY_ROYALE_DIST=C:\src\just-for-harbs\apache-royale-nightly-build-beta-0.9.8-bin-js-swf
    set MY_ROYALE_WORK=C:\src\just-for-harbs\royale-asjs-release-0.9.8
    set ROYALE_COMPILER_HOME=%MY_ROYALE_DIST%\royale-asjs\js
    set ROYALE_COMPILER_REPO=%MY_ROYALE_DIST%\royale-compiler
    set ROYALE_TYPEDEFS_HOME=%MY_ROYALE_DIST%\royale-asjs
    
    
    (That is, MY_ROYALE_DIST = compiler distribution and MY_ROYALE_WORK = my 
working Royale source.  I'm actually trying to build the source in 
MY_ROYALE_WORK.)
    
    So I don't necessarily need ROYALE_COMPILER_HOME to be arbitrary;  it's 
%MY_ROYALE_DIST%\royale-asjs\js.
    
    Normally, in the various build.xml, ROYALE_COMPILER_HOME is automatically 
set to %ROYALE_HOME%\js.
    
    
    I think the core issue is that ROYALE_HOME is used for both the compiler 
location and for the ASJS source location.  It sounds like copying the compiler 
around (via copy-compiler) was the way around that.  And maybe that's the right 
thing to do.
    
    But then "ant all" is doing several undesirable things:
    
    1.  Making directories outside of my source location.  (It assumes my 
source location is "MyParentDir/royale-asjs" and that "MyParentDir" can be 
modified.)
    2.  Copying my source (or pulling latest?) to ../royale-asjs, unnecessarily.
    3.  Pulling down the latest code, which I don't want and takes time.
    4.  Building the compiler anyway (even though I have the nightly build in 
%MY_ROYALE_DIST%).  [This also requires the JDK, instead of JRE.]
    
    To avoid all that, I use "ant" instead of "ant all", which then requires 
ROYALE_TYPEDEFS_HOME, and fails without the ROYALE_COMPILER_HOME changes.
    
    
    The quick resolution (in addition to the other steps that I took) was to 
add support for the environment variable ROYALE_COMPILER_HOME in all of the 
build.xml files.  If the above problems are fixed another way (perhaps in 
prebuild), then of course you don't need support for an environment variable 
ROYALE_COMPILER_HOME.
    
    I need to be able to quickly build several versions of the ASJS source.  
That means separate directories using only the ASJS source that I have (not 
counting third-party), and not recompiling the compiler every time (for time 
and so I can use only JRE).
    
    
    
    On 11/30/2020 3:56 PM, Alex Harui wrote:
    
    I've been unable to follow the details of what you tried, but if 
ROYALE_COMPILER_REPO wasn't pointing to the equivalent of a built 
royale-compiler repo, then I wouldn't expect it to work.  I believe a binary 
artifact would suffice instead of an actual repo, but I could be wrong.  But it 
may have been safer to figure out what was missing from a binary artifact and 
fix that.  I think what is happening with the changes to ROYALE_COMPILER_HOME 
is that there is a whole new configuration being supported (compiler outside of 
the royale-asjs folder).  Makes me nervous, but hey, I'm not the one supporting 
it.
    
    It could be that the single library path option is broken and/or has been 
abandoned.  The compiler used to use -library-path as the single path option.  
But you could specify -js-library-path and/or -swf-library-path to specify 
JS-specific or SWF-specific lists of libraries.  Pretty sure that's the default 
configuration these days, I think because it was easiest to have the builds 
produce JS-only and js-swf packages.
    
    If you are not using SWF output, just building the xJS swcs should be 
sufficient.  If you are using both, you "could" have a configuration that just 
uses the non-jS swcs but you'd probably have to use a different -config.xml 
file.
    
    HTH,
    -Alex
    
    On 11/30/20, 1:13 PM, "Edward Stangler" wrote:
    
    
        As I mentioned earlier (especially in the step-by-step that I posted),
        setting ROYALE_COMPILER_REPO was also not enough.  (ROYALE_TYPEDEFS_REPO
        wasn't necessary, as far I could tell.)  The build.xml file changes were
        still needed.
    
        I'm not familiar with the single library path possibility.  So far that
        I've seen, there has to be a frameworks/lib/x.swc and a
        frameworks/js/lib/xJS.swc library.  If I only replace one, my compiles
        (of the final apps) don't see the changes in both SWF and JS.
    
    
        On 11/30/2020 10:20 AM, Alex Harui wrote:
        > Oops!  I should have said ROYALE_COMPILER_REPO and 
ROYALE_TYPEDEFS_REPO (instead of ROYALE_X_HOME), so tweaks to how the R_X_HOME 
properties worked wouldn't be needed.
        >
        > The SWF SWCs are intended to allow the app developer to only specify 
one set of libraries on the library-path in order to build both SWF and JS 
output, so the transpilation is required to be in that SWC.
        >
        > HTH,
        > -Alex
        >
        > On 11/30/20, 12:43 AM, "Edward Stangler" wrote:
        >
        >
        >     I actually do want to generate the SWF SWCs.  My point was that 
during
        >     the SWF SWC build, there's no reason to build JS.  For example, 
when
        >     building Basic.swc, it doesn't need to target JS.  But while 
building
        >     BasicJS.swc, then obviously SWF and JS targets are needed.  I'm 
not
        >     familiar with the IDE issues, though.
        >
        >     (BTW, on another machine using the SWCs in the final app, running 
a
        >     -debug=true compile for JS is much, much faster.)
        >
        >     I'll try the anti-virus thing, thanks.
        >
        >     -=-=-
        >
        >     My original point of this thread was that I did set 
ROYALE_COMPILER_HOME
        >     (and other stuff) to a nightly build, and it didn't work.  So I
        >     explained the exact steps that I used, and how I could modify the
        >     build.xml files to handle ROYALE_COMPILER_HOME correctly.
        >
        >     So, there's probably more work to do (i.e. perhaps in prebuild, 
as Harbs
        >     pointed out), but the modified build.xml files will at least make 
it
        >     mostly work, by doing something that seems reasonable (actually 
reading
        >     the environment variable ROYALE_COMPILER_HOME).
    
    
    
    
    
    

Reply via email to