[gnome-games] playstation: Add gresource



commit 64be53437dde497f0528462e7e54ff558b93ab47
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sun Jul 31 10:28:47 2016 +0200

    playstation: Add gresource
    
    This will be used in the next commit to ship a PlayStation gameinfo.

 ...rg.gnome.Games.plugin.playstation.gresource.xml |    5 ++++
 plugins/playstation/src/Makefile.am                |   24 ++++++++++++++++++++
 2 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/plugins/playstation/data/org.gnome.Games.plugin.playstation.gresource.xml 
b/plugins/playstation/data/org.gnome.Games.plugin.playstation.gresource.xml
new file mode 100644
index 0000000..515a13e
--- /dev/null
+++ b/plugins/playstation/data/org.gnome.Games.plugin.playstation.gresource.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/Games/plugin/playstation">
+  </gresource>
+</gresources>
diff --git a/plugins/playstation/src/Makefile.am b/plugins/playstation/src/Makefile.am
index 311974a..fe442e8 100644
--- a/plugins/playstation/src/Makefile.am
+++ b/plugins/playstation/src/Makefile.am
@@ -1,11 +1,33 @@
 plugindir = $(libdir)/gnome-games/plugins
 plugin_LTLIBRARIES = libgames-playstation-plugin.la
 
+gresource_file = $(top_srcdir)/plugins/playstation/data/org.gnome.Games.plugin.playstation.gresource.xml
+
+resource_files = $(shell \
+       $(GLIB_COMPILE_RESOURCES) \
+       --generate-dependencies \
+       --sourcedir=$(top_srcdir)/plugins/playstation/data \
+       $(gresource_file) \
+)
+
+resources.c: $(gresource_file) $(resource_files)
+       $(AM_V_GEN) \
+       $(GLIB_COMPILE_RESOURCES) \
+               --target=$@ \
+               --sourcedir=$(top_srcdir)/plugins/playstation/data \
+               --generate-source \
+               $<
+
+BUILT_SOURCES = \
+       resources.c \
+       $(NULL)
+
 libgames_playstation_plugin_la_DEPENDENCIES = \
        $(top_builddir)/src/gnome-games.vapi \
        $(NULL)
 
 libgames_playstation_plugin_la_SOURCES = \
+       $(BUILT_SOURCES) \
        playstation-error.vala \
        playstation-header.vala \
        playstation-plugin.vala \
@@ -19,6 +41,7 @@ libgames_playstation_plugin_la_VALAFLAGS = \
        --pkg glib-2.0 \
        --pkg gtk+-3.0 \
        --pkg tracker-sparql-1.0 \
+       --gresources $(gresource_file) \
        --vapidir $(top_builddir)/src \
        $(NULL)
 
@@ -47,6 +70,7 @@ libgames_playstation_plugin_la_LDFLAGS = \
 
 EXTRA_DIST = \
        $(plugin_DATA) \
+       $(gresource_file) \
        $(NULL)
 
 MAINTAINERCLEANFILES = \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]