Problems Building on Windows

I am having a huge amount of problems building this on windows.
I admit that I am not following the directions on the website
because I would like to have something newer than 2.10.
I got the 2.22 bundle from gtk.org. Maybe it’s not supported?

Anyway, my first problem was that I needed to set the
PKG_CONFIG_PATH environment variable so that ruby-gnome2
could find my GTK installation. It took me a long time to
figure that out, so it would be nice to have a note in the
documentation.

But then I ran into the problem that the mkmf-gnome2.rb
script doesn’t set the CFLAGS from pkg-config. I’m not
sure why because Kou’s pkg-config script makes it quite
easy.

But then finally, some GTK variables can’t be found.
It seems like 2.22 isn’t supported yet. But I can’t find
anything on the website saying what version is supported.
I don’t believe it is 2.10 because that is more than 2
years old.

I would really, really like to build this so I can finally
release my application on windows. Any help is
appreciated.

MikeC

Hi,

In AANLkTimV=HZpe_o-aE7KcMf_XzfPA=removed_email_address@domain.invalid
“[ruby-gnome2-devel-en] Problems Building on Windows” on Mon, 10 Jan
2011 19:51:49 +0900,
Mike C. [email protected] wrote:

I am having a huge amount of problems building this on windows.
I admit that I am not following the directions on the website
because I would like to have something newer than 2.10.
I got the 2.22 bundle from gtk.org. Maybe it’s not supported?

GTK+ 2.22 is supported.

Anyway, my first problem was that I needed to set the
PKG_CONFIG_PATH environment variable so that ruby-gnome2
could find my GTK installation. It took me a long time to
figure that out, so it would be nice to have a note in the
documentation.

Could you contribute your build instructions?
We want to update the following documents:
http://ruby-gnome2.sourceforge.jp/hiki.cgi?compile_mingw
http://ruby-gnome2.sourceforge.jp/hiki.cgi?compile_vc

But then I ran into the problem that the mkmf-gnome2.rb
script doesn’t set the CFLAGS from pkg-config. I’m not
sure why because Kou’s pkg-config script makes it quite
easy.

Did you and pkg-config.rb find GTK+ *.pc?

But then finally, some GTK variables can’t be found.
It seems like 2.22 isn’t supported yet. But I can’t find
anything on the website saying what version is supported.
I don’t believe it is 2.10 because that is more than 2
years old.

We can install Ruby/GTK2 binary with GTK+ 2.22 binaries by
gem:

gem install gtk2

The gem was built with MinGW on my Debian GNU/Linux. (It’s
cross compile.)

But GTK+ version isn’t saied as you saied.
We should update the following document…
http://ruby-gnome2.sourceforge.jp/hiki.cgi?Install+Guide+for+Windows

Thanks,

kou

Thanks for the quick reply!

On 10 January 2011 21:30, Kouhei S. [email protected] wrote:

GTK+ 2.22 is supported.

That’s good to know. Probably there was something else wrong.

Could you contribute your build instructions?
We want to update the following documents:
http://ruby-gnome2.sourceforge.jp/hiki.cgi?compile_mingw
http://ruby-gnome2.sourceforge.jp/hiki.cgi?compile_vc

OK. I will try again tomorrow. I am using mingw right now.
If I can get it to work I will write some instructions.

But then I ran into the problem that the mkmf-gnome2.rb
script doesn’t set the CFLAGS from pkg-config. I’m not
sure why because Kou’s pkg-config script makes it quite
easy.

Did you and pkg-config.rb find GTK+ *.pc?

Yes. Once I set the PKG_CONFIG_PATH there was no
problem. But the mkmf-gnome2.rb script doesn’t seem
to use the config information. I added some code like:

gtk_config = PackageConfig.new(“gtk±2.0”)
CFLAGS += " " + gtk_config.cflags

It is possible I misunderstood something and it is handled
somewhere else. But I couldn’t get it to work without doing
this.

We can install Ruby/GTK2 binary with GTK+ 2.22 binaries by
gem:

gem install gtk2

The gem was built with MinGW on my Debian GNU/Linux. (It’s
cross compile.)

Ahh. That’s VERY good :slight_smile: I didn’t realize it. I will use that.
But I will try to get everything built and then update the
documentation.
My first language is English, so it’s will be easy for me once I
understand
what to do.

    MikeC

Hi,

In AANLkTinpwJC5Y-GPO5AZUsnG8SmXEJV3cjUUGv=removed_email_address@domain.invalid
“Re: [ruby-gnome2-devel-en] Problems Building on Windows” on Mon, 10
Jan 2011 22:09:04 +0900,
Mike C. [email protected] wrote:

Could you contribute your build instructions?
We want to update the following documents:
http://ruby-gnome2.sourceforge.jp/hiki.cgi?compile_mingw
http://ruby-gnome2.sourceforge.jp/hiki.cgi?compile_vc

OK. I will try again tomorrow. I am using mingw right now.
If I can get it to work I will write some instructions.

Thanks!

gtk_config = PackageConfig.new(“gtk±2.0”)
CFLAGS += " " + gtk_config.cflags

It is possible I misunderstood something and it is handled
somewhere else. But I couldn’t get it to work without doing
this.

OK. I understand.
The current mkmf-gnome2.rb requires GTK+ and required
binaries are installed under
RUBY_GTK2_TOP_DIRECTORY/vendor/local/ direcotry.

.
|-- ext
| -- gtk2 | ... . – vendor
`-- local
|-- bin
|-- lib

See also directories in Ruby/GTK2 gem.

My first language is English, so it’s will be easy for me once I understand
what to do.

Thanks! It will be very useful.


kou