Wow! Found a feature I didn't know existed.

Just to recap:
My problem is that I want to distrubute a complex patch,
but I do not know all of the dependencies.
So I want to build a list of such.

In Pd version 0.46.7 (and perhaps others),

Edit -> Preferences -> Path
Check "verbose".

Now when you load a patch, it shows you a ton of spew on the
Pd Console window, as it tries to find every object.

Now you get stuff like this:

tried C:/Users/BH/Music/pd/BHPDToolkitNEW/BHPDtoolkit-master/BHPDtoolkit-master/patches/EvenOddSynth~.m_i386 and failed
tried C:/Users/BH/Music/pd/BHPDToolkitNEW/BHPDtoolkit-master/BHPDtoolkit-master/abstractions/EvenOddSynth~.m_i386 and failed
tried C:/Program Files (x86)/pd-0.43.4-extended/extra/freeverb~/EvenOddSynth~.m_i386 and failed
tried C:/Program Files (x86)/pd-0.43.4-extended/extra/cyclone/EvenOddSynth~.m_i386 and failed
tried C:/Program Files (x86)/pd-0.43.4-extended/extra/iemlib/EvenOddSynth~.m_i386 and failed
... (snipped 951 lines!!)...
tried C:/Users/BH/AppData/Roaming/Pd/output~/output~.dll and failed
tried C:/Program Files (x86)/Common Files/Pd/output~/output~.dll and failed
tried C:/Program Files (x86)/Pure Data-0.46-7/extra/output~/output~.dll and failed
tried C:/Users/BH/Music/pd/BHPDToolkitNEW/BHPDtoolkit-master/BHPDtoolkit-master/patches/output~.pd and failed
tried C:/Users/BH/Music/pd/BHPDToolkitNEW/BHPDtoolkit-master/BHPDtoolkit-master/abstractions/output~.pd and succeeded

.... but that's fine with me!!  A little shell scripting and I get a list of all the objects used
and exactly the pathname to them. PERFECT!

Be prepared for a lot of output. My patch produced 3758 such lines!

So it may not produce a dependency tree like I originally asked for,
but I guess that's not what I really wanted.

Hope this helps someone else...
BH



On Mon, Jun 6, 2016 at 4:52 PM, William Huston <williamahuston@gmail.com> wrote:
My idea is, I want to distribute a patch.

But I build my patches with layers of abstractions.

So I want to make a recursive map of the dependency tree,
including any external libraries needed, so I can know
what needs to be included when I distribute the patch.

Has anyone tried this?

I will probably do this with an external program,
probably Perl (not within Pd).

First it seems I really need to understand how to
Pd does conflict resolution in case of name clashes.

Next, it seems one must know the search path.

This is a bit easier on Linux systems b/c it just
requires parsing a flat file.

On Windows it requires parsing the Registry
(which I admit is still a big mystery for me).

On My machine, I am finding the search path here:

HKEY_USERS\S-1-5-21-1970324843-3388967453-2642309065-1000\Software\Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Pd\

npath=12 means 12 directories to search, each being
path1=(path1)
path2=(path2)
...
path12=(path12)

I also find this repeated here:

HKEY_USERS\S-1-5-21-1970324843-3388967453-2642309065-1000_Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Pd

One question is, where does this strange string come from?
Is this guaranteed to be the same on every Windows systems?

S-1-5-21-1970324843-3388967453-2642309065-1000
S-1-5-21-1970324843-3388967453-2642309065-1000_Classes

Ugh. Anyway, just looking for some general guidance here.

Thanks,
BH

--
--
May you, and all beings
be happy and free from suffering :)
-- ancient Buddhist Prayer (Metta)



--
--
May you, and all beings
be happy and free from suffering :)
-- ancient Buddhist Prayer (Metta)