Skip to content

Commit

Permalink
Move app ID and prefixes to meson_options
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanmccall committed Nov 24, 2023
1 parent 722b049 commit 72258b4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 10 deletions.
5 changes: 4 additions & 1 deletion build-aux/flatpak/org.endlessos.Key.Devel.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@
"builddir" : true,
"run-tests" : true,
"config-opts" : [
"-Dprofile=development"
"-Dprofile=development",
"-Dbase_application_id=org.endlessos.Key",
"-Dbase_object_path=/org/endlessos/Key",
"-Denv_prefix=ENDLESS_KEY_"
],
"sources" : [
{
Expand Down
17 changes: 8 additions & 9 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ locale_dir = join_paths(get_option('prefix'), get_option('localedir'))
datadir = join_paths(get_option('prefix'), get_option('datadir'))

build_profile = get_option('profile')

if build_profile == 'default'
base_application_id = 'org.endlessos.Key'
base_object_path = '/org/endlessos/Key'
profile_env_prefix = 'ENDLESS_KEY_'
elif build_profile == 'development'
base_application_id = 'org.endlessos.Key.Devel'
base_object_path = '/org/endlessos/Key/Devel'
profile_env_prefix = 'ENDLESS_KEY_DEVEL_'
base_application_id = get_option('base_application_id')
base_object_path = get_option('base_object_path')
profile_env_prefix = get_option('env_prefix')

if build_profile == 'development'
base_application_id += '.Devel'
base_object_path += '/Devel'
profile_env_prefix += 'DEVEL_'
endif

frontend_application_id = base_application_id
Expand Down
21 changes: 21 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,24 @@ option(
],
value: 'default'
)

option(
'base_application_id',
type: 'string',
value: 'org.learningequality.Kolibri',
description: 'Base application ID. When profile is "development", ".Devel" is appended'
)

option(
'base_object_path',
type: 'string',
value: '/org/learningequality/Kolibri',
description: 'Base D-Bus object path. When profile is "development", "/Devel" is appended'
)

option(
'env_prefix',
type: 'string',
value: 'KOLIBRI_',
description: 'Prefix for environment variables. When profile is "development", "DEVEL_" is appended'
)

0 comments on commit 72258b4

Please sign in to comment.