User Tools

Site Tools


kdevelop

Setting up KDevelop to work on Mixxx

KDevelop is an integrated development environment (IDE) that makes working on a large C++ project like Mixxx much easier than a text editor. This wiki page will help you set up KDevelop 5 to work on Mixxx.

Create a new project

First, before running KDevelop, compile Mixxx. This is important because there are header files generated by the Qt meta object compiler (qt-moc) and Protobuf (protoc) that are #included by the .cpp files in Mixxx's src directory. If KDevelop can't find those, it won't be able to parse the structure of Mixxx.

In KDevelop, go to Project > Open/import project. Select the directory where the Mixxx source code is (not the “src” directory, the one above that; the root of the git repository). Press Next and select Custom BuildSystem in the Project manager dropdown. On the left side of KDevelop, click Projects. Right click on your project and select Open Configuration.

Configure SCons

In the Custom Build System pane, under the Build Tools section, type scons in the Executable field and add your scons arguments to the Arguments field (this should at least include your prefix argument). This will allow you to build Mixxx easily within KDevelop. Building within KDevelop allows you to click on compile errors and warnings to open the corresponding source code file at the place where the error/warning is pointing to.

Filter out redundant files

scons keeps a cached build for every Git branch in the cache directory. Telling KDevelop's indexer to scan this is a waste of time. So, in the Project Filter pane, click the Add button and type “cache”. Change the Target column to Folders instead of Files and Folders. If you are using multile Git worktrees, you may want to filter out those folders too.

Specify #include paths

Select the Language Support pane and click the Batch edit button to edit the list of #include paths. KDevelop normally detects the #include paths from the build system, but it is not able to do this with SCons. There are some paths that must be included in the Mixxx source tree; these must be absolute paths, not relative to the project root.

Copy and paste the list below into the Batch edit dialog, replacing [MIXXX LOCATION] with wherever you have your Mixxx source tree. The version numbers for the libraries in mixxx/lib are for those included with Mixxx 2.3. If they have been updated, please update this wiki page. The paths in /usr are for those on Fedora 29. They may need some adjustment for your distribution.

When you are done, click Apply. KDevelop will parse the entire Mixxx source tree. This could take quite a while first time. If your computer has < 8 GB of memory, make sure you have a swap partition or swap file enabled. The parser can take up to 1.5 GB of memory. If your system runs out of memory, it will hang in the middle of the scan until Linux kills the process.

[MIXXX LOCATION]/lib/benchmark/include
[MIXXX LOCATION]/lib/fidlib
[MIXXX LOCATION]/lib/gtest-1.7.0/include
[MIXXX LOCATION]/lib/gmock-1.7.0
[MIXXX LOCATION]/lib/gmock-1.7.0/gtest
[MIXXX LOCATION]/lib/gmock-1.7.0/gtest/include
[MIXXX LOCATION]/lib/gmock-1.7.0/include
[MIXXX LOCATION]/lib/gtest-1.7.0/include/gtest
[MIXXX LOCATION]/lib/hidapi-0.8.0-rc1/hidapi
[MIXXX LOCATION]/lib/libebur128/ebur128
[MIXXX LOCATION]/lib/portaudio
[MIXXX LOCATION]/lib/qtscript-bytearray
[MIXXX LOCATION]/lib/replaygain
[MIXXX LOCATION]/lib/reverb
[MIXXX LOCATION]/lib/soundtouch-2.0.0
[MIXXX LOCATION]/lib/xwax
[MIXXX LOCATION]/lin64_build
[MIXXX LOCATION]/src
[MIXXX LOCATION]/vamp-plugins
/usr/include
/usr/include/ffmpeg
/usr/include/glib-2.0
/usr/lib64/glib-2.0/include
/usr/include/taglib
/usr/include/libupower-glib
/usr/include/libusb-1.0
/usr/include/qt5
/usr/include/qt5/QtCore
/usr/include/qt5/QtDBus
/usr/include/qt5/QtDesigner
/usr/include/qt5/QtGui
/usr/include/qt5/QtHelp
/usr/include/qt5/QtMultimedia
/usr/include/qt5/QtNetwork
/usr/include/qt5/QtOpenGL
/usr/include/qt5/QtQml
/usr/include/qt5/QtScript
/usr/include/qt5/QtScriptTools
/usr/include/qt5/QtSql
/usr/include/qt5/QtSvg
/usr/include/qt5/QtXml
/usr/include/qt5/QtTest
/usr/include/qt5/QtUiTools
/usr/include/qt5/QtWebKit
/usr/include/qt5/QtWidgets
/usr/include/qt5/QtXmlPatterns
/usr/lib/scons/SCons
Translations of this page:
kdevelop.txt · Last modified: 2019/02/02 10:11 by be.ing