[PD] get dir of current pd

Jonathan Wilkes jancsika at yahoo.com
Fri Aug 2 05:33:19 CEST 2013


On 07/30/2013 03:40 PM, Dan Wilcox wrote:
> Here's how we do it in OpenFrameworks: 
> https://github.com/openframeworks/openFrameworks/blob/develop/libs/openFrameworks/utils/ofFileUtils.cpp#L1400

Btw-- In line 1414, is that supposed to be "!=" instead of "==" ?

-Jonathan

>
> On Jul 30, 2013, at 3:03 PM, pd-list-request at iem.at 
> <mailto:pd-list-request at iem.at> wrote:
>
>> *From:*Jonathan Wilkes <jancsika at yahoo.com <mailto:jancsika at yahoo.com>>
>> *Subject:**Re: [PD] get dir of current pd*
>> *Date:*July 30, 2013 2:43:24 PM EDT
>> *To:*pd-list at iem.at <mailto:pd-list at iem.at>
>>
>>
>> On 07/30/2013 07:48 AM, yvan volochine wrote:
>>> On 30/07/13 08:41, Jonathan Wilkes wrote:
>>>> Ok, I figured out how to do this
>>>
>>> and how do you do?
>>
>> In GNU/Linux on some _distros_ you can check the symlink
>> /proc/self/exe
>>
>> If you do a readink from within C in Pd you'll get the absolute
>> path and name of the executable.
>>
>> However, if you use the command "readlink" to [shell] I imagine
>> the readlink binary will look in the mirror and give you its own
>> name back.
>>
>> I don't think /proc/self/exe is a requirement of all Linux flavors,
>> and I don't know what the BSD OSes do, or OSX.  So I'm reluctant
>> to add this to [pdinfo].
>>
>> Windows has its own function accessible from C to return the full
>> path and name of the executable.
>>
>> -Jonathan
>>
>>>
>>> y
>
> --------
> Dan Wilcox
> @danomatika
> danomatika.com <http://danomatika.com>
> robotcowboy.com <http://robotcowboy.com>
>
>
>
>
>
>
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20130801/d51886cc/attachment-0001.htm>


More information about the Pd-list mailing list