On Jul 24, 2:09 am, Norris Boyd <[EMAIL PROTECTED]> wrote:
> On Jul 22, 12:58 am, John Leach <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Dear list,
>
> > One of the problems I've had in my JavaScript development tools
> > project Frizionehttp://code.google.com/p/frizione
> > is that Helma is using a modified version of Rhino, as does
> > YUICompressor. Unfortunately that means they don't play well together,
> > so I had to launch YUICompressor as a process - which seemed
> > ridiculous.
>
> > I've built a little sub project, which you can find 
> > here:http://code.google.com/p/frizione/source/browse/branches/BleedingEdge...
> > This uses a clean Rhino codebase, with separate modified Java source
> > files, then compiles to produce two jar files - the unmodified Rhino
> > jar (the purpose is not to do this, just grab the prebuilt jar from
> > mozilla) and a separate jar file which contains the modified Rhino
> > code.
>
> > With that done, Just load the modified jar before the standard Rhino
> > jar, and everything works nicely.
>
> > Having said that, I'd like your opinion on licensing. Some of the
> > projects are MIT, some BSD, and of course Rhino is tri-license. I've
> > included all the licenses, but I don;t know if that is enough. The
> > second problem is that I have to (necessarily) include the Rhino
> > sources, which I'm not wildly happy about. I suppose I could use Ant
> > CVS to grab the code, which would be better. Any advice greatly
> > appreciated.
>
> > FYI, is the build.xml for toolsrc broken? It uses "classes" (lines 79,
> > 81, 87, and 91) and "js.jar" (lines 83 and 90) which I converted to "$
> > {classes}" and "${dist.dir}/${rhino.jar}" respectively. Works a treat
> > with those changes made.
>
> > John Leach
> > Verona, Italy
>
> > P.S. for James Burke - I haven't been able to integrate ShrinkSafe. I
> > took a look at the code, but it seems to modify the Rhino Main class,
> > instead of rolling its own. I don;t know enough about ShrinkSafe (nor
> > how it is used) to do the modifications right now. Perhaps the Helma
> > and YUICompressor modifications can help...
>
> > John
>
> Ideally we'd just incorporate the changes needed by Helma and
> YUICompressor back into Rhino itself, provided they're generally
> useful. Do you know what the nature of the changes to Rhino are?
>
> --Norris

The modifications are fairly specific. I can give a brief outline, but
please remember that it's not my code.

YUICompressor is written and maintained by Julien Lecompte.
Helma is written and maintained by Hannes Wallnoefer, who has posted
to this group.

YUICompressor modifies Token and TokenStream as it adds a single IE/
JScript specific comment token. These are comments that begin with /*!
or /[EMAIL PROTECTED]
Similarly Parser and Decompiler are modified to handle this new token.

Helma makes some much deeper modifications. It adds a new constructor
to Token, changes the signature of hasInstance in BaseFunction, adds a
metaobject to ScriptableObject modifying this class through the has,
get, put, and delete methods. It also modifies the Parser (adding
methods) to be able to access the token stream.

I'm sure the respective authors can give much more detailed
information.

IMHO, both projects add value to Rhino. YUICompressor has very low
impact on the codebase, Helma provides a gateway to the token stream,
which could be used by compressor or documentation type tools, for
example. As far as I remember, Hannes sent the Rhino team a patch in
2006. I used that patch (manually) to modify the current 1.7R1
codebase.

For my own part, I just needed both the Helma and YUICompressor Rhino
modifications together for my little project Frizione (http://
code.google.com/p/frizione/). The technique of creating a
'specialised' jar, which pulls in the 'standard' rhino jar works quite
nicely for any other authors toying with modifications to Rhino.

Hope that helps.

John Leach
Verona, Italy.
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to