Qtractor Wiki How To - 1 Compile Qtractor


How To - Contents

Introduction

What is compile?

Compiling is the process of translating human-readable source code into binary code readable by your hardware.

Go from having text files to an executable.

It is the way to install a program directly from its source code.

An installer file (.deb for example) works differently. Install previously compiled binary files. Distribute and configure executables on your operating system.

Advantages

Optimized executable: By compiling we ensure that the machine code is generated for our specific hardware, and not generic hardware. This should theoretically improve the efficiency of the program, although in practice I have not noticed any differences.

Have the latest version: If an installer with the latest version is not found in the repositories of our distribution, compiling allows us to install it.

Test new features: This way we can experience functionalities in development that are not yet in the official version.

Personalize: By having the source code, we can customize Qtractor before compiling: Our own icons, menus, functions, etc. The possibilities are endless.

Dependencies

There are two types of dependencies:

Git

The official Qtractor repository is located on sf.net, and it works with git.

Git is a version management system. It allows us to do things like:

Compile

Install binary libraries

We will use as an example the Debian command “sudo apt install”. If your Linux is not based on Debian, you will have to adapt it to the order of your distribution.

The name of the libraries may vary between distributions.

If you work with kxstudio repositories, temporarily disable them before executing the command. The version of “lv2-dev” in this repository may create conflicts.

Update repositories

From the terminal:

sudo apt update

Install binary dependencies

If you are compiling Qtractor under a Debian or Ubuntu-based distro you can install all the required build dependencies with one command by running:

sudo apt-get build-dep qtractor

If it doesn’t work for you, try:

sudo apt install qt6-base-dev qt6-base-dev-tools qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools qt6-svg-dev libqt6svg6-dev libjack-dev libjack-jackd2-dev libasound2-dev libsndfile-dev libvorbis-dev libmad0-dev libz-dev libsamplerate-dev librubberband-dev libfftw3-dev libaubio-dev ladspa-sdk dssi-dev liblo-dev lv2-dev liblilv-dev libsratom-dev libsord-dev libserd-dev libgtk2.0-dev libgtkmm-2.4-dev

Download source code from official Git

git clone --recursive https://git.code.sf.net/p/qtractor/code qtractor-git

The “–recursive” subcommand allows you to resolve source code dependencies. In this case for the CLAP and VST3 plugins. Git is thus responsible for attaching a copy from the repositories of these external projects.

Enter in the generated folder:

cd qtractor-git

Build the binary

Collect all the files and check if everything is in order

cmake -B build

Build

cmake --build build

If everything went well, you now have a functional executable. However it will not communicate well with the operating system. For example, it will show the interface in English, even if your Linux is configured in another language.

The executable can be found in the folder:

qtractor-git/build/src/qtractor

If you execute the previous line in the console you will see that qtractor opens and works correctly.

Install

Maybe you want to install it to enjoy Qtractor in your language.

sudo cmake --install build

By default it will be installed in:

/usr/local

Install to custom destination

If you want to install Qtractor in another destination you must modify the cmake:

cmake -DCMAKE_INSTALL_PREFIX=YourDestinationPath -B build

cmake --build build

sudo cmake --install build