+ Use `build.py` script which will build all Jami (daemon/client lib/client-qt)
+ Build only this client.
## GNU/Linux
### With build.py
```bash
git clone https://review.jami.net/ring-project
```
Jami installer uses **python3**. If it's not installed, please install it:
```bash
cd ring-project/
./build.py --init
```
Then you will need to install dependencies:
+ For GNU/Linux
```bash
./build.py --dependencies --qt # needs sudo
```
Then, you can build daemon, lrc and client-qt with:
```bash
./build.py --install --qt
```
And you will have the daemon in `daemon/bin/dring` and the client in `client-qt/build-local/jami-qt`. You also can run it with
If you use a Qt version that is not wide-system installed you need to specify its path after the `--qt` flag, i. e., `./build.py --install --qt /home/<username>/Qt/5.15.0/gcc_64
```bash
./build.py --run --qt
```
Notes:
+ `--global-install` to install client-qt globally under /usr/local
+ `--prefix` to change the destination of the install.
## Build only the client
In order to use the Qt Client it is necessary to have the Qt version 5.14 or higher. If your system does not have it you can install it [from sources or download the binary installer](https://www.qt.io/download).
+ Variables `QT5_VER` and `QT5_PATH` are used to specify version and path for a custom installation of Qt.
+ If lrc library is installed in a custom directory you can set its path with the variable LRC. Additionally you can specify built library location with `LRC` (otherwise it will seach inside LRC with the suffixes `/lib`, `/build` and `/build-local`).
- Jami-qt also support building each module (daemon, lrc, jami-qt) seperately
**Daemon**
- Make sure that dependencies is built by make-ring.py
- On MSVC folder (ring-project\daemon\MSVC):
```sh
cmake -DCMAKE_CONFIGURATION_TYPES="ReleaseLib_win32" -DCMAKE_VS_PLATFORM_NAME="x64" -G "Visual Studio 16 2019" -A x64 -T '$(DefaultPlatformToolset)' ..
python winmake.py -b daemon
```
- This will generate a ```.lib``` file in the path of ring-project\daemon\MSVC\x64\ReleaseLib_win32\bin
> Note: each dependencies contrib for daemon can also be updated individually <br>
> For example:
```bash
python winmake.py -b opendht
```
**Lrc**
- Make sure that daemon is built first
```bash
cd lrc
python make-lrc.py -gb
```
**Jami-qt**
- Make sure that daemon, lrc are built first
```bash
cd client-windows
python make-client.py -d
python make-client.py -b
```
**Note**
- For all python scripts, both ```--toolset``` and ```--sdk``` options are available.
- For more available options, run scripts with ```-h``` option.
- ```--qtver``` option is available on ```make-lrc.py``` and ```make-client.py```.
## Packaging On Native Windows
- To be able to generate a msi package, first download and install [Wixtoolset](https://wixtoolset.org/releases/).
- In Visual Studio, download WiX Toolset Visual Studio Extension.
- Build client-windows project first, then the JamiInstaller project, msi package should be stored in ring-project\client-windows\JamiInstaller\bin\Release
- We currently use [GoogleTest](https://github.com/google/googletest) and [Qt Quick Test](https://doc.qt.io/qt-5/qtquicktest-index.html#introduction) in our product. To build and run tests, you could use the following command.