1Building and running Geary 2========================== 3 4Geary uses the [Meson](http://mesonbuild.com) and 5[Ninja](https://ninja-build.org) build systems. You will need these 6and a number of other development libraries installed to build 7Geary. See the Dependencies section below for a list of packages to 8install. 9 10Building, running, tests and documentation 11------------------------------------------ 12 13To build Geary, run the following commands from the top-level 14directory of the source code repository: 15 16``` 17meson build 18ninja -C build 19``` 20 21Once built, Geary can be run directly from the build directory without 22being installed: 23 24``` 25./build/src/geary 26``` 27 28Note that certain desktop integration (such as being listed in an 29application menu) requires full installation to work correctly. 30 31To run the unit tests, use the Meson `test` command: 32 33``` 34meson test -C build 35``` 36 37API documentation will be built if `valadoc` is installed. 38 39Consult the Meson documentation for information about configuring the 40build, installing, and so on. 41 42Build profiles 43-------------- 44 45Geary can be built using a number of different build profiles, which 46determine things like the application id, the location of stored data, 47the name of the application, icon and other visual elements. 48 49These can be set at build configuration time using the Meson `setup` 50and `configure` commands, using the standard `-Dprofile=…` option. See 51the `profile` option in `meson_options.txt` for the current list of 52supported types. 53 54Maintainers must use the `release` build profile when packaging Geary, 55otherwise when run it will use branding and data locations intended 56for development only. 57 58Note that setting the profile does not alter such things as compiler 59options, use the standard Meson `--buildtype` argument for that. 60 61Consult the Meson documentation for more information about configuring 62options. 63 64Dependencies 65------------ 66 67Building Geary requires the following major libraries and tools: 68 69 * GTK+ 3 70 * WebKitGTK+ 2 71 * SQLite 3 72 * Vala 73 74See the `meson.build` file in the top-level directory for the complete 75list of required dependencies and minimum versions. 76 77Geary requires SQLite is built with both FTS3 and FTS5 support. Ensure 78`--enable-fts5`, `-DSQLITE_ENABLE_FTS3` and 79`-DSQLITE_ENABLE_FTS3_PARENTHESIS` are passed to the SQLite configure 80script. 81 82All required libraries and tools are available from major Linux 83distribution's package repositories: 84 85Installing dependencies on Fedora 86--------------------------------- 87 88Install them by running this command: 89 90``` 91sudo dnf install meson vala desktop-file-utils enchant2-devel \ 92 folks-devel gcr-devel glib2-devel gmime30-devel \ 93 gnome-online-accounts-devel gspell-devel gsound-devel \ 94 gtk3-devel iso-codes-devel itstool json-glib-devel \ 95 libappstream-glib-devel libgee-devel libhandy1-devel \ 96 libpeas-devel libsecret-devel libicu-devel libstemmer-devel \ 97 libunwind-devel libxml2-devel libytnef-devel sqlite-devel \ 98 webkitgtk4-devel 99``` 100 101Installing dependencies on Ubuntu/Debian 102---------------------------------------- 103 104Install them by running this command: 105 106``` 107sudo apt-get install meson build-essential valac \ 108 desktop-file-utils iso-codes gettext itstool \ 109 libappstream-glib-dev libenchant-2-dev libfolks-dev \ 110 libgcr-3-dev libgee-0.8-dev libglib2.0-dev libgmime-3.0-dev \ 111 libgoa-1.0-dev libgspell-1-dev libgsound-dev libgtk-3-dev \ 112 libjson-glib-dev libhandy-1-dev libicu-dev libpeas-dev \ 113 libsecret-1-dev libsqlite3-dev libstemmer-dev libunwind-dev \ 114 libwebkit2gtk-4.0-dev libxml2-dev libytnef0-dev 115``` 116 117And for Ubuntu Messaging Menu integration: 118 119``` 120sudo apt-get install libmessaging-menu-dev 121``` 122 123--- 124Copyright © 2016 Software Freedom Conservancy Inc. 125Copyright © 2018-2020 Michael Gratton <mike@vee.net> 126