Compiling linphone-desktop in MAC OS Catalina

It was confusing for me so I documented it

Install prerequisites as mentioned in the git readme and Set DIR to your qt version. Mine is 5.14.2

brew install cmake
brew install python
brew install yasm
brew install nasm
brew install doxygen
pip install pystache
pip install six
brew install perl
brew install qt5
brew cask install qt-creator
brew install pkg-config


Qt5_DIR="/usr/local/Cellar/qt/5.14.2/lib/cmake"
PATH="/usr/local/Cellar/qt/5.14.2/gcc_64/bin/:$PATH"


Clone the Code:

git clone https://gitlab.linphone.org/BC/public/linphone-desktop.git
cd linphone-desktop
git submodule update --init --recursive

It's about 1.8 GB



Create a Build folder for your own build:

mkdir build
 cd build/
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo

( if you have problem with Qt5 path use below command : 
cmake .. -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.14.2
)

( if you want to disable any installation you can use cmake-gui .. command )



cmake --build . --target all

and install it

cmake --build . --target install

to run it go to outputt folder and run ./linphone

cd  OUTPUT/Linphone.app/Contents/MacOS
./linphone

Logo, icon, and graphical interface files are in linphoneapp/assets . you can change them and compile them to see the effects. For example, I just changed the icon and recompiled it:



Notes : 
In order to build a DMG file, you can use -DENABLE_APP_PACKAGING=YES tag with CMake : 

cmake .. -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.14.2 -DENABLE_APP_PACKAGING=YES
cmake --build . --target all
cmake --build . --target install







Comments