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 May 23, 2024
1 parent ccc670b commit b340e40
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
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.learningequality.Kolibri'
base_object_path = '/org/learningequality/Kolibri'
profile_env_prefix = 'KOLIBRI_'
elif build_profile == 'development'
base_application_id = 'org.learningequality.Kolibri.Devel'
base_object_path = '/org/learningequality/Kolibri/Devel'
profile_env_prefix = 'KOLIBRI_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 b340e40

Please sign in to comment.