[totem/wip/hadess/update-nightly: 2/2] build: Add support for building Nightly version
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/wip/hadess/update-nightly: 2/2] build: Add support for building Nightly version
- Date: Wed, 25 Sep 2019 15:04:19 +0000 (UTC)
commit 1d1e464274c98a67c481c5c97fef94e5a87279f2
Author: Bastien Nocera <hadess hadess net>
Date: Wed Sep 25 17:01:06 2019 +0200
build: Add support for building Nightly version
This includes renaming a few files that mentioned org.gnome.Totem
directly as we want the new nightly build to be parallel installable
with a stable version, as org.gnome.Totem.Devel.
Closes: #359
.gitlab-ci.yml | 2 +-
data/icons/meson.build | 2 +-
...ome.Totem-nightly.svg => org.gnome.Totem.Devel.svg} | 0
data/meson.build | 5 +++--
data/org.gnome.Totem.service.in | 2 +-
...org.gnome.Totem.json => org.gnome.Totem.Devel.json} | 5 +++--
meson.build | 18 ++++++++++++++++++
meson_options.txt | 1 +
src/backend/bvw-test.c | 2 +-
src/plugins/dbusservice/dbusservice.py | 2 +-
src/totem-object.c | 2 +-
src/totem.c | 6 +++---
12 files changed, 34 insertions(+), 13 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1bd0681fe..2c599fb96 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,7 +25,7 @@ flatpak:master:
stage: test
variables:
# Replace with your manifest path
- MANIFEST_PATH: "flatpak/org.gnome.Totem.json"
+ MANIFEST_PATH: "flatpak/org.gnome.Totem.Devel.json"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
# Replace with your application name, as written in the manifest
FLATPAK_MODULE: "totem"
diff --git a/data/icons/meson.build b/data/icons/meson.build
index 234ff8e53..49260c10d 100644
--- a/data/icons/meson.build
+++ b/data/icons/meson.build
@@ -1,5 +1,5 @@
install_data(
- join_paths('scalable', 'org.gnome.Totem.svg'),
+ join_paths('scalable', application_id + '.svg'),
install_dir: join_paths(totem_datadir, 'icons', 'hicolor', 'scalable', 'apps')
)
diff --git a/data/icons/scalable/org.gnome.Totem-nightly.svg b/data/icons/scalable/org.gnome.Totem.Devel.svg
similarity index 100%
rename from data/icons/scalable/org.gnome.Totem-nightly.svg
rename to data/icons/scalable/org.gnome.Totem.Devel.svg
diff --git a/data/meson.build b/data/meson.build
index aecc657cd..284da983a 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -79,11 +79,12 @@ i18n.merge_file (
service_conf = configuration_data()
service_conf.set('bindir', totem_bindir)
+service_conf.set('application_id', application_id)
-service = 'org.gnome.Totem.service'
+service = application_id + '.service'
configure_file(
- input: service + '.in',
+ input: 'org.gnome.Totem.service.in',
output: service,
install: true,
install_dir: join_paths(totem_datadir, 'dbus-1', 'services'),
diff --git a/data/org.gnome.Totem.service.in b/data/org.gnome.Totem.service.in
index eaba8aebc..eeecdde88 100644
--- a/data/org.gnome.Totem.service.in
+++ b/data/org.gnome.Totem.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
-Name=org.gnome.Totem
+Name=@application_id@
Exec=@bindir@/totem --gapplication-service
diff --git a/flatpak/org.gnome.Totem.json b/flatpak/org.gnome.Totem.Devel.json
similarity index 98%
rename from flatpak/org.gnome.Totem.json
rename to flatpak/org.gnome.Totem.Devel.json
index f4ffacb78..346742763 100644
--- a/flatpak/org.gnome.Totem.json
+++ b/flatpak/org.gnome.Totem.Devel.json
@@ -1,11 +1,12 @@
{
- "app-id": "org.gnome.Totem",
+ "app-id": "org.gnome.Totem.Devel",
"runtime": "org.gnome.Platform",
"runtime-version": "master",
"sdk": "org.gnome.Sdk",
"command": "totem",
"tags": ["nightly"],
- "desktop-file-name-prefix": "(Nightly) ",
+ "rename-desktop-file": "org.gnome.Totem.desktop",
+ "desktop-file-name-suffix": " (☢️)",
"finish-args": [
/* X11 + XShm access */
"--share=ipc", "--socket=x11",
diff --git a/meson.build b/meson.build
index 0685d55e0..bd4e87d72 100644
--- a/meson.build
+++ b/meson.build
@@ -41,6 +41,16 @@ totem_debug = get_option('buildtype').contains('debug')
cc = meson.get_compiler('c')
+if get_option('profile') == 'development'
+ profile = '.Devel'
+ name_suffix = ' ☢️'
+else
+ profile = ''
+ name_suffix = ''
+endif
+
+application_id = 'org.gnome.Totem@0@'.format(profile)
+
config_h = configuration_data()
# debug options
@@ -51,6 +61,7 @@ set_defines = [
# package
['PACKAGE', meson.project_name()],
['TOTEM_API_VERSION', totem_api_version],
+ ['APPLICATION_ID', application_id],
['VERSION', totem_version],
# i18n
['GETTEXT_PACKAGE', meson.project_name()]
@@ -229,6 +240,13 @@ meson.add_dist_script(
message('Totem was configured with the following options:')
message('** Using the GStreamer-1.0 backend')
+str = 'Development build'
+if get_option('profile') == 'development'
+ message('** ' + str + ' enabled')
+else
+ message(' ' + str + ' disabled')
+endif
+
str = 'Easy codec installation support'
if have_easy_codec
message('** ' + str + ' enabled')
diff --git a/meson_options.txt b/meson_options.txt
index d6f8b4290..7070fd5d0 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -2,3 +2,4 @@ option('enable-easy-codec-installation', type: 'combo', choices: ['yes', 'no', '
option('enable-python', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Enable
python support')
option('with-plugins', type: 'combo', choices: ['all', 'none', 'auto'], value: 'auto', description: 'Which
Totem plugins to compile (default: auto; "all", "none" and "auto" are valid)')
option('enable-gtk-doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
+option('profile', type: 'combo', choices: ['default', 'development'], value: 'default', description: 'Build
profiles')
diff --git a/src/backend/bvw-test.c b/src/backend/bvw-test.c
index 3d3dba2cc..cbd6f29ad 100644
--- a/src/backend/bvw-test.c
+++ b/src/backend/bvw-test.c
@@ -117,7 +117,7 @@ int main
G_CALLBACK (gtk_main_quit), NULL);
bvw = bacon_video_widget_new (NULL);
- bacon_video_widget_set_logo (BACON_VIDEO_WIDGET (bvw), "org.gnome.Totem");
+ bacon_video_widget_set_logo (BACON_VIDEO_WIDGET (bvw), APPLICATION_ID);
g_signal_connect (G_OBJECT (bvw), "eos", G_CALLBACK (on_eos_event), NULL);
g_signal_connect (G_OBJECT (bvw), "got-metadata", G_CALLBACK (on_got_metadata), NULL);
diff --git a/src/plugins/dbusservice/dbusservice.py b/src/plugins/dbusservice/dbusservice.py
index e65a80baa..70deb7f7a 100644
--- a/src/plugins/dbusservice/dbusservice.py
+++ b/src/plugins/dbusservice/dbusservice.py
@@ -175,7 +175,7 @@ class Root (dbus.service.Object): # pylint: disable=R0904
'CanRaise': True,
'HasTrackList': False,
'Identity': 'Videos',
- 'DesktopEntry': 'org.gnome.Totem',
+ 'DesktopEntry': self.totem.application_id,
'SupportedUriSchemes': self.totem.get_supported_uri_schemes (),
'SupportedMimeTypes': self.totem.get_supported_content_types (),
}
diff --git a/src/totem-object.c b/src/totem-object.c
index 93be4fa86..19d77f6ec 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -252,7 +252,7 @@ totem_object_app_activate (GApplication *app)
}
/* Set the logo at the last minute so we won't try to show it before a video */
- bacon_video_widget_set_logo (totem->bvw, "org.gnome.Totem");
+ bacon_video_widget_set_logo (totem->bvw, APPLICATION_ID);
g_application_unmark_busy (G_APPLICATION (totem));
diff --git a/src/totem.c b/src/totem.c
index 1e9ef168f..9072c1ba6 100644
--- a/src/totem.c
+++ b/src/totem.c
@@ -70,13 +70,13 @@ main (int argc, char **argv)
g_set_prgname ("totem");
g_set_application_name (_("Videos"));
- gtk_window_set_default_icon_name ("org.gnome.Totem");
+ gtk_window_set_default_icon_name (APPLICATION_ID);
g_setenv("PULSE_PROP_media.role", "video", TRUE);
- g_setenv("PULSE_PROP_application.icon_name", "org.gnome.Totem", TRUE);
+ g_setenv("PULSE_PROP_application.icon_name", APPLICATION_ID, TRUE);
/* Build the main Totem object */
totem = g_object_new (TOTEM_TYPE_OBJECT,
- "application-id", "org.gnome.Totem",
+ "application-id", APPLICATION_ID,
"flags", G_APPLICATION_HANDLES_OPEN,
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]