darktable-org / lua-scripts

155 stars 110 forks source link

script_manager - support libraries in "local" directories #457

Closed wpferguson closed 6 months ago

wpferguson commented 6 months ago

Add support for "local" libraries specific to a script or set of scripts. Currently only the lua/lib is searched for libraries.

This change adds a check for each .lua file in a lib directory and adds an entry to the package.path search path if necessary. Then entry is added to the end of that search path entries, so if the library name is the same as an existing one earlier in the search path, the earlier one will be used.