Skip to content

Ubuntu Step by Step Compilation

Gaerzi edited this page Jan 17, 2014 · 9 revisions

This section will detail how to compile SLADE in Ubuntu (and probably anything else using apt-get, like Debian). This method has been tested on a fresh install of Ubuntu 13.04 and should work fine.

Step 1: Set up additional repositories for required libraries

Firstly, before downloading the required libraries, we need to set up some additional repositories so that the right versions are downloaded. Currently this is so that we get SFML 2 instead of 1.6. Open a terminal window and type the following lines:

sudo apt-add-repository ppa:sonkun/sfml-stable
sudo apt-get update

Step 2: Download and install the required libraries and tools

First things first, we’ll need to install all the libraries and tools required by SLADE and wxWidgets. Open a terminal window and type the following line:

sudo apt-get install build-essential libgtk2.0-dev libglew1.6-dev libfreeimage-dev libftgl-dev libfluidsynth-dev libsfml-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libgconf2-dev freeglut3-dev cmake libmodplug-dev git libwebkit-dev

If any of the above libraries can’t be found, try running ‘apt-cache search <libname>’, as the library name may have changed or updated since this was written.

Step 3: Compile and install wxWidgets from Git

Now we have to compile and install wxWidgets, because as of now SLADE requires wxWidgets v3.0.0+, which currently isn’t available in the debian/ubuntu package repositories.

The first step is to get the latest wxWidgets sources from GitHub. To do this, open a terminal window and cd to some directory, eg. ‘libs’. Now enter the following line:

git clone https://github.com/wxWidgets/wxWidgets.git

This should download the wxWidgets sources and put them in the ‘wxWidgets’ directory. Next we have to switch to the latest release tag (as the very latest sources from Git may have bugs):

cd wxWidgets
git checkout tags/WX_3_0_0

Now that we have wxWidgets 3.0 checked out, enter the following commands to compile and install it:

mkdir buildgtk
cd buildgtk
../configure --with-opengl --with-gtk --enable-mediactrl --enable-webview
make
sudo make install
sudo ldconfig

* To make compilation faster if you have a multi-core CPU, you can replace the ‘make’ line with ‘make -j #’ where # is the number of CPU cores your system has.

Hopefully everything goes right here. This has been tested on a fresh install of Ubuntu 13.04, but may not work on earlier or later versions (should, though).

Step 4: Download and compile SLADE from the GitHub repository

The last step is to download the SLADE sources from GitHub and compile them. First up, open Terminal and cd to some directory (or you can just use home if you want). Then enter the following line:

git clone https://github.com/sirjuddington/SLADE.git slade

This should download the SLADE sources and put them in the ‘slade’ directory. Now enter the following commands to compile SLADE (using CMake):

cd slade/dist
cmake ..
make

* As with compiling wxWidgets, the ‘make’ line can also be changed here to take advantage of multi-core compilation.

And that should be it, you should now be able to run SLADE by entering ‘./slade’ in the terminal window (from the SLADE directory).

Clone this wiki locally