Open darix opened 3 years ago
I looked at itand here's what I came up with
$(prefix)/share/darktable/lua/scripts
Just my comments:
Perhaps darktable should work more like GIMP.
@darix Where would you like to safe the files you need for the packages? How is it handled in other projects?
The path suggested by @wpferguson is perfect imho.
GIMP loads all files in the script directories no special file like the luarc. Is it possible to change dt to do the same
The difference is that GIMP just adds a menu entry. If we started all the scripts, as of today, that would add 21 modules to the lighttable UI. If we install the modules as a package, then script_manager becomes the default interface to the scripts (kind of like GIMP's menus). I'll add a check to see if the user has a luarc file in the config directory and use it if it exists, otherwise script_manager will start.
GIMP as a list of directories in the preferences, that can be extended by the user to look for the scripts. (This is just nice to have.)
This is doable. We just have to add them to package.path in the right place. Currently <config_dir>/lua
is the last entry. I'm planning on adding <prefix>/share/darktable/lua/scripts
as the last entry, so the if <config_dir>/lua
exists that will get used first. We could add other path entries either before or after
any update on this?
I've been swamped by real life and just haven't got to it yet. Things should let up around the April/May time frame and I'll start cleaning up all the loose ends and left over issues.
while I am in this bug tracker. any progress? :)
I was awfully optimistic in Jan of 22 :rofl:
Life finally slowed down around January of this year and I've been making progress on clearing out all the backlog.
I may have an idea.....
@TurboGit opened a PR, #450, to make the lua scripts more of a "first class" citizen by including the script tree in the externals so that the translators could work on translating the script strings as part of darktable. If we have the tree already in the source I wonder how much of an effort it would be to package the scripts along with darktable. I'd just have to figure out how to "override" the installed ones (have the .config/darktable/lua directory before the darktable-install/lua directory in the search path maybe). Or the scripts could be installed in the usual place the first time darktable starts and then just work as normal.
Had an idea about how to do it. I added a luarc file and a lua directory with the scripts in <install dir>/share
. I added <install dir>/share/lua
to the search path at the end. That way if the user chooses to install using the scripts installer (into <confir dir>/lua
) that set of scripts will take priority over the included scripts.
I had to do some tweaks to script_manager to handle the built in scripts, but it wasn't too bad.
I'll end up pulling scripts_installer out of the darktable luarc file and adding it to the tools directory so that if a user has git installed and wants the latest version of the scripts they can just run scripts_installer to pull them.
I'll probably need some help with the CMake magic to get everything to be where it should so that it installs correctly.
To make it easier for people to run lua scripts it might be an idea to provide native packages (deb,rpm) for the lua scripts
They could live e.g. in
$(prefix)/share/darktable/scripts
.