DarkRadiant - Compiling in Linux: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
(Formatting)
Line 5: Line 5:
Copy and paste the following into a terminal:
Copy and paste the following into a terminal:


<code>sudo apt-get install git automake libtool pkg-config zlib1g-dev libjpeg62-dev libwxgtk3.0-dev libxml2-dev libsigc++-2.0-dev libpng-dev libftgl-dev libglew-dev libboost-dev libboost-regex-dev libboost-filesystem-dev libboost-python-dev libboost-test-dev libalut-dev libvorbis-dev</code>
sudo apt-get install git automake libtool pkg-config zlib1g-dev libjpeg62-dev libwxgtk3.0-dev libxml2-dev  
sudo apt-get install libsigc++-2.0-dev libpng-dev libftgl-dev libglew-dev libboost-dev libboost-regex-dev  
sudo apt-get install libboost-filesystem-dev libboost-python-dev libboost-test-dev libalut-dev libvorbis-dev


=== Fedora 25 ===
=== Fedora 25 ===
Copy and paste the following into a terminal:
Copy and paste the following into a terminal:


<code>sudo dnf install git automake libtool gcc-c++ zlib-devel libjpeg-turbo-devel wxGTK3-devel libxml2-devel libsigc++20-devel ftgl-devel glew-devel boost-devel libvorbis-devel freealut-devel python-devel</code>
sudo dnf install git automake libtool gcc-c++ zlib-devel libjpeg-turbo-devel wxGTK3-devel libxml2-devel  
sudo dnf install libsigc++20-devel ftgl-devel glew-devel boost-devel libvorbis-devel freealut-devel python-devel


=== Arch Linux ===
=== Arch Linux ===
The following packages are requred after starting from an Arch-Anywhere installation using Gnome as Window Manager. This is based on a system that has the '''base-devel''' package configuration:
The following packages are requred after starting from an Arch-Anywhere installation using Gnome as Window Manager. This is based on a system that has the '''base-devel''' package configuration:


<code>sudo pacman -S automake libtool wxgtk ftgl glew boost boost-libs freealut webkitgtk2</code>
sudo pacman -S automake libtool wxgtk ftgl glew boost boost-libs freealut webkitgtk2


=== openSUSE 42.2 ===
=== openSUSE 42.2 ===


<code>sudo zypper install git make libtool automake gcc-c++ zlib-devel libjpeg62-devel wxWidgets-3_0-devel libxml2-devel libsigc++2-devel ftgl-devel glew-devel boost-devel python-devel libvorbis-devel freealut-devel</code>
sudo zypper install git make libtool automake gcc-c++ zlib-devel libjpeg62-devel wxWidgets-3_0-devel  
sudo zypper install libxml2-devel libsigc++2-devel ftgl-devel glew-devel boost-devel python-devel libvorbis-devel freealut-devel


=== Ubuntu 15.10 x64 / Kubuntu 16.04 x64 ===
=== Ubuntu 15.10 x64 / Kubuntu 16.04 x64 ===
Line 25: Line 29:
Copy and paste the following into a terminal:
Copy and paste the following into a terminal:


<code>sudo apt-get install git automake libtool pkg-config zlib1g-dev libjpeg62-dev libwxgtk3.0-dev libxml2-dev libsigc++-2.0-dev libpng12-dev libftgl-dev libglew-dev libboost-dev libboost-regex-dev libboost-filesystem-dev libboost-python-dev libboost-test-dev libalut-dev libvorbis-dev</code>
sudo apt-get install git automake libtool pkg-config zlib1g-dev libjpeg62-dev libwxgtk3.0-dev libxml2-dev  
sudo apt-get install libsigc++-2.0-dev libpng12-dev libftgl-dev libglew-dev libboost-dev libboost-regex-dev  
sudo apt-get install libboost-filesystem-dev libboost-python-dev libboost-test-dev libalut-dev libvorbis-dev


=== Debian 8.2 ===
=== Debian 8.2 ===
Line 31: Line 37:
The same instructions as for Ubuntu 15.10 should work, but instead use this command line to install the dependencies (the libjpeg package is named differently):
The same instructions as for Ubuntu 15.10 should work, but instead use this command line to install the dependencies (the libjpeg package is named differently):


