lib/compc.jar is a bit more like the old Flex compiler. It is limited to the compiler options that existed in Flex and it compiles to SWF only (no JS). The "targets" compiler option is a new option for compiling to JS, so that's why you saw that error about the unknown option. That error was the clue that made me realize you were using the wrong .jar file.
-- Josh Tynjala Bowler Hat LLC <https://bowlerhat.dev> On Tue, Sep 22, 2020 at 11:26 AM Yishay Weiss <[email protected]> wrote: > Bingo. > > Removing my config.xml and using js/lib/compc.jar solved it. > > What’s going on there? > > From: Josh Tynjala<mailto:[email protected]> > Sent: Tuesday, September 22, 2020 9:22 PM > To: Apache Royale Development<mailto:[email protected]> > Subject: Re: compc - configname > > Try using js/lib/compc.jar instead of lib/compc.jar. > > -- > Josh Tynjala > Bowler Hat LLC <https://bowlerhat.dev> > > > On Tue, Sep 22, 2020 at 11:21 AM Yishay Weiss <[email protected]> > wrote: > > > If I do that I get > > > > Buildfile: C:\dev\example\build.xml > > > > compile: > > [java] Unknown tag:compiler.targets > > [java] Loading configuration: > > c:\dev\flexjs\royale-asjs\frameworks\flex-config.xml > > [java] Loading configuration: C:\dev\example\royale-config.xml > > [java] > > [java] c:\dev\flexjs\royale-asjs\frameworks\flex-config.xml(33): > col: > > 0 Error: unknown configuration variable 'compiler.targets'. > > [java] c:\dev\flexjs\royale-asjs\frameworks\flex-config.xml (line: > 33) > > [java] > > [java] <targets> > > [java] > > [java] > > [java] Java Result: 5 > > > > From: Greg Dove<mailto:[email protected]> > > Sent: Tuesday, September 22, 2020 9:16 PM > > To: Apache Royale Development<mailto:[email protected]> > > Subject: Re: compc - configname > > > > it might need to be > > > > <arg value="-load-config+=${basedir}/royale-config.xml"/> > > > > > > On Wed, Sep 23, 2020 at 6:15 AM Greg Dove <[email protected]> wrote: > > > > > > > > Yishay, what is in > > > > > > <arg value="-load-config=${basedir}/royale-config.xml"/> > > > > > > > > > > > > On Wed, Sep 23, 2020 at 6:07 AM Yishay Weiss <[email protected]> > > > wrote: > > > > > >> Maybe you can share some of your source? This is my ant test project > > >> which fails. > > >> > > >> Thanks. > > >> > > >> <project name="MyProject" default="compile" basedir="."> > > >> <description> > > >> simple example build file > > >> </description> > > >> > > >> <target name="compile"> > > >> <java jar="c:/dev/flexjs/royale-asjs/lib/compc.jar" > fork="true"> > > >> <jvmarg value="-Xmx384m" /> > > >> <jvmarg > value="-Dsun.io.useCanonCaches=false" > > >> /> > > >> <jvmarg > > >> value="-Droyalelib=c:/dev/flexjs/royale-asjs/frameworks" /> > > >> <arg value="+configname=flex"/> > > >> <arg > > >> value="+royalelib=c:/dev/flexjs/royale-asjs/frameworks"/> > > >> <arg > > >> value="-load-config=${basedir}/royale-config.xml"/> > > >> <arg value="-include-classes=MyClass"/> > > >> <arg value="-output=My.swc"/> > > >> <arg value="-source-path=src"/> > > >> </java> > > >> </target> > > >> </project> > > >> > > >> <!-- C:\dev\flexjs\royale-asjs\bin\compc.bat "-output=My.swc" > > >> "-source-path=src" "-include-classes=MyClass" "+configname=flex" --> > > >> > > >> From: Josh Tynjala<mailto:[email protected]> > > >> Sent: Tuesday, September 22, 2020 8:06 PM > > >> To: Apache Royale Development<mailto:[email protected]> > > >> Subject: Re: compc - configname > > >> > > >> Hmmm... interestingly that's exactly how I was using it. > > >> > > >> <arg line="+configname=air"/> > > >> > > >> It's possible that the order matters with options with the + > character. > > >> Try > > >> to put it before all regular options that start with the - character. > > >> > > >> -- > > >> Josh Tynjala > > >> Bowler Hat LLC <https://bowlerhat.dev> > > >> > > >> > > >> On Tue, Sep 22, 2020 at 9:40 AM Yishay Weiss <[email protected]> > > >> wrote: > > >> > > >> > Ok, I can confirm adding +configname=flex on the command line does > the > > >> > trick. Now I need to understand why adding <arg > > >> value=”+configname=flex”/> > > >> > to > > >> > <java jar=”…/lib/compc.jar” fork=”true”> doesn’t work in ant... > > >> > > > >> > > > >> > From: Josh Tynjala<mailto:[email protected]> > > >> > Sent: Tuesday, September 22, 2020 6:43 PM > > >> > To: Apache Royale Development<mailto:[email protected]> > > >> > Subject: Re: compc - configname > > >> > > > >> > It should be possible to specify +configname=flex with both mxmlc > and > > >> > compc. > > >> > > > >> > I just found the build script for an old Flex SWC of mine that uses > > >> > +configname=air, so if the Royale compc doesn't also support > > >> +configname, > > >> > it's a bug. > > >> > > > >> > -- > > >> > Josh Tynjala > > >> > Bowler Hat LLC <https://bowlerhat.dev> > > >> > > > >> > > > >> > On Tue, Sep 22, 2020 at 7:54 AM Yishay Weiss < > [email protected]> > > >> > wrote: > > >> > > > >> > > Hi, > > >> > > > > >> > > I can’t figure out how to add configname=flex to compc. Any > > pointers? > > >> My > > >> > > goal is to compile a library that relies on emulation components. > > >> > > > > >> > > Thanks. > > >> > > > > >> > > > > >> > > > >> > > > >> > > >> > > > > > >
