summaryrefslogtreecommitdiff
path: root/test cases/frameworks/7 gnome/resources/generated-main.c
AgeCommit message (Collapse)Author
2022-09-03tests/7 gnome: Fix incorrect unref of GResourceNirbheek Chauhan
The returned GResource is transfer-none, since the generated function basically calls g_static_resource_get_resource(). It should not be unreffed. Causes an abort on Debian: GLib-GIO:ERROR:../../../gio/gresource.c:1451:g_static_resource_fini: assertion failed: (g_atomic_int_get (&resource->ref_count) >= 2)
2016-10-13gnome: allow use of generated files with compile_resources()Sam Thursfield
This commit adds a 'dependencies' keyword to the gnome.compile_resources() function, which allows your resource blob to depend on files generated at build-time from custom_target() or configure_file() targets. My current use case for this is source data that gets processed with Gettext translation tools before being compiled into the resource blob. This feature only works with GLib version 2.48.2 and above. So the compile_resources() function now detects GLib version and raises an error if the version of GLib being used is too old. The compile_resources() test case is now split into two, so that the existing one can continue to run on systems with old GLib versions (such as Ubuntu Xenial, which the automated tests on travisci.org use), but where new enough GLib is available we also test generating gresource content. The existing warning about glib-compile-resources is now only printed if GLib version is older than 2.50.0 because <https://bugzilla.gnome.org/show_bug.cgi?id=745754> is fixed in the 2.50.0 release.