[PD-dev] Packaging question for Scheme for Pd

IOhannes m zmoelnig zmoelnig at iem.at
Mon Oct 4 17:51:28 CEST 2021


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 :-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20211004/e0e70eb8/attachment.sig>


More information about the Pd-dev mailing list