Support GLib resources

Bug #1341768 reported by Robert Ancell
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bake
Fix Released
Medium
Robert Ancell

Bug Description

Make it easy to add GResources to a project.

Related branches

Revision history for this message
Robert Ancell (robert-ancell) wrote :

I've previously thought about this and haven't decided if we should use the gresource.xml file or put that information into the Recipe. It would be nice to have it in the recipe so GResources were easier but I don't want to have to chase any future GResource features.

Changed in bake:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Assuming using gresource.xml I'd expect the format to be something like this:

programs.test {
  sources = test.vala
  gresources = test.gresource.xml
}

For dependencies to work Bake needs to parse test.gresource.xml to work out what files it depends on.

Note for Vala we need to pass --gresources to valac

Revision history for this message
Victor Aurélio Santos (vaurelios) wrote :

Rober,

In the reallity Bake not needs to parse the xml, the tool glib-compile-resources does it for you, for example:

% glib-compile-resources --generate-dependencies --sourcedir=../src ../src/gdownloader.gresources.xml
../src/menus.ui
../src/new-download.ui
../src/window.ui
../src/preferences.ui

when I'm using autotmake I use it for generate the dependencie list.

and really like you suggestion:

programs.test {
  sources = test.vala
  gresources = test.gresource.xml
}

this looks very good, when working with automake we have to write various lines... :(

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Thanks Victor! That will make things a lot easier...

Revision history for this message
Robert Ancell (robert-ancell) wrote :

See bug 1342610, bug 1342611, bug 1342612 and bug 1342613 for enhancements.

summary: - Support GResources
+ Support GLib resources
Changed in bake:
assignee: nobody → Robert Ancell (robert-ancell)
status: Triaged → In Progress
milestone: none → 0.1.47
status: In Progress → Fix Released
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Final syntax is:

programs.test {
  sources = test.vala
  glib-resources = resources.xml
}

See help documentation for more details

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.