Skip to content

Commit

Permalink
chore: register search provider
Browse files Browse the repository at this point in the history
First step towards closing bragefuglseth#20.
  • Loading branch information
FineFindus committed Jan 12, 2024
1 parent 87c9059 commit 1de6e6d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
3 changes: 3 additions & 0 deletions data/dev.bragefuglseth.Fretboard.SearchProvider.service.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[D-BUS Service]
Name=@appid@.SearchProvider
Exec=@bindir@/@name@ --gapplication-service
5 changes: 5 additions & 0 deletions data/dev.bragefuglseth.Fretboard.search-provider.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Shell Search Provider]
DesktopId=@appid@.desktop
BusName=@appid@.SearchProvider
ObjectPath=@object_path@
Version=2
21 changes: 21 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,25 @@ if compile_schemas.found()
args: ['--strict', '--dry-run', meson.current_source_dir()])
endif

# Search Provider
service_conf = configuration_data()
service_conf.set('appid', application_id)
service_conf.set('name', meson.project_name())
service_conf.set('bindir', bindir)
configure_file(
input: '@0@.SearchProvider.service.in'.format(base_id),
output: '@0@.SearchProvider.service'.format(application_id),
configuration: service_conf,
install_dir: datadir / 'dbus-1' / 'services'
)
search_conf = configuration_data()
search_conf.set('appid', application_id)
search_conf.set('object_path', object_path)
configure_file(
input: '@0@.search-provider.ini'.format(base_id),
output: '@0@.search-provider.ini'.format(application_id),
configuration: search_conf,
install_dir: datadir / 'gnome-shell' / 'search-providers',
)

subdir('icons')
3 changes: 3 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ base_id = 'dev.bragefuglseth.Fretboard'
version = meson.project_version()

prefix = get_option('prefix')
bindir = get_option('bindir')
localedir = prefix / get_option('localedir')
datadir = prefix / get_option('datadir')
pkgdatadir = datadir / meson.project_name()
Expand All @@ -23,9 +24,11 @@ gettext_package = meson.project_name()
if get_option('profile') == 'development'
profile = 'Devel'
application_id = '@0@.@1@'.format(base_id, profile)
object_path = '/dev/bragefuglseth/Fretboard/Devel/SearchProvider'
else
profile = ''
application_id = base_id
object_path = '/dev/bragefuglseth/Fretboard/SearchProvider'
endif

meson.add_dist_script(
Expand Down
2 changes: 1 addition & 1 deletion src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ cargo_build = custom_target(
output: meson.project_name(),
console: true,
install: true,
install_dir: get_option('bindir'),
install_dir: bindir,
command: [
'env', cargo_env,
cargo_bin, 'build',
Expand Down

0 comments on commit 1de6e6d

Please sign in to comment.