Issue #2867 - iso-codes location is not relocatable on all platforms
gimplanguagestore-parser.c (parse_iso_codes): instead of
special-casing Windows and OS X, use ENABLE_RELOCATABLE_RESOURCES and
find the package relative to ${gimp_installation_directory}, so
relocating it works on all platforms (also flatpack, snap, whatever),
given the --enable-relocatable-bundle configure switch is used.
This commit is contained in:
@ -336,11 +336,12 @@ parse_iso_codes (GHashTable *base_lang_list,
|
|||||||
|
|
||||||
xml_parser = gimp_xml_parser_new (&markup_parser, &parser);
|
xml_parser = gimp_xml_parser_new (&markup_parser, &parser);
|
||||||
|
|
||||||
#if defined (G_OS_WIN32) || defined (PLATFORM_OSX)
|
#if ENABLE_RELOCATABLE_RESOURCES
|
||||||
file = gimp_data_directory_file ("..", "..",
|
file = gimp_installation_directory_file ("share", "xml", "iso-codes",
|
||||||
"xml", "iso-codes", "iso_639.xml", NULL);
|
"iso_639.xml", NULL);
|
||||||
#else
|
#else
|
||||||
file = g_file_new_for_path (ISO_CODES_LOCATION G_DIR_SEPARATOR_S "iso_639.xml");
|
file = g_file_new_for_path (ISO_CODES_LOCATION G_DIR_SEPARATOR_S
|
||||||
|
"iso_639.xml");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
success = gimp_xml_parser_parse_gfile (xml_parser, file, error);
|
success = gimp_xml_parser_parse_gfile (xml_parser, file, error);
|
||||||
|
|||||||
Reference in New Issue
Block a user