app: fix running gimp or gimp-console as tool during build time on Windows.

This commit is in conjunction of gimp-data@d273a18 and finally makes Windows
build able to run GIMP main binary itself (or gimp-console) in order to create
various images, before the installation step.

- Use the new GIMP_TESTING_INTERPRETER_DIRS environment variable for uninstalled
  binary to find the .interp files (in particular because our build scripts are
  usually Python scripts these days).
- Use the new GIMP_TESTING_ENVIRON_DIRS environment variable to find .env files
  (actually running uninstalled GIMP binaries did run without this one, but it's
  not a bad idea to add support anyway.
This commit is contained in:
Jehan 2024-03-05 01:27:08 +01:00
parent c6a6449dd0
commit 530d8c6f9f
2 changed files with 11 additions and 3 deletions

View file

@ -227,6 +227,7 @@ gimp_plug_in_manager_initialize (GimpPlugInManager *manager,
GimpInitStatusFunc status_callback)
{
GimpCoreConfig *config;
const gchar *path_str;
GList *path;
g_return_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager));
@ -236,13 +237,20 @@ gimp_plug_in_manager_initialize (GimpPlugInManager *manager,
status_callback (NULL, _("Plug-in Interpreters"), 0.8);
path = gimp_config_path_expand_to_files (config->interpreter_path, NULL);
path_str = g_getenv ("GIMP_TESTING_INTERPRETER_DIRS");
if (! path_str)
path_str = config->interpreter_path;
path = gimp_config_path_expand_to_files (path_str, NULL);
gimp_interpreter_db_load (manager->interpreter_db, path);
g_list_free_full (path, (GDestroyNotify) g_object_unref);
status_callback (NULL, _("Plug-in Environment"), 0.9);
path = gimp_config_path_expand_to_files (config->environ_path, NULL);
path_str = g_getenv ("GIMP_TESTING_ENVIRON_DIRS");
if (! path_str)
path_str = config->environ_path;
path = gimp_config_path_expand_to_files (path_str, NULL);
gimp_environ_table_load (manager->environ_table, path);
g_list_free_full (path, (GDestroyNotify) g_object_unref);

@ -1 +1 @@
Subproject commit be37d3fee97be70bb5856f0c8c6d3e756f71f2ff
Subproject commit d273a187ad679c7f3ce03ffb6614f9dc43709edc