WIN32OLE and CrossoverOffice (wine)

Hi!

I am just learning ruby and am going to do a little script that
manipulates some rtf files. I would need WIN32OLE for that. But…

The matter is not that simple. I am running linux and run the
microsoft office programs on top of codeweavers crossover office
(www.codeweavers.com), which, I presume, is basically wine with a nice
installer.

Anyhow, does anyone have any experience in making WIN32OLE work with
crossover office / wine? Is it even possible?
I tried running the extconf.rb that comes in the WIN32OLE download,
but it didn’t do much (as was to be expected).

On the other hand, is there any ruby library for reading /
manipulating / creating rtf? I tried looking in RAA and google, but
didn’t find any.

Thanks in advance.

   -Antti

Hi,

Anyhow, does anyone have any experience in making WIN32OLE work
with crossover office / wine? Is it even possible?
I tried running the extconf.rb that comes in the WIN32OLE download,
but it didn’t do much (as was to be expected).

Though I’ve never tried it, doesn’t it work with --with-opt-dir
option?

$ ruby extconf.rb --with-opt-dir=$winedir

Above -dir option requires include files exist under
${winedir}/include and libraries under ${winedir}/lib.

If they don’t, try:

$ ruby extconf.rb --with-opt-include=$wineincludedir --wit-opt-lib=$winelibdir

···

At Tue, 28 Jan 2003 05:58:31 +0900, Antti Karanta wrote:


Nobu Nakada

Neither seems to work. But then again, the include - dir does not even
exist:

akaranta@hyperion:~/cxoffice> ls
README bin changelog.txt doc icons lib license.txt support uninstall

I tried looking for it in the subfolders, but it’s not there either.

  -Antti
···

nobu.nokada@softhome.net wrote:

Antti Karanta wrote:

Anyhow, does anyone have any experience in making WIN32OLE work
with crossover office / wine? Is it even possible?
I tried running the extconf.rb that comes in the WIN32OLE download,
but it didn’t do much (as was to be expected).

Though I’ve never tried it, doesn’t it work with --with-opt-dir
option?

$ ruby extconf.rb --with-opt-dir=$winedir

Above -dir option requires include files exist under
${winedir}/include and libraries under ${winedir}/lib.

If they don’t, try:

$ ruby extconf.rb --with-opt-include=$wineincludedir --wit-opt-lib=$winelibdir

Hi,

···

At Wed, 29 Jan 2003 06:43:29 +0900, Antti Karanta wrote:

Neither seems to work. But then again, the include - dir does not even
exist:

akaranta@hyperion:~/cxoffice> ls
README bin changelog.txt doc icons lib license.txt support uninstall

I tried looking for it in the subfolders, but it’s not there either.

I meant WINE’s header and library directories.


Nobu Nakada

I used to provide ruby-stdlibs-win32ole package in my previous builds. It
was compiled against WINE headers w/o serious problems but I was never
able to use it with wine.

Do you have any samples how to run some application under wine and control
it with ruby’s win32ole?

···

On Wed, Jan 29, 2003 at 07:07:08AM +0900, nobu.nokada@softhome.net wrote:

Hi,

At Wed, 29 Jan 2003 06:43:29 +0900, > Antti Karanta wrote:

Neither seems to work. But then again, the include - dir does not even
exist:

akaranta@hyperion:~/cxoffice> ls
README bin changelog.txt doc icons lib license.txt support uninstall

I tried looking for it in the subfolders, but it’s not there either.

I meant WINE’s header and library directories.

/ Alexander Bokovoy


Courage is your greatest present need.

Neither seems to work. But then again, the include - dir does not even
exist:

akaranta@hyperion:~/cxoffice> ls
README bin changelog.txt doc icons lib license.txt support uninstall

I tried looking for it in the subfolders, but it’s not there either.

I meant WINE’s header and library directories.

Yes, I got that. CrossoverOffice includes a wine installation:

akaranta@hyperion:~/cxoffice> ls -l bin/wine
-rwxr-xr-x 1 akaranta users 23763 Nov 18 09:27 bin/wine

but it seems to be missing the include dir. So, I installed the
“standard” wine, too. Still didn’t work. = (

ruby extconf.rb --with-opt-dir=/opt/wine
checking for main() in -lole32… no
ruby extconf.rb --with-opt-include=/opt/wine/include
–with-opt-lib=/opt/wine/lib
checking for main() in -lole32… no
ls /opt/wine/
VERSION bin doc gnome include kde lib man personal share

But thanks for trying to help, anyway. = )

   -Antti
···

nobu.nokada@softhome.net wrote:

Hi,

ruby extconf.rb --with-opt-dir=/opt/wine
checking for main() in -lole32… no
ruby extconf.rb --with-opt-include=/opt/wine/include
–with-opt-lib=/opt/wine/lib
checking for main() in -lole32… no
ls /opt/wine/
VERSION bin doc gnome include kde lib man personal share

Now I tried with win32ole in recent CVS, and succeeded to
compile but segfaulted.

$ ruby ~/src/ruby/current/ext/win32ole/extconf.rb --with-opt-include=/usr/include/wine --with-opt-lib=/usr/lib/wine
checking for main() in -lole32… yes
checking for main() in -loleaut32… yes
checking for main() in -luuid… yes
checking for main() in -luser32… yes
checking for main() in -lkernel32… yes
checking for main() in -ladvapi32… yes
creating Makefile
$ make
gcc -fPIC -pipe -march=i686 -ggdb -g3 -ffast-math -O3 -fomit-frame-pointer -mpreferred-stack-boundary=2 -fPIC -I. -I/usr/lib/ruby/1.8/i686-linux -I/usr/lib/ruby/1.8/i686-linux -I/home/nobu/src/ruby/current/ext/win32ole -I/usr/include/wine -c /home/nobu/src/ruby/current/ext/win32ole/win32ole.c
gcc -shared -rdynamic -L"/usr/lib/wine" -L"/usr/lib" -o win32ole.so win32ole.o -lruby-1.8 -ladvapi32 -lkernel32 -luser32 -luuid -loleaut32 -lole32 -ldl -lcrypt -lm -lc
$ ruby -rwin32ole -e ‘p Win32OLE’
./win32ole.so: [BUG] Segmentation fault
ruby 1.8.0 (2003-01-27) [i686-linux]
Aborted (core dumped)

I have no idea about this.

···

At Wed, 29 Jan 2003 20:25:29 +0900, Antti Karanta wrote:


Nobu Nakada