[Insight-users] Re: WrapITK binaries
Michael Bell
michael.bell at acm.org
Wed Aug 16 13:40:51 EDT 2006
Gaetan,
Everything is harder in Windows, but it was still successful. I was
again able to put all of the relevant libraries into a single
directory.
I have a 30M zip file containing ITK compiled with VS7 for XP, and the
java wrappers for floats and unsigned chars. If there is a place and a
use for this , let me know.
thanks,
michael
On 8/16/06, Michael Bell <michael.bell at acm.org> wrote:
> Gaetan,
>
> This works great on Linux. I can move the libs around all I want now.
> I just take the bin directory from ITK, the lib directory from
> wrapITK, and InsightToolkit.jar.
>
> I'm compiling on Windows now. I'll let you know the results.
>
> thanks,
> michael
>
> On 8/15/06, Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr> wrote:
> >
> > Hi,
> >
> > I have pushed a patch to WrapITK repository to search libs in standard
> > system's paths if the libs are not found in build or install dir. I was
> > giving a full name (with lib prefix and .so suffix) to the loadLibrary()
> > method, while it require the lib name without prefix or suffix.
> > http://voxel/darcsweb/darcsweb.cgi?r=WrapITK;a=filediff;h=20060815220327-2fc9d-1faff0e8575fd39dab49036955d77cda1b9b9f7c.gz;f=Java/itkbase.java.in
> >
> > Please test and report any problem !
> >
> > Gaetan
> >
> > Le Mon, 14 Aug 2006 22:31:33 +0200, Michael Bell <michael.bell at acm.org> a
> > écrit:
> >
> > > Gaetan,
> > >
> > > I understand why you would load from an absolute path based on the jar
> > > file; it is very convenient for the developer. However, the path has
> > > to be set to point to the ITK libs already, correct? So loadLibrary
> > > appears to be appropriate, and I think it will be the solution for my
> > > purposes.
> > >
> > > As always, I appreciate your uncommon responsiveness.
> > >
> > > thanks,
> > > michael
> > >
> > >
> > > On 8/14/06, Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr> wrote:
> > >>
> > >> Hi Michael,
> > >>
> > >> You're right, java use absolute paths (and tcl do the same BTW). Only
> > >> python is currently able to be installed anywhere without problem -
> > >> that's
> > >> what I have tested. I'm not sure what is the best way to handle that
> > >> problem. In python, we are using the magic __file__ variable to find the
> > >> path where WrapITK is installed. Perhaps there is the same kind of thing
> > >> for tcl, but I would be surprised to have the same in java.
> > >> Perhaps can we use standard environment variable to found the libs if
> > >> they
> > >> are not installed in the default places ? In Java for example, instead
> > >> of
> > >> loading the libs in a particular path, we could delegate the job of
> > >> finding the path of the library to some standard methods, by using
> > >> Runtime.loadLibrary() instead of Runtime.load(). That way, loadLibrary()
> > >> will find the lib if they are in the LD_LIBRARY_PATH on linux, in the
> > >> PATH
> > >> on windows, in the DYLD_LIBRARY_PATH on mac os x, ...
> > >> The user only have to take care to set correctly the PATH. Would it be
> > >> ok
> > >> for you ?
> > >>
> > >> Gaetan
> > >>
> > >>
> > >> Le Mon, 14 Aug 2006 17:28:16 +0200, Michael Bell <michael.bell at acm.org>
> > >> a
> > >> écrit:
> > >>
> > >> > How does CPack handle directory load paths?
> > >> >
> > >> > For java wrapping, the dll SwigRuntimeJava is loaded from an absolute
> > >> > path, the path to the build directory or install path. See
> > >> > WrapITK/Java/itkbase.java.in.
> > >> >
> > >> > If I want to distribute this to other machines without compiling from
> > >> > scratch, this means that I can't put SwigRuntimeJava in the classpath
> > >> > and expect it to work. I can't even preload it because it always gets
> > >> > loaded with InsightToolkit.jar.
> > >> >
> > >> > Does itkbase need to be changed for this to work, or does CPack take
> > >> > care of the problem? (BTW, this causes problems on unix and windows)
> > >> >
> > >> > thanks,
> > >> > michael
> > >> >
> > >> >
> > >> > On 8/10/06, Gaetan Lehmann <gaetan.lehmann at jouy.inra.fr> wrote:
> > >> >>
> > >> >> Hi,
> > >> >>
> > >> >> I have added a basic CPack configuration to WrapITK.
> > >> >> It work just fine with linux, but I would not be surprised to have
> > >> some
> > >> >> problems on other systems (like windows).
> > >> >> Can you tests on your system(s) ?
> > >> >>
> > >> >> The only thing to do is to set INSTALL_WRAP_ITK_COMPATIBILITY to OFF
> > >> >> with
> > >> >> cmake, and to build the target "package". On my system:
> > >> >>
> > >> >> [glehmann at marvin build]$ make package
> > >> >> Run CPack packaging tool...
> > >> >> CPack: Install projects
> > >> >> CPack: - Run preinstall target for: WrapITK
> > >> >> CPack: - Install project: WrapITK
> > >> >> CPack: Compress package
> > >> >> CPack: Finalize package
> > >> >> CPack: Package
> > >> >>
> > >> /home/glehmann/src/contrib-itk/WrapITK-unstable/build/WrapITK-0.2.1-Linux.sh
> > >> >> generated.
> > >> >>
> > >> >> So easy :-)
> > >> >>
> > >> >> Gaetan
> > >> >>
> > >> >>
> > >> >>
> > >> >> On Wed, 09 Aug 2006 23:00:00 +0200, Charl P. Botha
> > >> <cpbotha at gmail.com>
> > >> >> wrote:
> > >> >>
> > >> >> > On 8/9/06, Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr> wrote:
> > >> >> >> We have already talked about that some time ago with Charl.
> > >> >> >> Charl, I think you have already deployed WrapITK on several host.
> > >> >> Have
> > >> >> >> you
> > >> >> >> used a special method to do that ?
> > >> >> >
> > >> >> > For this application I use PyInstaller, but WrapITK was too complex
> > >> >> > for it. In the end I just made a script that collects all the
> > >> >> > relevant ITK/WrapITK DLLs and Python files and puts them in the
> > >> right
> > >> >> > places, on Windows and Linux. I ship this whole tree with my
> > >> >> > application. The script is now integrated in my Frankensteinian
> > >> >> > build-system and it seems to work.
> > >> >> >
> > >> >> > You're welcome to have the bits that do the WrapITK 'packaging', of
> > >> >> > course. In principle, one should be able to take the generated
> > >> tree
> > >> >> > and plonk it down on a user's system. After having set the
> > >> >> > environment with a brilliant tool such as <plug>
> > >> >> > cpbotha.net/Software/envedit </plug> you're good to go.
> > >> >> >
> > >> >> > See you,
> > >> >> > Charl
> > >> >>
> > >> >>
> > >> >>
> > >> >> --
> > >> >> Gaëtan Lehmann
> > >> >> Biologie du Développement et de la Reproduction
> > >> >> INRA de Jouy-en-Josas (France)
> > >> >> tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
> > >> >> http://voxel.jouy.inra.fr
> > >> >>
> > >> >
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> Gaëtan Lehmann
> > >> Biologie du Développement et de la Reproduction
> > >> INRA de Jouy-en-Josas (France)
> > >> tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
> > >> http://voxel.jouy.inra.fr
> > >>
> > >
> > >
> >
> >
> >
> > --
> > Gaëtan Lehmann
> > Biologie du Développement et de la Reproduction
> > INRA de Jouy-en-Josas (France)
> > tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
> > http://voxel.jouy.inra.fr
> >
>
>
> --
> michael.bell at acm.org
>
--
michael.bell at acm.org
More information about the Insight-users
mailing list