[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] libsvn_swig_ruby as dll for windows builds

From: Kouhei Sutou <kou_at_cozmixng.org>
Date: 2007-01-18 16:43:49 CET

Hi,

Thanks for your great works for the Ruby bindings on Windows!

In <ae6cb1100701151543j50ec8480gd1c0a30fe2115854@mail.gmail.com>
  "Re: [PATCH] libsvn_swig_ruby as dll for windows builds" on Mon, 15 Jan 2007 15:43:41 -0800,
  "Joe Swatosh" <joe.swatosh@gmail.com> wrote:

> > > * subversion/bindings/swig/ruby/test/run-test.rb
> > > copy the libsvn_swig_ruby-1.dll to the ext directory for testing
> > > add the ext directory to the path so libsvn_swig_ruby-1.dll can be
> > > found to load
> >
> > Could you teach me that directory structure of build system
> > on Windows?
> >
> > Do we need to setup ENV["PATH"]? Can we use $LOAD_PATH
> > instead of ENV["PATH"]?
>
> I am no expert on the build system, but here are my observations.
> After generating the build files with the "python gem-make.py ...",
> rebuilding Apache, I change directory to the working copy trunk an do
> a build with "msdev subversion_msvc.dsw /USEENV /MAKE "__ALL_TESTS__ -
> Win32 Release" where the Release part specifies a release build (could
> be debug). After msdev has run, there is a Release subdirectory in
> the working copy trunk. I them build the Perl, Python and Ruby
> bindings with similar invocations of msdev. The Release directory
> looks like this:
(snip)

> To answer your explicit question above: Yes, we must modify the ENV['PATH'].

OK. Does the attached patch works on Windows? Could you try
the patch?

Regards,

--
kou

Index: subversion/bindings/swig/ruby/test/run-test.rb
===================================================================
--- subversion/bindings/swig/ruby/test/run-test.rb (revision 23088)
+++ subversion/bindings/swig/ruby/test/run-test.rb (working copy)
@@ -5,7 +5,7 @@
 
 test_dir = File.expand_path(File.join(File.dirname(__FILE__)))
 base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
-top_dir = File.expand_path(File.join(base_dir, "..", "..", ".."))
+top_dir = File.expand_path(File.join(base_dir, "..", "..", "..", ".."))
 
 ext_dir = File.join(base_dir, ".ext")
 ext_svn_dir = File.join(ext_dir, "svn")
@@ -19,6 +19,14 @@
   ext_svn_ext_dir = File.join(ext_svn_dir, "ext")
   FileUtils.mkdir_p(ext_svn_ext_dir)
   FileUtils.cp(Dir.glob(File.join(base_dir, "*.dll"), ext_svn_ext_dir))
+
+ dlls_dir = base_dir.sub(/^(#{Regexp.escape(top_dir)})/) do |matched|
+ File.join(matched, "Release")
+ end
+ FileUtils.cp(Dir.glob(File.join(dlls_dir, "*.dll")), ext_svn_ext_dir)
+ FileUtils.cp(Dir.glob(File.join(dlls_dir, 'libsvn_swig_ruby', "*.dll")),
+ ext_svn_ext_dir)
+ ENV["PATH"] = "#{ext_svn_ext_dir};#{ENV['PATH']}"
 else
   ENV["PATH"] = "#{File.join(top_dir, 'subversion', 'svnserve')}:#{ENV['PATH']}"
   FileUtils.ln_sf(File.join(base_dir, ".libs"), File.join(ext_svn_dir, "ext"))

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jan 18 16:44:11 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.