[PD-dev] library finding it's own path?

martin.peach at sympatico.ca martin.peach at sympatico.ca
Thu Apr 23 21:40:25 CEST 2009


IOhannes wrote:
> Martin Peach wrote:
> > 
> > Have a look at the source for [mrpeach/which] in svn. I took some code 
> > from Pd internals and it calls some more, but maybe not _way_ too much.
> > 
> 
> thanks for the hints, but this is even more "ugly" (no harm intended) 
> than what i already have. i really want to be agnostic about which 
> extension the library has (just image miller adds a new extension; or 
> hans removes .l_i386 from PdX and i will actually find the wrong binary)
> 

Well it's the same 'ugly' code that Pd itself uses. I simply copied the extension list from Pd source. I guess you could just access the list directly and then not worry about it changing in the future. The code for [which] tries all possible extensions for the current OS and opens the first one that exists. Pd does the same thing, or at least the version in svn does. Probably if the relevant functions were exposed in m_pd.h they could all be used in situ.

Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20090423/9a51addb/attachment.htm>


More information about the Pd-dev mailing list