
Building & Installing Geary
===========================

Building
--------

Geary uses the Meson <http://mesonbuild.com> and Ninja
<https://ninja-build.org> build systems. To build Geary, run the
following commands from the top-level directory of the source code
repository:

    meson build
    ninja -C build

A convenience Makefile for development only is also provided. To use
it, simply invoke make from the top-level directory.

Dependencies
------------

Building Geary requires the following major libraries and tools:

 * GTK+ 3
 * WebKitGTK+ 2
 * SQLite 3
 * Vala

See the `meson.build` file in the top-level directory for the complete
list of required dependencies and minimum versions.

Geary also requires SQLite to be built with the compiler flag
`-DSQLITE_ENABLE_FTS3`.

All required libraries and tools are available from major Linux
distribution's package repositories:

Installing dependencies on Fedora
---------------------------------

Fedora 25 and later ships with the correct versions of the required
libraries. Install them by running this command:

    sudo yum install vala gobject-introspection-devel meson \
        desktop-file-utils iso-codes-devel libcanberra-devel libgee-devel \
        glib2-devel gmime-devel gtk3-devel libnotify-devel sqlite-devel \
        webkitgtk4-devel libsecret-devel libxml2-devel vala-tools \
        gcr-devel enchant2-devel libunwind-devel json-glib-devel \
        gnome-online-accounts-devel itstool

Installing dependencies on Ubuntu/Debian
----------------------------------------

Ubuntu 17.10 (Artful) and later ships with the correct versions of the
required libraries.

Ubuntu 16.04 LTS (Xenial) does not meet the minimum requirements,
users of that are encourage to use Geary 0.12 LTS instead.

Debian 9 (Stretch) and later ships with the correct versions of the
required libraries.

Install them by running this command:

    sudo apt-get install valac libgirepository1.0-dev \
        meson desktop-file-utils iso-codes libcanberra-dev \
        libgee-0.8-dev libglib2.0-dev libgmime-2.6-dev libgtk-3-dev \
        libsecret-1-dev libxml2-dev libnotify-dev libsqlite3-dev \
        libwebkit2gtk-4.0-dev libgcr-3-dev libenchant-dev \
        libunwind-dev libgoa-1.0-dev libjson-glib-dev itstool gettext

And for Ubuntu Unity integration:

    sudo apt-get install libunity-dev libmessaging-menu-dev

Running
-------

If you wish to try Geary before installing it, you may execute it directly
from its build directory:

    ./build/src/geary

Note that certain desktop integration (such as being listed in an
application menu) requires full installation.

Installation
------------

After Geary has built, install it by invoking the install target:

    ninja -C build install

After installation, it can be uninstalled in the same way:

    ninja -C build uninstall

By default, Geary will install under /usr/local. To install to a
different directory, set pass the --prefix to meson when performing
the initial configuration step:

    meson --prefix=/usr -C build

---
Copyright 2016 Software Freedom Conservancy Inc.  
Copyright 2018 Michael Gratton <mike@vee.net>
