[gnome-shell] extensions-app: Support building a separate Devel app
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] extensions-app: Support building a separate Devel app
- Date: Thu, 11 Feb 2021 17:21:07 +0000 (UTC)
commit 60d640189b5eb1d5aced745dec469a38b5542b12
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Jan 22 19:29:07 2021 +0100
extensions-app: Support building a separate Devel app
Follow the pattern used by most GNOME applications and add a profile
build option that allows building a Devel app instead of the regular
release.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3612
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1661>
subprojects/extensions-app/data/meson.build | 6 +++---
subprojects/extensions-app/data/metainfo/meson.build | 2 +-
subprojects/extensions-app/js/meson.build | 8 ++++++--
...c.gresource.xml => org.gnome.Extensions.src.gresource.xml.in} | 2 +-
subprojects/extensions-app/meson.build | 9 ++++++++-
subprojects/extensions-app/meson_options.txt | 8 ++++++++
6 files changed, 27 insertions(+), 8 deletions(-)
---
diff --git a/subprojects/extensions-app/data/meson.build b/subprojects/extensions-app/data/meson.build
index e7bfa9965a..d7e7d4001c 100644
--- a/subprojects/extensions-app/data/meson.build
+++ b/subprojects/extensions-app/data/meson.build
@@ -1,6 +1,6 @@
gnome.compile_resources(
app_id + '.data',
- app_id + '.data.gresource.xml',
+ base_id + '.data.gresource.xml',
gresource_bundle: true,
install: true,
install_dir: pkgdatadir
@@ -16,7 +16,7 @@ desktopconf.set('prgname', prgname)
i18n.merge_file('desktop',
input: configure_file(
- input: desktop_file + '.in.in',
+ input: base_id + '.desktop.in.in',
output: desktop_file + '.in',
configuration: desktopconf
),
@@ -36,7 +36,7 @@ if (desktop_file_validate.found())
endif
configure_file(
- input: app_id + '.service.in',
+ input: base_id + '.service.in',
output: app_id + '.service',
configuration: desktopconf,
install_dir: servicedir,
diff --git a/subprojects/extensions-app/data/metainfo/meson.build
b/subprojects/extensions-app/data/metainfo/meson.build
index dcdb03bd6a..4406a3e5bd 100644
--- a/subprojects/extensions-app/data/metainfo/meson.build
+++ b/subprojects/extensions-app/data/metainfo/meson.build
@@ -1,6 +1,6 @@
metainfo = app_id + '.metainfo.xml'
i18n.merge_file(metainfo,
- input: metainfo + '.in',
+ input: base_id + '.metainfo.xml.in',
output: metainfo,
po_dir: po_dir,
install: true,
diff --git a/subprojects/extensions-app/js/meson.build b/subprojects/extensions-app/js/meson.build
index a378a7e347..3b54159212 100644
--- a/subprojects/extensions-app/js/meson.build
+++ b/subprojects/extensions-app/js/meson.build
@@ -16,7 +16,7 @@ configure_file(
)
configure_file(
- input: app_id + '.in',
+ input: base_id + '.in',
output: app_id,
configuration: launcherconf,
install_dir: pkgdatadir,
@@ -24,7 +24,11 @@ configure_file(
gnome.compile_resources(
app_id + '.src',
- app_id + '.src.gresource.xml',
+ configure_file(
+ input: base_id + '.src.gresource.xml.in',
+ output: app_id + '.src.gresource.xml',
+ configuration: {'profile': '/'.join(profile.split('.')) },
+ ),
source_dir: ['.', '../../../js'],
gresource_bundle: true,
install: true,
diff --git a/subprojects/extensions-app/js/org.gnome.Extensions.src.gresource.xml
b/subprojects/extensions-app/js/org.gnome.Extensions.src.gresource.xml.in
similarity index 75%
rename from subprojects/extensions-app/js/org.gnome.Extensions.src.gresource.xml
rename to subprojects/extensions-app/js/org.gnome.Extensions.src.gresource.xml.in
index 8cda0f91ad..330ede1006 100644
--- a/subprojects/extensions-app/js/org.gnome.Extensions.src.gresource.xml
+++ b/subprojects/extensions-app/js/org.gnome.Extensions.src.gresource.xml.in
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
- <gresource prefix="/org/gnome/Extensions/js">
+ <gresource prefix="/org/gnome/Extensions@profile@/js">
<file>main.js</file>
<file>misc/config.js</file>
diff --git a/subprojects/extensions-app/meson.build b/subprojects/extensions-app/meson.build
index 7a21acc7d2..c68dfb1b1f 100644
--- a/subprojects/extensions-app/meson.build
+++ b/subprojects/extensions-app/meson.build
@@ -4,7 +4,14 @@ project('gnome-extensions-app',
license: 'GPLv2+'
)
-app_id = 'org.gnome.Extensions'
+if get_option('profile') == 'development'
+ profile = '.Devel'
+else
+ profile = ''
+endif
+
+base_id = 'org.gnome.Extensions'
+app_id = base_id + profile
prgname = 'gnome-extensions-app'
gnome = import('gnome')
diff --git a/subprojects/extensions-app/meson_options.txt b/subprojects/extensions-app/meson_options.txt
index 435f237e6a..ca2eb41158 100644
--- a/subprojects/extensions-app/meson_options.txt
+++ b/subprojects/extensions-app/meson_options.txt
@@ -2,3 +2,11 @@ option('package_name',
type: 'string',
description: 'The gettext domain name',
)
+option('profile',
+ type: 'combo',
+ choices: [
+ 'default',
+ 'development'
+ ],
+ value: 'default'
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]