Automate profile setting

We can derive whether we are build a developement snapshot or
a stable version from the minor version number. So do that.
This way, we'll get the devel profile selected in the nightly
SDK, which will make the commit sha appear in the inspector,
which is useful to determine what nightly users are testing.
This commit is contained in:
Matthias Clasen 2024-01-18 21:20:41 -05:00
parent f9c6bd125b
commit cebc95f253
2 changed files with 14 additions and 5 deletions

View File

@ -787,9 +787,18 @@ gen_visibility_macros = find_program('build-aux/meson/gen-visibility-macros.py')
gen_profile_conf = find_program('build-aux/meson/gen-profile-conf.py')
profile = get_option('profile')
if profile == 'auto'
if gtk_minor_version.is_even()
profile = 'default'
else
profile = 'devel'
endif
endif
profile_conf_h = declare_dependency(
sources: custom_target('profile-conf',
command: [gen_profile_conf, meson.project_source_root(), get_option('profile')],
command: [gen_profile_conf, meson.project_source_root(), profile],
capture: true,
output: 'profile_conf.h',
build_by_default: true,

View File

@ -124,14 +124,14 @@ option('man-pages',
option('demo-profile',
type: 'combo',
choices: [ 'default', 'devel' ],
value: 'default',
choices: [ 'auto', 'default', 'devel' ],
value: 'auto',
deprecated: 'profile')
option('profile',
type: 'combo',
choices: [ 'default', 'devel' ],
value: 'default',
choices: [ 'auto', 'default', 'devel' ],
value: 'auto',
description : 'Profile to use for demos')
option('build-demos',