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.
This commit is contained in:
Jehan 2026-03-26 23:11:41 +01:00
parent d2f6867064
commit 75eb99dca3

View file

@ -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);
}