SLADE Wiki
Advertisement


Unix Compilation

Required Libraries

To compile SLADE3 on unix based systems, the following libraries are required:

wxWidgets 2.9 (NOT 2.8)

As wxWidgets 2.9 is not currently considered 'stable', there may not be a package for it in package-based distros, and it will have to be compiled itself. When compiling wxWidgets, the extra option --with-opengl is needed when ./configure-ing, or else GLCanvas support will not be enabled, which SLADE3 requires. Instructions for compiling wxWidgets can be found in "docs/gtk/install.txt" in the wxWidgets tarball.

FreeImage

It is recommended to download/compile/install the latest version of FreeImage from the website, as compilation is very simple and the version in the package manager may be out of date.


Compiling with CodeLite IDE

The recommended method of compiling SLADE3 is to open the CodeLite project and build from within the IDE. Once CodeLite is installed, simply run it, select "Workspace->Switch to Workspace...", and open the SLADE.workspace file.

Once it's open, it's a simple matter of making sure the 'Release' configuration is selected (unless you really want to compile Debug), and selecting "Build->Build Project". If the required libraries have all been installed correctly, SLADE should compile successfully, and the executable will be placed in the 'dist' folder. Note that the debug build of SLADE requires that the debug build of wxWidgets 2.9 is also installed.


Compiling with the Makefile

As a secondary compilation method, a Makefile is included with the SLADE source. This should generally work to compile SLADE, but make sure to do a 'make clean' before compiling. There is also a Makefile-debug file included with the source to compile the debug build if necessary.


Windows Compilation

Required Software

Microsoft Visual Studio is required to build SLADE3 in Windows. "Express" versions of VS can be downloaded from Microsoft for free. It may also be possible to compile SLADE3 using CodeLite in Windows, but the CodeLite project settings may have to be modified to do so. Visual Studio solution files are provided for VS2005, 2008 and 2010. Please note that in the SVN not all the projects/solutions may be up to date, and some may be missing files. Generally the safest to use are the 2005 (updated by Gez) and 2010 solutions.


Required Libraries

The libraries required to compile SLADE3 in Windows are the same as for Unix as above. To compile wxWidgets in Windows, you must open the wxWidgets solution file for the version of Visual Studio you have, open the setup.h file (in VS) and search for wxUSE_GLCANVAS, which must be set to 1. Save setup.h, select the Release build, and build the solution.

FreeImage comes with precompiled libraries for Windows, and you only need to setup Visual Studio to search the FreeImage 'Dist' folder for extra libraries and includes.


Special note for setting up the required libraries in Visual Studio 2010

In VS2010, Microsoft moved the external include/library folder settings from being global to the IDE to being defined in the project file. The SLADE3 VS2010 project file therefore uses environment variables to find these folders. To compile SLADE3 in VS2010, you must set up two environment variables:

%WXWIN% - This should point to the base wxWidgets directory (eg. C:\wxWidgets-2.9.0)

%FREEIMAGE% - This should point to the base FreeImage directory (eg. C:\FreeImage)


Compiling with Visual Studio

Once the required libraries are set up, simply open the SLADE solution file for your version of Visual Studio, select the Release configuration, and select "Build->Build Solution". This should compile SLADE and place the executable file in the 'dist' folder.

Advertisement