mirror of
https://gitlab.gnome.org/Rirusha/Cassette.git
synced 2025-06-28 12:49:52 +00:00
build: replace 'profile' option with 'is_devel' flag
This commit is contained in:
parent
5c21a4caf7
commit
da69278875
5 changed files with 8 additions and 15 deletions
|
@ -49,7 +49,7 @@
|
|||
"name" : "cassette",
|
||||
"builddir" : true,
|
||||
"buildsystem" : "meson",
|
||||
"config-opts": [ "-Dprofile=development" ],
|
||||
"config-opts": [ "-Dis_devel=true" ],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "dir",
|
||||
|
|
|
@ -24,19 +24,17 @@ gio = dependency('gio-2.0', version: '>= 2.72')
|
|||
|
||||
app_id = 'io.github.Rirusha.Cassette'
|
||||
|
||||
if get_option('profile') == 'development'
|
||||
if get_option('is_devel')
|
||||
find_program('git', required: true)
|
||||
name_postfix = ' (Devel)'
|
||||
app_id_dyn = '@0@-Devel'.format(app_id)
|
||||
app_identity_dyn = 'Cassette (Devel)'
|
||||
profile = 'Devel'
|
||||
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
|
||||
version_suffix = '-dev.@0@'.format (vcs_tag)
|
||||
else
|
||||
name_postfix = ''
|
||||
app_id_dyn = app_id
|
||||
app_identity_dyn = 'Cassette'
|
||||
profile = ''
|
||||
version_suffix = ''
|
||||
endif
|
||||
|
||||
|
@ -46,7 +44,7 @@ conf.set_quoted('APP_NAME', 'Cassette@0@'.format (name_postfix))
|
|||
conf.set_quoted('APP_ID_DYN', app_id_dyn)
|
||||
conf.set_quoted('APP_IDENTITY_DYN', app_identity_dyn)
|
||||
conf.set_quoted('G_LOG_DOMAIN', app_id)
|
||||
conf.set_quoted('PROFILE', profile)
|
||||
conf.set10('IS_DEVEL', get_option('is_devel'))
|
||||
conf.set_quoted('VERSION', meson.project_version() + version_suffix)
|
||||
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
||||
conf.set_quoted('DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
option(
|
||||
'profile',
|
||||
type: 'combo',
|
||||
choices: [
|
||||
'default',
|
||||
'development',
|
||||
],
|
||||
value: 'default',
|
||||
description: 'The build profile for app. One of "default" or "development".'
|
||||
'is_devel',
|
||||
type: 'boolean',
|
||||
value: false
|
||||
)
|
||||
|
|
|
@ -90,7 +90,7 @@ namespace Cassette {
|
|||
|
||||
public bool is_devel {
|
||||
get {
|
||||
return Config.PROFILE == "Devel";
|
||||
return Config.IS_DEVEL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Config {
|
|||
public const string APP_ID_DYN;
|
||||
public const string APP_IDENTITY_DYN;
|
||||
public const string VERSION;
|
||||
public const string PROFILE;
|
||||
public const bool IS_DEVEL;
|
||||
public const string GETTEXT_PACKAGE;
|
||||
public const string GNOMELOCALEDIR;
|
||||
public const string DATADIR;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue