1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-03 09:49:15 +02:00
No description
Find a file
2019-02-11 17:55:11 +01:00
.credentials travis: add encrypted ssh secret key 2018-09-25 16:05:57 +02:00
.github update template according to the latest irc discussion, align with android 2019-01-28 22:22:55 +01:00
.scripts Revert "try running tox with live accounts" 2018-12-12 01:03:53 +01:00
cmdline Merge pull request #526 from deltachat/quotes 2019-02-10 08:48:37 +01:00
docs comment 2019-01-08 23:39:09 +01:00
libs yolo iconv support in the current fallback libetpan 2019-02-05 15:14:34 +01:00
python Enable iconv 2019-02-05 15:05:13 +01:00
src bump version 2019-02-11 17:55:11 +01:00
.gitattributes Force Unix-lineends. 2016-07-13 15:42:54 +02:00
.gitignore Ignore the python wheelhouse 2019-02-05 11:45:21 -03:00
.travis.yml Revert "try running tox with live accounts" 2018-12-12 01:03:53 +01:00
CHANGELOG.md bump version 2019-02-11 17:55:11 +01:00
deltachat-core.cbp move thread stuff to dc_jobthread.c 2018-12-21 17:16:54 +01:00
LICENSE mention copyright as well in the license file 2018-11-01 21:16:32 +02:00
meson.build Add support for the stress test in meson 2019-02-09 17:40:16 +01:00
meson_options.txt Hack around libetpan not respecting wrap-mode 2018-09-25 23:10:06 -05:00
README.md README: LibEtPan must be bullt with SASL support 2018-11-10 05:57:01 +00:00

Delta Chat Core Library

Build Status

The Delta Chat Core Library is written in cross-platform C, documented at https://c.delta.chat.

The deltachat Python bindings can be found in the python subdirectory and are documented at https://py.delta.chat.

binary/distribution packages (work-in-progress)

There are work-in-progress efforts for creating (binary) packages which do not require that you build the library manually:

If you can help with advancing or adding to these efforts, be our guest. Otherwise read on for how to get libdeltachat.so and deltachat.h installed into your system.

building your own libdeltachat.so

getting a recent enough meson for building

If you have installed meson in your environment check the version::

meson --version

You need to have version 0.47.2 at least. If the version is older there is a recommended way of getting a better version:

  1. uninstall your system-level meson package (if possible)

  2. ensure you have at least python3.5 installed and type:

        python3 -m pip 
    

    to check that you have "pip" installed. If not available, you might get it as a python3-pip package or you could follow installing pip.

  3. then pip-install meson into your home-directory:

        python3 -u -m pip install meson
    

    the -u causes the pip-install to put a meson command line tool into ~/.local/ or %APPDATA%\Python on Windows.

  4. run meson --version to verify it's at at least version 0.48.0 now. If the meson command is not found, add ~/.local/bin to PATH and try again (export PATH=~/.local/bin:$PATH on many unix-y terminals).

installing "ninja-build"

On Linux and Mac you need to install 'ninja-build' (debian package name) to be able to actually build/compile things.

Note that most dependencies below are detected using pkg-config. Usually this just works automatically, provided the depending libraries are installed correctly.

installing c-level dependencies

The deltachat core library depends on a number of external libraries, which you may need to install (we have some fallbacks if you don't):

  • LibEtPan; Note that this library does not use pkg-config so the system-provided version will be looked up by using libetpan-config which must be in the PATH. Version 1.8 or newer is required. LibEtPan must be compiled with SASL support enabled.

  • OpenSSL

  • SQLite

  • zlib

  • libsasl

To install these on debian you can type:

    sudo apt install libetpan-dev libssl-dev libsqlite3-dev libsasl2-dev libbz2-dev zlib1g-dev

performing the actual build

Once all dependencies are installed, creating a build is as follows, starting from a deltachat-core github checkout:

mkdir builddir
cd builddir
meson
# Optionally configure some other parameters
# run `meson configure` to see the options, e.g.
#    meson configure --default-library=static
ninja
sudo ninja install
sudo ldconfig

The install keeps a log of which files were installed. Uninstalling is thus also supported:

sudo ninja uninstall

NOTE that the above assumes /usr/local/lib is configured somewhere in /etc/ld.so.conf or /etc/ld.so.conf.d/*, which is fairly standard. It is possible your system uses /usr/local/lib/x86_64-linux-gnu which should be auto-detected and just work as well.

Building without system-level dependencies

By default stripped-down versions of the dependencies are bundled with Delta Chat Core and these will be used when a dependency is missing. You can choose to always use the bundled version of the dependencies by invoking meson with the --wrap-mode=forcefallback option. Likewise you can forbid using the bundled dependencies using --wrap-mode=nofallback.

There also is an experimental feature where you can build a version of the shared libdeltachat.so library with no further external dependencies. This can be done by passing the -Dmonolith=true option to meson. Note that this implies --wrap-mode=forcefallback since this will always use all the bundled dependencies.

Language bindings and frontend Projects

Language bindings are available for:

  • Node.js
  • Python
  • Java and Swift (contained in the Android/iOS repos)

The following "frontend" project make use of the C-library or its language bindings:

Testing program

After a successful build there is also a little testing program in builddir/cmdline. You start the program with ./delta <database-file> (if the database file does not exist, it is created). The program then shows a prompt and typing help gives some help about the available commands.

New tests are currently developed using Python, see https://github.com/deltachat/deltachat-core/tree/master/python/tests

License

Licensed under the MPL 2.0 see LICENSE file for details.

Copyright © 2017, 2018 Björn Petersen and Delta Chat contributors.