Adding library paths for modules

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding library paths for modules

Daniel Mirota
Dear Slicer Developer Community,

I have a combination of C++ and python modules that share a common set
of libraries from the JHU cisst library (
https://trac.lcsr.jhu.edu/cisst ).  One solution we have at the moment
is to patch the CTK launcher to add these paths, but we would prefer
to leave Slicer unmodified.  Do you have any suggestions on how to add
these paths?  One thought we had was a python script to run once and
add the module paths, but this would not take care of the library
paths.

Thanks,
Dan
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: Adding library paths for modules

Jean-Christophe Fillion-Robin
Hi Daniel, 

As explained here [1], when extension are installed using the extension manager, launcher setting are updated to consider Slicer modules location and also standard location like "/path/to/extension/{bin, lib/Slicer-4.2}" [2][3]. (Note that the value of these paths is abstracted using Slicer_BIN_DIR and Slicer_LIB_DIR). 

But when you manually add the module path through the settings ... launcher settings are not updated. This will be fixed as part of issue 2145 [3]

It means that after the user install your extension, launcher setting will be automatically updated.

If you would like to help us improving the system so that launcher settings can be updated after manually adding module path to the settings, let me know and I would be happy to provide guidance.

Thanks
Jc





On Mon, Apr 22, 2013 at 4:07 PM, Daniel Mirota <[hidden email]> wrote:
Dear Slicer Developer Community,

I have a combination of C++ and python modules that share a common set
of libraries from the JHU cisst library (
https://trac.lcsr.jhu.edu/cisst ).  One solution we have at the moment
is to patch the CTK launcher to add these paths, but we would prefer
to leave Slicer unmodified.  Do you have any suggestions on how to add
these paths?  One thought we had was a python script to run once and
add the module paths, but this would not take care of the library
paths.

Thanks,
Dan
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject



--
+1 919 869 8849

_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: Adding library paths for modules

Daniel Mirota
Hi, Jean-Christophe,

Thank you for your detailed and prompt response.  I've been reading
through the documentation for building an extension ( [1] and [2] )
and I was wondering, is it possible to build and package an extension
entirely offline?  The extension is not quite ready for primetime just
yet and I would like to build and test it locally.

I found a cmake file ( [3] ) which appears to perform the build
process.  Although, the file also uploads it, which could be commented
out.

Then, I was thinking about testing it locally by installing it via
python script, which appears to be possible by creating an instance of
the qSlicerExtensionsManagerModel (that is python wrapped) and calling
installExtension.

My thoughts are to bundle all of the modules that share the cisst
library into one extension.  Thus, the path to the libraries would be
installed in the slicer library and python paths when the extension is
installed.

I would appreciate your comments and input.

Thanks again,
Dan


[1] http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Tutorials/BundleModulesIntoExtension
[2] http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions
[3] https://github.com/Slicer/Slicer/blob/master/Extensions/CMake/SlicerBlockBuildPackageAndUploadExtension.cmake



On Mon, Apr 22, 2013 at 4:16 PM, Jean-Christophe Fillion-Robin
<[hidden email]> wrote:

> Hi Daniel,
>
> As explained here [1], when extension are installed using the extension
> manager, launcher setting are updated to consider Slicer modules location
> and also standard location like "/path/to/extension/{bin, lib/Slicer-4.2}"
> [2][3]. (Note that the value of these paths is abstracted using
> Slicer_BIN_DIR and Slicer_LIB_DIR).
>
> But when you manually add the module path through the settings ... launcher
> settings are not updated. This will be fixed as part of issue 2145 [3]
>
> It means that after the user install your extension, launcher setting will
> be automatically updated.
>
> If you would like to help us improving the system so that launcher settings
> can be updated after manually adding module path to the settings, let me
> know and I would be happy to provide guidance.
>
> Thanks
> Jc
>
>
> [1]
> http://slicer-devel.65872.n3.nabble.com/Unloaded-module-when-linked-to-OpenCV-tp4028392p4028399.html
>
> [2]
> https://github.com/Slicer/Slicer/blob/master/Base/QTCore/qSlicerExtensionsManagerModel.cxx#L581-595
>
> [3]
> https://github.com/Slicer/Slicer/blob/master/Base/QTCore/qSlicerExtensionsManagerModel.cxx#L443-472
>
> [4] http://www.na-mic.org/Bug/view.php?id=2145
>
>
> On Mon, Apr 22, 2013 at 4:07 PM, Daniel Mirota <[hidden email]> wrote:
>>
>> Dear Slicer Developer Community,
>>
>> I have a combination of C++ and python modules that share a common set
>> of libraries from the JHU cisst library (
>> https://trac.lcsr.jhu.edu/cisst ).  One solution we have at the moment
>> is to patch the CTK launcher to add these paths, but we would prefer
>> to leave Slicer unmodified.  Do you have any suggestions on how to add
>> these paths?  One thought we had was a python script to run once and
>> add the module paths, but this would not take care of the library
>> paths.
>>
>> Thanks,
>> Dan
>> _______________________________________________
>> slicer-devel mailing list
>> [hidden email]
>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
>> To unsubscribe: send email to
>> [hidden email] with unsubscribe as the
>> subject
>
>
>
>
> --
> +1 919 869 8849
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: Adding library paths for modules

lasso
In reply to this post by Daniel Mirota
Hi Dan,

You can also check out the SlicerRT extension's CMake files. SlicerRT builds and uses Plastimatch as your extension would build and use CISST.

Andras

From: [hidden email]
Sent: ‎2013-‎04-‎22 18:17
To: [hidden email]
Cc: [hidden email]; [hidden email]
Subject: Re: [slicer-devel] Adding library paths for modules

Hi, Jean-Christophe,

Thank you for your detailed and prompt response.  I've been reading
through the documentation for building an extension ( [1] and [2] )
and I was wondering, is it possible to build and package an extension
entirely offline?  The extension is not quite ready for primetime just
yet and I would like to build and test it locally.

I found a cmake file ( [3] ) which appears to perform the build
process.  Although, the file also uploads it, which could be commented
out.

Then, I was thinking about testing it locally by installing it via
python script, which appears to be possible by creating an instance of
the qSlicerExtensionsManagerModel (that is python wrapped) and calling
installExtension.

My thoughts are to bundle all of the modules that share the cisst
library into one extension.  Thus, the path to the libraries would be
installed in the slicer library and python paths when the extension is
installed.

I would appreciate your comments and input.

Thanks again,
Dan


[1] http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Tutorials/BundleModulesIntoExtension
[2] http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions
[3] https://github.com/Slicer/Slicer/blob/master/Extensions/CMake/SlicerBlockBuildPackageAndUploadExtension.cmake



On Mon, Apr 22, 2013 at 4:16 PM, Jean-Christophe Fillion-Robin
<[hidden email]> wrote:

> Hi Daniel,
>
> As explained here [1], when extension are installed using the extension
> manager, launcher setting are updated to consider Slicer modules location
> and also standard location like "/path/to/extension/{bin, lib/Slicer-4.2}"
> [2][3]. (Note that the value of these paths is abstracted using
> Slicer_BIN_DIR and Slicer_LIB_DIR).
>
> But when you manually add the module path through the settings ... launcher
> settings are not updated. This will be fixed as part of issue 2145 [3]
>
> It means that after the user install your extension, launcher setting will
> be automatically updated.
>
> If you would like to help us improving the system so that launcher settings
> can be updated after manually adding module path to the settings, let me
> know and I would be happy to provide guidance.
>
> Thanks
> Jc
>
>
> [1]
> http://slicer-devel.65872.n3.nabble.com/Unloaded-module-when-linked-to-OpenCV-tp4028392p4028399.html
>
> [2]
> https://github.com/Slicer/Slicer/blob/master/Base/QTCore/qSlicerExtensionsManagerModel.cxx#L581-595
>
> [3]
> https://github.com/Slicer/Slicer/blob/master/Base/QTCore/qSlicerExtensionsManagerModel.cxx#L443-472
>
> [4] http://www.na-mic.org/Bug/view.php?id=2145
>
>
> On Mon, Apr 22, 2013 at 4:07 PM, Daniel Mirota <[hidden email]> wrote:
>>
>> Dear Slicer Developer Community,
>>
>> I have a combination of C++ and python modules that share a common set
>> of libraries from the JHU cisst library (
>> https://trac.lcsr.jhu.edu/cisst ).  One solution we have at the moment
>> is to patch the CTK launcher to add these paths, but we would prefer
>> to leave Slicer unmodified.  Do you have any suggestions on how to add
>> these paths?  One thought we had was a python script to run once and
>> add the module paths, but this would not take care of the library
>> paths.
>>
>> Thanks,
>> Dan
>> _______________________________________________
>> slicer-devel mailing list
>> [hidden email]
>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
>> To unsubscribe: send email to
>> [hidden email] with unsubscribe as the
>> subject
>
>
>
>
> --
> +1 919 869 8849
_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject

_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject