On Fri, Aug 30, 2002 at 08:33:34AM +0900, Alan Chen wrote:
> On Fri, Aug 30, 2002 at 08:14:20AM +0900, michael libby wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > On Thursday 29 August 2002 11:13, christopher.j.meisenzahl / citicorp.com 
> > wrote:
> > > There is an English readme file included in the archive. It gives you
> > > the steps to install/configure it. Erally straightforward. The only
> > > slightly odd piece is creating a text file that the compiler uses to
> > > determine what files are needed.
> > 
> > I didn't find that any stranger than using a makefile.
> > 
> > Has anyone gotten this to work with a Tk application of any size that would 
> > be willing to share the .rbc file for it?
> > 
> >  -michael
> 
> Let me know if you find out anything, I've been struggling with trying
> to get it to include fox. I'm still not completely understanding how
> it resolves requires.  Either that or I've found a bug trying to build
> a fxruby application into an exe.

To answer my own question, exerb aliases the kernel require to do an
internal search. However, from my initial code review, extensions that
use rb_require end up calling rb_f_require which is just a direct
access of the C function. Exerb builds it's own version of ruby to
include in the exe anyway, so it could be patched to go to the exerb
require code. But should the patch be applied to ruby itself?

If I wanted to instrument requires and did this:
module Kernel
    alias_method :origRequire, :require

    def require(lib)
      # log requires to stdout
      puts lib
      origRequire(lib)
    end
end

require 'fox'

...

I end up missing all the extension calls to rb_require.

- alan

-- 
Alan Chen
Digikata LLC
http://digikata.com