[gtk/demo-appdata] demos: Generate appdata
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/demo-appdata] demos: Generate appdata
- Date: Tue, 1 Jun 2021 19:36:45 +0000 (UTC)
commit 25ee6d3f47545a0b9e2fd546b5b8f385270f2462
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 1 08:16:27 2021 -0400
demos: Generate appdata
We don't maintain a release history here, but at least
we can put in the right version and date for the current
build.
Fixes: #3993
demos/gtk-demo/meson.build | 7 ++++++-
...gtk.Demo4.appdata.xml => org.gtk.Demo4.appdata.xml.in} | 9 ++-------
demos/icon-browser/meson.build | 7 ++++++-
...r4.appdata.xml => org.gtk.IconBrowser4.appdata.xml.in} | 9 ++-------
demos/meson.build | 15 +++++++++++++++
demos/widget-factory/meson.build | 7 ++++++-
....appdata.xml => org.gtk.WidgetFactory4.appdata.xml.in} | 9 ++-------
7 files changed, 39 insertions(+), 24 deletions(-)
---
diff --git a/demos/gtk-demo/meson.build b/demos/gtk-demo/meson.build
index abfe033df4..24e4abe05d 100644
--- a/demos/gtk-demo/meson.build
+++ b/demos/gtk-demo/meson.build
@@ -205,4 +205,9 @@ install_data('org.gtk.Demo4.gschema.xml', install_dir: gtk_schemasdir)
gnome.compile_schemas()
# appdata
-install_data('org.gtk.Demo4.appdata.xml', install_dir: gtk_appdatadir)
+configure_file(
+ input: 'org.gtk.Demo4.appdata.xml.in',
+ output: 'org.gtk.Demo4.appdata.xml',
+ configuration: appdata_config,
+ install_dir: gtk_appdatadir
+)
diff --git a/demos/gtk-demo/org.gtk.Demo4.appdata.xml b/demos/gtk-demo/org.gtk.Demo4.appdata.xml.in
similarity index 81%
rename from demos/gtk-demo/org.gtk.Demo4.appdata.xml
rename to demos/gtk-demo/org.gtk.Demo4.appdata.xml.in
index f102eb7eaa..7aa94b8bf8 100644
--- a/demos/gtk-demo/org.gtk.Demo4.appdata.xml
+++ b/demos/gtk-demo/org.gtk.Demo4.appdata.xml.in
@@ -31,14 +31,9 @@
<update_contact>matthias.clasen_at_gmail.com</update_contact>
<developer_name>Matthias Clasen and others</developer_name>
<releases>
- <release version="3.99.0" date="2020-07-30">
+ <release version="@BUILD_VERSION@" date="@BUILD_DATE@">
<description>
- <p>A new developers snapshot towards GTK 4.0.</p>
- </description>
- </release>
- <release version="3.94.0" date="2018-06-25">
- <description>
- <p>A new developers snapshot towards GTK 4.0.</p>
+ <p>A new build of GTK.</p>
</description>
</release>
</releases>
diff --git a/demos/icon-browser/meson.build b/demos/icon-browser/meson.build
index 3922811f92..9c7ddb99de 100644
--- a/demos/icon-browser/meson.build
+++ b/demos/icon-browser/meson.build
@@ -32,5 +32,10 @@ endforeach
install_data('org.gtk.IconBrowser4.desktop', install_dir: gtk_applicationsdir)
# appdata
-install_data('org.gtk.IconBrowser4.appdata.xml', install_dir: gtk_appdatadir)
+configure_file(
+ input: 'org.gtk.IconBrowser4.appdata.xml.in',
+ output: 'org.gtk.IconBrowser4.appdata.xml',
+ configuration: appdata_config,
+ install_dir: gtk_appdatadir
+)
diff --git a/demos/icon-browser/org.gtk.IconBrowser4.appdata.xml
b/demos/icon-browser/org.gtk.IconBrowser4.appdata.xml.in
similarity index 81%
rename from demos/icon-browser/org.gtk.IconBrowser4.appdata.xml
rename to demos/icon-browser/org.gtk.IconBrowser4.appdata.xml.in
index 8ae3f259f6..d5c8bac706 100644
--- a/demos/icon-browser/org.gtk.IconBrowser4.appdata.xml
+++ b/demos/icon-browser/org.gtk.IconBrowser4.appdata.xml.in
@@ -30,14 +30,9 @@
<update_contact>matthias.clasen_at_gmail.com</update_contact>
<developer_name>Matthias Clasen and others</developer_name>
<releases>
- <release version="3.99.0" date="2020-07-30">
+ <release version="@BUILD_VERSION@" date="@BUILD_DATE@">
<description>
- <p>A new developers snapshot towards GTK 4.0.</p>
- </description>
- </release>
- <release version="3.94.0" date="2018-06-25">
- <description>
- <p>A new developers snapshot towards GTK 4.0.</p>
+ <p>A new build of GTK.</p>
</description>
</release>
</releases>
diff --git a/demos/meson.build b/demos/meson.build
index 5b68828eef..de720925f6 100644
--- a/demos/meson.build
+++ b/demos/meson.build
@@ -11,6 +11,21 @@ demo_conf_h = declare_dependency(
)
)
+# appdata
+today = 'unknown'
+date = find_program('date',
+ required: false)
+if date.found()
+ r = run_command(date, '-I')
+ if r.returncode() == 0
+ today = r.stdout().strip()
+ endif
+endif
+
+appdata_config = configuration_data()
+appdata_config.set('BUILD_VERSION', meson.project_version())
+appdata_config.set('BUILD_DATE', today)
+
subdir('constraint-editor')
subdir('gtk-demo')
subdir('icon-browser')
diff --git a/demos/widget-factory/meson.build b/demos/widget-factory/meson.build
index e248963e24..1cebd4adc5 100644
--- a/demos/widget-factory/meson.build
+++ b/demos/widget-factory/meson.build
@@ -26,4 +26,9 @@ foreach size: ['scalable', 'symbolic']
endforeach
# appdata
-install_data('org.gtk.WidgetFactory4.appdata.xml', install_dir: gtk_appdatadir)
+configure_file(
+ input: 'org.gtk.WidgetFactory4.appdata.xml.in',
+ output: 'org.gtk.WidgetFactory4.appdata.xml',
+ configuration: appdata_config,
+ install_dir: gtk_appdatadir
+)
diff --git a/demos/widget-factory/org.gtk.WidgetFactory4.appdata.xml
b/demos/widget-factory/org.gtk.WidgetFactory4.appdata.xml.in
similarity index 82%
rename from demos/widget-factory/org.gtk.WidgetFactory4.appdata.xml
rename to demos/widget-factory/org.gtk.WidgetFactory4.appdata.xml.in
index b3e9889137..60e30a7e6b 100644
--- a/demos/widget-factory/org.gtk.WidgetFactory4.appdata.xml
+++ b/demos/widget-factory/org.gtk.WidgetFactory4.appdata.xml.in
@@ -32,14 +32,9 @@
<update_contact>matthias.clasen_at_gmail.com</update_contact>
<developer_name>Matthias Clasen and others</developer_name>
<releases>
- <release version="3.99.0" date="2020-07-30">
+ <release version="@BUILD_VERSION@" date="@BUILD_DATE@">
<description>
- <p>A new developers snapshot towards GTK 4.0.</p>
- </description>
- </release>
- <release version="3.94.0" date="2018-06-25">
- <description>
- <p>A new developers snapshot towards GTK 4.0.</p>
+ <p>A new build of GTK.</p>
</description>
</release>
</releases>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]