Fixing more things in gmic packaging

currently we install the gmic_cluts.gmz also into the gimp plugin directory next to the gimp plugin. but of course the plain gmic-qt does not look there. and the krita package will probably no look there either. I tested with strace and plain gmic-qt doesnt seems to search any system path for this file but directly goes to ~/.cache/gmic/

Wouldnt make more sense to have /usr/share/gmic/luts/gmic_cluts.gmz so all the different libgmic based tools have a shared copy? oh and maybe a cmdline switch to make gmic work fully offline.

from poking a little bit … the stdlib.gmic file would need to be patched to look in /usr/share/gmic/ as well as into the cache directory?

my end goal would be to ship all the files into a gmic-data subpackage that all filters work fully offline. (think laptop on train use case)

3 Likes

While we are at it … should the gmic_denoise_cnn.gmz and other files from the resources files also go to /usr/share/gmic/ ?

All those files are actually “G’MIC resources”, and the command input_cached is the one that manages the different folders that may contain thos resource files.
If needed, I may add usr/share/gmic/ to the list of searched folder. Anyway, no subdirectories please, because it would become complicated to manage if resource files are dispatched in different subfolders.

I am fine going without any subdir and just use /usr/share/gmic for everything.

Backported patch and verified. Does the same search logic apply to all those images for the style transfer plugin?

1 Like

One thing i couldnt test yet, is how it behaves during updating. no updates available :slight_smile:

Not sure I understand what update you are talking about here. Is it related to the G’MIC filter update system, or something else?

yeah … so if it finds files in /usr/share/gmic and i press “update filters” in gmic-qt… will it download to ~/.cache/gmic/ or try /usr/share/gmic?

Well, two things will happen.

When you press the filter update button:

  • The file https://gmic.eu/updateXXX.gmic (where XXX is the G’MIC version number) is downloaded, decompressed and stored in $HOME/.config/gmic/updateXXX.gmic.
  • Then, if you try a filter that requires resource files, the filter will use the newly updated input_cached command, so will look into /usr/share/gmic/ to find these resource files.

This is not clear to me: does that mean updating filters will still work or not?

What could be not working ?