Dear Iohannes,
thanks for your valuable answers as always.

I will follow your indications but at the moment I found another workaround: I don't use any declare 
object and I add in Preferences->Path  all the paths of the folders I intend to use. They are all inside 
/usr/lib/pd/extra (e.g. cyclone). Why Pd does not allow to load recursively also the subfolders of a 
folder indicated in the Preferences->Path?
It would be great since one could just add the path /usr/lib/pd/extra... actually this should also
be automatically loaded, without the need for the user to setup the Path in the Preferences, 
since deken automatically places the externals there.


I was wondering, is there a chance to solve the bug? If yes, when more or less?

Best

Angelo


On Wed, Aug 10, 2016 at 6:10 PM, IOhannes m zmölnig <zmoelnig@iem.at> wrote:
On 08/10/2016 10:39 PM, Angelo Arcadi wrote:
Dear Iohannes, list,
first of all I noticed that in my previous message I
wrote /usr/lib/extra while instead I was loading
/usr/lib/pd/extra of course.

Secondly, I enabled the verbose option as Iohannes suggested and I
noticed the following:

1- creating the objects "declare -stdpath cyclone" or  "declare -path
cyclone" does not work, one
need to create the objects "declare -sdtpath /usr/lib/pd/extra/cyclone"
or  "declare -path /usr/lib/pd/extra/cyclone".

there seems to be indeed a bug here:
- [declare -path] adds the new path *only* to the current directory.
- [declare -stdpath] tries adding the new path *only* to the standard-paths (those searched without you passing '-path' on the cmdline).

since you must add "-path /usr/lib/pd/extra" to Pd's search-paths somewhere, there is currently no way to tell Pd to also use this path :-(

like always, the fix should be simple: but first it needs to be decided what the desired behaviour should actually be...


Any suggestion?


here's a workaround for now:

TL;DR: use [declare -path cyclone -stdpath cyclone -lib cyclone] together with "libdir".

"libdir" is a library-loader object that loads directories-as-libraries if they conform to the libdir format (like cyclone; generally all the libraries that have a <libraryname>-meta.pd patch).

- add '/usr/lib/pd/extra' to your general search paths (in Pd's preferences)
- add 'libdir' to the automatically loaded libraries  (in Pd's preferences) - pd-libdir is available via apt.
this will work, because the libdir library will install itself into /usr/lib/pd/extra/libdir/libdir.pd_linux, and when loading "libdir", Pd will search (among other things) for libdir/libdir.pd_linux in (among other paths) /usr/lib/pd/extra/

- use [declare -path cyclone -stdpath cyclone -lib cyclone] to declare the dependency on cyclone.
the "-path" and "-stdpath" portions are unused in your setup (but might work for people with more straight-forward setups).
the "-lib" portion will trigger the libdir loading mechanis, which will search all the paths (among them /usr/lib/pd/extra/) for cyclone/cyclone-meta.pd, and will eventually find it as /usr/lib/pd/extra/cyclone/cyclone-meta.pd - and then it will add /usr/lib/pd/extra/cyclone/ to the (canvas-local) search path.


i know that [declare -path cyclone -stdpath cyclone -lib cyclone] looks like a joke (while you are there, add "-stdlib cyclone" as well, that should be fool-proof)

fmasdr

IOhannes

_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list