jami-docs

Forked version of Jami documentation, see wrycode.com/jami-docs-demo
git clone git://git.wrycode.com/wrycode/jami-docs.git
Log | Files | Refs

build.md (6933B)


      1 # old build instructions
      2 
      3 
      4 
      5 
      6 
      7 
      8 
      9 
     10 
     11 
     12 2\. **LibRingClient** (or LRC) is written in
     13 QtCore and facilitates clients' portability between operating systems.
     14 It does not interact with the Android client.
     15 
     16 **Building gnome client without installing LibRing and LibRingClient**
     17 
     18 This allows you to build every component separately and to run them from
     19 their location without having to install them. To do this, you must
     20 first build LibRing and then tell LibRingClient where it is located.
     21 Then, you build the LibRingClient and tell client-gnome where
     22 LibRingClient it is located. Finally, you build client-gnome.
     23 
     24 1.  Build the daemon as explained above.
     25 2.  Configure the build of LibRingClient by specifying the location of
     26 	the (non-installed) daemon with e.g.:
     27 		 cd build && cmake .. -DRING_BUILD_DIR=$HOME/ring-project/daemon/src -DCMAKE_BUILD_TYPE=Debug
     28 
     29 3.  Build LibRingClient by running "make".
     30 4.  Configure the build of client-gnome by specifying the location of
     31 	LibRingClient using the specific variable designed for it:
     32 		cd build && cmake .. -DLibRingClient_PROJECT_DIR=$HOME/ring-project/lrc -DCMAKE_BUILD_TYPE=Debug
     33 
     34 5.  Build client-gnome by running "make".
     35 
     36 To run an install-less Jami, you must manually start the daemon and then
     37 the client, e.g.:
     38 
     39 	term1: $HOME/ring-project/daemon/bin/dring -cdp
     40 	term2: $HOME/ring-project/client-gnome/jami-gnome --debug
     41 
     42 Client Qt for Jami
     43 --------------------------------------------------
     44 
     45 ## On GNU/Linux
     46 
     47 + LibRing and LibRingClient must be installed first. If you have not
     48 already done so, go to the [How to Build LibRing (or
     49 Daemon)](#how-to-build-libring-or-daemon) and [How to Build
     50 LibRingClient (or LRC)](#how-to-build-libringclient-or-lrc) sections.
     51 
     52 + **Qt 5.14**: In order to use the client Qt it is necessary to have the
     53 Qt version 5.14 or higher. If your system does not have it you can install it
     54 [from sources or download the binary installer](https://www.qt.io/download).
     55 To compile the LibRingClient with a locally installed Qt you need to specify
     56 its path, for example:
     57 ```sh
     58 cmake -DQT5_VER=5.15.0 -DQT5_PATH=/home/<username>/Qt/5.15.0/gcc_64 -DRING_BUILD_DIR=<daemon-source-path> -DCMAKE_INSTALL_PREFIX=<lrc-installation-path> -DRING_XML_INTERFACES_DIR=<daemon-source-path>/bin/dbus ..
     59 ```
     60 
     61 #### Installing Build Dependencies
     62 
     63 - For Debian based:
     64 ```bash
     65 qtmultimedia5-dev libqt5svg5-dev qtwebengine5-dev qtdeclarative5-dev qtquickcontrols2-5-dev qml-module-qtquick2 qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-layouts qml-module-qtquick-privatewidgets qml-module-qtquick-shapes qml-module-qtquick-window2 qml-module-qtquick-templates2 qml-module-qt-labs-platform qml-module-qtwebengine qml-module-qtwebchannel libqrencode-dev libnm-dev
     66 ```
     67 - For Fedora:
     68 ```bash
     69 sudo dnf install qt5-qtsvg-devel qt5-qtwebengine-devel qt5-qtmultimedia-devel qt5-qtdeclarative-devel qt5-qtquickcontrols2-devel qt5-qtquickcontrols qrencode-devel NetworkManager-libnm-devel
     70 ```
     71 
     72 #### Build Instructions
     73 Once LibRingClient is built you can compile the client:
     74 
     75 ```sh
     76 cd client-qt
     77 mkdir build
     78 cd build
     79 cmake .. -DQT5_VER=5.15.0 -DQT5_PATH=/home/<username>/Qt/5.15.0/gcc_64 -DLRC=<path_to_lrc> -DCMAKE_INSTALL_PREFIX=<installation_path>
     80 make
     81 ```
     82 Variables `QT5_VER` and `QT5_PATH` are used to specify version and path for a custom installation of Qt.
     83 
     84 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 `LRCLIB` (otherwise it will seach inside LRC with the suffixes `/lib`, `/build` and `/build-local`).
     85 
     86 Then, you are finally ready to launch jami-qt in your build directory.
     87 
     88 If you want to install it to the path provided by `CMAKE_INSTALL_PREFIX` you can run:
     89 
     90 ```sh
     91 make install
     92 ```
     93 
     94 #### Debugging
     95 
     96 Compile the client and LibRingClient with `-DCMAKE_BUILD_TYPE=Debug`
     97 
     98 #### Known linker issues
     99 
    100  With Ubuntu 20.04, even if the build process finish with success, the linker might give you the following message:
    101 
    102 ```sh
    103 /usr/bin/ld: /home/<username>/Qt/5.15.0/gcc_64/lib/libQt5WebEngineCore.so: .dynsym local symbol at index 3 (>= sh_info of 3)
    104 (...)
    105 ```
    106 This has been solved by switching to [gold linker](https://forum.qt.io/topic/109387/gammaray-build-error-on-ubuntu):
    107 
    108 ```sh
    109 sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld
    110 ```
    111 
    112 ## On native Windows
    113 
    114 - Make sure that daemon, lrc are built first
    115 
    116 ```bash
    117 	cd client-windows
    118 	python make-client.py -d
    119 	python make-client.py -b
    120 	powershell -ExecutionPolicy Unrestricted -File copy-runtime-files.ps1
    121 ```
    122 - ```--toolset```, ```--sdk``` options are available, as well.
    123 - To control the version of qmake.exe, ```--qtver``` option can be used
    124 
    125 #### Packaging on native Windows
    126 
    127 - To be able to generate a msi package, first download and install [Wixtoolset](https://wixtoolset.org/releases/).
    128 - In Visual Studio, download WiX Toolset Visual Studio Extension.
    129 - Build client-windows project first, then the JamiInstaller project, msi package should be stored in ring-project\client-windows\JamiInstaller\bin\Release
    130 
    131 Mac OS X Client for Jami
    132 ---------------------------------------------------
    133 
    134 + LibRing and LibRingClient must be installed first. If you have not
    135 already done so, go to the [How to Build LibRing (or
    136 Daemon)](#how-to-build-libring-or-daemon) and [How to Build
    137 LibRingClient (or LRC)](#how-to-build-libringclient-or-lrc) sections.
    138 
    139 
    140 #### Other Requirements
    141 
    142 -   Qt5 (we link against Qt5Core, Qt5Widgets, Qt5Gui)
    143 -   Cocoa framework and Xcode toolchains
    144 
    145 #### Getting the Source Code
    146 
    147 ```bash
    148 git clone https://review.jami.net/ring-client-macosx
    149 ```
    150 
    151 #### Build Instructions
    152 
    153 ```bash
    154 mkdir build && cd build
    155 export CMAKE_PREFIX_PATH=<dir_to_qt5>
    156 ```
    157 
    158 ##### Setting up Compilation with XCode
    159 
    160 Generate an Xcode project with CMake:
    161 
    162 ```bash
    163 cmake ../ -DCMAKE_INSTALL_PREFIX=<libringclient_install_path> -G Xcode
    164 open Ring.xcodeproj/
    165 ```
    166 
    167 
    168 Build and run it from Xcode.
    169 
    170 ##### Setting up Compilation by Command Line
    171 
    172 ```bash
    173 cmake ../ -DCMAKE_INSTALL_PREFIX=<libringclient_install_path>
    174 make
    175 open Ring.app/
    176 ```
    177 
    178 
    179 + The app built using
    180 'make' contains only links to required libraries. To fully build and
    181 package as a standalone Bundle, see the **Packaging** section.
    182 
    183 ##### Debugging
    184 
    185 For now, the build type of the client is "Debug" by default. However it
    186 is useful to also have the debug symbols of LibRingClient. To do this,
    187 specify `-DCMAKE_BUILD_TYPE=Debug` when compiling LibRingClient in the
    188 cmake options.
    189 
    190 ##### Packaging
    191 
    192 To make a standalone Bundle we use a cmake module:
    193 [BundleUtilities](https://cmake.org/cmake/help/v3.0/module/BundleUtilities.html).
    194 All dependencies are copied inside the Bundle and links are fixed.
    195 
    196 We can then generate a "DragNDrop" dmg file with
    197 [CPack](https://cmake.org/Wiki/CMake:Packaging_With_CPack).
    198 
    199 ```bash
    200 cmake ../ -DCMAKE_INSTALL_PREFIX=<libringclient_install_path>
    201 make install -j
    202 cpack -G DragNDrop Ring
    203 ```