vala - How to include resources file in anjuta project -


I am trying to update a graphic project in the valve, take a lot of code lines into a UI file I am here. I want to use the template (available with glib-2.38 and GTK + 3.8, something like that).

My project is managed with Anjuta and AutoConf.

in src dir

application.ui:

    

resources.xml:

  & lt ;? Xml version = "1.0" charset = "UTF-8"? & Gt; & Lt; Gresources & gt; & Lt; Gresource prefix = "/ org / app / spi" & gt; & Lt; File compressed = "true" preprocess = "xml-stripblanks" & gt; Application.ui & lt; / file & gt; & Lt; / Gresource & gt; & Lt; / Gresources & gt;   

In the src / Makefile.am, I - gresources resources.xml spi_VALAFLAGS

And filanlly I declared Gtk.ApplicationWindow like this

  [GtkTemplate (ui = "/org/app/spi/application.ui")] internal square SpiWindow: Gtk.ApplicationWindow { // Constructor Public Window (Gtk.Application Application) {Object (application: app); }}   

But when I compile the application and then run the error message:

(spi: 9749): Gtk-CRITICAL: disabled To load resources for the entire template for 'Spindow': resource does not exist on '/org/app/spi/application.ui' (spi: 9749): Gtk-CRITICAL: gtk_widget_init_template : asserttion 'template! = Null 'unsuccessful'

You still need to compile resources and include them Is:

  GLIB_COMPILE_RESOURCES = glib-compile-resources resources.c: resources.xml $ (shell $ (GLIB_COMPILE_RESOURCES) - generate-dependency processing.xml) $ (GLIB_COMPILE_RESOURCES) - target = $ @ - generate-source $ & lt; Include   

and resources.c as a source file in spi_SOURCES .

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -