DarkRadiant - Compiling in Linux: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
 
(110 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Install Libraries and Tools ==
== Install Required Packages ==


=== Ubuntu 7.04 ===
=== Ubuntu 22.10 and later ===


You'll need a bunch of packages to get DarkRadiant to compile without glitches. I can't remember all from the top of my head, I will try to complete this list during my next Linux setup, but don't hold your breath. These are the names as found in Ubuntu 7.04 (Feisty Fawn):
Copy and paste the following into a terminal:
 
sudo apt-get install git g++ gettext cmake pkg-config libxml2-dev libsigc++-2.0-dev libftgl-dev libglew-dev libjpeg-dev
sudo apt-get install libalut-dev libvorbis-dev libwxgtk3.2-dev libglib2.0-dev libeigen3-dev python3-dev libgtest-dev libgit2-dev
 
=== Ubuntu 20.04 to 22.04 ===
 
Copy and paste the following into a terminal:
 
sudo apt-get install git g++ gettext cmake pkg-config zlib1g-dev libjpeg-dev libxml2-dev libsigc++-2.0-dev libgtest-dev libeigen3-dev
sudo apt-get install libwxgtk3.0-gtk3-dev libpng-dev libftgl-dev libglew-dev libalut-dev libvorbis-dev python3-dev libgit2-dev
 
=== openSUSE Tumbleweed ===


* g++
Copy and paste the following into a terminal:
* gcc-4.1
* libboost-dev
* libboost-serialization-dev
* libboost-filesystem-dev
* libboost-regex-dev
* libglew-dev
* libgtk2.0-dev
* libglib2.0-dev (maybe installed with libgtk2.0-dev)
* libgtkglext1-dev
* libxml2-dev
* libopenal-dev
* libalut-dev
* libvorbis-dev
* libboost-python-dev (for the optional scripting plugin)
* python-dev (for the optional scripting plugin)


Always download all the dependencies as well.
sudo zypper install git cmake gcc-c++ gettext-tools zlib-devel libjpeg62-devel libxml2-devel libsigc++2-devel gtest
sudo zypper install wxWidgets-3_0-devel ftgl-devel glew-devel libvorbis-devel freealut-devel python38-devel


If you get an error about the G++ compiler not being found, make sure you also install the <code>g++</code> package, and not just the <code>g++-4.1</code> package.
=== Mageia 8 ===


=== Ubuntu 7.10 ===
Copy and paste the following into a terminal, run as user who has the required permissions to install the packages:
* g++
* libboost-dev
* libboost-regex-dev
* libgtk2.0-dev
* libglew1.4-dev
* libgtkglext1-dev
* libxml2-dev
* libboost-serialization-dev
* libboost-filesystem-dev
* libboost-date-time-dev
* libalut-dev
* libvorbis-dev
* libboost-python-dev (for the optional scripting plugin)
* python-dev (for the optional scripting plugin)


Always download all the dependencies as well.
sudo urpmi git cmake make gcc-c++ libzlib-devel libjpeg-devel libwxgtku3.0-devel libsigc++2.0-devel
sudo urpmi libftgl-devel libglew-devel libpython3-devel libopenal-devel libfreealut-devel libvorbis-devel lib64gtest-devel


For the D3Hook plugin, the boost/asio library is needed (version 0.3.7, newer versions don't work). This library is located in the plugins/dm.d3hook/boost/ folder and should be ready for compilation.
=== Debian 10 ===


=== Ubuntu 8.04 ===
Copy and paste the following into a terminal:
Copy and paste the following into a terminal:


<code>sudo apt-get install g++ libboost-dev libboost-regex-dev libgtk2.0-dev libglew1.5-dev libgtkglext1-dev libxml2-dev libboost-serialization-dev libboost-filesystem-dev libboost-date-time-dev libalut-dev libvorbis-dev libboost-python-dev python-dev</code>
sudo apt-get install git cmake pkg-config gettext zlib1g-dev libjpeg-dev libwxgtk3.0-dev libgtest-dev libeigen3-dev libgit2-dev
sudo apt-get install libxml2-dev libsigc++-2.0-dev libpng-dev libftgl-dev libglew-dev libalut-dev libvorbis-dev python3-dev
 
=== Fedora 26 / 25 ===
Copy and paste the following into a terminal:
 
sudo dnf install git automake libtool gcc-c++ zlib-devel libjpeg-turbo-devel wxGTK3-devel libxml2-devel libsigc++20-devel
sudo dnf install libpng12-devel ftgl-devel glew-devel libvorbis-devel freealut-devel python-devel pybind11-devel
 
Note that the wxGTK package does not yet support Wayland environments, which is the default since Fedora 25 (DarkRadiant will just segfault during startup). You'll need to [https://fedoraproject.org/wiki/Changes/WaylandByDefault deactivate it] for the moment being.
 
=== Arch Linux ===
The following packages are required after starting from an Anarchy installation using Gnome as Window Manager.
 
sudo pacman -S cmake wxgtk3 ftgl glew freealut libvorbis python libsigc++ eigen
 
=== Manjaro ===
The following packages are required:
sudo pacman -S cmake base-devel wxgtk3 ftgl glew freealut libvorbis python libsigc++ eigen
 
=== CentOS 7 x64 ===
 
Copy and paste the following into a terminal, run as user who has the required permissions to install the packages:
 
sudo yum -y install gcc gcc-c++ git automake libtool zlib-devel libjpeg-turbo-devel wxGTK3-devel libxml2-devel
sudo yum -y install libsigc++20-devel ftgl-devel glew-devel boost-devel openal-soft-devel freealut-devel libvorbis-devel python-devel
 
CentOS 7 ships with an older compiler, so you'll need to install a more recent GCC first (following the directions on [https://stackoverflow.com/questions/36327805/how-to-install-gcc-5-3-with-yum-on-centos-7-2 stackoverflow]):
 
sudo yum install centos-release-scl
sudo yum install devtoolset-4-gcc*
scl enable devtoolset-4 bash
 
Note that the <tt>wxGTK3-devel</tt> package doesn't create a <tt>wx-config</tt> symlink in the <tt>/usr/bin</tt> directory, that's why you need to pass an additional <tt>--with-wx-config=/usr/bin/wx-config-3.0</tt> argument to the ./configure script below, like this:


The python headers are needed for the optional scripting plugin.
./configure --enable-darkmod-plugins --with-wx-config=/usr/bin/wx-config-3.0


In the terminal, Ctrl Shift V is used for pasting instead of Ctrl V.
=== Slackware 14.2 ===


=== Ubuntu 8.10 ===
Slackware doesn't provide precompiled packages on the one hand (unlike Debian or Arch), but already ships with a lot of libraries on the other. Stuff like git, automake, libtools and development libraries like zlib and boost are already present, but wxWidgets, openAL, ALut and FTGL need to be installed by means of a SlackBuild script. The following has been done in Slackware 14.2, so your mileage may vary.
Copy and paste the following into a terminal:


<code>sudo apt-get install g++ libboost-dev libboost-regex-dev libgtk2.0-dev libglew1.5-dev libgtkglext1-dev libxml2-dev libboost-filesystem-dev libboost-serialization-dev libboost-date-time-dev libjpeg62-dev libalut-dev libvorbis-dev libboost-python-dev python-dev</code>
Download the Source tarballs and the SlackBuild packages from these URLs:


The python headers are needed for the optional scripting plugin.
* https://slackbuilds.org/repository/14.2/libraries/wxGTK3/
* https://slackbuilds.org/repository/14.2/libraries/ftgl/
* https://slackbuilds.org/repository/14.2/libraries/OpenAL/
* https://slackbuilds.org/repository/14.2/libraries/freealut/


In the terminal, Ctrl Shift V is used for pasting instead of Ctrl V.
Download and extract the SlackBuild <tt>.tar.gz</tt> files in your <tt>~/Downloads</tt> folder (or anywhere else where you want to have them). For instance, the wxGTK3 package can be untar'd like this:


=== Ubuntu 9.10 ===
tar xzf wxGTK3.tar.gz
Copy and paste the following into a terminal:
cd wxGTK3
chmod +x wxGTK3.SlackBuild


<code>sudo apt-get install g++ libboost1.38-dev libgtk2.0-dev libglew1.5-dev libgtkglext1-dev libxml2-dev libalut-dev libvorbis-dev libboost-python-dev python-dev libgtksourceview2.0-dev</code>
Do this for all of the above libraries, that should give you the directories <tt>ftgl/</tt>, <tt>OpenAL/</tt>, <tt>wxGTK3/</tt> and <tt>freealut/</tt>. Next, download the Source Tarballs (the <tt>.tar.bz2</tt>) files from the links above and place them next to the corresponding SlackBuild script. Then run the scripts for each of them and install the build output in your system in a second step:


The python headers are needed for the optional scripting plugin.
./wxGTK3.SlackBuild


Adjust the configure.ac file, as Ubuntu 9.10 appends the postfix -mt for each boost library installed in /usr/lib:
This produced (on my end at least) the package <tt>/tmp/wxGTK3-3.0.2-i486-2_SBo.tgz</tt> which can be installed by the <tt>installpkg</tt> command:
boost_regex => boost_regex-mt
boost_filesystem => boost_filesystem-mt
boost_system => boost_system-mt
boost_python => boost_python-mt


  # Boost.Regex
  installpkg /tmp/wxGTK3-3.0.2-i486-2_SBo.tgz
AC_CHECK_LIB([boost_regex-mt], [main],
              [REGEX_LIBS='-lboost_regex-mt'],
              [AC_MSG_ERROR([Boost.Regex not found])])
AC_SUBST([REGEX_LIBS])
# Boost.Filesystem
AC_CHECK_LIB([boost_filesystem-mt], [main],
              [BOOST_FILESYSTEM_LIBS='-lboost_filesystem-mt'],
              [AC_MSG_ERROR([Boost.Filesystem not found])])
AC_SUBST([BOOST_FILESYSTEM_LIBS])
# Boost.System
AC_CHECK_LIB([boost_system-mt], [main],
              [BOOST_SYSTEM_LIBS='-lboost_system-mt'],
              [AC_MSG_ERROR([Boost.System not found])])
AC_SUBST([BOOST_SYSTEM_LIBS])


Same for the Python check below in configure.ac:
Do the same for the rest of the libraries (ftgl, OpenAL, freealut). Be aware that the freealut package depends on the OpenAL package, so you need to do the OpenAL one first. Once you have these installed, you can proceed to the build section (<tt>git clone</tt> and <tt>configure</tt> and <tt>make</tt>).
AC_CHECK_LIB([boost_python-mt], [main],
                [BOOST_PYTHON_LIBS='-lboost_python-mt'],
                [script_module=''])
Then re-run ./autogen.sh and ./configure


=== Ubuntu 10.10 ===
=== Gentoo ===
Copy and paste the following into a terminal:


<code>sudo apt-get install automake libtool g++ libgtkmm-2.4-dev libjpeg62-dev libgtkglextmm-x11-1.2-dev libxml2-dev libglew1.5-dev libboost-dev libboost-regex-dev libboost-filesystem-dev libboost-python-dev libalut-dev libvorbis-dev libgtksourceviewmm-2.0-dev</code>
DarkRadiant can be built and installed from an unofficial ebuild repository (overlay). The easiest way to do this is with [https://packages.gentoo.org/packages/app-portage/layman app-portage/layman], which must be installed with the <tt>git</tt> use flag.


The python and the gtksourceviewmm headers are needed for the optional scripting plugin. The alut and vorbis headers are used by the optional sound module.
In the 'overlays' section in <tt>/etc/layman/layman.cfg</tt>, add:


=== Ubuntu 11.10 ===
https://raw.githubusercontent.com/varingst/varingst-overlay/master/overlay.xml
Copy and paste the following into a terminal (at least that's what worked in the beta2):


<code>sudo apt-get install automake libtool g++ zlib1g-dev libjpeg62-dev libxml2-dev libgtkmm-2.4-dev libglew1.6-dev libalut-dev libvorbis-dev libboost-dev libboost-regex-dev libboost-filesystem-dev libboost-python-dev libgtksourceviewmm-2.0-dev libgtkglextmm-x11-1.2-dev</code>
Then fetch and add the overlay:


The python and the gtksourceviewmm headers are needed for the optional scripting plugin. The alut and vorbis headers are used by the optional sound module.
# layman -f -a varingst


=== Fedora 10 ===
Now that the overlay is added, you can build and install DarkRadiant with Portage:
The Duke has posted a how-to in his blog at http://realduke.wordpress.com/2008/07/28/darkradiant-under-fedora-10/. I might quote the relevant parts about the needed packages:


To compile DarkRadiant under Fedora 10, we’ll need the folowing tools and libraries installed:
  # emerge darkradiant
  “subversion”(svn), “gcc”, “gcc-c++” (g++)
“boost-devel”, “gtk2-devel”, “glew-devel”, “gtkglext-devel”, “libxml2-devel”, “freealut-devel” and “libvorbis-devel”
For <tt>yum</tt> users, just copy and execute this:
“yum -y install subversion gcc gcc-c++ boost-devel gtk2-devel glew-devel gtkglext-devel libxml2-devel freealut-devel libvorbis-devel”


For the optional scripting plugin, you'll need the python and boost::python headers as well (note: I can't really check if these are correct, I don't have Fedora available --greebo):
To sync the overlay, either do it manually with layman:
libboost-python-devel python-devel


== Obtain the source ==
# layman -s varingst


Install the subversion client. On Ubuntu this can be done via the Synaptic Manager or the command line:
Or look into the [https://wiki.gentoo.org/wiki/Project:Portage/Sync various ways to hook into the portage sync system].
sudo apt-get install subversion


Change to the directory where you want the source code to be in and then check the current version out of SVN with:
=== Building with a non-default g++ Compiler ===
DarkRadiant's codebase makes use of C++17 features, in particular std::filesystem. Not all distributions ship with a compatible g++ compiler by default, but it's possible to install a more recent compiler suite. Get the compiler package and ensure that the makefiles are called with the correct setup, e.g.
CXX="g++-5.1" cmake . && make && make install


svn checkout https://darkradiant.svn.sourceforge.net/svnroot/darkradiant/trunk/darkradiant/ darkradiant
=== Older Distributions / Compiling DarkRadiant 1.8 and older ===
The instructions about how to compile DR 1.8 (based on GTK) in distributions published in 2012 and older have been removed. They should still be in the [http://wiki.thedarkmod.com/index.php?title=DarkRadiant_-_Compiling_in_Linux&oldid=18927 history] of this page, should they ever be needed.


== Compile ==
== Obtain the source ==


'''Note: in the past, DarkRadiant was built using SCons. This build system has now been removed in favour of the standard Automake build.'''
Make sure you have the git client installed, this is covered in the package installation commands above.
Next, change to the directory where you want the source code to be in and then clone the Git repository with:


First, make sure you have the automake toolchain downloaded:
git clone https://github.com/codereader/DarkRadiant.git
sudo apt-get install libtool autoconf
Then run
./autogen.sh
in your darkradiant folder.


DarkRadiant employs an Autoconf/Automake build system under Linux as used in the majority of open-source projects. Compilation can be achieved using the standard
Once the initial clone is done, the source can be updated to the latest version from inside the working directory with:


  $ ./configure
  git pull
$ make
$ make install


on most systems.
== Configure and Compile ==
DarkRadiant employs the CMake build system under Linux as used in many open-source projects. Make sure you have the CMake toolchain downloaded, this is covered in the package installation commands above.


By default, a release build will be created; if a debug build is required pass the '''--enable-debug''' option to the configure script.
To build DarkRadiant, run the typical chain of CMake and make commands:


Other points to note about the configure process:
cmake .
make
[sudo] make install


* The DarkMod-specific plugins are not built by default. To enable these, pass '''--enable-darkmod-plugins''' to ./configure.
By the above, a release build will be created; if a debug build is required pass the <tt>-DCMAKE_BUILD_TYPE=Debug</tt> option to the cmake command script.
* The configure script autodetects required dependencies, and will conditionally-enable optional components of DarkRadiant (such as the sound plugin) based on what it finds.
* For quick testing of a DarkRadiant build, it is desirable to install it into a temporary location rather than the default of '''/usr/local'''; for this, simply pass a prefix option such as '''--prefix=/tmp/dr''' to configure, after which DarkRadiant will be installed in '''/tmp/dr/bin/darkradiant'''.


If you want to update the source with the latest version from the SVN, just issue:
Other points to note about the configure process:


svn update
* The DarkMod-specific plugins are built by default, the <tt>-DENABLE_DM_PLUGINS=OFF</tt> argument will disable them.
in the darkradiant source directory. <code>svn info</code> shows you what version you currently have.
* The CMake script autodetects required dependencies, and will conditionally enable optional components of DarkRadiant (such as the sound plugin) based on what it finds.
* For quick testing of a DarkRadiant build, it is desirable to install it into a temporary location rather than the default of <tt>/usr/local</tt>; for this, simply pass a prefix option such as <tt>-DCMAKE_INSTALL_PREFIX=/tmp/dr</tt> to cmake, after which DarkRadiant will be installed in <tt>/tmp/dr/bin/darkradiant</tt>.


=== Multiprocessor Systems ===
=== Multiprocessor Systems ===
You can pass the --jobs=N parameter to make:
 
You can pass the <tt>--jobs=N</tt> parameter to make:
  make --jobs=2
  make --jobs=2
to use more than one processor for the compilation.
to use more than one processor for the compilation. This will eat lots of RAM, so don't do this on machines with little available memory.


=== Building a .deb package ===
=== Building a .deb package ===
Line 178: Line 166:
  dpkg-buildpackage -rfakeroot
  dpkg-buildpackage -rfakeroot


in the main '''darkradiant''' directory. The .deb will be created in the parent directory.
in the main <tt>darkradiant</tt> directory. The .deb will be created in the parent directory.
 
== See also ==
* [[DarkRadiant Linux Issues]]


{{coding}}
{{coding}}
{{darkradiant|sort=Compilation}}
{{darkradiant|sort=Compilation}}

Latest revision as of 09:50, 13 January 2024

Install Required Packages

Ubuntu 22.10 and later

Copy and paste the following into a terminal:

sudo apt-get install git g++ gettext cmake pkg-config libxml2-dev libsigc++-2.0-dev libftgl-dev libglew-dev libjpeg-dev
sudo apt-get install libalut-dev libvorbis-dev libwxgtk3.2-dev libglib2.0-dev libeigen3-dev python3-dev libgtest-dev libgit2-dev

Ubuntu 20.04 to 22.04

Copy and paste the following into a terminal:

sudo apt-get install git g++ gettext cmake pkg-config zlib1g-dev libjpeg-dev libxml2-dev libsigc++-2.0-dev libgtest-dev libeigen3-dev
sudo apt-get install libwxgtk3.0-gtk3-dev libpng-dev libftgl-dev libglew-dev libalut-dev libvorbis-dev python3-dev libgit2-dev

openSUSE Tumbleweed

Copy and paste the following into a terminal:

sudo zypper install git cmake gcc-c++ gettext-tools zlib-devel libjpeg62-devel libxml2-devel libsigc++2-devel gtest
sudo zypper install wxWidgets-3_0-devel ftgl-devel glew-devel libvorbis-devel freealut-devel python38-devel

Mageia 8

Copy and paste the following into a terminal, run as user who has the required permissions to install the packages:

sudo urpmi git cmake make gcc-c++ libzlib-devel libjpeg-devel libwxgtku3.0-devel libsigc++2.0-devel 
sudo urpmi libftgl-devel libglew-devel libpython3-devel libopenal-devel libfreealut-devel libvorbis-devel lib64gtest-devel

Debian 10

Copy and paste the following into a terminal:

sudo apt-get install git cmake pkg-config gettext zlib1g-dev libjpeg-dev libwxgtk3.0-dev libgtest-dev libeigen3-dev libgit2-dev
sudo apt-get install libxml2-dev libsigc++-2.0-dev libpng-dev libftgl-dev libglew-dev libalut-dev libvorbis-dev python3-dev

Fedora 26 / 25

Copy and paste the following into a terminal:

sudo dnf install git automake libtool gcc-c++ zlib-devel libjpeg-turbo-devel wxGTK3-devel libxml2-devel libsigc++20-devel 
sudo dnf install libpng12-devel ftgl-devel glew-devel libvorbis-devel freealut-devel python-devel pybind11-devel

Note that the wxGTK package does not yet support Wayland environments, which is the default since Fedora 25 (DarkRadiant will just segfault during startup). You'll need to deactivate it for the moment being.

Arch Linux

The following packages are required after starting from an Anarchy installation using Gnome as Window Manager.

sudo pacman -S cmake wxgtk3 ftgl glew freealut libvorbis python libsigc++ eigen

Manjaro

The following packages are required:

sudo pacman -S cmake base-devel wxgtk3 ftgl glew freealut libvorbis python libsigc++ eigen

CentOS 7 x64

Copy and paste the following into a terminal, run as user who has the required permissions to install the packages:

sudo yum -y install gcc gcc-c++ git automake libtool zlib-devel libjpeg-turbo-devel wxGTK3-devel libxml2-devel 
sudo yum -y install libsigc++20-devel ftgl-devel glew-devel boost-devel openal-soft-devel freealut-devel libvorbis-devel python-devel

CentOS 7 ships with an older compiler, so you'll need to install a more recent GCC first (following the directions on stackoverflow):

sudo yum install centos-release-scl 
sudo yum install devtoolset-4-gcc*
scl enable devtoolset-4 bash

Note that the wxGTK3-devel package doesn't create a wx-config symlink in the /usr/bin directory, that's why you need to pass an additional --with-wx-config=/usr/bin/wx-config-3.0 argument to the ./configure script below, like this:

./configure --enable-darkmod-plugins --with-wx-config=/usr/bin/wx-config-3.0

Slackware 14.2

Slackware doesn't provide precompiled packages on the one hand (unlike Debian or Arch), but already ships with a lot of libraries on the other. Stuff like git, automake, libtools and development libraries like zlib and boost are already present, but wxWidgets, openAL, ALut and FTGL need to be installed by means of a SlackBuild script. The following has been done in Slackware 14.2, so your mileage may vary.

Download the Source tarballs and the SlackBuild packages from these URLs:

Download and extract the SlackBuild .tar.gz files in your ~/Downloads folder (or anywhere else where you want to have them). For instance, the wxGTK3 package can be untar'd like this:

tar xzf wxGTK3.tar.gz
cd wxGTK3
chmod +x wxGTK3.SlackBuild

Do this for all of the above libraries, that should give you the directories ftgl/, OpenAL/, wxGTK3/ and freealut/. Next, download the Source Tarballs (the .tar.bz2) files from the links above and place them next to the corresponding SlackBuild script. Then run the scripts for each of them and install the build output in your system in a second step:

./wxGTK3.SlackBuild

This produced (on my end at least) the package /tmp/wxGTK3-3.0.2-i486-2_SBo.tgz which can be installed by the installpkg command:

installpkg /tmp/wxGTK3-3.0.2-i486-2_SBo.tgz

Do the same for the rest of the libraries (ftgl, OpenAL, freealut). Be aware that the freealut package depends on the OpenAL package, so you need to do the OpenAL one first. Once you have these installed, you can proceed to the build section (git clone and configure and make).

Gentoo

DarkRadiant can be built and installed from an unofficial ebuild repository (overlay). The easiest way to do this is with app-portage/layman, which must be installed with the git use flag.

In the 'overlays' section in /etc/layman/layman.cfg, add:

https://raw.githubusercontent.com/varingst/varingst-overlay/master/overlay.xml

Then fetch and add the overlay:

# layman -f -a varingst

Now that the overlay is added, you can build and install DarkRadiant with Portage:

# emerge darkradiant

To sync the overlay, either do it manually with layman:

# layman -s varingst

Or look into the various ways to hook into the portage sync system.

Building with a non-default g++ Compiler

DarkRadiant's codebase makes use of C++17 features, in particular std::filesystem. Not all distributions ship with a compatible g++ compiler by default, but it's possible to install a more recent compiler suite. Get the compiler package and ensure that the makefiles are called with the correct setup, e.g.

CXX="g++-5.1" cmake . && make && make install

Older Distributions / Compiling DarkRadiant 1.8 and older

The instructions about how to compile DR 1.8 (based on GTK) in distributions published in 2012 and older have been removed. They should still be in the history of this page, should they ever be needed.

Obtain the source

Make sure you have the git client installed, this is covered in the package installation commands above. Next, change to the directory where you want the source code to be in and then clone the Git repository with:

git clone https://github.com/codereader/DarkRadiant.git

Once the initial clone is done, the source can be updated to the latest version from inside the working directory with:

git pull

Configure and Compile

DarkRadiant employs the CMake build system under Linux as used in many open-source projects. Make sure you have the CMake toolchain downloaded, this is covered in the package installation commands above.

To build DarkRadiant, run the typical chain of CMake and make commands:

cmake .
make
[sudo] make install

By the above, a release build will be created; if a debug build is required pass the -DCMAKE_BUILD_TYPE=Debug option to the cmake command script.

Other points to note about the configure process:

  • The DarkMod-specific plugins are built by default, the -DENABLE_DM_PLUGINS=OFF argument will disable them.
  • The CMake script autodetects required dependencies, and will conditionally enable optional components of DarkRadiant (such as the sound plugin) based on what it finds.
  • For quick testing of a DarkRadiant build, it is desirable to install it into a temporary location rather than the default of /usr/local; for this, simply pass a prefix option such as -DCMAKE_INSTALL_PREFIX=/tmp/dr to cmake, after which DarkRadiant will be installed in /tmp/dr/bin/darkradiant.

Multiprocessor Systems

You can pass the --jobs=N parameter to make:

make --jobs=2

to use more than one processor for the compilation. This will eat lots of RAM, so don't do this on machines with little available memory.

Building a .deb package

To build a Debian/Ubuntu package, simply run

dpkg-buildpackage -rfakeroot

in the main darkradiant directory. The .deb will be created in the parent directory.