jami-docs/technical/Build-instructions.md

971 lines
25 KiB
Markdown

**Jami relies on various components which interact together.**
![Ring-layers](/uploads/ccc91eff2ab16cb68c6c51dd6fad0f63/Ring-layers.png)
They are divided into three main layers:
1\. **Daemon** is the core of
Jami. It does not interact with users but it is involved in every
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.
To fully build Jami, you must build each of these components in order,
unless you choose to build Jami easily and quickly.
How to Build Jami Easily and Quickly
===============================================================
We use a GIT repository to manage sources. On shell based platform you
can fetch your private copy using following command:
```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/
./make-ring.py --init
```
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
```
**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>
+ These instructions are for Ubuntu, check equivalent if you use a different distribution
#### Prepare environment
- 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
```
<!-- -->
- Install Android Studio:
<https://developer.android.com/studio/index.html>
<!-- -->
- Install the Android NDK:
<https://developer.android.com/ndk/downloads/index.html>
<!-- -->
- Install required tools
<!-- -->
```bash
sudo apt install autoconf automake libtool autopoint swig python
```
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
git clone --recurse-submodules https://review.jami.net/ring-project
```
- Initialize project
<!-- -->
```bash
cd ring-project
./make-ring.py --init --distribution=Android
```
- Compile
<!-- -->
```bash
ANDROID_ABI="armeabi-v7a arm64-v8a" ./make-ring.py --install --distribution=Android
```
**Output**: You can find the *.apk* file in the
*./client-android/ring-android/app/build/outputs* folder.
#### Troubleshooting
- Check case in your sdk path. Since api 26,
/home/user/Android/**s**dk have become /home/user/Android/**S**dk
<!-- -->
- You can check each path with *echo*. e.g : echo $JAVA\_HOME
<!-- -->
- `sudo` will use root's bash profile. And you don't need it.
<!-- -->
- If build fails, you can try to clean contribs with:
```bash
cd ring-project/ && git clean -xdf
cd ../daemon && git clean -xdf
```
- 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
<!-- -->
- 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.
On iOS
----------------------------------------------
After installing [Brew](https://brew.sh) and Python3 (brew install
python3):
```bash
git clone https://review.jami.net/ring-project
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
```
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
git clone https://review.jami.net/ring-daemon
```
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**
Dependencies LibRing : Fedora
```bash
sudo yum groupinstall group "Development Tools" "Development Libraries"
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
```
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
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
```
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
mkdir native
cd native
../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 Windows
For the moment only 64-bit MSVC build can be compiled.
**Build environment**: msvc2017_x64 | yasm | nasm | perl | cmake | msys2 (to install separately)…
Download [vs_community](https://developerinsider.co/download-visual-studio-2017-web-installer-iso-community-professional-enterprise/) binary and run
Download [GNU CoreUtils for windows](http://gnuwin32.sourceforge.net/packages/coreutils.htm)
Download [wget](https://www.gnu.org/software/wget/)
```bash
vs_community*.exe --config "<path-to-config>" --passive --norestart
```
extract [vsconfig.zip](uploads/af663991871a742eb08ba623169c14d9/vsconfig.zip) and take the config document inside
+ Configure Qt on VS 2017 with VS tools and add Qt version/path in VS project properties
+ Web install [WixToolSet](http://wixtoolset.org/releases/) and configure Wix VS extension
starting directory: ring-project/
```bash
git submodule update --init daemon lrc client-windows
git submodule update --recursive --remote daemon lrc client-windows
```
+ Web install qt<5.9.4> for msvc2017_64 + qwebengine
+ VS package install qt vs tools + configure for qt_version
+ Web install [VSNASM](https://github.com/ShiftMediaProject/VSNASM/releases/tag/0.5) and [VSYASM](https://github.com/ShiftMediaProject/VSYASM/releases/tag/0.4)
+ Install chocolatey from admin cmd
+ Run
```bash
choco install -y --allow-downgrade 7zip unzip wget --version 1.19.4 cmake git.install --version 2.10.2
```
+ Web install msys2 64 bit and from msys2 run:
```bash
pacman -S make ; pacman -S gcc ; pacman -S perl ; pacman -S diffutils
```
+ Put yasm.exe(Win64 version) inside C:\msys64\usr\bin\
+ Put gas-preprocessor.pl inside C:\msys64\usr\bin\
+ Web install strawberry perl
**Fetch and build LibRing's dependencies**
```bash
cd daemon/MSVC
make-daemon.bat fetch win32 x64
make-daemon.bat contrib win32 x64
make-daemon.bat daemon win32 x64
```
**Build LibRing**
```bash
cd ..\..\lrc
set QtDir=C:\\Qt\\5.9.4
make-lrc.bat gen x64
make-lrc.bat build x64
```
##### Native compiling on Windows
**MSVC**: Microsoft Visual C++ 2017
```bash
cd ..\client-windows
fetch-deps.bat /c
build-client.bat deps x64
build-client.bat build x64
```
+ If you get .dll errors during compilation, run in admin PowerShell:
```
cd ring-project\client-windows && .\copy-runtime-files.ps1
```
+ Set as Release on VS and Run Local Debugger
You are good to go !
#### 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:
<https://review.jami.net>
This service works for all Jami sub-projects (LibRing, LRC and clients).
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
git clone https://review.jami.net/ring-lrc
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
```
#### Windows
##### Build on Linux with MinGW
**Build environment**: minGW-w64 | mingw32-qt5-qtbase |
mingw32-qt5-qttools
**Build LibRingClient**
*LIBRING\_INSTALL\_PREFIX* makes reference to the build directory of
LibRing, so it is either ring-daemon/build/\_win32/, or the directory
specified via `--prefix` argument defined during LibRing compilation.
```bash
cd ring-lrc
mkdir -p build
cd build
export CMAKE_PREFIX_PATH=/usr/i686-w64-mingw32/sys-root/mingw/lib/cmake
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/winBuild.cmake -DRING_BUILD_DIR=<LIBRING_INSTALL_PREFIX> -DENABLE_LIBWRAP=true -DCMAKE_INSTALL_PREFIX=<LIBRING_INSTALL_PREFIX> ..
make [-jX] (for X-way multi-threaded build ) install || exit 1
```
note:the CMAKE\_INSTALL\_PREFIX **must** be the same as LibRing for
building the client
##### Build on Native Windows
**MVSC**: Microsoft Visual C++ 2015 CTP is still lacking some C++11
features needed to compile the common library (e.g. constexpr is only
partially supported).
**MinGW**: TODO
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
Gnome Client for Jami
------------------------------------------------
+ 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 https://review.jami.net/ring-client-gnome
```
#### 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**
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
**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
- the Jami daemon and libRingClient
- 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
sudo apt-get install libgtk-3-0 libqt5core5a libclutter-gtk-1.0-0 gnome-icon-theme-symbolic libebook-1.2-19 libnotify4
```
**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".
To run an install-less Jami, you must manually start the daemon and then
the client, e.g.:
term1: $HOME/ring-project/daemon/bin/dring -cdp
term2: $HOME/ring-project/client-gnome/jami-gnome --debug
KDE Client for Jami
----------------------------------------------
![](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`
Windows Client for Jami
--------------------------------------------------
+ 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
- Mingw-w64 build environment
- Qt5 (we link against Qt5Core, Qt5Widgets, Qt5Gui) built with Mingw
- Qt5 Svg & Qt5 WinExtras
#### Getting the Source Code
```bash
git clone https://review.jami.net/ring-client-windows
```
#### Build Instructions
**USE THE QMAKE OF Qt BUILT WITH MINGW** (e.g.
/usr/bin/i686-w64-mingw32-qmake-qt5)
**Windows Client dependencies**
The windows client version relies on two git submodules, to update them
go to ring-client-windows folder and run:
```bash
git submodule update --init
cd winsparkle
git submodule update --init
```
**Build Windows Client (executable)**
```bash
cd ring-client-windows
cd winsparkle
mkdir -p build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=<your path to ring-lrc/>cmake/winBuild.cmake -DCMAKE_INSTALL_PREFIX=LIBRING_INSTALL_PREFIX (same as for LibRing & LibRingClient) ../cmake
make [-jX] (for X-way multi-threaded build )
make install
cd ../../libqrencode
./autogen.sh
mkdir -p build && cd build
../configure --host=i686-w64-mingw32 --prefix=<absolute path of LIBRING_INSTALL_PREFIX>
make [-jX] (for X-way multi-threaded build )
make install
cd ../.. && mkdir build && cd build
i686-w64-mingw32-qmake-qt5 ../RingWinClient.pro -r -spec win32-g++ RING=LIBRING_INSTALL_PREFIX (same as for LibRing & LibRingClient)
make [-jX] (for X-way multi-threaded build )
make install
```
note: an absolute path is a path starting with /, mandatory here; unlike
in cmake command lines which allows relative paths.
You will find all files in ./release directory.
#### Debugging
Compile the client with `BUILD=Debug` and compile LibRingClient with
`-DCMAKE_BUILD_TYPE=Debug`
#### Packaging
[Nsis : Nullsoft Scriptable Install System](http://nsis.sourceforge.net/Main_Page)
```bash
cd build/release
makensis ring.nsi
```
Mac OS X Client for Jami
---------------------------------------------------
+ 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
git clone https://review.jami.net/ring-client-macosx
```
#### 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
```