Forum: Ruby-Gnome 2 Ruby-Gnome2-0.18 One-Click Installer for Windows

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0b3691137137dbbfe0d517b2ddde4e46?d=identicon&s=25 Hidehito Ota (Guest)
on 2009-03-23 15:17
(Received via mailing list)
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-gn...
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 Ota
8616a8bf5c9ac0db67ac26f89d3b06b6?d=identicon&s=25 Mike Charlton (Guest)
on 2009-03-23 15:35
(Received via mailing list)
On Mon, Mar 23, 2009 at 11:16 PM, Hidehito Ota <eiota0926@gmail.com>
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
7988f36d0ee9050e8f1d646db55a9eb0?d=identicon&s=25 KONTRA, Gergely (Guest)
on 2009-04-17 22:15
(Received via mailing list)
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 <pihentagy@gmail.com> ]------------------+
|                                                           |
| Mobile:(+36 20)356 9656                                   |
|                                                           |
+- "Olyan lángész vagyok, hogy poroltóval kellene járnom!" -+
8616a8bf5c9ac0db67ac26f89d3b06b6?d=identicon&s=25 Mike Charlton (Guest)
on 2009-04-18 01:11
(Received via mailing list)
On Sat, Apr 18, 2009 at 5:13 AM, KONTRA, Gergely <pihentagy@gmail.com>
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
7988f36d0ee9050e8f1d646db55a9eb0?d=identicon&s=25 KONTRA, Gergely (Guest)
on 2009-04-23 22:36
(Received via mailing list)
If I have (not too much) freetime, how can I make the installer?

btw what is missing for 1.9?


+-[ Gergely Kontra <pihentagy@gmail.com> ]------------------+
|                                                           |
| Mobile:(+36 20)356 9656                                   |
|                                                           |
+- "Olyan lángész vagyok, hogy poroltóval kellene járnom!" -+
B985bf8029d396259f579c70f809269a?d=identicon&s=25 Simon Arnaud (sarnaud)
on 2009-04-28 12:07
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
7988f36d0ee9050e8f1d646db55a9eb0?d=identicon&s=25 KONTRA, Gergely (Guest)
on 2009-05-02 21:36
(Received via mailing list)
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 Kontra <pihentagy@gmail.com> ]------------------+
|                                                           |
| Mobile:(+36 20)356 9656                                   |
|                                                           |
+- "Olyan lángész vagyok, hogy poroltóval kellene járnom!" -+
4828d528e2e46f7c8160c336eb332836?d=identicon&s=25 Robert Heiler (shevegen)
on 2009-05-02 22:58
> - 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 :)
This topic is locked and can not be replied to.