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
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)
-
elsif /chmod 0644/ =~ lineend
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)
-
endend
end
end
========
Hidehito O.