These instructions will guide you through the process of building and installing the toxcore library and its components, as well as getting already pre-built binaries.
This repository, although called `toxcore`, in fact contains several libraries besides `toxcore` which complement it, as well as several executables. However, note that although these are separate libraries, at the moment, when building the libraries, they are all merged into a single `toxcore` library. Here is the full list of the main components that can be built using the CMake, their dependencies and descriptions.
| toxcore | Library | libnacl or libsodium, libm, libpthread, librt | Cross-platform | The main Tox library that provides the messenger functionality. |
| toxencryptsave | Library | libtoxcore, libnacl or libsodium | Cross-platform | Provides encryption of Tox profiles (savedata), as well as arbitrary data. |
There are some testing programs that you might find interesting. Note that they are not intended for the real-world use and are not coded to the high security standards, so use them on your own risk.
| irc_syncbot | Executable | libtoxcore | Unix-like | Bot that synchronizes an IRC channel and a Tox group chat (conference). |
| tox_shell | Executable | libtoxcore, libutil | Unix-like | Proof of concept SSH-like server software using Tox. Testing program, not intended for actual use. |
| tox_sync | Executable | libtoxcore | Unix-like | Bittorrent-sync-like software using Tox. Syncs two directories together. |
There are also some programs that are not plugged into the CMake build system which you might find interesting. You would need to build those programs yourself. These programs reside in [`other/fun`](other/fun) directory.
| bootstrap_node_info | Script | python3 | Cross-platform | Script for getting version and Message Of The Day (MOTD) information from a DHT bootstrap node. |
| cracker | Executable | libnacl or libsodium | Cross-platform | Tries to find a curve25519 key pair, hex representation of the public key of which starts with the specified byte sequence. |
| strkey | Executable | libsodium | Cross-platform | Tries to find a curve25519 key pair, hex representation of the public key of which contains a specified byte pattern at the specified position or at any position. |
| make-funny-savefile | Script | python | Cross-platform | Generates Tox profile file (savedata file) with provided key pair. Useful for generating Tox profiles from the output of cracker or strkey programs. |
| sign | Executable | libsodium | Cross-platform | Program for ed25519 file signing. |
Library dependencies are listed in the [components](#components) table. The dependencies need to be satisfied for the components to be built. Note that if you don't have a dependency for some component, e.g. you don't have `libopus` installed required for building `toxav` component, building of that component is silently disabled.
You should have a C99 compatible compiler in order to build the main components. The secondary components might require the compiler to support GNU extensions.
To build the main components you need to have CMake of at least 2.8.6 version installed. You also need to have pkg-config installed, the build system uses it to find dependency libraries.
There is some experimental accommodation for building natively on Windows, i.e. without having to use MSYS/Cygwin and pkg-config, but it uses exact hardcoded paths for finding libraries and supports building only of some of toxcore components, so your mileage might vary.
There are currently no instructions on how to build toxcore on Windows host in Microsoft Visual Studio's Developer Command Prompt. Contribution of the instructions is welcome!
These cross-compilation instructions were tested on and written for 64-bit Ubuntu 16.04. You could generalize them for any Linux system, the only requirements are that you have Docker version of >= 1.9.0 and you are running 64-bit system.
| ALLOW_TEST_FAILURE | Don't stop if a test suite fails. | "true" or "false" (case sensitive). | false |
| ENABLE_ARCH_i686 | Build 32-bit toxcore. The image should have been built with SUPPORT_ARCH_i686 enabled. | "true" or "false" (case sensitive). | true |
| ENABLE_ARCH_x86_64 | Build 64-bit toxcore. The image should have been built with SUPPORT_ARCH_x86_64 enabled. | "true" or "false" (case sensitive). | true |
| ENABLE_TEST | Run the test suite. The image should have been built with SUPPORT_TEST enabled. | "true" or "false" (case sensitive). | false |
| EXTRA_CMAKE_FLAGS | Extra arguments to pass to the CMake command when building toxcore. | CMake options. | "-DWARNINGS=OFF -DBOOTSTRAP_DAEMON=OFF -DTEST_TIMEOUT_SECONDS=300" |
Toxcore is packaged by at least by the following distributions: ALT Linux, [Arch Linux](https://www.archlinux.org/packages/?q=toxcore), [Fedora](https://apps.fedoraproject.org/packages/toxcore), Mageia, openSUSE, PCLinuxOS, ROSA and Slackware, [according to the information from pkgs.org](https://pkgs.org/download/toxcore). Note that this list might be incomplete and some other distributions might package it too.