[polari/ci: 1/3] build: Generate source resource list
- From: Gitlab System User <gitlab src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/ci: 1/3] build: Generate source resource list
- Date: Thu, 19 Oct 2017 11:19:56 +0000 (UTC)
commit e9ad156a292acee00cd503d8f698e4852c397a57
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Oct 19 05:27:31 2017 +0200
build: Generate source resource list
The list of javascript sources moved from the build system to the
GResource XML when we started to compile sources into a resource.
However to get at least some minimal testing of non-compiled sources,
we want to leverage meson's unit test support to perform some basic
syntax checking. That will require that the build system again has
access to the list of javascript files, so move it back there. In order
to avoid duplicating the list of files, generate the resource XML
at configure time.
Fixes https://gitlab.gnome.org/GNOME/polari/issues/11
src/meson.build | 43 +++++++++++++++++++++++++++-
src/org.gnome.Polari.src.gresource.xml | 28 ------------------
src/org.gnome.Polari.src.gresource.xml.meson | 6 ++++
3 files changed, 48 insertions(+), 29 deletions(-)
---
diff --git a/src/meson.build b/src/meson.build
index eae686e..c0242d2 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -15,9 +15,50 @@ data_resources = gnome.compile_resources(
c_name: 'data_resources'
)
+js_sources = [
+ 'accountsMonitor.js',
+ 'application.js',
+ 'appNotifications.js',
+ 'chatView.js',
+ 'connections.js',
+ 'emojiPicker.js',
+ 'entryArea.js',
+ 'initialSetup.js',
+ 'ircParser.js',
+ 'joinDialog.js',
+ 'main.js',
+ 'mainWindow.js',
+ 'networksManager.js',
+ 'pasteManager.js',
+ 'roomList.js',
+ 'roomManager.js',
+ 'roomStack.js',
+ 'serverRoomManager.js',
+ 'tabCompletion.js',
+ 'telepathyClient.js',
+ 'userList.js',
+ 'utils.js',
+ 'userTracker.js'
+]
+
+js_xml = []
+foreach js_source : js_sources
+ js_xml += ' <file>@0@</file>'.format(js_source)
+endforeach
+
+resource_data = configuration_data()
+resource_data.set('JS_SOURCE_FILES', '\n'.join(js_xml))
+
+resource_xml_name = '@0 src gresource xml'.format(app_id)
+src_resources_xml = configure_file(
+ input: resource_xml_name + '.meson',
+ output: resource_xml_name,
+ configuration: resource_data
+)
+
src_resources = gnome.compile_resources(
'src-resources',
- '@0 src gresource xml'.format(app_id),
+ src_resources_xml,
c_name: 'src_resources'
)
diff --git a/src/org.gnome.Polari.src.gresource.xml.meson b/src/org.gnome.Polari.src.gresource.xml.meson
new file mode 100644
index 0000000..292e966
--- /dev/null
+++ b/src/org.gnome.Polari.src.gresource.xml.meson
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/Polari/js">
+@JS_SOURCE_FILES@
+ </gresource>
+</gresources>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]