Forum: Ruby-Gnome 2 Problems Building on Windows

8616a8bf5c9ac0db67ac26f89d3b06b6?d=identicon&s=25 Mike Charlton (Guest)
on 2011-01-10 11:52
(Received via mailing list)
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
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2011-01-10 13:30
(Received via mailing list)
Hi,

In <AANLkTimV=HZpe_o-aE7KcMf_XzfPA=+hcidqpfVvJUr7@mail.gmail.com>
  "[ruby-gnome2-devel-en] Problems Building on Windows" on Mon, 10 Jan
2011 19:51:49 +0900,
  Mike Charlton <mikekchar@gmail.com> 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...


Thanks,
--
kou
8616a8bf5c9ac0db67ac26f89d3b06b6?d=identicon&s=25 Mike Charlton (Guest)
on 2011-01-10 14:09
(Received via mailing list)
Thanks for the quick reply!

On 10 January 2011 21:30, Kouhei Sutou <kou@cozmixng.org> 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 :-)  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
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2011-01-10 14:38
(Received via mailing list)
Hi,

In <AANLkTinpwJC5Y-GPO5AZUsnG8SmXEJV3cjUUGv=wtjqP@mail.gmail.com>
  "Re: [ruby-gnome2-devel-en] Problems Building on Windows" on Mon, 10
Jan 2011 22:09:04 +0900,
  Mike Charlton <mikekchar@gmail.com> 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
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.