Ruby-Gnome2-0.18 One-Click Installer for Windows


#1

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:
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
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.


#2

On Mon, Mar 23, 2009 at 11:16 PM, Hidehito O. 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 :slight_smile:

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

#3

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 ]------------------+
| |
| Mobile:(+36 20)356 9656 |
| |
± “Olyan lángész vagyok, hogy poroltóval kellene járnom!” -+


#4

On Sat, Apr 18, 2009 at 5:13 AM, KONTRA, Gergely 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

#5

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 ]------------------+
| |
| Mobile:(+36 20)356 9656 |
| |
± “Olyan lángész vagyok, hogy poroltóval kellene járnom!” -+


#6

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 ]------------------+
| |
| Mobile:(+36 20)356 9656 |
| |
± “Olyan lángész vagyok, hogy poroltóval kellene járnom!” -+


#7
  • 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 :slight_smile:


#8

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

regards

Simon