<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br>On Aug 10, 2012, at 4:19 PM, Rafaël Carré <<a href="mailto:funman@videolan.org">funman@videolan.org</a>> wrote:<br><br><blockquote type="cite">Le 2012-08-10 22:53, Nathan Hjelm a écrit :<br><blockquote type="cite">With the current version of VLC (2.0.3) users can not simply drop libaacs.dylib into VLC.app/Contents/MacOS/lib. As far as I can tell this is because neither @loader_path/../lib (@loader_path references from the location of the Mach-O binary that is calling dlopen. In this case VLC.app/Contents/MacOS/plugins/) or @executable_path/lib (@executable_path references from the current running executable: VLC.app/Contents/MacOS) are part of the default search path for dynamically loaded libraries. Now this can be fixed in several ways including:<br><br>1) VLC adds @loader_path/../lib to the rpath of liblibbluray_plugin.dylib (install_name_path -add_rpath @loader_path/../lib liblibbluray_plugin.dylib),<br>2) VLC adds @executable_path/lib to the rpath of VLC executable (install_name_path -add_rpath @executable_path/../lib VLC), or<br>3) update libbluray.dylib to search for libaacs and libbbdplus through some common paths if libaacs.dylib can't be found in the default path.<br><br>I think #3 is a more general fix for to the loading problem and a patch vs the latest tarball (0.2.2) is attached.<br><br>Thoughts?<br></blockquote><br>3) is a good idea IMO, although I'm not sure we should specifically<br>mention VLC; other applications can use libbluray as well?<br></blockquote><br>I can update the patch without that wording in the comment. I can make it more general to point out the common locations an app might put libaacs.dylib or libbdplus.dylib (Contents/MacOS/lib, Contents/MacOS, Contents/lib, etc).<br><br><blockquote type="cite">Does anyone know another app using it? Where in the .app would they put<br>libbluray.dylib?<br></blockquote><br>I don't know about other apps but it just occurred to me libaacs likely would be in the same directory as either the executable or libbluray.dylib so I probably should add @executable_path and @loader_path to the list of search paths.<br><br>I will post an updated patch tomorrow (it is a bit late in my time zone-- GMT-6).<br><br><blockquote type="cite">Your patch looks OK at a quick glance.<br><br><blockquote type="cite"><br>-Nathan<br><br>FYI, I will be posting another patch to the libaacs devel list to add support for IOKit to libaacs.<br></blockquote><br>Nice, I look forward to it.<br></blockquote><br>Posted! Might need some small changes as well but it works!<br><br>-Nathan<br></body></html>