geary/desktop/meson.build
Niels De Graef 9acf5d344d Make Geary DBus-activatable. Bug 775956.
* org.gnome.Geary.service.in: create, and let it be installed by CMake.

* org.gnome.Geary.desktop.in: add `DBusActivatable=true`.

* geary-autostart.desktop.in: use `--gapplication-service` instead of
hidden.

* Change the way arguments are parsed:
  * Use the _command-line_ and _handle-local-options_ signals instead
    of _local-command-line_.
  * Remove the `--hidden` option (replaced by `--gapplication-service`)
  * Use VariantDict (which is a little cleaner)
  * Don't use global variables in Arg, but set them in
  the config instead.
  * We can no longer set a global summary due to the new option handling
  in GApplication. On IRC, I got the feedback that info like this should
  be going into a manpage.

* Since the QUIT-action can now be called without ever activating the
app, make the necessary changes to the `GearyController`:
  * `main_window` and `current_conversations` can be null.
  * use `pending_mailtos()` for the compose action as well.
  * Don't update the UNDO action if we're closing down.

* More instance variables prefixed with this (we're changing the lines
anyway, might as well do it properly).

* `Environment.set_prgname()` is already executed in GApplication.run(),
so no more need for `GearyApplication.PRGNAME`.

Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2019-04-12 22:04:56 +10:00

104 lines
2.4 KiB
Python

#
# Desktop files
#
desktop_src = [
'org.gnome.Geary.desktop',
'geary-autostart.desktop'
]
foreach desktop_file: desktop_src
desktop_merged = i18n.merge_file(
input: desktop_file + '.in',
output: desktop_file,
type: 'desktop',
po_dir: po_dir,
install: true,
install_dir: join_paths(datadir, 'applications')
)
if desktop_file_validate.found()
test(
desktop_file + '-validate',
desktop_file_validate,
args: [ desktop_merged.full_path() ]
)
endif
endforeach
#
# Appdata file
#
appdata_file = 'org.gnome.Geary.appdata.xml'
appdata_merged = i18n.merge_file(
input: appdata_file + '.in',
output: appdata_file,
type: 'xml',
po_dir: po_dir,
install: true,
install_dir: join_paths(datadir, 'metainfo')
)
if appstream_util.found()
test(
appdata_file + '-validate',
appstream_util,
args: [
'validate-relax', '--nonet', appdata_merged.full_path()
]
)
endif
#
# Contractor file (Elementary OS)
#
if install_contractor_file
# Call msgfmt manually since gettext won't otherwise translate the
# Description field. See merge req !50.
msgfmt = find_program('msgfmt')
custom_target('geary-attach-contract',
input: 'geary-attach.contract.desktop.in',
output: 'geary-attach.contract',
command: [msgfmt, '--desktop', '--keyword=Description', '--template', '@INPUT@', '-d', po_dir, '-o', '@OUTPUT@'],
install: true,
install_dir: join_paths(datadir, 'contractor')
)
install_data('geary-attach',
install_dir: bindir,
)
endif
# GSettings schemas.
#
# Compile since it makes sure the schema is valid and is used for both
# running the client locally and for tests.
#
# Note the use of depend_files here is a kludge to ensure that the
# schema is re-compiled if the source changes. This is not supported
# by Meson but it works, so request for official support has been
# added, see: https://github.com/mesonbuild/meson/issues/2770
geary_compiled_schema = gnome.compile_schemas(
depend_files: files('org.gnome.Geary.gschema.xml'),
)
install_data('org.gnome.Geary.gschema.xml',
install_dir: join_paths(datadir, 'glib-2.0', 'schemas'),
)
#
# DBus services
#
service_conf = configuration_data()
service_conf.set('bindir', bindir)
configure_file(
input: 'org.gnome.Geary.service.in',
output: 'org.gnome.Geary.service',
configuration: service_conf,
install: true,
install_dir: dbus_services_dir
)