About G_RESOURCE_OVERLAYS

From what I understand from the Gio.Resource documentation, it is possible to use the G_RESOURCE_OVERLAYS environment variable to avoid having to install resources when developing/testing a program.

According to the documentation, you can replace the path where it searches for resources, but I can’t get it to work.

I’m testing with World / Design Tooling / Icon Library · GitLab where by the code, the resources are searched in /usr/local/share/icon-library/, then I set the environment variable export G_RESOURCE_OVERLAYS="/usr/local/share/icon-library=<my-path>/icon-library/build/data where ‘build’ is the folder where the program is compiled (with meson), but I get an error:

Could not load resources: Error { domain: g-file-error-quark, code: 4, message: "Failed to open file “/usr/local/share/icon-library/resources.gresource”: open() failed: No such file or directory" }

Am I misinterpreting the use of the environment variable or is it declared incorrectly? THANK YOU.

Hi,

Looking at the sources, it seems resources are searched by default under:

/org/gnome/design/IconLibrary

Filesystem paths like /usr/local/... don’t make any sense at all. Resources paths are purely virtual, and by convention match the application-ID.

I’ve tried that way too and it doesn’t work either.

export G_RESOURCE_OVERLAYS="/org/gnome/design/IconLibrary=<path>/icon-library/build/data"

Any other ideas? :confused:

Well, I’ve seen that it has to be registered as ‘gresource’ to do OVERLAYS. I thought there was a way that it didn’t need to be installed.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.