kde-builder
Build KDE software from source code
TLDR
Initialize kde-builder
Compile a KDE component and its dependencies from the source (use workspace to compile Plasma desktop)
Compile a component without updating its local code and without compiling its dependencies
Refresh the build directories before compiling
Resume compilation from a specific dependency
Run a component with a specified executable name
Install login session
Use system libraries in place of a component if it fails to build
SYNOPSIS
kde-builder [options] [projects...]
PARAMETERS
--build <projects|all>
Builds specified projects or all configured projects.
--update
Updates source repositories for all configured projects.
--status
Shows the current build status of projects (e.g., checked out, built).
--list
Lists all known projects that kde-builder can manage.
--clean <projects|all>
Cleans the build directories of specified projects or all projects.
--reconfigure <projects|all>
Reconfigures specified projects or all projects without recompiling.
--prefix <path>
Specifies the installation prefix (where software will be installed).
--source-dir <path>
Specifies the directory where source code will be cloned.
--build-dir <path>
Specifies the directory where build artifacts will be created.
--install-dir <path>
Specifies the directory for final installation (alternative to --prefix, often for temporary installs).
--branch <branch_name>
Specifies the Git branch to use for all projects.
--enable-debug
Enables debug symbols in the build, useful for developers.
--disable-tests
Disables building of tests to speed up compilation.
--jobs <N>
Uses N parallel compilation jobs.
--config-file <file>
Specifies an alternative configuration file.
DESCRIPTION
kde-builder is a powerful command-line utility designed to simplify the complex process of compiling KDE software from its source code. It automates fetching the latest source from Git repositories, managing build dependencies, configuring projects with CMake, compiling, and installing them. This tool is invaluable for KDE developers, testers, and users who wish to run the bleeding-edge development versions of KDE applications and frameworks, or contribute to KDE's development.
It provides features like parallel builds, updating existing source trees, cleaning build directories, and managing different branches and build types (e.g., debug or release builds). By abstracting away the manual steps of git clone, cmake, make, and make install for numerous KDE projects, kde-builder significantly reduces the effort and potential errors associated with building large software collections like KDE Plasma and its applications.
CAVEATS
Building KDE from source using kde-builder can be a resource-intensive process. It requires a significant amount of disk space (tens of gigabytes), a powerful CPU, and a considerable amount of RAM. Compilation times can be very long, ranging from several hours to a full day, depending on hardware specifications and the number of projects being built. Users must also ensure that all necessary build tools and development libraries are installed on their system before initiating a build. Incorrect configurations or missing dependencies can lead to build failures.
<B>CONFIGURATION FILE</B>
kde-builder heavily relies on a configuration file, typically located at ~/.config/kde-builderrc. This file defines the list of projects to build, their Git repositories, build options, and installation paths. Users can customize this file to include or exclude specific projects, specify custom branches, or override default build settings. This centralized configuration makes it easy to manage a complex build environment.
<B>BUILD ORDER MANAGEMENT</B>
One of the key features of kde-builder is its intelligent dependency resolution and build order management. It understands the interdependencies between various KDE projects (e.g., KDE Frameworks components, Plasma, applications) and ensures that projects are built in the correct order to satisfy all requirements, preventing common compilation errors related to missing libraries or headers.
HISTORY
kde-builder emerged as an essential tool to simplify the developer workflow for KDE, especially as the project grew in complexity and moved to more decentralized version control systems like Git. It streamlined the process that previously involved manually cloning numerous repositories, managing build order, and configuring each project individually. Its development has mirrored the evolution of KDE's build infrastructure, adapting to changes from older build systems to CMake and more recently, supporting the modular structure of KDE Frameworks and Plasma 5/6. It has been a cornerstone for daily development builds and continuous integration within the KDE community for many years.