iainctduncan / scheme-for-pd

Pure Data port of the Scheme For Max external, providing an embedded S7 Scheme/Lisp interpreter for scripting and live-coding Pure Data in Scheme Lisp.
BSD 3-Clause "New" or "Revised" License
64 stars 5 forks source link

how to make the install do right thing re scm dir #8

Closed iainctduncan closed 2 years ago

iainctduncan commented 3 years ago

An install should ensure that

Still not sure what that should shake out to for the Makefile, suggestions welcome.

lassik commented 3 years ago

Are you asking about which directories to install files in, or about the Makefile/shell syntax to do it?

umlaeute commented 3 years ago

the helpfile should just work with the current Makefile. (both s4pd.pd_linux and s4pd-help.pd get installed to /usr/local/lib/pd-externals/s4pd/).

the scm-files are a bit more tricky. i haven't checked the actual code yet, but i assume:

possible solutions:

getting the path of the s4pd binary requires to use the (somewhat) private m_imp.h header

lassik commented 3 years ago

Architecture-independent files are normally installed in share, and lib is ideally reserved for architecture-dependent machine code.

umlaeute commented 3 years ago

@lassik no, please don't. this is good advice in general, but it doesn't work well in the Pd ecosystem.

if a linux distribution wants to enforce the lib/share dichotomy for Pd packages, they are of course free to do so at the distribution maintainer's discretion.

but the Pd library format is very simple: a single folder.

lassik commented 3 years ago

Fair enough.

iainctduncan commented 3 years ago

Thinking about this more, I think doing the "instruct the user to add a [declare -path s4pd] in the patch where they want to use [s4pd]" option is the right way to go, because it acts as a forcing function for users to deal with those scm files, and they should really be comfortable looking in that directory in order to update their s4pd.scm bootloader with optional inclusions. (ie loop.scm, stuff.scm, and others from Bill and Rick which I don't have included by default but are very useful)

So, being new to Pd, is "please add a [declare -path s4pd]" going to be sufficient instruction? Anything else that should be done with the layout to support that?

umlaeute commented 3 years ago

"instruct the user to add a [declare -path s4pd] in the patch where they want to use [s4pd]" option is the right way to go

probably true. certainly the simplest solution to implement as well :-)

because it acts as a forcing function for users to deal with those scm files, and they should really be comfortable looking in that directory in order to update their s4pd.scm bootloader with optional inclusions

i think you should not assume that the user has write-access to that directory.

otoh, with [declare -path ...] it's easy for the user to specify an alternative path (one they do have write-access to).

iainctduncan commented 2 years ago

Based on recent thread on dev list, I will fix makefile and releases so that all scm files are in the s4pd dir (no scm subdir) and add instructions to add [declare -path s4pd].

iainctduncan commented 2 years ago

Current source version now does the right thing, and will find the scm files with either a declare path or a file path set in preferences.

iainctduncan commented 2 years ago

closing, satisfied with how this works now