System path for gmic_film_cluts.gmz file

(Carmelo Dr Raw) #1

In the current implementation of G’MIC Film CLUTS, I cannot find a way to specify a system path where the gmic_film_cluts.gmz file could be installed.

The background idea is to provide this file as part of the Photoflow and GIMP AppImage packages, so that the user does not have to rely on a network connection to download the CLUTS since they are already bundled in the package itself.

However, the current options do not seem to allow this, because:

  • ${_path_rc} and ${-path_gimp} point to user-specific folders, where files get written and not only read… so they cannot point to system folders
  • ${g_path_unix} represents a system folder where nothing gets written to, but it is hardcoded and only valid for UNIX systems

The solution I have found at the moment is to add the following lines in the input_clut procedure:

-if {narg({'${GMIC_SYSTEM_PATH}'})} g_path_unix=${GMIC_SYSTEM_PATH}

and then set the GMIC_SYSTEM_PATH environment variable to the folder where the gmic_film_cluts.gmz file is installed.

This actually works correctly not only for UNIX systems…

Would it be possible to implement a similar mechanism in the official G’MIC code?


(David Tschumperlé) #2

That looks good indeed.
I’ve done this :
which should be equivalent to you solution.

(Carmelo Dr Raw) #3