Skip to content

Commit

Permalink
flatpak: Suffix app ID with .Devel
Browse files Browse the repository at this point in the history
This commit changes the app ID from `org.gnome.SettingsDevel` to `org.gnome.Settings.Devel`, as recommended by the GNOME Developer Documentation - https://developer.gnome.org/documentation/tutorials/application-id.html#application-id-for-flatpak-development.

Additionally, some changes have been made in the buildsystem, to properly substitute the app ID depending on the profile in use.
  • Loading branch information
TheEvilSkeleton authored and felipeborges committed Mar 21, 2024
1 parent 49e3560 commit d9970d4
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ flatpak:

variables:
OLD_APPID: "org.gnome.Settings"
APPID: "org.gnome.SettingsDevel"
BUNDLE: "org.gnome.SettingsDevel.flatpak"
MANIFEST_PATH: "build-aux/flatpak/org.gnome.Settings.json"
APPID: "org.gnome.Settings.Devel"
BUNDLE: "org.gnome.Settings.Devel.flatpak"
MANIFEST_PATH: "build-aux/flatpak/org.gnome.Settings.Devel.json"
PROJECT_ID: "org.gnome.Settings"
PROJECT_NAME: "gnome-control-center.git"
RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"app-id" : "org.gnome.Settings",
"app-id" : "org.gnome.Settings.Devel",
"runtime" : "org.gnome.Sdk",
"runtime-version" : "master",
"sdk" : "org.gnome.Sdk",
Expand Down
9 changes: 0 additions & 9 deletions data/icons/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,3 @@ install_subdir(
'hicolor',
install_dir : control_center_icondir
)

if get_option('profile') == 'development'
icondir = join_paths('hicolor', 'scalable', 'apps')
install_data(
join_paths(icondir, 'org.gnome.Settings.Devel.svg'),
install_dir: join_paths(control_center_icondir, icondir),
rename: 'org.gnome.Settings.svg'
)
endif
7 changes: 3 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ python = py.find_installation('python3')

config_h.set_quoted('TEST_NM_PYTHON', python.full_path())

application_id = 'org.gnome.Settings'

if get_option('profile') == 'development'
profile = 'Devel'
else
profile = ''
application_id += '.' + 'Devel'
endif
application_id = 'org.gnome.Settings@0@'.format(profile)

version_split = meson.project_version().split('.')

Expand Down
4 changes: 1 addition & 3 deletions shell/appdata/meson.build
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
appdata_conf = configuration_data()
appdata_conf.set('appid', application_id)

appdata = 'org.gnome.Settings.appdata.xml'

appdata_file = i18n.merge_file(
input: configure_file(
input: appdata + '.in',
input: 'org.gnome.Settings.appdata.xml.in.in',
output: 'org.gnome.Settings.appdata.xml.in',
configuration: appdata_conf
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2015 Richard Hughes <richard@hughsie.com> -->
<component type="desktop">
<id>org.gnome.Settings.desktop</id>
<id>@appid@.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0-or-later</project_license>
<name>Settings</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
<gresource prefix="/org/gnome/Settings">
<file preprocess="xml-stripblanks">icons/multitasking-symbolic.svg</file>
<file>style.css</file>
<file alias="appdata">appdata/org.gnome.Settings.appdata.xml.in</file>
<file alias="appdata">appdata/@appid@.appdata.xml</file>
</gresource>
</gresources>
11 changes: 9 additions & 2 deletions shell/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,17 @@ common_sources = files(
generated_sources = files()

#Resources
gresource_file = configure_file(
input: meson.project_name() + '.gresource.xml.in',
output: meson.project_name() + '.gresource.xml',
configuration: service_conf
)

generated_sources += gnome.compile_resources(
'resources',
meson.project_name() + '.gresource.xml',
export : true
gresource_file,
export : true,
dependencies: [gresource_file, appdata_file]
)

common_sources += generated_sources
Expand Down

0 comments on commit d9970d4

Please sign in to comment.