# Ruby-Gnome2-0.18 One-Click Installer for Windows

**URL:** <https://www.ruby-forum.com/t/ruby-gnome2-0-18-one-click-installer-for-windows/163645>\
**Category:** Ruby-Gnome 2\
**Created:** [March 23, 2009, 3:17pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-0-18-one-click-installer-for-windows/163645 "2009-03-23T15:17:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hidehito\_O](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/839c29/32.png) [@Hidehito\_O](https://www.ruby-forum.com/u/Hidehito_O)\
**Post date:** [March 23, 2009, 3:17pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-0-18-one-click-installer-for-windows/163645/1 "2009-03-23T15:17:43Z")

</div>

Hello.

I’m working with Ruby-Gnome2-0.18.1 one-click installer for Windows,  
using ruby-gnome2/branches/0.18 and win32installer/trunk.  
I’ve succeeded in building an installer package,  
but my build process requires some modification of them.  
My current build process is found here:  
[2009-03-21](http://d.hatena.ne.jp/luna_8bit/20090321#1237598167)  
My current binary can be downloaded from:

[http://nomina.petit-archives.mydns.jp/misc/ruby-gnome2-0.18.1-1-i386-mingw32.exe](http://nomina.petit-archives.mydns.jp/misc/ruby-gnome2-0.18.1-1-i386-mingw32.exe)  
Patches are attatched below.

This process and modification are tested in my environment alone.  
There are some remaining problems.

- Does this package work?
- Do these patches cause something bad in other environment?
- Should I use ruby-1.8.6 instead of ruby-1.8.7 in the build process?

I’d like them to be reviewed.

== patch to ruby-gnome2/branches/0.18 ==  
Index: bonobo/src/rbbonobo-main.c

===================================================================

— bonobo/src/rbbonobo-main.c (revision 3612)

+++ bonobo/src/rbbonobo-main.c (working copy)

@@ -97,7 +97,9 @@

rbonobo\_setup\_x\_error\_handler(self)  
VALUE self;  
{  
+#ifndef **MINGW32**  
bonobo\_setup\_x\_error\_handler();  
+#endif  
return self;  
}

Index: gnome/src/rbgnome.h

===================================================================

— gnome/src/rbgnome.h (revision 3612)

+++ gnome/src/rbgnome.h (working copy)

@@ -20,7 +20,9 @@

#define ENABLE\_NLS 1

+#ifndef **MINGW32**  
#include \<sys/time.h\>  
+#endif  
#include \<gnome.h\>

#undef PATH\_SEP  
Index: libart/src/rbart\_canvas.c

===================================================================

— libart/src/rbart\_canvas.c (revision 3612)

+++ libart/src/rbart\_canvas.c (working copy)

@@ -11,7 +11,17 @@

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/

+#ifdef **MINGW32**  
+#define XMD\_H  
+#endif  
+  
+#ifdef **MINGW32**  
+#define boolean boolean2  
#include “rbart.h”  
+#undef boolean  
+#else  
+#include “rbart.h”  
+#endif

#include \<jpeglib.h\>  
#include \<png.h\>

# == patch to win32installer/trunk == Index: Rakefile

— Rakefile (revision 3612)  
+++ Rakefile (working copy)  
@@ -28,7 +28,7 @@

# Don’t touch below

# 

desc “Call all other tasks”  
-task :default =\> [:copyglade, :copydoc, :copyrcairo, :copyrgnome2]  
+task :default =\> [:copyglade, :copydoc, :copysamples, :copyrcairo,  
:copyrgnome2]

desc “Copy gtk libs from GTK\_DIR to GTK dir”  
task :copygtk do  
@@ -105,7 +105,8 @@  
mkdir\_p dest\_dir unless File.exist? dest\_dir  
cp\_r(File.join(sitelibdir, “cairo.rb”), dest\_dir)  
mkdir\_p File.join(dest\_dir, “cairo”) unless File.exist?  
File.join(dest\_dir, “cairo”)

- cp\_r(Dir.glob(File.join(sitelibdir, “cairo”)), File.join(dest\_dir,  
“cairo”))

- mkdir\_p File.join(dest\_dir, “i386-msvcrt”) unless File.exist?  
File.join(dest\_dir, “i386-msvcrt”)
- cp\_r(Dir.glob(File.join(sitelibdir, “cairo”)), dest\_dir)  
cp\_r(Dir.glob(File.join(sitelibdir, “i386-msvcrt”, “cairo.so”)),  
File.join(dest\_dir, “i386-msvcrt”))  
cp\_r(Dir.glob(File.join(sitelibdir, “i386-msvcrt”, “rb\_cairo.h”)),  
File.join(dest\_dir, “i386-msvcrt”))  
end  
@@ -119,14 +120,18 @@  
path.gsub!(/[\r\n]/, “”)  
dest\_path = path.gsub(/^.\*site\_ruby/, “ruby/lib/ruby/site\_ruby”)  
mkdir\_p dest\_path unless File.exist? dest\_path

- 

```
 cp_r(File.join(path, File.basename(filename)), dest_path)

```

- 

```
 if path != dest_path

```

- 

```
   cp_r(File.join(path, File.basename(filename)), dest_path)

```

- 

```
 end

```

elsif /chmod 0644/ =~ line  
path = line.split(/ /)[2]  
path.gsub!(/[\r\n]/, “”)  
dest\_path = path.gsub(/^.\*site\_ruby/, “ruby/lib/ruby/site\_ruby”)  
dest\_path = File.dirname(dest\_path)  
mkdir\_p dest\_path unless File.exist? dest\_path

- 

```
 cp_r(path, dest_path)

```

- 

```
 if path != dest_path

```

- 

```
   cp_r(path, dest_path)

```

- 

```
 end

```

end  
end  
end

========  
Hidehito O.

---

<div class="post-metadata">

**Author:** ![Hidehito\_O](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/839c29/32.png) [@Hidehito\_O](https://www.ruby-forum.com/u/Hidehito_O)\
**Post date:** [March 23, 2009, 3:35pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-0-18-one-click-installer-for-windows/163645/2 "2009-03-23T15:35:57Z")

</div>

On Mon, Mar 23, 2009 at 11:16 PM, Hidehito O. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I’m working with Ruby-Gnome2-0.18.1 one-click installer for Windows,

Today is a day where I needed some cheering up. You have  
made my day 🙂

> This process and modification are tested in my environment alone.  
> There are some remaining problems.  
> Â - Does this package work?  
> Â - Do these patches cause something bad in other environment?  
> Â - Should I use ruby-1.8.6 instead of ruby-1.8.7 in the build process?

I would be happy to try these on my machine tomorrow. I’m  
not exactly sure what to do, but I will do my best to help!

```
          MikeC

```

---

<div class="post-metadata">

**Author:** ![Hidehito\_O](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/839c29/32.png) [@Hidehito\_O](https://www.ruby-forum.com/u/Hidehito_O)\
**Post date:** [April 17, 2009, 10:15pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-0-18-one-click-installer-for-windows/163645/3 "2009-04-17T22:15:00Z")

</div>

Hi all!

I am just realized there are no prebuild win32 binaries for ruby-gtk2  
on the download page. What has happened? (I just want to play around  
with ruby1.9 and gtk).

Thanks  
Gergo  
±[Gergely Kontra [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) ]------------------+  
| |  
| Mobile:(+36 20)356 9656 |  
| |  
± “Olyan lángész vagyok, hogy poroltóval kellene járnom!” -+

---

<div class="post-metadata">

**Author:** ![Hidehito\_O](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/839c29/32.png) [@Hidehito\_O](https://www.ruby-forum.com/u/Hidehito_O)\
**Post date:** [April 18, 2009, 1:11am UTC](https://www.ruby-forum.com/t/ruby-gnome2-0-18-one-click-installer-for-windows/163645/4 "2009-04-18T01:11:22Z")

</div>

On Sat, Apr 18, 2009 at 5:13 AM, KONTRA, Gergely [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi all!
> 
> I am just realized there are no prebuild win32 binaries for ruby-gtk2  
> on the download page. What has happened? (I just want to play around  
> with ruby1.9 and gtk).

I think other priorities have been more important for most people than  
win32 binaries. Also, ruby-gtk2 does _not_ work with ruby 1.9 at the  
moment (unless it has changed recently). Again, other priorities…

```
        MikeC

```

---

<div class="post-metadata">

**Author:** ![Hidehito\_O](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/839c29/32.png) [@Hidehito\_O](https://www.ruby-forum.com/u/Hidehito_O)\
**Post date:** [April 23, 2009, 10:36pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-0-18-one-click-installer-for-windows/163645/5 "2009-04-23T22:36:08Z")

</div>

If I have (not too much) freetime, how can I make the installer?

btw what is missing for 1.9?

±[Gergely Kontra [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) ]------------------+  
| |  
| Mobile:(+36 20)356 9656 |  
| |  
± “Olyan lángész vagyok, hogy poroltóval kellene járnom!” -+

---

<div class="post-metadata">

**Author:** ![Hidehito\_O](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/839c29/32.png) [@Hidehito\_O](https://www.ruby-forum.com/u/Hidehito_O)\
**Post date:** [May 2, 2009, 9:36pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-0-18-one-click-installer-for-windows/163645/6 "2009-05-02T21:36:57Z")

</div>

Hi!

First, thanks for the installer, seems to work.

Some notes:

- Register environment variables should be disabled, if you unselect  
GTK2  
runtime IMHO
- Ruby is detected correctly, but at the end of the address there are 2  
extra characters (seems like a newline, but displayed as 2 rectangles)
- The readme has linux style line endins, which the default application  
on  
windows (Notepad) does not handle correctly.
- GTK seems to be HUGE. Gimp itself is only 40 Mb with GTK, and this  
version  
of GTK is 100 Mb big.

I don’t know if it is a bug or not, but the hello world doesn’t run  
out-of-the-box with GIMP 2.6.6’s bundled GTK.

Gergo

±[Gergely K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) ]------------------+  
| |  
| Mobile:(+36 20)356 9656 |  
| |  
± “Olyan lÃ¡ngÃ©sz vagyok, hogy poroltÃ³val kellene jÃ¡rnom!” -+

---

<div class="post-metadata">

**Author:** ![Hidehito\_O](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/839c29/32.png) [@Hidehito\_O](https://www.ruby-forum.com/u/Hidehito_O)\
**Post date:** [May 2, 2009, 10:58pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-0-18-one-click-installer-for-windows/163645/7 "2009-05-02T22:58:09Z")

</div>

> - Ruby is detected correctly, but at the end of the address there are 2  
> extra characters (seems like a newline, but displayed as 2 rectangles)

I wondered about this too, and I thought it was some Japanese Character  
which failed to be displayed here, but it seemed like a really tiny  
error and one could delete it, so it did not seem important enough to  
report. Interesting to see I am not the only one who noticed it 🙂

---

<div class="post-metadata">

**Author:** ![Hidehito\_O](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/839c29/32.png) [@Hidehito\_O](https://www.ruby-forum.com/u/Hidehito_O)\
**Post date:** [April 28, 2009, 12:07pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-0-18-one-click-installer-for-windows/163645/8 "2009-04-28T12:07:26Z")

</div>

KONTRA, Gergely wrote:

> If I have (not too much) freetime, how can I make the installer?

Check the first post.

Since I guess you are using the mailing list, here is the link to the  
sync’ed forum post :

[http://www.ruby-forum.com/topic/182233](http://www.ruby-forum.com/topic/182233)

regards

Simon
