Skip to content

Commit

Permalink
build: minor meson.build changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rirusha committed Jul 28, 2024
1 parent da69278 commit 19477c9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,27 @@ gio = dependency('gio-2.0', version: '>= 2.72')

app_id = 'io.github.Rirusha.Cassette'

name_suffix = ''
version_suffix = ''

if get_option('is_devel')
name_suffix = ' (Devel)'
app_id_suffix = '-Devel'

find_program('git', required: true)
name_postfix = ' (Devel)'
app_id_dyn = '@0@-Devel'.format(app_id)
app_identity_dyn = 'Cassette (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'
version_suffix = ''
endif

app_id_dyn = '@0@@1@'.format (app_id, app_id_suffix)

conf = configuration_data()
conf.set_quoted('APP_ID', app_id)
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('APP_NAME', 'Cassette@0@'.format (name_suffix))
conf.set_quoted('G_LOG_DOMAIN', app_id)
conf.set10('IS_DEVEL', get_option('is_devel'))
conf.set_quoted('VERSION', meson.project_version() + version_suffix)
conf.set_quoted('VERSION', '@0@@1@'.format (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')))
conf.set_quoted('GNOMELOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
Expand Down
2 changes: 1 addition & 1 deletion src/client/player/mpris.vala
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class Mpris : Object {
public bool can_quit { get; set; default = true; }
public bool can_raise { get; set; default = true; }
public string desktop_entry { get; set; default = Config.APP_ID_DYN; }
public string identity { get; set; default = Config.APP_IDENTITY_DYN; }
public string identity { get; set; default = Config.APP_NAME; }

public signal void quit_triggered ();
public signal void raise_triggered ();
Expand Down

0 comments on commit 19477c9

Please sign in to comment.