From 75eb99dca33fb4f3508222ccf6dfade4dc3067a5 Mon Sep 17 00:00:00 2001 From: Jehan Date: Thu, 26 Mar 2026 23:11:41 +0100 Subject: [PATCH] app: use build-time paths, not run-time ones for the gimprc man dump. The problem especially occurs for our new build rule where we generate the gimprc man page from within the build. In particular, it uses a temporary config folder generated on the fly (with a random folder name) and sets various environment variables such as GIMP3_SYSCONFDIR. So if we use the runtime paths, our man page will be full of bogus paths. In any case, for a man page, it just makes sense to use the real install prefix. This of course assumes non-relocatable builds, and an XDG-compliant installation (as it uses the $XDG_CONFIG_HOME variable), but that was already what we were showing in the template man page, and man pages are mostly for Linux, *BSD, etc. So that works fine. --- app/config/gimpconfig-dump.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/config/gimpconfig-dump.c b/app/config/gimpconfig-dump.c index fd9790a42f..9982d0b25b 100644 --- a/app/config/gimpconfig-dump.c +++ b/app/config/gimpconfig-dump.c @@ -309,8 +309,8 @@ dump_gimprc_manpage (GimpConfig *rc, g_output_stream_printf (output, NULL, NULL, NULL, man_page_header, - gimp_sysconf_directory (), - gimp_directory ()); + GIMPSYSCONFDIR, + "$XDG_CONFIG_HOME" G_DIR_SEPARATOR_S GIMPDIR G_DIR_SEPARATOR_S GIMP_USER_VERSION); klass = G_OBJECT_GET_CLASS (rc); property_specs = g_object_class_list_properties (klass, &n_property_specs); @@ -394,14 +394,14 @@ dump_gimprc_manpage (GimpConfig *rc, g_output_stream_printf (output, NULL, NULL, NULL, man_page_path, - gimp_directory (), - gimp_data_directory (), - gimp_plug_in_directory (), - gimp_sysconf_directory ()); + "$XDG_CONFIG_HOME" G_DIR_SEPARATOR_S GIMPDIR G_DIR_SEPARATOR_S GIMP_USER_VERSION, + GIMPDATADIR, + GIMPPLUGINDIR, + GIMPSYSCONFDIR); g_output_stream_printf (output, NULL, NULL, NULL, man_page_footer, - gimp_sysconf_directory (), - gimp_directory ()); + GIMPSYSCONFDIR, + "$XDG_CONFIG_HOME" G_DIR_SEPARATOR_S GIMPDIR G_DIR_SEPARATOR_S GIMP_USER_VERSION); }