Closed iainctduncan closed 2 years ago
Are you asking about which directories to install files in, or about the Makefile/shell syntax to do it?
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:
/usr/local/lib/pd-externals/s4pd/
is not in the search-path, the scripts won't be found if the user actually uses a [s4pd]
in their own folderpossible solutions:
[declare -path s4pd]
in the patch where they want to use [s4pd]
getting the path of the s4pd binary requires to use the (somewhat) private m_imp.h
header
Architecture-independent files are normally installed in share
, and lib
is ideally reserved for architecture-dependent machine code.
@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.
Fair enough.
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?
"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).
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].
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.
closing, satisfied with how this works now
An install should ensure that
Still not sure what that should shake out to for the Makefile, suggestions welcome.