[vtk-developers] ruby patch to vtk-5.0.0
David Gobbi
dgobbi at atamai.com
Mon Mar 13 00:34:13 EST 2006
Hi Seiya,
Thanks for the information about installation. Actually I have too many
versions of VTK on
my computer to do a "make install" of any one of them. That is why I
did a manual "ruby setup.rb".
Afterwards, I copied all of the vtk .rb files from
/usr/lib/site_ruby/1.8/ to ~/VTKbin/Wrapping/Ruby
and set RUBYLIB to ~/VTKbin/Wrapping/Ruby:~/VTKbin/bin.
It would be good if "cmake" creates all the .rb files that you need in
${VTK_BINARY_DIR}/Wrapping/Ruby so that it would be possible to run the
ruby examples
without doing a "make install" first. In fact, this will be necessary
in order for VTK "make test"
to work properly with ruby, because testing has to work before install.
Or am I missing something?
- David
Seiya Nishizawa wrote:
> Hi David,
>
> Thanks for you using it.
>
> On Sat, 11 Mar 2006 12:59:48 -0500 (EST)
> David Gobbi <dgobbi at atamai.com> wrote:
>
>
>> The patch is very complete, I can tell that it is based on the Python wrappers. The fact that you
>> included 82 examples (were these translated from the Python examples?) is very impressive.
>>
> Yes, you are right.
> At the first, I copyed them from python's examples.
> So there may be some words "python" in comment part of the ruby samples :-)
>
>
>> To install on my Linux system I did the following, is this what you would recommend?
>> 1) grabbed VTK-5-0 from CVS
>> 2) cd VTK
>> 3) patch -p1 < vtk-ruby-060306.patch
>> 4) built VTK with cmake/make
>> 5) cd Wrapping/Ruby
>> 6) ruby setup.rb (as root)
>> 7) installed the "narray-0.5.8" extension for ruby
>> 8) set LD_LIBRARY_PATH to find the VTK "bin" directory
>>
> After built by make (4),
> you can install them to your system by typing
> "%make install",
> which install vtk files to proper path under CMAKE_INSTALL_PREFIX
> and ruby files to ruby_site path (default).
> If you specified
> VTK_RUBY_LIB_DIR, VTK_RUBY_ARCH_DIR, and VTK_RUBY_SETUP_ARGS(--prefix="/hoge"),
> *.rb files are installed to /hoge/VTK_RUBY_LIB_DIR,
> and *.so files are to /hoge/VTK_RUBY_ARCH_DIR.
>
>
>> I do have two comments:
>>
>> 1) It should not require "narray", since "narray" is actually only used by two files:
>> vtk/util/vtkImageImportFromArray.rb and vtk/util/vtkImageExportToArray.rb.
>> It would be better if these two files were moved from "vtk/util" into "vtk/narray"
>> to make them optional.
>>
> There was bug in vtk/util/vtkImageImportFromArray.rb: "rescue" -> "rescue LoadError".
> After the fix, it works without narray.
> So it is not necessary to move to "vtk/narray" I think.
>
>
>
>> 2) You took the "vtk" prefix off of the classes. This does not always work, because
>> the "vtk3DSImporter" class becomes "3DSImporter" if you remove the "vtk". This
>> leads to a syntax error:
>>
> I skip because it was discussed in another thread.
>
> --------------
> Seiya Nishizawa
> seiya at kugi.kyoto-u.ac.jp
> GnuPG Fingerprint = 0696 D312 5737 929A B481 FC91 44F4 6BA0 467A 7703
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
More information about the vtk-developers
mailing list