summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile10
-rw-r--r--rcm-client-main.c2
-rw-r--r--rcm-client.gresource.xml6
4 files changed, 16 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 587d841..a48f84b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ rcm-server
rcm-client
*.swp
generated.*
+rcm-client-resources.*
diff --git a/Makefile b/Makefile
index 744ede8..61cf3e6 100644
--- a/Makefile
+++ b/Makefile
@@ -27,8 +27,8 @@ RCC_CFLAGS = ${GENERIC_CFLAGS} ${EXTRA_CFLAGS} $(shell pkg-config --cflags ${RCC
RCC_LDFLAGS = ${GENERIC_LDFLAGS} ${EXTRA_LDFLAGS} $(shell pkg-config --libs ${RCC_PACKAGES})
RCC_COMPILE = $(CC) $(RCC_CFLAGS)
RCC_LINK = $(CC) $(RCC_CFLAGS) $(RCC_LDFLAGS)
-RCC_OBJECTS = rcm-client-main.o rcm-client-hardware-list.o rcm-client-receive.o rcm-client-advanced.o generated.o shared.o
-RCC_HEADERS = rcm-client-main.h rcm-client-hardware-list.h rcm-client-receive.h rcm-client-advanced.h generated.h $(COMMON_HEADERS)
+RCC_OBJECTS = rcm-client-main.o rcm-client-hardware-list.o rcm-client-receive.o rcm-client-advanced.o rcm-client-resources.o generated.o shared.o
+RCC_HEADERS = rcm-client-main.h rcm-client-hardware-list.h rcm-client-receive.h rcm-client-advanced.h rcm-client-resources.h generated.h $(COMMON_HEADERS)
INSTALL = install -c
INSTALL_PROGRAM = ${INSTALL}
@@ -54,6 +54,12 @@ shared.o: shared.c shared.h
linux-input-keycodes.o: linux-input-keycodes.c $(COMMON_HEADERS)
$(CC) $(GENERIC_CFLAGS) $(EXTRA_CFLAGS) -o $@ -c $<
+rcm-client-resources.c: rcm-client.gresource.xml $(shell glib-compile-resources --generate-dependencies rcm-client.gresource.xml)
+ glib-compile-resources --target=$@ --generate-source --c-name rcm rcm-client.gresource.xml
+
+rcm-client-resources.h: rcm-client.gresource.xml $(shell glib-compile-resources --generate-dependencies rcm-client.gresource.xml)
+ glib-compile-resources --target=$@ --generate-header --c-name rcm rcm-client.gresource.xml
+
rcm-client-%.o: rcm-client-%.c $(RCC_HEADERS)
$(RCC_COMPILE) -o $@ -c $<
diff --git a/rcm-client-main.c b/rcm-client-main.c
index 9d6c4e1..f0e267c 100644
--- a/rcm-client-main.c
+++ b/rcm-client-main.c
@@ -230,7 +230,7 @@ int main(int argc, char *argv[])
gtk_style_context_add_provider_for_screen(screen, GTK_STYLE_PROVIDER(css), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref(css);
- global->builder = gtk_builder_new_from_file("rcm-client.ui");
+ global->builder = gtk_builder_new_from_resource("/org/gnome/RemoteControlManager/rcm-client.ui");
global->window = GTK_WINDOW(gtk_builder_get_object(global->builder, "main_window"));
g_signal_connect(global->window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
diff --git a/rcm-client.gresource.xml b/rcm-client.gresource.xml
new file mode 100644
index 0000000..a8b918f
--- /dev/null
+++ b/rcm-client.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/RemoteControlManager">
+ <file compressed="true">rcm-client.ui</file>
+ </gresource>
+</gresources>