Linphone is a free VoIP and video softphone based on the SIP protocol.
Here are the general instructions to build linphone for desktop. The specific instructions for each build platform is described just below.
-
Install some build tools:
CMake
,Python
andQt5
(5.9 or newer).C++11
support is required! It's necessary to install thepip
command and to execute:pip install pystache
-
It's necessary to set the environment variable
Qt5_DIR
to point to the path containing the cmake folders of Qt5. Example:Qt5_DIR="~/Qt/5.9/gcc_64/lib/cmake"
-
The
PATH
environment variable must point to the Qt5 directorybin
. Example:PATH="~/Qt/5.9/gcc_64/bin/:$PATH"
-
Prepare the build by running the
prepare.py
script. -
Build the project using the appropriate build tool (
make
,ninja
,Xcode
,Visual Studio (2013 or 2015 version)
).
-
Prepare the build in a terminal by running the following command in the current directory:
./prepare.py -DENABLE_DOC=OFF
-
Build the project in a terminal with:
make
To install the required dependencies on Mac OS X, you can use Homebrew. Before you install packages with Brew, you may have to change directories permissions (if you can't change permissions with sudo on a MacOS >= High Sierra, get a look at this StackOverflow answer).
-
First ensure you have installed pip. You can get it for python 2.7 there.
-
Then, you can install a pip package with the following command:
pip install [package]
For instance, if you don't have pystache and the dot package (contained in graphviz), enter the following commands:
pip install pystache pip install graphviz
-
Finish the pre-build by cleaning the obsolete files and then run prepare.py and make again:
./prepare.py -c ./prepare.py -DENABLE_DOC=OFF make
-
Ensure that you have downloaded the
Qt msvc2015 version
(32-bit). (64-bit version is not supported at this moment by Linphone Desktop.)MinGW
must be installed too. -
Define the
Qt5_DIR
andPATH
environment variable to the Qt5 installation path:Qt5_DIR="C:\Qt\5.9\msvc2015\lib\cmake" PATH="C:\Qt\5.9\msvc2015\bin;%PATH%"
-
Open a Windows command line (cmd.exe) in the current directory and run:
python prepare.py -G "Visual Studio 14 2015" -DENABLE_DOC=OFF
-
Run the following command in the root directory of linphone-desktop:
cmake --build WORK\desktop\cmake --config Release
Or Open the generated Visual Studio solution
Project.sln.lnk
and build it. Check if theRelease
option is selected in Visual Studio. (WithWin32
!)
- 4K (High DPI Displays) If you encounter troubles with high DPI displays on Windows, please to see this link: https://bugreports.qt.io/browse/QTBUG-53022
Some options can be given during the prepare.py
step to customize the build. The basic usage of the prepare.py
script is:
./prepare.py [options]
Here are the main options you can use.
Building with debug symbols is necessary if you want to be able to debug the application using some tools like GDB or the Visual Studio debugger. To do so, pass the --debug
option to prepare.py
:
./prepare.py --debug [other options]
You might want to generate an installation package to ease the distribution of the application. To add the package generation step to the build just run:
./prepare.py --package [other options]
./prepare.py --all-codecs
The prepare.py
script is wrapper around CMake. Therefore you can give any CMake option to the prepare.py
script.
To get a list of the options you can pass, you can run:
./prepare.py --list-cmake-variables
The options that enable you to configure what will be built are the ones beginning with ENABLE_
. So for example, you might want to build linphone without the opus codec support. To do so use:
./prepare.py -DENABLE_OPUS=NO
You need to update the project:
git pull --rebase
git submodule sync && git submodule update --init --recursive
Then simply re-building using the appropriate tool corresponding to your platform (make, Visual Studio...) should be sufficient to update the build (after having updated the source code via git). However if the compilation fails, you may need to rebuild everything from scratch using:
./prepare.py -c && ./prepare.py [options]
Then you re-build as usual.
Linphone is getting a full internationalization support, using Transifex platform. If you want you can contribute at: https://www.transifex.com/belledonne-communications/linphone-desktop/languages/
GPLv2 © Linphone