2014-10-01 04:51:03 +08:00
#Install Instructions
- [Dependencies ](#dependencies )
- [Linux ](#linux )
- [OS X ](#osx )
2014-12-09 07:15:53 +08:00
- [Windows ](#windows )
2014-10-01 04:51:03 +08:00
< a name = "dependencies" / >
2014-09-03 20:59:00 +08:00
##Dependencies
2014-09-03 18:54:41 +08:00
2015-02-13 13:19:38 +08:00
| Name | Version | Modules |
|--------------|-------------|-------------------------------------------------- |
| Qt | >= 5.2.0 | core, gui, network, opengl, sql, svg, widget, xml |
| GCC/MinGW | >= 4.8 | C++11 enabled |
| Tox Core | most recent | core, av |
| OpenCV | >= 2.4.9 | core, highgui, imgproc |
| OpenAL Soft | >= 1.16.0 | |
| filter_audio | most recent | |
2015-03-14 16:30:52 +08:00
| qrencode | >= 3.0.3 | |
2014-09-05 02:00:19 +08:00
2014-12-09 07:15:53 +08:00
< a name = "linux" / >
##Linux
###Simple install
Easy qTox install is provided for variety of distributions:
https://wiki.tox.im/Binaries#Apt.2FAptitude_.28Debian.2C_Ubuntu.2C_Mint.2C_etc..29
2014-09-05 02:00:19 +08:00
2014-12-09 07:15:53 +08:00
If your distribution is not listed, or you want/need to compile qTox, there are provided instructions.
2014-09-05 02:00:19 +08:00
2014-12-09 07:15:53 +08:00
**Please note that installing toxcore/qTox from AUR is not supported**, although installing other dependencies, provided that they met requirements, should be fine, unless you are installing cryptography library from AUR, which should rise red flags by itself…
2014-09-03 19:37:29 +08:00
2014-12-09 07:15:53 +08:00
----
2014-09-03 18:54:41 +08:00
2014-09-27 06:11:13 +08:00
Most of the dependencies should be available through your package manger. You may either follow the directions below, or simply run `./simple_make.sh` after cloning, which will attempt to automatically download dependencies followed by compilation.
2014-09-03 20:22:00 +08:00
2014-12-09 07:15:53 +08:00
2014-09-04 19:04:53 +08:00
###Cloning the Repository
2014-09-03 20:22:00 +08:00
In order to clone the qTox repository you need Git.
2014-12-09 07:15:53 +08:00
Arch Linux:
2014-09-03 20:22:00 +08:00
```bash
2014-12-09 07:15:53 +08:00
sudo pacman -S --needed git
2014-09-03 20:22:00 +08:00
```
2015-02-18 00:23:36 +08:00
Debian / Ubuntu:
2014-09-03 20:22:00 +08:00
```bash
sudo apt-get install git
```
2015-05-04 04:56:45 +08:00
Fedora: (yum is now officially deprecated by dnf using yum will redirect to dnf on Fedora 21 and fail on future versions)
2014-09-03 20:22:00 +08:00
```bash
2015-05-04 04:56:45 +08:00
sudo dnf install git
2014-09-03 20:22:00 +08:00
```
2014-09-04 19:04:53 +08:00
Afterwards open a new Terminal, change to a directory of your choice and clone the repository:
2014-09-03 20:40:18 +08:00
```bash
2014-09-04 19:04:53 +08:00
cd /home/user/qTox
2014-09-03 20:40:18 +08:00
git clone https://github.com/tux3/qTox.git qTox
```
The following steps assumes that you cloned the repository at "/home/user/qTox". If you decided to choose another location, replace corresponding parts.
2015-03-08 04:29:39 +08:00
###GCC, Qt, OpenCV, OpanAL Soft and QRCode
2014-09-03 20:22:00 +08:00
2014-12-09 07:15:53 +08:00
Arch Linux:
2014-09-03 20:22:00 +08:00
```bash
2015-03-08 04:29:39 +08:00
sudo pacman -S --needed base-devel qt5 opencv openal libxss qrencode
2014-09-03 20:22:00 +08:00
```
2015-02-18 00:23:36 +08:00
Debian / Ubuntu:
2014-09-03 20:22:00 +08:00
```bash
2015-03-17 03:53:35 +08:00
sudo apt-get install build-essential qt5-qmake qt5-default qttools5-dev-tools libqt5opengl5-dev libqt5svg5-dev libopenal-dev libopencv-dev libxss-dev qrencode libqrencode-dev
2014-09-03 20:22:00 +08:00
```
Fedora:
```bash
2015-05-04 04:56:45 +08:00
dnf group install "Development Tools"
dnf install qt-devel qt-doc qt-creator qt5-qtsvg opencv-devel openal-soft-devel libXScrnSaver-devel qrencode-devel
2014-09-03 20:22:00 +08:00
```
2014-12-05 22:16:04 +08:00
Slackware:
You can grab slackbuilds of the needed dependencies here:
http://slackbuilds.org/repository/14.1/libraries/OpenAL/
http://slackbuilds.org/repository/14.1/libraries/qt5/
http://slackbuilds.org/repository/14.1/libraries/opencv/
2015-03-08 04:29:39 +08:00
http://slackbuilds.org/slackbuilds/14.1/graphics/qrencode/
2014-12-09 07:15:53 +08:00
2014-09-03 20:59:00 +08:00
###Tox Core
2014-09-03 20:22:00 +08:00
First of all install the dependencies of Tox Core.
2014-12-09 07:15:53 +08:00
Arch Linux:
2014-09-03 20:22:00 +08:00
```bash
2015-03-20 05:42:23 +08:00
sudo pacman -S --needed opus libvpx
2014-09-03 20:22:00 +08:00
```
2015-02-18 00:23:36 +08:00
Debian / Ubuntu:
2014-09-03 20:22:00 +08:00
```bash
2014-09-11 06:36:34 +08:00
sudo apt-get install libtool autotools-dev automake checkinstall check libopus-dev libvpx-dev
2014-09-03 20:22:00 +08:00
```
2014-12-09 07:15:53 +08:00
Fedora:
2014-09-03 20:22:00 +08:00
```bash
2015-05-04 04:56:45 +08:00
sudo dnf install libtool autoconf automake check check-devel
2014-09-03 20:22:00 +08:00
```
Now you can either follow the instructions at https://github.com/irungentoo/toxcore/blob/master/INSTALL.md#unix or use the "bootstrap.sh" script located at "/home/user/qTox".
2014-09-03 20:40:18 +08:00
The script will automatically download and install Tox Core and libsodium to "/home/user/qTox/libs":
```bash
2014-09-03 20:56:45 +08:00
cd /home/user/qTox
2014-09-03 20:40:18 +08:00
./bootstrap.sh # use -h or --help for more information
```
2014-09-08 06:59:31 +08:00
2014-12-22 18:50:08 +08:00
###filter_audio
You also need to install filter_audio library separately if you did not run ``./bootstrap.sh``.
```bash
2015-02-25 18:51:48 +08:00
git clone https://github.com/irungentoo/filter_audio
cd filter_audio
make
sudo make install
2014-12-22 18:50:08 +08:00
```
2015-03-20 15:01:57 +08:00
After all the dependencies are installed, compiling should be as simple as:
2014-09-27 06:11:13 +08:00
```bash
qmake
make
```
2014-09-27 06:06:33 +08:00
###Building packages
2014-09-08 06:59:31 +08:00
2014-09-27 06:11:13 +08:00
Alternately, qTox now has the experimental and probably-dodgy ability to package itself (in .deb
2014-09-08 06:59:31 +08:00
form natively, and .rpm form with < a href = "http://joeyh.name/code/alien/" > alien< / a > ).
After installing the required dependencies, run `bootstrap.sh` and then run the
`buildPackages.sh` script, found in the tools folder. It will automatically get the
packages necessary for building .debs, so be prepared to type your password for sudo.
2014-09-27 06:04:01 +08:00
2014-12-09 07:15:53 +08:00
2014-10-01 04:51:03 +08:00
< a name = "osx" / >
2014-09-27 06:04:01 +08:00
##OS X
2015-03-05 00:59:55 +08:00
Please be aware that if you've tried an earlier version of this set of instructions you may have
installed broken libraries and packages in the proces. Please delete them before continuing.
2014-09-27 06:04:01 +08:00
2015-03-05 00:59:55 +08:00
Also, if you want to use qTox and are an end user download it by clicking the download button on tox.im,
as the copy you'll make by following this guide is only suitable for testing.
2014-09-27 06:04:01 +08:00
2015-03-05 00:59:55 +08:00
Compiling qTox on OS X for development requires 3 tools, [Xcode ](https://developer.apple.com/xcode/ ) and [Qt 5.4+ ](http://www.qt.io/qt5-4/ ), and [homebrew ](http://brew.sh ).
2014-09-27 06:04:01 +08:00
2015-03-05 00:59:55 +08:00
###Required tools
2014-12-09 07:15:53 +08:00
2015-03-05 00:59:55 +08:00
First, let's install the dependencies
* ```brew install git wget```
* ``git clone https://github.com/tux3/qTox``
* ```cd qTox```
2014-09-27 06:04:01 +08:00
2015-03-05 00:59:55 +08:00
###Libraries required to compile
2014-09-27 06:04:01 +08:00
2015-03-05 00:59:55 +08:00
Now we are in the qTox folder and need our library dependencies to actually build it.
2014-09-27 06:04:01 +08:00
2015-03-05 00:59:55 +08:00
We've taken the time to prepare them automatically with our CI system so if you ever have issues redownload them.
2014-09-27 06:06:33 +08:00
2015-03-05 00:59:55 +08:00
* ```wget https://jenkins.libtoxcore.so/job/qTox%20OS%20X/lastSuccessfulBuild/artifact/dep.zip```
* ```unzip dep.zip```
2014-09-27 06:04:01 +08:00
2015-03-05 00:59:55 +08:00
If you do not want to download our binaries, you must compile [opencv2 ](http://opencv.org ), [toxcore ](https://github.com/irungentoo/toxcore ), [opus ](https://www.opus-codec.org ), [vpx ](http://www.webmproject.org/tools/ ), [filteraudio ](https://github.com/irungentoo/filter_audio ), and our fork of [openal ](https://github.com/irungentoo/openal-soft-tox ) yourself with the prefix to the libs folder.
2014-09-27 06:04:01 +08:00
2015-03-05 00:59:55 +08:00
Please be aware that no one has ever successfully got this working outside of on our CI system, but we encourage you to try and provide instructions on how you did so if you do.
2014-09-27 06:04:01 +08:00
2015-03-05 00:59:55 +08:00
Please be aware that you shouldn't do this on your main Mac, as it's fairly hard to successfully do this without ruining a bunch of things in the process.
2014-09-27 06:04:01 +08:00
2015-03-05 00:59:55 +08:00
Everything from opencv2 to filter_audio has now been installed in this library and is ready to go.
2014-09-27 06:04:01 +08:00
2015-03-05 00:59:55 +08:00
###Compiling
2014-09-27 06:04:01 +08:00
2015-03-05 00:59:55 +08:00
Either open Qt creator and hit build or run qmake & & make in your qTox folder and it'll just work™
2014-09-27 06:04:01 +08:00
2015-03-05 00:59:55 +08:00
Note that if you use the CLI to build you'll need to add Qt5's bins to your path.
```export PATH=$PATH:~/Qt/5.4/clang_64/bin/```
2014-09-27 06:04:01 +08:00
2015-03-05 00:59:55 +08:00
###Fixing things up
2014-09-27 06:04:01 +08:00
2015-03-05 00:59:55 +08:00
The bad news is that Qt breaks our linker paths so we need to fix those.
First cd in to your qtox.app directory, if you used Qt Creator it's in ```~/build-qtox-Desktop_Qt_5_4_1_clang_64bit-Release``` most likely, otherwise it's in your qTox folder.
Install qTox so we can copy its libraries and shove the following in a script somewhere:
```
~macdeployqt qtox.app
cp -r /Applications/qtox.app qtox_old.app
cp qtox.app/Contents/MacOS/qtox qtox_old.app/Contents/MacOS/qtox
rm -rf qtox.app
mv qtox_old.app qtox.app
2014-09-27 06:04:01 +08:00
```
2015-03-05 00:59:55 +08:00
* Give it a name like ~/deploy.qtox.sh
* cd in to the folder with qtox.app
* run ```bash ~/deploy.qtox.sh```
2014-12-09 07:15:53 +08:00
2015-03-05 00:59:55 +08:00
###Running qTox
You've got 2 choices, either click on the qTox app that suddenly exists, or do the following:
* ``qtox.app/Contents/MacOS/qtox``
* Enjoy the snazzy CLI output as your friends and family congratulate you on becoming a hacker
2014-12-09 07:15:53 +08:00
< a name = "windows" / >
##Windows
###Qt
Download the Qt online installer for Windows from [qt-project.org ](http://qt-project.org/downloads ).
While installation you have to assemble your Qt toolchain. Take the most recent version of Qt compiled with MinGW.
Although the installer provides its own bundled MinGW compiler toolchain its recommend installing it separately because Qt is missing MSYS which is needed to compile and install OpenCV and OpenAL. Thus you can - if needed - deselect the tab "Tools".
The following steps assume that Qt is installed at "C:\Qt". If you decided to choose another location, replace corresponding parts.
###MinGW
Download the MinGW installer for Windows from [sourceforge.net ](http://sourceforge.net/projects/mingw/files/Installer/ ).
Make sure to install MSYS (a set of Unix tools for Windows).
The following steps assume that MinGW is installed at "C:\MinGW". If you decided to choose another location, replace corresponding parts.
2015-03-20 06:11:32 +08:00
###qrencode
Download the qrencode from http://fukuchi.org/works/qrencode/ or direct from https://code.google.com/p/qrencode-win32/source/checkout ,
build project "..\qrencode-win32\vc8\qrcodelib\", you must copy files from release in: "qrcodelib.dll" to \qTox\libs\bin\qrcodelib.dll";
"qrencode.h" to \qTox\libs\include\qrencode.h"; "qrcodelib.lib" to "\qTox\libs\lib\qrencode.lib" with rename!!!
2014-12-09 07:15:53 +08:00
###Setting up Path
2015-01-05 19:25:32 +08:00
Add MinGW/MSYS/CMake binaries to the system path to make them globally accessible.
2014-12-09 07:15:53 +08:00
Open Control Panel -> System and Security -> System -> Advanced system settings -> Environment Variables...
In the second box search for the PATH variable and press Edit...
The input box "Variable value:" should already contain some directories. Each directory is separated with a semicolon.
2015-01-05 19:25:32 +08:00
Extend the input box by adding ";C:\MinGW\bin;C:\MinGW\msys\1.0\bin;C:\Program Files (x86)\CMake 2.8\bin".
The very first semicolon must only be added if it is missing. CMake may be added by installer automatically.
2014-12-09 07:15:53 +08:00
###Cloning the Repository
2015-03-20 06:11:32 +08:00
Clone the repository (https://github.com/tux3/qTox.git) with your preferred Git client. [SmartGit ](http://www.syntevo.com/smartgit/ ) is very nice for this task (you may need to add the path to the git.exe system variable Path).
2014-12-09 07:15:53 +08:00
The following steps assume that you cloned the repository at "C:\qTox". If you decided to choose another location, replace corresponding parts.
2015-01-05 19:25:32 +08:00
### Getting dependencies
Run bootstrap.bat in cloned C:\qTox directory
Script will download rest of dependencies compile them and put to appropriate directories.