[cairo-commit] rcairo/src/lib cairo.rb,1.16,1.17

Kouhei Sutou commit at pdx.freedesktop.org
Wed Apr 23 22:54:32 PDT 2008


Committed by: kou

Update of /cvs/cairo/rcairo/src/lib
In directory kemper:/tmp/cvs-serv4437/src/lib

Modified Files:
	cairo.rb 
Log Message:
* Rakefile, src/lib/cairo.rb: support gem for mswin32.
* README (Windows): add.


Index: cairo.rb
===================================================================
RCS file: /cvs/cairo/rcairo/src/lib/cairo.rb,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- cairo.rb	11 Apr 2008 03:01:34 -0000	1.16
+++ cairo.rb	24 Apr 2008 06:00:47 -0000	1.17
@@ -1,10 +1,20 @@
 # vim: filetype=ruby:expandtab:shiftwidth=2:tabstop=8:softtabstop=2 :
 
 if /mingw|mswin|mswin32/ =~ RUBY_PLATFORM
-  require 'rbconfig'
-  ENV['PATH'] = %w(bin lib).collect do |dir|
-    "#{Config::CONFIG["prefix"]}\\lib\\GTK\\#{dir};"
-  end.join('') + ENV['PATH']
+  require 'pathname'
+  base_dir = Pathname(File.dirname(__FILE__))
+  base_dir = base_dir.parent.parent + "cairo"
+  if base_dir.exist?
+    base_dir = base_dir.to_s.gsub(/\//, "\\")
+    ENV['PATH'] = %w(bin lib).collect do |dir|
+      "#{base_dir}\\#{dir};"
+    end.join('') + ENV['PATH']
+  else
+    require 'rbconfig'
+    ENV['PATH'] = %w(bin lib).collect do |dir|
+      "#{Config::CONFIG["prefix"]}\\lib\\GTK\\#{dir};"
+    end.join('') + ENV['PATH']
+  end
 end
 
 module Cairo



More information about the cairo-commit mailing list