freeride-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [FR-devel] Managing Ruby extensions and FreeRIDE


From: Curt Hibbs
Subject: RE: [FR-devel] Managing Ruby extensions and FreeRIDE
Date: Mon, 16 Sep 2002 07:30:39 -0700

Laurent Julliard wrote:
>
> Rich Kilmer wrote:
> > FreeRIDE team,
> >
> > I have been thinking about coming up with a standard way to wrap Ruby
> > extension libraries (site_ruby stuff) as plugins (such as log4r, rexml,
> > fxruby, etc).  In order to do this we need to control the ruby path
> > ($:).  The concept is something along these lines (path names are
> > examples)
> >
> > Ruby path ($:) is reduced to:
> > $: = ["c:/ruby/lib/ruby/1.7", "c:/ruby/lib/ruby/1.7/i386-mswin32", "."]
> > Notice there are no references to the site_ruby directory.  Then, as a
> > plugin is loaded its directory is added to the Ruby path:
> >
> > c:/freeride/plugins/rexml2.4.0/plugin.xml
> >                            .../rexml_plugin.rb
> >                            .../rexml/(all rexml files)
> >
> > After this plugin is loaded, the new path looks like:
> > $: = ["c:/freeride/plugins/rexml2.4.0", "c:/ruby/lib/ruby/1.7",
> > "c:/ruby/lib/ruby/1.7/i386-mswin32", "."]
> >
> > So, if in your code you added the dependency on REXML then you would not
> > load without it, and to access rexml you would still just have:
> >
> > require 'rexml/document' # or whatever...
> >
> > This would mean that EVERY library that is used in FreeRIDE would have
> > to be packaged as a plugin...the upside is FreeRIDE/FreeBASE plugins
> > have (or will have ;-) version capability and dependency management.
> > The actual "packaging" is brain-dead simple.  Just copy what would be in
> > the site_ruby/1.7 directory into the plugin directory (with the .so
> > files in the root of the plugin's directory.  This packaging of
> > libraries as plugins is the way the Eclipse project works (in Java) for
> > the exact same reason.
> >
>
> Your idea goes one step beyond what we have where all extensions
> library that we use is supposed to be in freeride\redist. By the way
> do we have to move everything in freeride/plugins or can we keep
> things in redist. I like the idea of making the distinction between FR
> plugins and extension plugins

I, too, like this very much. I think they can go in the redist directory,
only the "plugin.xml" file needs to be in the plugin directory -- the actual
files that it refers to can be in the redist (or any other directory). I'm
sure Rich will correct me if I am wrong.

> > I also want to add into FreeBASE the ability to specify the platform
> > that the plugin runs on...that way we could have Linux plugins and Win32
> > plugins (and OS X plugins...some day :-) all sitting on the same
> > machine, but those compiled for other platforms would never load.
> >
>
> This is a must have!!

Yes, yes, yes!!!

> > We could do this on an existing Ruby installation by chopping everything
> > except the core library directories out of the $: path upon FreeRIDE
> > loading, or distributing our own version of Ruby with FreeRIDE.
> >
> > Thoughts?
> >
>
> I can not agree more, Given the nightmare I have gone through over the
> last days trying to make the FR Debugger run on Win32 I think it is
> almost obligatory that we distribute Ruby with FR. Ruby 1.7.x on
> mswin32 seems to be too unstable to let the users use their own version.
>
> This being said may be we don't need to package Ruby to start with
> just point to a zip version that we keep somewhere which is known to
> work. It would save some space and make the FR application smaller to
> download especially in the development phase.

Good points. I'd like to make FreeRIDE as simple as possible to install.

Curt





reply via email to

[Prev in Thread] Current Thread [Next in Thread]