diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f511ee5..45a9210 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,9 +10,10 @@ flatpak:
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master"
stage: "test"
variables:
- MANIFEST_PATH: "org.gnome.Podcasts.json"
+ MANIFEST_PATH: "org.gnome.PodcastsDevel.json"
FLATPAK_MODULE: "gnome-podcasts"
- DBUS_ID: "org.gnome.Podcasts"
+ CONFIGURE_ARGS: "-Dprofile=development"
+ DBUS_ID: "org.gnome.PodcastsDevel"
script:
- flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
@@ -21,7 +22,7 @@ flatpak:
- flatpak-builder --run app ${MANIFEST_PATH} glib-compile-resources --sourcedir=podcasts-gtk/resources/ podcasts-gtk/resources/resources.xml
# Build the flatpak repo
- - flatpak-builder --run app ${MANIFEST_PATH} meson --prefix=/app _build
+ - flatpak-builder --run app ${MANIFEST_PATH} meson --prefix=/app ${CONFIGURE_ARGS} _build
- flatpak-builder --run app ${MANIFEST_PATH} ninja -C _build install
# Run the tests
diff --git a/meson.build b/meson.build
index 0d31185..f621f63 100644
--- a/meson.build
+++ b/meson.build
@@ -7,6 +7,25 @@ project(
license: 'GPLv3',
)
+if get_option('profile') == 'development'
+ profile = 'Devel'
+ vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
+ if vcs_tag == ''
+ version_suffix = '-devel'
+ else
+ version_suffix = '-@0@'.format (vcs_tag)
+ endif
+else
+ profile = ''
+ version_suffix = ''
+endif
+
+application_id = 'org.gnome.Podcasts@0@'.format(profile)
+i18n = import('i18n')
+
+subdir('podcasts-gtk/po')
+podir = join_paths (meson.source_root (), 'podcasts-gtk', 'po')
+
podcasts_version = meson.project_version()
version_array = podcasts_version.split('.')
podcasts_major_version = version_array[0].to_int()
@@ -18,16 +37,12 @@ podcasts_bindir = join_paths(podcasts_prefix, get_option('bindir'))
podcasts_localedir = join_paths(podcasts_prefix, get_option('localedir'))
podcasts_conf = configuration_data()
-podcasts_conf.set('BINDIR', podcasts_bindir)
+podcasts_conf.set('appid', application_id)
+podcasts_conf.set('bindir', podcasts_bindir)
datadir = get_option('datadir')
-icondir = join_paths(datadir, 'icons')
subdir('podcasts-gtk/resources')
-i18n = import('i18n')
-subdir('podcasts-gtk/po')
-podir = join_paths (meson.source_root (), 'podcasts-gtk', 'po')
-
cargo = find_program('cargo', required: false)
gresource = find_program('glib-compile-resources', required: false)
cargo_vendor = find_program('cargo-vendor', required: false)
@@ -38,7 +53,14 @@ cargo_release = custom_target('cargo-build',
output: ['gnome-podcasts'],
install: true,
install_dir: podcasts_bindir,
- command: [cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@', podcasts_localedir])
+ command: [cargo_script,
+ '@CURRENT_SOURCE_DIR@',
+ '@OUTPUT@',
+ podcasts_localedir,
+ application_id,
+ podcasts_version + version_suffix,
+ profile
+ ])
run_target('release', command: ['scripts/release.sh',
meson.project_name() + '-' + podcasts_version
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..4c5cc39
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,9 @@
+option (
+ 'profile',
+ type: 'combo',
+ choices: [
+ 'default',
+ 'development'
+ ],
+ value: 'default'
+)
diff --git a/org.gnome.Podcasts.json b/org.gnome.PodcastsDevel.json
similarity index 91%
rename from org.gnome.Podcasts.json
rename to org.gnome.PodcastsDevel.json
index a7f0f32..a155dc1 100644
--- a/org.gnome.Podcasts.json
+++ b/org.gnome.PodcastsDevel.json
@@ -1,5 +1,5 @@
{
- "app-id" : "org.gnome.Podcasts",
+ "app-id" : "org.gnome.PodcastsDevel",
"runtime" : "org.gnome.Platform",
"runtime-version" : "master",
"sdk" : "org.gnome.Sdk",
@@ -30,8 +30,7 @@
],
"env" : {
"CARGO_HOME" : "/run/build/Podcasts/cargo",
- "RUST_BACKTRACE" : "1",
- "DEBUG" : "true"
+ "RUST_BACKTRACE" : "1"
}
},
"modules" : [
@@ -48,6 +47,7 @@
{
"name" : "gnome-podcasts",
"buildsystem" : "meson",
+ "config-opts" : [ "-Dprofile=development" ],
"sources" : [
{
"type" : "git",
diff --git a/podcasts-gtk/build.rs b/podcasts-gtk/build.rs
index 45d6332..c8279e6 100644
--- a/podcasts-gtk/build.rs
+++ b/podcasts-gtk/build.rs
@@ -1,7 +1,3 @@
-use std::env;
-use std::fs::File;
-use std::io::Write;
-use std::path::Path;
use std::process::Command;
fn main() {
@@ -9,9 +5,10 @@ fn main() {
println!("cargo:rerun-if-changed=resources");
println!("cargo:rerun-if-changed=resources/*");
- Command::new("glib-compile-resources")
+ let out = Command::new("glib-compile-resources")
.args(&["--generate", "resources.xml"])
.current_dir("resources")
.status()
- .unwrap();
+ .expect("failed to generate resources");
+ assert!(out.success());
}
diff --git a/podcasts-gtk/resources/gtk/empty_view.ui b/podcasts-gtk/resources/gtk/empty_view.ui
index d12ad8e..a999f16 100644
--- a/podcasts-gtk/resources/gtk/empty_view.ui
+++ b/podcasts-gtk/resources/gtk/empty_view.ui
@@ -81,13 +81,12 @@ Tobias Bernard
vertical
12
-