From 15e6fbc2f240d03e5524a30738cfbb047e7cb6d3 Mon Sep 17 00:00:00 2001 From: Ryo Nakano Date: Mon, 12 Aug 2024 15:53:35 +0900 Subject: [PATCH] chore: metainfo: Set screenshot from app version --- ...om.github.sgpthomas.hourglass.metainfo.xml.in.in} | 6 +++--- data/meson.build | 12 ++++++++++-- po/extra/POTFILES | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) rename data/{com.github.sgpthomas.hourglass.metainfo.xml.in => com.github.sgpthomas.hourglass.metainfo.xml.in.in} (98%) diff --git a/data/com.github.sgpthomas.hourglass.metainfo.xml.in b/data/com.github.sgpthomas.hourglass.metainfo.xml.in.in similarity index 98% rename from data/com.github.sgpthomas.hourglass.metainfo.xml.in rename to data/com.github.sgpthomas.hourglass.metainfo.xml.in.in index 297f955..c7340dd 100644 --- a/data/com.github.sgpthomas.hourglass.metainfo.xml.in +++ b/data/com.github.sgpthomas.hourglass.metainfo.xml.in.in @@ -19,17 +19,17 @@ Alarm View - https://raw.githubusercontent.com/sgpthomas/hourglass/3.0.0/data/screenshots/alarm.png + https://raw.githubusercontent.com/sgpthomas/hourglass/@VERSION@/data/screenshots/alarm.png Stopwatch View - https://raw.githubusercontent.com/sgpthomas/hourglass/3.0.0/data/screenshots/stopwatch.png + https://raw.githubusercontent.com/sgpthomas/hourglass/@VERSION@/data/screenshots/stopwatch.png Timer View - https://raw.githubusercontent.com/sgpthomas/hourglass/3.0.0/data/screenshots/timer.png + https://raw.githubusercontent.com/sgpthomas/hourglass/@VERSION@/data/screenshots/timer.png diff --git a/data/meson.build b/data/meson.build index 548125b..774a5cd 100644 --- a/data/meson.build +++ b/data/meson.build @@ -12,8 +12,16 @@ install_data( install_dir: get_option('datadir') / 'pixmaps' ) -i18n.merge_file( - input: meson.project_name() + '.metainfo.xml.in', +appstream_conf = configuration_data() +appstream_conf.set('VERSION', meson.project_version()) +appstream_file_in = configure_file( + input: meson.project_name() + '.metainfo.xml.in.in', + output: meson.project_name() + '.metainfo.xml.in', + configuration: appstream_conf +) + +appstream_file = i18n.merge_file( + input: appstream_file_in, output: meson.project_name() + '.metainfo.xml', po_dir: meson.project_source_root() / 'po' / 'extra', install: true, diff --git a/po/extra/POTFILES b/po/extra/POTFILES index 456fc5c..61fa6f7 100644 --- a/po/extra/POTFILES +++ b/po/extra/POTFILES @@ -1,2 +1,2 @@ data/com.github.sgpthomas.hourglass.desktop.in.in -data/com.github.sgpthomas.hourglass.metainfo.xml.in +data/com.github.sgpthomas.hourglass.metainfo.xml.in.in