<code>sudo apt-get install git automake libtool pkg-config zlib1g-dev libjpeg62-turbo-dev libwxgtk3.0-dev libxml2-dev libsigc++-2.0-dev libpng12-dev libftgl-dev libglew-dev libboost-dev libboost-regex-dev libboost-filesystem-dev libboost-python-dev libboost-test-dev libalut-dev libvorbis-dev</code>
sudo apt-get install git automake libtool pkg-config zlib1g-dev libjpeg62-turbo-dev libwxgtk3.0-dev libxml2-dev  
sudo apt-get install libsigc++-2.0-dev libpng12-dev libftgl-dev libglew-dev libboost-dev libboost-regex-dev  
sudo apt-get install libboost-filesystem-dev libboost-python-dev libboost-test-dev libalut-dev libvorbis-dev</code>


=== Older Distributions / Compiling DarkRadiant 1.8 and older ===
=== Older Distributions / Compiling DarkRadiant 1.8 and older ===

Revision as of 17:21, 29 December 2016

Install Required Packages

Ubuntu 16.10 x64

Copy and paste the following into a terminal:

sudo apt-get install git automake libtool pkg-config zlib1g-dev libjpeg62-dev libwxgtk3.0-dev libxml2-dev 
sudo apt-get install libsigc++-2.0-dev libpng-dev libftgl-dev libglew-dev libboost-dev libboost-regex-dev 
sudo apt-get install libboost-filesystem-dev libboost-python-dev libboost-test-dev libalut-dev libvorbis-dev

Fedora 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 
sudo dnf install libsigc++20-devel ftgl-devel glew-devel boost-devel libvorbis-devel freealut-devel python-devel

Arch Linux

The following packages are requred after starting from an Arch-Anywhere installation using Gnome as Window Manager. This is based on a system that has the base-devel package configuration:

sudo pacman -S automake libtool wxgtk ftgl glew boost boost-libs freealut webkitgtk2

openSUSE 42.2

sudo zypper install git make libtool automake gcc-c++ zlib-devel libjpeg62-devel wxWidgets-3_0-devel 
sudo zypper install libxml2-devel libsigc++2-devel ftgl-devel glew-devel boost-devel python-devel libvorbis-devel freealut-devel

Ubuntu 15.10 x64 / Kubuntu 16.04 x64

Copy and paste the following into a terminal:

sudo apt-get install git automake libtool pkg-config zlib1g-dev libjpeg62-dev libwxgtk3.0-dev libxml2-dev 
sudo apt-get install libsigc++-2.0-dev libpng12-dev libftgl-dev libglew-dev libboost-dev libboost-regex-dev 
sudo apt-get install libboost-filesystem-dev libboost-python-dev libboost-test-dev libalut-dev libvorbis-dev

Debian 8.2

The same instructions as for Ubuntu 15.10 should work, but instead use this command line to install the dependencies (the libjpeg package is named differently):

sudo apt-get install git automake libtool pkg-config zlib1g-dev libjpeg62-turbo-dev libwxgtk3.0-dev libxml2-dev 
sudo apt-get install libsigc++-2.0-dev libpng12-dev libftgl-dev libglew-dev libboost-dev libboost-regex-dev 
sudo apt-get install libboost-filesystem-dev libboost-python-dev libboost-test-dev libalut-dev libvorbis-dev

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 git://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

Compile

DarkRadiant employs an Autoconf/Automake build system under Linux as used in the majority of open-source projects. Make sure you have the automake toolchain downloaded, this is covered in the package installation commands above.

The makefiles in the git sources might not always be up to date in each revision, so run

./autogen.sh

in your darkradiant folder to update them.

Afterwards, run the typical chain of configure and make commands:

./configure --enable-darkmod-plugins
make
make install

By the above, a release build will be created; if a debug build is required pass the --enable-debug option to the configure script.

Other points to note about the configure process:

  • The DarkMod-specific plugins are not built by default, the --enable-darkmod-plugins argument will enable them.
  • 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.

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.