jami-docs/technical/Build-instructions.md

1017 lines
28 KiB
Markdown
Raw Normal View History

2019-01-29 03:58:14 +08:00
**Jami relies on various components which interact together.**
2018-05-17 11:58:54 +08:00
![Ring-layers](/uploads/ccc91eff2ab16cb68c6c51dd6fad0f63/Ring-layers.png)
They are divided into three main layers:
2019-01-29 03:58:14 +08:00
1\. **Daemon** is the core of
Jami. It does not interact with users but it is involved in every
2018-05-17 11:58:54 +08:00
command.
2\. **LibRingClient** (or LRC) is written in
QtCore and facilitates clients' portability between operating systems.
It does not interact with the Android client.
3\. The **Client** layer formalizes the
use-case on GNU/Linux (Gnome), Windows, Mac OS X and Android.
2019-01-29 03:58:14 +08:00
To fully build Jami, you must build each of these components in order,
unless you choose to build Jami easily and quickly.
2018-05-17 11:58:54 +08:00
2020-01-22 04:06:15 +08:00
How to Build Jami Easily and Quickly (no cross compile)
2018-05-17 11:58:54 +08:00
===============================================================
We use a GIT repository to manage sources. On shell based platform you
can fetch your private copy using following command:
```bash
2019-05-09 23:06:39 +08:00
git clone https://review.jami.net/ring-project
2018-05-17 11:58:54 +08:00
```
2019-01-29 03:58:14 +08:00
Jami installer uses **python3**. If it's not installed, please install
2018-05-17 11:58:54 +08:00
it:
```bash
cd ring-project/
./make-ring.py --init
2019-03-22 21:09:19 +08:00
2018-05-17 11:58:54 +08:00
```
On GNU/Linux
---------------------------------------
**Build and install all the dependencies**: Your distro package manager
will be used.
```bash
./make-ring.py --dependencies
```
**Build and install locally**
```bash
./make-ring.py --install
```
**Run LibRing *(daemon)* and client that were installed locally**
```bash
./make-ring.py --run
```
You can then stop the processes with `CTRL-C`. You can also run them in
the background with the `--background` argument and then use the
`--stop` command to stop them. Use `Stdout` and `stderr` to go to
daemon.log and client-gnome.log.
**Install globally for all users instead**
```bash
./make-ring.py --install --global-install
```
2019-11-06 03:21:11 +08:00
**Update sub-projects**
One design choice that has been made is to not update the submodules of the ring-project very often due to high activity on the sub-projects. Therefore, you need to update them manually prior to rebuilding everything.
```
2020-04-09 20:21:47 +08:00
git submodule update --init daemon lrc client-gnome
2019-11-06 03:21:11 +08:00
```
2018-05-17 11:58:54 +08:00
**Uninstall the global install**
```bash
./make-ring.py --uninstall
```
On Mac OS X
--------------------------------------
+ You need to setup [Homebrew](http://brew.sh/) since there is no built-in package manager on OSX.
**Build and install all the dependencies**
```bash
./make-ring.py --dependencies
```
**Build and install locally**
```bash
./make-ring.py --install
```
**Output**: You can find the *.app* file in the
*./install/client-macosx* folder.
On Android
-------------------------------------
+ Please make sure Android SDK and NDK are installed, and their paths are properly set. If you need
more information, please visit <https://github.com/savoirfairelinux/ring-client-android>
2018-06-11 23:16:23 +08:00
+ These instructions are for Ubuntu, check equivalent if you use a different distribution
2018-05-17 11:58:54 +08:00
#### Prepare environment
2018-06-11 23:16:23 +08:00
- Install Java JDK 7 or 8 (Oracle or OpenJDK)
<http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html>
```bash
sudo apt install openjdk
```
2018-05-17 11:58:54 +08:00
<!-- -->
- Install Android Studio:
<https://developer.android.com/studio/index.html>
You can install all dependecies like ndk (side by side), lldb with android-studio in settings > appearance & behavior > system settings > android sdk > sdk tools
2018-05-17 11:58:54 +08:00
<!-- -->
- Install the Android NDK:
<https://developer.android.com/ndk/downloads/index.html>
<!-- -->
2018-06-11 23:16:23 +08:00
- Install required tools
2018-05-17 11:58:54 +08:00
<!-- -->
```bash
2018-06-14 21:50:28 +08:00
sudo apt install autoconf automake libtool autopoint swig python
2018-05-17 11:58:54 +08:00
```
Add these variables to your bash profile:
```bash
export JAVA_HOME=<path_to_java_JDK>
export ANDROID_HOME=<path_to_root_folder_sdk>
export ANDROID_SDK=$ANDROID_HOME
export ANDROID_NDK=<path_to_root_folder_ndk>
export ANDROID_NDK_ROOT=$ANDROID_NDK
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_NDK:$JAVA_HOME/bin
```
ie for Ubuntu :
```bash
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/
export ANDROID_HOME=/home/{username}/Android/Sdk
export ANDROID_SDK=/home/{username}/Android/Sdk
export ANDROID_NDK_ROOT=/home/{username}/Android/Sdk/ndk-bundle/
export ANDROID_NDK=/home/{username}/Android/Sdk/ndk-bundle/
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_NDK:$JAVA_HOME/bin
```
#### Build and install locally-
- Clone whole project repository
<!-- -->
```bash
2019-05-09 23:06:39 +08:00
git clone --recurse-submodules https://review.jami.net/ring-project
2018-05-17 11:58:54 +08:00
```
- Initialize project
<!-- -->
```bash
cd ring-project
./make-ring.py --init --distribution=Android
```
- Compile
<!-- -->
```bash
2019-05-14 02:09:19 +08:00
ANDROID_ABI="armeabi-v7a arm64-v8a" ./make-ring.py --install --distribution=Android
2018-05-17 11:58:54 +08:00
```
**Output**: You can find the *.apk* file in the
*./client-android/ring-android/app/build/outputs* folder.
**Errors**
- ```configure: error: source directory already configured; run "make distclean" there first```
It means you build for another distro like x86_64-pc-linux-gnu and builds are conflicting. The simpliest solution is to make another ring-project only for Android to avoid this conflict.
2018-05-17 11:58:54 +08:00
#### Troubleshooting
- Check case in your sdk path. Since api 26,
/home/user/Android/**s**dk have become /home/user/Android/**S**dk
<!-- -->
2018-06-14 21:58:04 +08:00
- You can check each path with *echo*. e.g : echo $JAVA\_HOME
2018-05-17 11:58:54 +08:00
<!-- -->
- `sudo` will use root's bash profile. And you don't need it.
2018-06-11 23:16:23 +08:00
<!-- -->
- If build fails, you can try to clean contribs with:
```bash
2018-06-14 21:58:04 +08:00
cd ring-project/ && git clean -xdf
cd ../daemon && git clean -xdf
2018-06-11 23:16:23 +08:00
```
2018-06-14 21:58:04 +08:00
- Makeinfo issue
makeinfo: command not found
WARNING: 'makeinfo' is missing on your system.
**Solution**: Install texinfo package containing makeinfo dep.
<!-- -->
- Unable to locate tools.jar
**Solution**: Your java installation is not pointing to a JDK.
Install one, or make JAVA_HOME point to it.
<!-- -->
- When building the apk error in build-tools
error while loading shared libraries: libstdc++.so.6
**Solution**: Install lib32stdc++6 lib32z1-dev
<!-- -->
- When compiling on Fedora
error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
**Solution***: sudo dnf install ncurses-compat-libs
2018-06-11 23:16:23 +08:00
2019-06-25 22:58:53 +08:00
<!-- -->
- When building, you may get a Gradle error. You should install Gradle 5.4.1 by running apt-get install or installing directly on android-studio.
2019-02-15 04:10:14 +08:00
2019-02-15 04:10:47 +08:00
On iOS
2019-02-15 04:10:14 +08:00
----------------------------------------------
After installing [Brew](https://brew.sh) and Python3 (brew install
python3):
```bash
2019-05-09 23:06:39 +08:00
git clone https://review.jami.net/ring-project
2019-02-15 04:10:14 +08:00
cd ring-project
./make-ring.py --init
./make-ring.py --dependencies --distribution iOS
./make-ring.py --install --distribution iOS
cd client-ios/Ring && carthage bootstrap --platform iOS --no-use-binaries --cache-builds && cd ..
xcodebuild build -project Ring/Ring.xcodeproj/ -configuration "Release" -arch "x86_64" -destination "platform=iOS Simulator,name=iPhone $DATE,OS=11" -sdk iphonesimulator11.0 VALID_ARCHS="x86_64"
```
it could be useful to do this if an error occurs:
```bash
ln -s /usr/local/opt/gettext/bin/autopoint /usr/local/bin
```
if you get build errors linked to swift, you should upgrade swiftgen:
```bash
brew upgrade swiftgen
```
On Windows
----------------------------------------------
Only 64-bit MSVC build can be compiled.
> Note: command ```./make-ring.py --init``` is not required on Windows build <br>
**Setup Before Building:**
- Download [Qt (Open Source)](https://www.qt.io/download-open-source?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5)<br>
2019-12-04 00:56:01 +08:00
| | Prebuild | Module |
|---|---|---|
| Components: | msvc2017_64 | Qt WebEngine |
- Download [Visual Studio](https://visualstudio.microsoft.com/) (version >= 2015) <br>
- Install Qt Vs Tools under extensions, and configure msvc2017_64 path under Qt Options <br>
| | Qt Version | SDK | Toolset |
|---|---|---|---|
| Minimum requirement: | 5.9.4 | 10.0.16299.0 | V141 |
**Start Building**
- Using Command Prompt , starting at directory ring-project/
```sh
git submodule update --init daemon lrc client-windows
git submodule update --recursive --remote daemon lrc client-windows
```
2019-12-04 01:25:17 +08:00
- Using **Elevated Command Prompt**
```sh
python make-ring.py --dependencies
```
> Note:
> 1. This command will install **chocolatey** which may require you to restart the Command Prompt to be able to use it.
> 2. This command will install **msys2 (64 bit)** by using chocolatey command which may cause issues below: <br>
> a. Choco may require you to restart the Command Prompt after finishing installing msys2. <br>
> b. Only if you have already installed msys2 (64 bit) under the default installation folder, we will use the existing one.
> 3. This command will install **strawberry perl** by using chocolatey command which may fail if you have already installed it.
> 4. This command will install **cmake** by using chocolatey command which will not add cmake into PATH (environment variable). <br>
>
> The issue 1, 2(a), 3 can be solved by restarting the Command Prompt under Administrator right and re-run the command. <br>
> The issue 3 can be solved by uninstalling your current strawberry perl and re-run the command. <br>
> The issue 4 can be solved by adding the location of the cmake.exe into PATH. <br>
2019-12-04 01:25:17 +08:00
- Using a new **Non-Elevated Command Prompt**
```sh
python make-ring.py --install
```
2019-12-04 01:01:55 +08:00
- Then you should be able to use the Visual Studio Solution file in client-windows folder **(Configuration = Release, Platform = x64)**
2019-12-04 01:25:17 +08:00
> Note: <br>
> To control the toolset and the sdk version that are used by msbuild, you can use ```--toolset``` and ```--sdk``` options <br>
2020-01-01 04:17:55 +08:00
> To control which Qt version should be used (qmake, windeployqt), uou can use ```--qtver``` option <br>
> By default: ```toolset=v141```, ```sdk=10.0.16299.0```, ```qtver=5.9.4``` <br>
2019-12-04 01:25:17 +08:00
> For example:
```sh
2020-01-01 04:17:55 +08:00
python make-ring.py --install --toolset v142 --sdk 10.0.18362.0 --qtver 5.12.0
```
2018-05-17 11:58:54 +08:00
How to Build LibRing (or Daemon)
===========================================================
First thing you need to do is buildind LibRing (or Daemon). Here are the
instructions to build chapters for your platform.
Getting LibRing Source Code (all platforms)
----------------------------------------------------------------------
We use a GIT repository to manage LibRing sources. On shell based
platform you can fetch your private copy using following command:
```bash
2019-05-09 23:06:39 +08:00
git clone https://review.jami.net/ring-daemon
2018-05-17 11:58:54 +08:00
```
Notice that direct push are blocked. See below how to contribute to the
daemon sending us patches.
How to Build LibRing (binary and SDK)
----------------------------------------------------------------
Following platforms are officialy supported : GNU/Linux | Windows | Mac
OS X
#### On GNU/Linux
**Build environment**
2018-05-17 12:01:27 +08:00
Dependencies LibRing : Fedora
2018-05-17 11:58:54 +08:00
```bash
sudo yum groupinstall group "Development Tools" "Development Libraries"
2019-05-23 23:57:37 +08:00
sudo yum install gcc-c++ yasm intltool libyaml-devel alsa-lib-devel pulseaudio-libs-devel libsamplerate-devel dbus-c++-devel pcre-devel gsm-devel speex-devel speexdsp-devel expat-devel qttools5-dev libsndfile-devel gnutls-devel gettext-devel cmake libtool systemd-devel uuid-devel libXfixes-devel jsoncpp-devel autoconf-archive
2018-05-17 11:58:54 +08:00
```
For video support, you'll also need ffmpeg, which is only available in
the RPMfusion repository as described here
<http://rpmfusion.org/Configuration>
Then install ffmpeg:
```bash
sudo yum install ffmpeg-devel
```
To build and run the tests with make check, you'll also need
```bash
sudo yum install cppunit-devel cppcheck sipp dbus
```
:\*Dependencies LibRing : Debian-based
Building dependencies/instructions for Debian, Ubuntu, Crunchbang Linux,
etc.
```bash
2019-05-23 23:57:37 +08:00
sudo apt-get install autoconf autoconf-archive automake autopoint cmake libpulse-dev libsamplerate0-dev libgsm1-dev libspeex-dev libtool libdbus-1-dev libasound2-dev libopus-dev libspeexdsp-dev libexpat1-dev libpcre3-dev libyaml-cpp-dev libboost-dev libdbus-c++-dev qttools5-dev libsndfile1-dev libsrtp-dev libjack-dev libupnp-dev libavcodec-dev libavformat-dev libswscale-dev libavdevice-dev libudev-dev yasm uuid-dev libgnutls28-dev libjsoncpp-dev libvdpau-dev libva-dev
2018-05-17 11:58:54 +08:00
```
If you want to run tests (e.g. when setting up a new VM on Jenkins), you
must install cppunit and sipp
```bash
sudo apt-get install libcppunit-dev sip-tester dbus
```
For H.264 support, you'll need
```bash
sudo apt-get install libavcodec-extra-*
```
**Compile LibRing's dependencies**
```bash
RING=$PWD/ring-daemon
cd $RING/contrib
2019-07-16 02:17:08 +08:00
mkdir native
cd native
2018-05-17 11:58:54 +08:00
../bootstrap
make
# That's all !
# Optionally, you may also type :
make list
# or
# make .packge?
# to force using downloaded packages, not system locally installed.
make .gnutls .upnp ...
```
Note: if compiling **libav** in contrib (you can see the list of
dependencies which will be compiled by running 'make list' in
\$RING/contrib/build) on Linux, you will likely first need to install
**libx11-dev libxext-dev libxfixes-dev** due to the '--enable-x11grab'
configure option.
**Build LibRing**
```bash
cd $RING
# Now generate autotools configuration files
./autogen.sh
# Create Makefiles and config.h files for your build target
./configure --prefix=/usr --disable-shared
# Build
make
# Install
sudo make install
```
#### On native Windows
2018-05-17 11:58:54 +08:00
- Make sure that dependencies is built by make-ring.py
- On MSVC folder (ring-project\daemon\MSVC):
```sh
2020-01-01 04:17:55 +08:00
cmake -DCMAKE_CONFIGURATION_TYPES="ReleaseLib_win32" -DCMAKE_VS_PLATFORM_NAME="x64" -G "Visual Studio 16 2019" -A x64 -T '$(DefaultPlatformToolset)' ..
python winmake.py -iv -b daemon
2019-04-19 03:37:44 +08:00
```
- ```--toolset```, ```--sdk``` options are available, as well.
- This will generate a ```.lib``` file in the path of ring-project\daemon\MSVC\x64\ReleaseLib_win32\bin
2018-05-17 11:58:54 +08:00
#### On Mac OS X
**Build Tools**: Use your favorite package manager to install the
necessary tools (HomeBrew or MacPorts) automake, libtool, gettext,
libtoolize, yasm, autoconf, pkg-config. If you don't use a package
manager:
```bash
cd extras/tools
./bootstrap
make
export PATH=$PATH:$RING/extras/tools/build/bin
```
**Compile LibRing's dependencies**
```bash
cd contrib
mkdir build
cd build
../bootstrap
make -j3
```
**Build LibRing**: If you want to link against libringclient and native
client, easiest way is to add `--prefix` to configure and then run make
install
```bash
cd ../../
./autogen.sh
./configure --without-dbus --prefix=<prefix_path>
make install
```
If you do not want to install LibRing, you will have to use
-DRING\_BUILD\_DIR=<path_to_ring>/src as a cmake argument for
LibRingClient.
**Common Issues**: "Autopoint not found" When using Homebrew, autopoint
is not found even when gettext is installed, because symlinks are not
created. To fixt it, run:
```bash
brew link --force gettext
```
Contributing to LibRing Source Code
--------------------------------------------------------------
First read our LibRing Coding Rules page before sending us any patches.
Gerrit is used as code review / integration tool. Register your ID (you
need a Google/GitHUB OAuth2 account) on our public web gerrit service
here:
2019-05-09 23:06:39 +08:00
<https://review.jami.net>
2018-05-17 11:58:54 +08:00
2019-01-29 03:58:14 +08:00
This service works for all Jami sub-projects (LibRing, LRC and clients).
2018-05-17 11:58:54 +08:00
How to Build LibRingClient (or LRC)
==============================================================
+ LibRing must be installed
first. If you have not already done so, go to the [\#How to Build
LibRing (or Daemon)](#How_to_Build_LibRing_(or_Daemon) "wikilink")
section.
Getting the Source Code
--------------------------------------------------
```bash
2019-05-09 23:06:39 +08:00
git clone https://review.jami.net/ring-lrc
2018-05-17 11:58:54 +08:00
LIBRINGLIENT=`pwd`/ring-lrc
RING=`pwd`/ring-daemon
```
How to Build LibRingClient from Sources
------------------------------------------------------------------
#### Dependencies
+ Qt5core
+ **Debian/Ubuntu:** qtbase5-dev
+ **Fedora:** qt5-qtbase-devel
<!-- -->
+ Qt5Linguist
*Tools are needed to enable compiling of translations*
+ **Debian/Ubuntu:** qttools5-dev and qttools5-dev-tools
+ **Fedora:** qt5-qttools-devel
#### GNU/Linux & Mac OS X
```bash
cd $LIBRINGLIENT
mkdir build
cd build
cmake .. -DRING_BUILD_DIR=$RING/src -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
```
For debug symbols add the appropriate cmake option to the cmake
configure line, like so:
```bash
cmake .. -DRING_BUILD_DIR=$RING/src -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug
```
#### Native Windows
2018-05-17 11:58:54 +08:00
- Make sure that daemon is built first
2018-05-17 11:58:54 +08:00
```bash
cd lrc
python make-lrc.py -gb
2018-05-17 11:58:54 +08:00
```
- ```--toolset```, ```--sdk``` options are available, as well.
2018-05-17 11:58:54 +08:00
Developper
-------------------------------------
[KDE Coding Guidelines](KDE_Coding_Guidelines "wikilink")
[Rapport de projet de fin d'études (French - 54,866
Mo)](https://projects.savoirfairelinux.com/attachments/download/21218/GTI792_Rapport_finale_LEPE13098909.pdf)
Emmanuel Lepage, 2015/04/23
How to Build a Client
================================================
In most of cases you want a client to control the daemon. We provide
ready to use clients for major platforms.
Choose your client build instructions below
2019-01-29 03:58:14 +08:00
Gnome Client for Jami
2018-05-17 11:58:54 +08:00
------------------------------------------------
+ LibRing and LibRingClient
must be installed first. If you have not already done so, go to the
[\#How to Build LibRing (or
Daemon)](#How_to_Build_LibRing_(or_Daemon) "wikilink") and [\#How to
Build LibRingClient (or
LRC)](#How_to_Build_LibRingClient_(or_LRC) "wikilink") sections.
#### Getting the Source Code
```bash
2019-05-09 23:06:39 +08:00
git clone https://review.jami.net/ring-client-gnome
2018-05-17 11:58:54 +08:00
```
#### Dependencies
##### Building Environment
- cmake
- C++11 compiler (eg: gcc &gt;= 4.8)
- GTK+ &gt;= 3.10
- clutter and clutter-gtk
- libRingClient
- Qt5Core
- gnome-icon-theme-symbolic
- X11
- libebook1.2 &gt;= 3.10 or evolution-data-server &gt;= 3.10
*Some distros (Debian/Ubuntu) have separated the EDS APIs into its
different client and server components, while others (Fedora) have put
everything in one EDS package)*
- libnotify (optional for desktop notifications)
- gettext (optional for compiling translations)
**Debian/Ubuntu**
2019-05-24 00:12:20 +08:00
sudo apt-get install g++ cmake libgtk-3-dev qtbase5-dev libclutter-gtk-1.0-dev gnome-icon-theme-symbolic libebook1.2-19 libnotify-dev gettext
2018-05-17 11:58:54 +08:00
**Fedora**
sudo yum install gcc-c++ cmake gtk3-devel qt5-qtbase-devel clutter-gtk-devel gnome-icon-theme-symbolic evolution-data-server-devel libnotify-devel gettext-devel
**Documentation**
You may optionally install doxygen to be able to build the documentation
via 'make doc'
##### Run-time Environment
- GTK+ &gt;= 3.10
- clutter and clutter-gtk
2019-01-29 03:58:14 +08:00
- the Jami daemon and libRingClient
2018-05-17 11:58:54 +08:00
- Qt5Core (libRingClient uses the Core module of Qt5, thus Qt5Core is
required to properly interface between it and GTK)
- gnome-icon-theme-symbolic, for the use of certain symbolic icons
(this dependency may be dropped in the future)
- X11 (this is currently needed for screen area selection during
screen sharing, a Wayland (or otherwise) alternative is not
currently supported)
- libebook1.2 &gt;= 3.10 or evolution-data-server &gt;= 3.10
*Some distros (Debian/Ubuntu) have separated the EDS APIs into its
different client and server components, while others (Fedora) have put
everything in one EDS package)*
- libnotify (optional for desktop notifications)
**Debian/Ubuntu**
<!-- -->
```bash
2019-05-24 00:12:20 +08:00
sudo apt-get install libgtk-3-0 libqt5core5a libclutter-gtk-1.0-0 gnome-icon-theme-symbolic libebook-1.2-19 libnotify4
2018-05-17 11:58:54 +08:00
```
**Note:** for Debian 9 replace libebook-1.2-14 with libebook-1.2-16
**Fedora**
<!-- -->
```bash
sudo yum install gtk3 qt5-qtbase clutter-gtk gnome-icon-theme-symbolic evolution-data-server libnotify
```
#### Build Instructions
**If LibRing and LibRingClient are already installed on the system (eg:
/usr/)** in the gnome-ring project root dir:
```bash
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
```
**Building without installing LibRing and LibRingClient**
This allows you to build every component separately and to run them from
their location without having to install them. To do this, you must
first build LibRing and then tell LibRingClient where it is located.
Then, you build the LibRingClient and tell client-gnome where
LibRingClient it is located. Finally, you build client-gnome.
1. Build the daemon as explained above.
2. Configure the build of LibRingClient by specifying the location of
the (non-installed) daemon with e.g.:
cd build && cmake .. -DRING_BUILD_DIR=$HOME/ring-project/daemon/src -DCMAKE_BUILD_TYPE=Debug
3. Build LibRingClient by running "make".
4. Configure the build of client-gnome by specifying the location of
LibRingClient using the specific variable designed for it:
cd build && cmake .. -DLibRingClient_PROJECT_DIR=$HOME/ring-project/lrc -DCMAKE_BUILD_TYPE=Debug
5. Build client-gnome by running "make".
2019-01-29 03:58:14 +08:00
To run an install-less Jami, you must manually start the daemon and then
2018-05-17 11:58:54 +08:00
the client, e.g.:
term1: $HOME/ring-project/daemon/bin/dring -cdp
2019-05-29 22:17:48 +08:00
term2: $HOME/ring-project/client-gnome/jami-gnome --debug
2018-05-17 11:58:54 +08:00
2019-01-29 03:58:14 +08:00
KDE Client for Jami
2018-05-17 11:58:54 +08:00
----------------------------------------------
![](Caution.png "fig:Caution.png"){width="30"} LibRing and LibRingClient
must be installed first. If you have not already done so, go to the
[\#How to build LibRing (or
Daemon)](#How_to_build_LibRing_(or_Daemon) "wikilink") and [\#How to
build LibRingClient (or
LRC)](#How_to_build_LibRingClient_(or_LRC) "wikilink") sections.
#### Getting the Source Code
```bash
git clone git://anongit.kde.org/ring-kde
```
#### Installing Build Dependencies
**Debian/Ubuntu**
<!-- -->
```bash
sudo apt-get install cmake git-core qtbase5-dev extra-cmake-modules libqt5svg5-dev libkf5attica-dev libkf5attica-dev libkf5config-dev libkf5guiaddons-dev libkf5dbusaddons-dev libkf5i18n-dev libkf5windowsystem-dev libkf5xmlgui-dev libkf5iconthemes-dev kinit-dev kio-dev libkf5completion-dev libkf5crash-dev kdelibs5-dev libkf5notifications-dev
```
#### Building Ring-KDE from Sources
```bash
cd $RING-KDE
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug
make
sudo make install
```
If LibRing isn't installed, you can use:
`-DRING_BUILD_DIR=$RING`
2019-01-29 03:58:14 +08:00
Windows Client for Jami
2018-05-17 11:58:54 +08:00
--------------------------------------------------
## On Linux
> For now, this process is experimental.
- LibRing and LibRingClient
2018-05-17 11:58:54 +08:00
must be installed first. If you have not already done so, go to the
[\#How to Build LibRing (or
Daemon)](#How_to_Build_LibRing_(or_Daemon) "wikilink") and [\#How to
Build LibRingClient (or
LRC)](#How_to_Build_LibRingClient_(or_LRC) "wikilink") sections.
- Building the whole ring-project is recommended, however, lrc might need to be rebuilt with cmake option ```-DCMAKE_INSTALL_PREFIX=/usr```
2018-05-17 11:58:54 +08:00
#### Other Requirements
- Qt 5.9.4 (qt open source)
- libqt5svg*, qtwebengine5-dev, qtmultimedia5-dev, qtdeclarative5-dev, pandoc
2018-05-17 11:58:54 +08:00
#### Getting the Source Code
```bash
git clone https://review.jami.net/ring-client-windows
2018-05-17 11:58:54 +08:00
```
#### Build Instructions
**Windows Client dependencies**
- For Debian based:
2018-05-17 11:58:54 +08:00
```bash
2019-12-24 02:48:55 +08:00
sudo apt install qtmultimedia5-dev libqt5svg5* qtwebengine5-dev qtdeclarative5-dev qtquickcontrols2-5-dev qml-module-qtquick* pandoc
2018-05-17 11:58:54 +08:00
```
- For Fedora:
2018-05-17 11:58:54 +08:00
```bash
sudo dnf install qt5-qtsvg-devel qt5-qtwebengine-devel qt5-multimedia-devel qt5-qtdeclarative-devel pandoc
2018-05-17 11:58:54 +08:00
```
**Build Windows Client**
2018-05-17 11:58:54 +08:00
```bash
cd ring-client-windows
pandoc -f markdown -t html5 -o changelog.html changelog.md
mkdir build
cd build
qmake -qt=qt5 ../jami-qt.pro
make -j9
```
- Then, you are finally ready to launch jami-qt in your build directory.
2018-05-17 11:58:54 +08:00
#### Debugging
Compile the client with `BUILD=Debug` and compile LibRingClient with
`-DCMAKE_BUILD_TYPE=Debug`
#### Known issues
1. The build system is not straight forward
2. Video doesn't work
3. Can't maximize/minimize window
4. Crash if the daemon is not started and installed.
2018-05-17 11:58:54 +08:00
## On native Windows
2018-05-17 11:58:54 +08:00
- Make sure that daemon, lrc are built first
2018-05-17 11:58:54 +08:00
```bash
cd client-windows
pandoc -f markdown -t html5 -o changelog.html changelog.md
python make-client.py -d
python make-client.py -b
powershell -ExecutionPolicy Unrestricted -File copy-runtime-files.ps1
2018-05-17 11:58:54 +08:00
```
- ```--toolset```, ```--sdk``` options are available, as well.
2020-01-01 04:17:55 +08:00
- To control the version of qmake.exe, ```--qtver``` option can be used
#### 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
2018-05-17 11:58:54 +08:00
2019-01-29 03:58:14 +08:00
Mac OS X Client for Jami
2018-05-17 11:58:54 +08:00
---------------------------------------------------
+ LibRing and LibRingClient
must be installed first. If you have not already done so, go to the
[\#How to Build LibRing (or
Daemon)](#How_to_Build_LibRing_(or_Daemon) "wikilink") and [\#How to
Build LibRingClient (or
LRC)](#How_to_Build_LibRingClient_(or_LRC) "wikilink") sections.
#### Other Requirements
- Qt5 (we link against Qt5Core, Qt5Widgets, Qt5Gui)
- Cocoa framework and Xcode toolchains
#### Getting the Source Code
```bash
2019-05-09 23:06:39 +08:00
git clone https://review.jami.net/ring-client-macosx
2018-05-17 11:58:54 +08:00
```
#### Build Instructions
```bash
mkdir build && cd build
export CMAKE_PREFIX_PATH=<dir_to_qt5>
```
##### Setting up Compilation with XCode
Generate an Xcode project with CMake:
```bash
cmake ../ -DCMAKE_INSTALL_PREFIX=<libringclient_install_path> -G Xcode
open Ring.xcodeproj/
```
Build and run it from Xcode.
##### Setting up Compilation by Command Line
```bash
cmake ../ -DCMAKE_INSTALL_PREFIX=<libringclient_install_path>
make
open Ring.app/
```
+ The app built using
'make' contains only links to required libraries. To fully build and
package as a standalone Bundle, see the **Packaging** section.
##### Debugging
For now, the build type of the client is "Debug" by default. However it
is useful to also have the debug symbols of LibRingClient. To do this,
specify `-DCMAKE_BUILD_TYPE=Debug` when compiling LibRingClient in the
cmake options.
##### Packaging
To make a standalone Bundle we use a cmake module:
[BundleUtilities](https://cmake.org/cmake/help/v3.0/module/BundleUtilities.html).
All dependencies are copied inside the Bundle and links are fixed.
We can then generate a "DragNDrop" dmg file with
[CPack](https://cmake.org/Wiki/CMake:Packaging_With_CPack).
```bash
cmake ../ -DCMAKE_INSTALL_PREFIX=<libringclient_install_path>
make install -j
cpack -G DragNDrop Ring
```
QML Client for Jami
-----------------------------------------------------
+ **Qt 5.15**: In order to use the QML Client it is necessary to install the Qt version 5.15 or higher. You can install it [from sources or download the binary installer](https://www.qt.io/download).
+ LibRing and LibRingClient
must be installed first. If you have not already done so, go to the
[\#How to Build LibRing (or
Daemon)](#How_to_Build_LibRing_(or_Daemon) "wikilink") and [\#How to
Build LibRingClient (or
LRC)](#How_to_Build_LibRingClient_(or_LRC) "wikilink") sections.
* **Note**: It is necessary to compile the *libringclient* with the installed Qt version 5.15. Before compiling you should remove all files in build folder and set the path to Qt libraries. For example, if Qt installation folder is in your home directory:
```sh
export CMAKE_PREFIX_PATH=~/Qt/5.15.0/gcc_64
export LD_LIBRARY_PATH=~/Qt/5.15.0/gcc_64/lib
```
After build you can check that *libringclient* uses the correct path to Qt libraries:
```sh
ldd libringclient.so
libQt5DBus.so.5 => /home/<username>/Qt/5.15.0/gcc_64/lib/libQt5DBus.so.5 (0x00007fad4599b000)
(...)
```
#### Build Instructions
Once LRC is built you can compile the QML Client:
```sh
cd ring-client-windows
pandoc -f markdown -t html5 -o changelog.html changelog.md
mkdir build
cd build
~/Qt/5.15.0/gcc_64/bin/qmake /jami-qt.pro
make -j9
```
**Note**: If LRC has been built inside its project directory, you need to add the path in the jami-qt.pro:
Change:
```sh
isEmpty(LRC) { LRC=../../install/lrc/ }
INCLUDEPATH += $${LRC}/include/libringclient
INCLUDEPATH += $${LRC}/include
INCLUDEPATH += ../src
```
To:
```sh
LIBS += -L$$PWD/../lrc/build-local/ -lringclient
INCLUDEPATH += $$PWD/../lrc/build-local
INCLUDEPATH += $$PWD/../lrc/src
```
#### Linker issue
With Ubuntu 20.04, even if the build process finish with success, the linker might give you the following message:
```sh
/usr/bin/ld: /home/ababi/Qt/5.15.0/gcc_64/lib/libQt5WebEngineCore.so: .dynsym local symbol at index 3 (>= sh_info of 3)
(...)
```
This has been solved by switching to [gold linker](https://forum.qt.io/topic/109387/gammaray-build-error-on-ubuntu):
```sh
sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld
```