2015-02-17 11:01:31 +01:00
# Installation
2017-04-12 18:00:43 +02:00
* [Dependencies ](#dependencies )
* [OS X Notes ](#os-x-notes )
2015-02-17 11:01:31 +01:00
* [Compiling ](#compiling )
2017-04-12 18:00:43 +02:00
* [Documentation ](#documentation )
2015-02-17 11:01:31 +01:00
* [Notes ](#notes )
2017-04-12 18:00:43 +02:00
* [Compilation variables ](#compilation-variables )
2018-10-08 21:15:36 +02:00
* [Environment variables ](#environment-variables )
2015-02-17 11:01:31 +01:00
## Dependencies
2015-10-28 22:14:17 +01:00
| Name | Needed by | Debian package |
|------------------------------------------------------|----------------------------|---------------------|
2021-09-12 16:58:28 +02:00
| [Tox Core ](https://github.com/toktok/c-toxcore ) | BASE | libtoxcore-dev |
2015-10-28 22:14:17 +01:00
| [NCurses ](https://www.gnu.org/software/ncurses ) | BASE | libncursesw5-dev |
| [LibConfig ](http://www.hyperrealm.com/libconfig ) | BASE | libconfig-dev |
| [GNUmake ](https://www.gnu.org/software/make ) | BASE | make |
| [libcurl ](http://curl.haxx.se/ ) | BASE | libcurl4-openssl-dev|
2018-06-16 05:07:16 +02:00
| [libqrencode ](https://fukuchi.org/works/qrencode/ ) | QRCODE | libqrencode-dev |
2015-10-28 22:14:17 +01:00
| [OpenAL ](http://openal.org ) | AUDIO, SOUND NOTIFICATIONS | libopenal-dev |
| [OpenALUT ](http://openal.org ) | SOUND NOTIFICATIONS | libalut-dev |
| [LibNotify ](https://developer.gnome.org/libnotify ) | DESKTOP NOTIFICATIONS | libnotify-dev |
2017-05-20 03:09:29 +02:00
| [Python 3 ](http://www.python.org/ ) | PYTHON | python3-dev |
2015-10-28 22:14:17 +01:00
| [AsciiDoc ](http://asciidoc.org/index.html ) | DOCUMENTATION< sup > 1</ sup > | asciidoc |
2015-02-17 11:01:31 +01:00
2017-04-12 18:00:43 +02:00
< sup > 1</ sup > : see [Documentation ](#documentation )
2015-02-17 11:01:31 +01:00
#### OS X Notes
Using [Homebrew ](http://brew.sh ):
```
2018-04-01 03:10:17 +02:00
brew install curl qrencode openal-soft freealut libconfig libpng
2016-10-07 19:24:31 +02:00
brew install --HEAD https://raw.githubusercontent.com/Tox/homebrew-tox/master/Formula/libtoxcore.rb
brew install libnotify
2018-04-01 03:10:17 +02:00
export PKG_CONFIG_PATH=/usr/local/opt/openal-soft/lib/pkgconfig
make
2015-02-17 11:01:31 +01:00
```
2015-10-28 22:14:17 +01:00
You can omit `libnotify` if you intend to build without desktop notifications enabled.
2015-02-17 11:01:31 +01:00
## Compiling
```
2018-10-02 23:31:14 +02:00
make
2018-10-08 21:15:36 +02:00
sudo make install
2015-02-17 11:01:31 +01:00
```
#### Documentation
Run `make doc` in the build directory after editing the asciidoc files to regenerate the manpages.< br />
2018-10-08 21:15:36 +02:00
**Note for developers**: asciidoc files and generated manpages will need to be committed together.< br / >
**Note for everyone**: [asciidoc ](http://asciidoc.org/index.html ) (and this step) is only required for regenerating manpages when you modify them.
2015-02-17 11:01:31 +01:00
## Notes
#### Compilation variables
2018-10-08 21:15:36 +02:00
* You can add specific flags to the Makefile with `USER_CFLAGS=""` and `USER_LDFLAGS=""` passed as arguments to make, or as environment variables
* Default compile options can be overridden by using special variables:
* `DISABLE_X11=1` → Disable X11 support (needed for focus tracking)
* `DISABLE_AV=1` → Disable audio call support
* `DISABLE_SOUND_NOTIFY=1` → Disable sound notifications support
2021-09-12 16:58:28 +02:00
* `DISABLE_QRCODE=1` → Disable QR exporting support
* `DISABLE_QRPNG=1` → Disable support for exporting QR as PNG
2018-10-08 21:15:36 +02:00
* `DISABLE_DESKTOP_NOTIFY=1` → Disable desktop notifications support
2021-01-19 04:37:14 +01:00
* `DISABLE_GAMES=1` → Disable support for games
2018-10-08 21:15:36 +02:00
* `ENABLE_PYTHON=1` → Build toxic with Python scripting support
2020-11-26 21:51:13 +01:00
* `ENABLE_RELEASE=1` → Build toxic without debug symbols and with full compiler optimizations
* `ENABLE_ASAN=1` → Build toxic with LLVM Address Sanitizer enabled
2015-02-17 11:01:31 +01:00
2018-10-08 21:15:36 +02:00
* `DESTDIR=""` Specifies the base install directory for binaries and data files (e.g.: DESTDIR="/tmp/build/pkg")
#### Environment variables
* You can use the `CFLAGS` and `LDFLAGS` environment variables to add specific flags to the Makefile
* The `PREFIX` environment variable specifies a base install directory for binaries and data files. This is interchangeable with the `DESTDIR` variable, and is generally used by systems that have the `PREFIX` environment variable set by default.< br />
**Note**: `sudo` does not preserve user environment variables by default on some systems. See the `sudoers` manual for more information.