<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>hi Pete</div><div><br></div><div>I use this script to clean my pluings in mac: </div><div><div><br></div><div>"./fix_lib $(Paraview_build_dir)/bin '$(ParaviewPXDMFReader_lib_install_dir)/libPXDMFReader.dylib'"</div></div><div><br></div><div>----- fix_lib -------</div><div><div>#!/bin/bash</div><div><br></div><div>stripString=$1</div><div>libpath=$2</div><div>insertString=@executable_path/../Libraries/</div><div><br></div><div>echo "Striping :" $stripString</div><div>echo "In : $libpath"</div><div>echo "insert String :" $insertString</div><div><br></div><div>for myfile in `otool -L $libpath | grep "$stripString" | awk '{print $1}'`</div><div>do</div><div> #echo "fichier=$myfile"</div><div> lib=`echo $myfile | awk -F / '{print $NF}'`</div><div> echo "changing $myfile to $insertString$lib" </div><div> install_name_tool -change $myfile $insertString$lib $libpath</div><div>done</div><div><br></div><div>for myfile in `otool -L $libpath | grep "framework" | grep -v "/System" | awk '{print $1}'`</div><div>do</div><div> #echo "fichier=$myfile"</div><div> echo "changing $myfile to @executable_path/../Frameworks/$myfile" </div><div> install_name_tool -change $myfile @executable_path/../Frameworks/$myfile $libpath</div><div>done</div><div><br></div><div>echo "changing name to libPXDMFReader.dylib"</div><div>install_name_tool -id libPXDMFReader.dylib $libpath</div><div><br></div><div>echo "Done"</div><div>echo "install_name_tool -change @executable_path/../Libraries/libvtkhdf5.1.8.5.dylib @executable_path/../Libraries/libhdf5.1.8.5.dylib$libpath"</div><div><br></div><div>exit</div></div><div><br></div><br><div><div>Le 7 févr. 2012 à 20:23, Peter Schmitt a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="">Hi David,</span><div style=""><br></div><div style="">Thanks for the hints. My goal is to create a plugin that my collaborators can load using the Kitware release of the ParaView binaries. I don't care if my plugin is installed in the SuperBuild's ParaView.app. <br>
</div><div style=""><br></div><div style="">In any case, I tried adding this to my plugin's CMakeLists.txt file:</div><div style=""><br></div><blockquote style=""><div><div>SET(PARAVIEW_VERSION "${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR}")</div>
</div><div><div>SET(PV_INSTALL_BIN_DIR bin)</div></div><div><div>SET(PV_INSTALL_LIB_DIR lib/paraview-${PARAVIEW_VERSION})</div></div><div><div><br></div></div><div><div>INSTALL(TARGETS vtkLFMReader</div></div><div><div> RUNTIME DESTINATION ${PV_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries</div>
</div><div><div> LIBRARY DESTINATION ${PV_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries</div></div><div><div> ARCHIVE DESTINATION ${PV_INSTALL_LIB_DIR} COMPONENT Development)</div></div></blockquote><div style=""><br></div><div style="">
Now `make install` copies my file to /usr/local/paraview-3.12. However, otool still shows hard-coded paths (ie. not @executable_path).</div><div style=""><br></div><div style="">I'll look into BundleUtilities to see if I can explicitly call fixup_bundle_item to set the @executable_path for my plugin. I suppose the easiest method might be just to copy my plugin to the ParaView source tree & let the ParaView `make install` target handle setting all of fixup_bundle's arguments for me. That seemed to work with an old version of ParaView <a href="http://www.paraview.org/pipermail/paraview/2008-November/009952.html" target="_blank" style="color:rgb(17,85,204)">http://www.paraview.org/pipermail/paraview/2008-November/009952.html</a></div>
<div style=""><br></div><div style="">Thanks,</div><div style="">Pete</div><br><div class="gmail_quote">On Mon, Feb 6, 2012 at 5:26 PM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">fixup_bundle is a cmake 2.8 feature that internally just runs<br>
install_name_tool on Mac like you are considering doing manually.<br>
I believe it is only tied the install target but I might be wrong on<br>
that, ask on the cmake list.<br>
<br>
See the ParaViewPlugins.cmake and Superbuild/CMakeLists.txt for how<br>
our plugins get the install target hooked in.<br>
<br>
David E DeMarle<br>
Kitware, Inc.<br>
R&D Engineer<br>
21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: <a href="tel:518-881-4909" value="+15188814909">518-881-4909</a><br>
<div><div class="h5"><br>
<br>
<br>
On Mon, Feb 6, 2012 at 7:06 PM, Peter Schmitt <<a href="mailto:pschmittml@gmail.com">pschmittml@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I have built ParaView-3.12.0 from the SuperBuild. Using otool, I noticed<br>
> that libraries had a hard-coded path to each shared library in the build<br>
> directory (otool -L ParaView-build/bin/libvtkPVServerManager.dylib).<br>
> However, after `make install`, I noticed each library was prefixed with<br>
> @executable_path (otool -L /usr/local/ParaView\<br>
> 3.12.0.app/Contents/Libraries/libvtkPVServerManager.dylib). I would like to<br>
> apply the same transformation to any custom plugins I have compiled.<br>
> However, my plugin doesn't have a 'make install' target. It looks like I<br>
> can manually update my plugin dylib via calls to<br>
><br>
> install_name_tool -change /full/path/to/libfoo.dylib<br>
> @executable_path/../Libraries/libfoo.dylib libBar.dylib<br>
><br>
> but there has to be a better way. The `make install` target from SuperBuild<br>
> suggests that the "fixup_bundle" updates the libraries appropriately. How<br>
> do I apply the same transformation for my custom plugin?<br>
><br>
> Thanks!<br>
> Pete<br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
><br>
</blockquote></div><br>
_______________________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView">http://paraview.org/Wiki/ParaView</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><br></blockquote></div><br></body></html>