On Sun, Apr 09, 2006 at 01:36:06AM +0900, ara.t.howard / noaa.gov wrote:
> so i need to compile a bunch of stuff on windows.  some third party stuff
> and ruby extensions to those third party libs.  everything i do __must__ be
> compatible with the one-click installer, here's what i'm thinking might be a
> good approach:
[...]
>   step four : clobber the one-click installer's rbconfig.rb with the one
>   just created!  the idea here is that this rbconfig can be used to
> 
>     ruby ./extconf.rb
> 
>   and create a Makefile that will be setup for the mingw toolchain but
>   producing output that will be compatible with the vc++ compiled one-click
>   ruby
 
>   step five : compile any third party libs using mingw
> 
>   step six : compile any ruby extensions against these as normal
> 
> has anyone done anything like this?  does it sound resonable?

A couple years ago I proceeded similarly to build ruby-serialport: actually, I
built and installed (separately) ruby under msys, and then copied the
extensions so the one-click build would see them, but that's largely
equivalent to what you described. That was with an older one-click distro
before Curt began building it against an incompatible runtime (so the
situation was the same as now, after the shift to the mswin32 build).

I've also had some success cross-compiling with mingw:
 http://eigenclass.org/hiki.rb?cross+compiling+rcovrt

In the past, I also cross-compiled PDCurses, the curses extension,
GraphicsMagick, etc... It sometimes required some ad-hoc modifications in the
build systems, but none took more than ~10-15 minutes and they would have
been easy to script had I wanted to automate builds.

-- 
Mauricio Fernandez  -   http://eigenclass.org   -  singular Ruby