libgimpbase: do not "fix" paths in build environment.

When running GIMP in the build environment (even before it's installed), we
don't want to "fix" paths. We had the case in particular on the macOS CI where
the install PREFIX was a parent directory of the build directory and therefore
we were "fixing" some perfectly good constructed directories (set by meson) into
non-existing folder paths.

Additionally this codepath should only run when ENABLE_RELOCATABLE_RESOURCES is
set (even though this alone would not have fixed our CI issue because the macOS
build is relocatable).

Finally I am updating the gimp-data repository so that libraries are properly
found from the (now correct thanks to this commit) paths set by meson when
running gimp-console from within the build directory.
This commit is contained in:
Jehan 2024-03-26 19:06:20 +01:00
parent 8e7fc1d920
commit be0e6b84e9
2 changed files with 10 additions and 6 deletions

@ -1 +1 @@
Subproject commit 86bbe5449596517c2b0efedfc06899983ae890b7
Subproject commit 363c98590c55dcfc225aa70a5b8f9b98677bb962

View File

@ -924,9 +924,8 @@ gimp_plug_in_directory_file (const gchar *first_element,
* and *@path is replaced with a pointer to a new string with the
* run-time prefix spliced in.
*
* On Linux, it does the same thing, but only if BinReloc support is enabled.
* On other Unices, it does nothing because those platforms don't have a
* way to find out where our binary is.
* On Linux and other Unices, it does the same thing, but only if BinReloc
* support is enabled, and only if we are not running GIMP in-build directory.
*/
static void
gimp_path_runtime_fix (gchar **path)
@ -963,10 +962,15 @@ gimp_path_runtime_fix (gchar **path)
*path = g_build_filename (gimp_installation_directory (), *path, NULL);
g_free (p);
}
#else
#elif defined (ENABLE_RELOCATABLE_RESOURCES)
gchar *p;
if (strncmp (*path, PREFIX G_DIR_SEPARATOR_S,
/* XXX: I could actually test any of the other GIMP_TESTING_* environment
* variables. The goal is only to check if we are running GIMP from within the
* build directory. In such case, no substitution should happen.
*/
if (! g_getenv ("GIMP_TESTING_PLUGINDIRS") &&
strncmp (*path, PREFIX G_DIR_SEPARATOR_S,
strlen (PREFIX G_DIR_SEPARATOR_S)) == 0)
{
/* This is a compile-time entry. Replace the path with the