On 10/4/21 5:22 PM, Iain Duncan wrote:
of the package ('s4pd') so that this can simply be put in the Pd/externals
directory? I just need to know what "normal" is for a release package.

yes: ship the scm files besides your external.

the easiest way is to instruct people to load your library with
[declare -path s4pd -lib s4pd] (which will add .../s4pd to Pd's search paths and *also* load the s4pd.pd_linux external). in the s4pd_setup() (or better: s4pd_new()) callback, spit out a big fat wraning if the scm files cannot be found like:
> ERROR: could not find 's4pd.scm'!
> ERROR: use [declare -path s4pd -lib s4pd] to load this external

and refuse to create an instance of the interpreter.

to make things a bit nicer, you could *additionally* search for "s4pd/s4pd.scm", and only bail out if neither of the two can be found.


you could also check how other language bindings do this, e.g. [tclpd] or [pdlua] (both of which somehow try to get the path of the library file, and then use that to load their auxiliary scripts)

gfmnasdr
IOhannes

[tclpd] <https://svn.code.sf.net/p/pure-data/svn/trunk/externals/loaders/tclpd/tclpd.c> [pdlua] <https://svn.code.sf.net/p/pure-data/svn/trunk/externals/loaders/pdlua/src/pdlua.c>

PS: we probably should move these to gitlab :-)

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
Pd-dev mailing list
[email protected]
https://lists.puredata.info/listinfo/pd-dev

Reply via email to