Skip to content

Commit

Permalink
build: Reduce indirections to generate desktop files
Browse files Browse the repository at this point in the history
  • Loading branch information
gpoo committed May 1, 2024
1 parent 3e2d39c commit c1788ac
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions data/meson.build
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
subdir('icons')

# Desktop file [input filename, output filename]
desktops = [['org.gnome.Evince.desktop',
'@[email protected]'.format(ev_app_id)]]

if enable_previewer
desktops += [['org.gnome.Evince-previewer.desktop',
'@[email protected]'.format(ev_app_id)]]
endif

foreach desktop: desktops
desktop_in = configure_file(
input: desktop[0] + '.in.in',
output: desktop[1] + '.in',
configuration: mime_types_conf,
)
# Desktop files
desktop_in = configure_file(
input: 'org.gnome.Evince.desktop.in.in',
output: 'org.gnome.Evince.desktop.in',
configuration: mime_types_conf,
)
i18n.merge_file(
type: 'desktop',
input: desktop_in,
output: '@[email protected]'.format(ev_app_id),
po_dir: po_dir,
install: true,
install_dir: join_paths(ev_datadir, 'applications'),
)

i18n.merge_file(
type: 'desktop',
input: desktop_in,
output: desktop[1],
po_dir: po_dir,
install: true,
install_dir: join_paths(ev_datadir, 'applications'),
)
endforeach
i18n.merge_file(
type: 'desktop',
input: 'org.gnome.Evince-previewer.desktop.in',
output: '@[email protected]'.format(ev_app_id),
po_dir: po_dir,
install: true,
install_dir: join_paths(ev_datadir, 'applications'),
)

# DBus service file
if enable_dbus
Expand Down
File renamed without changes.

0 comments on commit c1788ac

Please sign in to comment.