[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Win32Ole question...

Nation, Carey

2/8/2007 3:24:00 PM

Ah, ok, thanks. Guess I'm a little dense. I couldn't find anything
about how to apply the patch. Can you point me at something?

Thanks!

1 Answer

Jano Svitok

2/8/2007 10:20:00 PM

0

On 2/8/07, Nation, Carey <Carey.Nation@turner.com> wrote:
> Ah, ok, thanks. Guess I'm a little dense. I couldn't find anything
> about how to apply the patch. Can you point me at something?
>
> Thanks!

So, here we go:

You'll need:
1. ruby-oneclick installed
2. msvc6 installed
3. the patch from the tracker
4. (optionally) the patch program

This is how to proceed:
1. copy the patch where the sources of win32ole are
(c:/ruby/src/ruby-1.8.xxx/ext/win32ole
2. patch the source:
2.a (if you have the patch program):
patch -p2 < ruby-1.8-changes.patch
2.b otherwise: just copy the + lines into appropriate place (you have
a bit of context, and line numbers to find the place)
3. start a console (cmd)
4. run vcvars32.bat from ms vc bin dir (I don't know the exact place,
look it up. It might be named a bit different though). This will setup
the compile environment.
5. run from the win32ole directory extconf.rb That should check
available libs and headers, and prepare a Makefile.
6. now start the compilation: nmake
7. if everything went ok, you'll have a brand new win32ole.so. Copy it
to c:/ruby/lib/1.8/i386-mswin32/ and you're done.

Notes:
- It should be possible to use mingw gcc compiler, but I don't know how.
- You should rather try the compilation with unpatched file, e. g. do
this once without step 2. to see if you're able to compile.
- There might be an easier way to do all of this, but you have to ask
wiser men ;-)
Basically, you need to google for two things: 1. how to compile a ruby
extension and 2. how to patch a file
- Beware that the patch is untested, so it may (the author says so) or
may not work.