Packaging questions

(darix) #1

currently the build system installs the gmic_cluts.gmz into the gimp plugin directory … this seems wrong.

wouldnt something like /usr/share/gmic/ make more sense?

also how big would be the “uncompressed” files be? would it be possible to add something like /usr/share/gmic/cluts/ to the search path for those uncompressed files? or are they arch dependent? also how can I unpack those files in my RPM build?

last point for now: a lot of files you currently store in ~/.config/gmic/ should probably not be there (like the unpacked cluts/update files) there are better directories like ~/.local/share/gmic or .cache/gmic/

0 Likes

(Morgan Hardwood) #2

The uncompresses CLUTs would be between 1-2MB each. @David_Tschumperle’s new compression algorithm is extremely efficient, reducing them to 0.3% of their original size.

:+1: for ~/.cache/gmic

0 Likes

(darix) #3

I doubt that …

137133  clut_fuji_xtrans_iii_acros.cimgz
149995  clut_fuji_xtrans_iii_astia.cimgz

by those numbers it would be roughly 83MB for all 550

having to do that only once during the build of the rpm and then shipped in /usr/share/gmic/cluts/ would be worth it imho

0 Likes

(G'MIC staff) #4

That actually depends on the resolution you want for your CLUTs. In G’MIC, I’m using 48^3, which is not really big. In RawTherapee, they use 144^3 instead, which then generate very big files at the end.

0 Likes

(darix) #5

with your file size i would be happy. … which brings us back to the question /usr/share/gmic/cluts/ … and how to generate those .cimgz files

0 Likes

(G'MIC staff) #6

About the folder I use to store the resources: I had to find something simple enough to make it easy to find both for Windows and Linux users.
If there is some standard environment variable on Linux to access to a correct folder path, then I’ll be happy to do so. If it requires some C++ code to get it, it’s already too late.

0 Likes

(darix) #7

well that is the nice thing about XDG … you can just append the XDG paths to the user home directory … and be done

https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html

0 Likes

(G'MIC staff) #8

OK, so you suggest I’m using $XDG_CACHE_HOME/gmic instead of $XDG_CONFIG_HOME/gmic to store the CLUTs, but what is the point of doing this ?
At least when stored in $XDG_CACHE_HOME/gmic, the user won’t have to decompress a CLUT again and again each time its computer is switched off. I’m not sure what I decompress the CLUTs in a temporary folder.

0 Likes

(darix) #9

$XDG_CACHE_HOME is also not cleared on each reboot.

but it is easier for e.g. run backups because you can just ignore the cache dir. gmic mixes that.

0 Likes

(G'MIC staff) #10

OK that makes sense. Thanks for the suggestion, I’ll do the modification.

0 Likes

(G'MIC staff) #11
0 Likes

(darix) #12

Thank you … now to the other questions from my first post?:smiley:

0 Likes

(G'MIC staff) #13

About the location of file gmic_cluts.gmz?
Do you suggest it also go to the same location than decompressed CLUTs ?

0 Likes

(darix) #14
  1. why the file is installed into the plugin dir instead of e.g. /usr/share/gmic/? I guess the gmic binary or the krita plugin use the cluts gmz file as well. not just the gimp plugin.
  2. how can i provide those unpacked files during the package build.
  3. which system directory should I use for them.
0 Likes

(G'MIC staff) #15

I can try to read it from anywhere, what folder would you like ?
$XDG_CACHE_HOME/gmic/gmic_cluts.gmz is OK for you ?

0 Likes

(darix) #16

that is a user specific directory again. and it might require some code changes to recognize … the cluts gmz file i just downloaded to the cache dir is newer and I need to use local cluts now.

0 Likes

(G'MIC staff) #18

Having a folder change is not a problem, as it will be recognized as soon as the user get its first filter update (which is done automatically at first run).

0 Likes