<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://staging-wiki.unvanquished.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Danmal</id>
	<title>Unvanquished - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://staging-wiki.unvanquished.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Danmal"/>
	<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/wiki/Special:Contributions/Danmal"/>
	<updated>2026-04-04T19:45:04Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=2921</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=2921"/>
		<updated>2014-05-12T02:17:53Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Configuring with CMake */ Options have been removed from CMakeList&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
Regardless of what interface you may use to compile the source, you will need [http://www.cmake.org/cmake/resources/software.html CMake] to generate makefiles. You will also need to install [https://developer.apple.com/xcode/ Xcode] (making sure to choose to install the command-line utilities when prompted by the installer).&lt;br /&gt;
&lt;br /&gt;
Then, you will need to acquire (and in some cases, manually compile) at a minimum the [[#Dependencies|necessary libraries]].&lt;br /&gt;
&lt;br /&gt;
Once you have the source code and the libraries installed, you may actually proceed to compile the source. You have several options:&lt;br /&gt;
* '''Compile the source at the command line'''. This is the easiest if you would just like to compile the game to use yourself and you do not intend to work on the code.&lt;br /&gt;
* '''Compile the source using an IDE'''. This is preferred if you intend on developing the source.&lt;br /&gt;
** Xcode is Apple's flagship IDE and you should have installed to compile the source regardless of which method you use.&lt;br /&gt;
** [http://qt-project.org/downloads QtCreator] is cross-platform and provides real-time feedback of syntax errors, a Vim mode, as well as other features.&lt;br /&gt;
** [http://www.codeblocks.org/ Code::Blcoks] is also cross-platform but lacks some of the features of Xcode and QtCreator.&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
You only need to use one of the following methods (HomeBrew or compiling by hand). Please try and avoid mixing methods as this may produce unexpected results.&lt;br /&gt;
&lt;br /&gt;
Unvanquished requires the following libraries:&lt;br /&gt;
* [[#JPEG|JPEG]], version 8 or higher. (Version 6 was known to have problems)&lt;br /&gt;
* [[#Simple_DirectMedia_Layer_.28SDL.29|Simple DirectMedia Layer]] (The binary provided by libsdl.org causes graphical corruptions. Compile from source or use homebrew/macports)&lt;br /&gt;
* [[#The_OpenGL_Extension_Wrangler_Library_.28GLEW.29|The OpenGL Extension Wrangler Library]]&lt;br /&gt;
* CuRL&lt;br /&gt;
* [[#The_GNU_MP_Bignum_Library_.28libgmp.29|GMP]]&lt;br /&gt;
* [[#WebP|WebP]] (v0.2.0 or newer)&lt;br /&gt;
&lt;br /&gt;
The following libraries are optional:&lt;br /&gt;
* Theora&lt;br /&gt;
* Speex&lt;br /&gt;
* [[#Ogg|Ogg]]&lt;br /&gt;
* [[#Vorbis|Vorbis]]&lt;br /&gt;
&lt;br /&gt;
====HomeBrew====&lt;br /&gt;
Install [http://mxcl.github.com/homebrew/ HomeBrew] and then run the following command&lt;br /&gt;
&lt;br /&gt;
 $ brew install nettle libjpeg curl sdl webp xvid gmp glew speex libvorbis theora&lt;br /&gt;
&lt;br /&gt;
All the necessary libraries should now have been installed.&lt;br /&gt;
&lt;br /&gt;
====Compiling by hand====&lt;br /&gt;
The following are shell scripts that download, compile, and install various libraries. This is more time consuming then other methods but might be useful if you need more control over your libraries&lt;br /&gt;
&lt;br /&gt;
=====JPEG=====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz &amp;gt; jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ tar xvzf jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ cd jpeg-8d&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====The OpenGL Extension Wrangler Library (GLEW)=====&lt;br /&gt;
&lt;br /&gt;
 $ curl -L https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz/download &amp;gt; glew-1.7.0.tgz&lt;br /&gt;
 $ tar xvzf glew-1.7.0.tgz&lt;br /&gt;
 $ cd glew-1.7.0&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====Simple DirectMedia Layer (SDL)=====&lt;br /&gt;
&lt;br /&gt;
Do not use the binaries provided by libsdl.org, as these are known to cause issues with gamma and color display. Instead, compile your own:&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15.tar.gz &amp;gt; SDL-1.2.15.tar.gz&lt;br /&gt;
 $ tar xvzf SDL-1.2.15.tar.gz&lt;br /&gt;
 $ cd SDL-1.2.15&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====The GNU MP Bignum Library (libgmp)=====&lt;br /&gt;
&lt;br /&gt;
 $ curl ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 &amp;gt; gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ tar xvjf gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ cd gmp-5.0.5&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====Ogg=====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz &amp;gt; libogg-1.3.0.tar.gz&lt;br /&gt;
 $ tar xvzf libogg-1.3.0.tar.gz&lt;br /&gt;
 $ cd libogg-1.3.0&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====Vorbis=====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz &amp;gt; libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ tar xvzf libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ cd libvorbis-1.3.3&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====WebP=====&lt;br /&gt;
&lt;br /&gt;
You do not need to compile WebP by hand; Google provides binaries for Mac OS X available from their [https://code.google.com/p/webp/downloads/detail?name=libwebp-0.2.0-mac-10.5.tar.gz project page]. You will need version 0.2.0 or newer.&lt;br /&gt;
&lt;br /&gt;
Once downloaded, you must still install the header files and the binary:&lt;br /&gt;
&lt;br /&gt;
 $ curl https://webp.googlecode.com/files/libwebp-0.2.0-mac-10.5.tar.gz &amp;gt; libwebp-0.2.0-mac-10.5.tar.gz&lt;br /&gt;
 $ tar xvzf libwebp-0.2.0-mac-10.5.tar.gz&lt;br /&gt;
 $ cd libwebp-0.2.0-mac-10.5&lt;br /&gt;
 $ sudo cp include/webp /usr/local/include&lt;br /&gt;
 $ sudo cp lib/libwebp.a /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
===Configuring with CMake===&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This should be a different directory.&lt;br /&gt;
# Hit &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that. Wait while the configuration process runs. You may have to set the following:&lt;br /&gt;
## If CMake did not find your jpeg headers for some reason, set &amp;lt;code&amp;gt;JPEG_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/path/to/Unvanquished/src/libs/jpeg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## If you have selected to generate Xcode project files, make the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank. This option is not available if you have the generator set to Unix makefiles.&lt;br /&gt;
# Hit &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# You may now close CMake.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
====With Xcode====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Either start Xcode and open the project file (in the build directory you specified) or double-click the project file in Finder.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open the project file created by CMake, which should be in the build directory you specified.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Change the active target to &amp;quot;ALL_BUILD&amp;quot; and click Product&amp;amp;rarr;Build.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start Terminal (Applications &amp;amp;rarr; Utilities &amp;amp;rarr; Terminal).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Input the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are on a multi-core or multi-processor machine, you may speed up the process by passing the &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; argument followed by the number of available cores to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;; e.g., &amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;. Note that doing so makes reading error messages more difficult, as multiple instances of the compiler will print to the screen at once, causing information to appear out of order.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing the build===&lt;br /&gt;
&lt;br /&gt;
====With Xcode 4====&lt;br /&gt;
&lt;br /&gt;
To test the game, select the &amp;quot;client&amp;quot; scheme from the combo box on the toolbar, and click the run button or press {{Hotkey|MacCommand}}{{Hotkey|R}}.&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
After compiling, you'll have to place the data files in the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; directory in your build directory. [[#Acquiring the Game Files|For download instructions, see below.]]&lt;br /&gt;
&lt;br /&gt;
Your file structure should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Build_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
You may now start the application as such:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386&lt;br /&gt;
&lt;br /&gt;
Note that older machines will not support the new OpenGL 3 renderer, and must be started specifying the &amp;quot;vanilla&amp;quot; (aka &amp;quot;GL&amp;quot;) renderer:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386 +set cl_renderer GL&lt;br /&gt;
&lt;br /&gt;
===Bundling the Application===&lt;br /&gt;
&lt;br /&gt;
====With CPack====&lt;br /&gt;
&lt;br /&gt;
CPack is able to create standalone bundles (as well as many other types of installers). However you must generate the files using Unix Makefiles instead of Xcode.&lt;br /&gt;
&lt;br /&gt;
 $ cd /path/to/Unvanquished-build&lt;br /&gt;
 $ cpack -G Bundle&lt;br /&gt;
&lt;br /&gt;
Some warnings will be printed however these can be safely ignored. There should be a file called Unvanquished.dmg in the Unvanquished-build folder.&lt;br /&gt;
&lt;br /&gt;
====Manually====&lt;br /&gt;
&lt;br /&gt;
{{Note|header=Important|content=&lt;br /&gt;
Please be aware that these instructions are very much out of date, and may not work. Also note that the dynamic library bundler does '''not''' work as intended and although you will be able to run your build on your machine, it will most likely not work on other machines. It is strongly suggested that you compile the source using Xcode.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
You'll find the Mac [http://macdylibbundler.sourceforge.net/ dynamic library bundler] to be quite useful (you must generate the files using Unix Makefiles instead of Xcode):&lt;br /&gt;
&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/macdylibbundler/files/macdylibbundler/0.4.1/dylibbundler0.4.1.zip/download &amp;gt; \&lt;br /&gt;
    dylibbundler0.4.1.zip&lt;br /&gt;
 $ unzip dylibbundler0.4.1.zip&lt;br /&gt;
 $ cd dylibbundler&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once you've done that, you can proceed to create the application bundle. Note that these steps assume that you have downloaded the data files to &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; as shown above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git=/path/to/Unvanquished-git-repo&lt;br /&gt;
$ build=/path/to/Unvanquished-build-dir&lt;br /&gt;
$ mkdir -pv Unvanquished.app/Contents/{libs,MacOS,Resources,Frameworks}&lt;br /&gt;
$ cp -r $build/main Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ sips -s format tiff $git/debian/unvanquished.png --out temp.tiff&lt;br /&gt;
$ tiff2icns temp.tiff Unvanquished.app/Contents/Resources/Unvanquished.icns&lt;br /&gt;
$ rm temp.tiff&lt;br /&gt;
$ cp $build/daemon{,ded}.i386 $build/*.dylib Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ cp -r /Library/Frameworks/SDL.framework Unvanquished.app/Contents/Frameworks&lt;br /&gt;
$ install_name_tool -id \&lt;br /&gt;
    @executable_path/../Frameworks/SDL.framework/Versions/A/SDL \&lt;br /&gt;
    Unvanquished.app/Contents/Frameworks/SDL.framework/Versions/A/SDL&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL \&lt;br /&gt;
    @executable_path/../Frameworks/SDL.framework/Versions/A/SDL \&lt;br /&gt;
    Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL \&lt;br /&gt;
    @executable_path/../Frameworks/SDL.framework/Versions/A/SDL \&lt;br /&gt;
    Unvanquished.app/Contents/MacOS/librendererGLi386.dylib&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL \&lt;br /&gt;
    @executable_path/../Frameworks/SDL.framework/Versions/A/SDL \&lt;br /&gt;
    Unvanquished.app/Contents/MacOS/librendererGL3i386.dylib&lt;br /&gt;
$ for binary in Unvanquished.app/Contents/MacOS/*.{i386,dylib}; do&lt;br /&gt;
    dylibbundler -b -x $binary -d $dest/Unvanquished.app/Contents/libs/; done&lt;br /&gt;
$ cp /usr/lib/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ chmod +w ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -id @executable_path/../libs/libGLEW.1.7.0.dylib \&lt;br /&gt;
    ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -change /usr/lib/libGLEW.1.7.0.dylib \&lt;br /&gt;
    @executable_path/../libs/libGLEW.1.7.0.dylib \&lt;br /&gt;
    ./Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ cat &amp;gt; Unvanquished.app/Contents/Info.plist&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot;&lt;br /&gt;
          &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;daemon.i386&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIconFile&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished.icns&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;net.Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleShortVersionString&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
^d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;^d&amp;lt;/code&amp;gt; indicates pressing {{Hotkey|Ctrl}}{{Hotkey|D}} on the keyboard.&lt;br /&gt;
&lt;br /&gt;
The contents of the completed application bundle should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Bundle_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
'''Note''': If you compiled SDL from source, you will not see a directory titled &amp;lt;code&amp;gt;SDL.framework&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
===Visual Studio===&lt;br /&gt;
&lt;br /&gt;
CMake can generate Visual Studio projects for Unvanquished.&lt;br /&gt;
&lt;br /&gt;
# Run the &amp;lt;code&amp;gt;Visual_Studio32.bat&amp;lt;/code&amp;gt; batch script in your source directory by double-clicking it. Alternatively, you may use the &amp;lt;code&amp;gt;Visual_Studio64.bat&amp;lt;/code&amp;gt; shell script if you have the [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7 SDK] installed and a 64-bit system.&lt;br /&gt;
# Open &amp;lt;code&amp;gt;build-32/Daemon.sln&amp;lt;/code&amp;gt; in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; or &amp;quot;Debug&amp;quot; in the first one and Win32 in the second one&lt;br /&gt;
# Press {{Hotkey|F5}} to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
====Important Notes====&lt;br /&gt;
&lt;br /&gt;
* LLVM is disabled and does not work correctly with CMake generated Visual Studio projects.&lt;br /&gt;
* ncurses is not supported under Visual Studio.&lt;br /&gt;
* The path to the build folder must not have any spaces otherwise generation of QVMs will fail. See {{Issue|102}}.&lt;br /&gt;
* Due to limitations with CMake, neither the startup project nor the working directory can be specified. These must be set manually to debug the client with Visual Studio:&lt;br /&gt;
** Right click on client and select &amp;quot;Set as StartUp project&amp;quot;.&lt;br /&gt;
** Right click on client, select properties, select Debugging and set &amp;quot;Working Directory&amp;quot; to &amp;lt;code&amp;gt;$(TargetPath)\..&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Troubleshooting====&lt;br /&gt;
&lt;br /&gt;
If installing the Windows 7 SDK [http://support.microsoft.com/kb/2717426?ppud=4&amp;amp;wa=wsignin1.0 fails with error code 5100] (when the installation fails, click &amp;quot;View Log&amp;quot;, and search for &amp;quot;5100&amp;quot;), remove any installed copies of the Microsoft Visual C++ 2010 x86 Redistributable and Microsoft Visual C++ 2010 x64 Redistributable via the control panel (Control Panel &amp;amp;rarr; Programs and Features), then run the installer again.&lt;br /&gt;
&lt;br /&gt;
===MinGW===&lt;br /&gt;
&lt;br /&gt;
It is possible to build Unvanquished with MinGW, although the process is rather arduous compared to Visual Studio or compiling for other platforms. Currently, you will also need [http://cygwin.com/setup.exe Cygwin] to build the GMP library as well.&lt;br /&gt;
&lt;br /&gt;
====Notes====&lt;br /&gt;
&lt;br /&gt;
* The easiest way to acquire and install MinGW is with the graphical [http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/ mingw-get-inst installer]. At a minimum, you will need to install the C and C++ compilers. &amp;lt;!-- TODO: maybe walk the user through the installer? --&amp;gt;&lt;br /&gt;
* When configuring the build with CMake, you will find that you will have to set a number of libraries manually. You can find precompiled DLLs for most of the dependencies; those that are not pre-compiled can be built with the corresponding &amp;lt;code&amp;gt;USE_INTERNAL_&amp;lt;/code&amp;gt; setting.&lt;br /&gt;
* '''The build will fail during QVM compilation if your source or build directories contain spaces.''' This is due to a bug with lcc. If your home directory contains a space, you may want to create source and build directories at the root of one of your drives (e.g., &amp;lt;code&amp;gt;C:\Unvanquished\Source&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C:\Unvanquished\Build&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
====Instructions====&lt;br /&gt;
&lt;br /&gt;
The easiest way to get a build up (at the time of writing) is as follows:&lt;br /&gt;
&lt;br /&gt;
{{Note|content=Although there are 64-bit binaries of most of the libraries required to build the game, these do not work with MinGW at present, so the following instructions all use the 32-bit binaries.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You will need to download and install some version of the DirectX SDK to compile the source. You may download the June 2010 release from [http://www.microsoft.com/en-us/download/details.aspx?id=6812 Microsoft].&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Although there are binaries of gmp distributed with the source, they have are dependent on Visual Studio's implementations of &amp;lt;code&amp;gt;_ftol2_sse&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_alloca_probe_16&amp;lt;/code&amp;gt;. A fix may be found on [http://stackoverflow.com/questions/6753111/static-linking-with-openssl Stack Exchange], but requires that Visual Studio be installed, which defeats the purpose of attempting to use MinGW to compile the source. You can build gmp yourself:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Download and extract the latest version of the [http://gmplib.org/ GNU MP Bignum Library (GMP)]. (You will need either cygwin with tar and bz2 installed or 7-zip to extract the archive.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the following Cygwin packages if you have not already:&lt;br /&gt;
* binutils&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-g++&lt;br /&gt;
* m4&lt;br /&gt;
* make&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;As part of the GMP compilation process, a file called &amp;lt;code&amp;gt;gen-fib.c&amp;lt;/code&amp;gt; generates a table of numbers in the Fibonacci sequence. The generated file does not play nicely with Cygwin or MinGW, so you must fix it. Edit &amp;lt;code&amp;gt;gen-fib.c&amp;lt;/code&amp;gt;, and at around line 100, change these lines&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for (i = 0; i &amp;lt; fnum; i++)&lt;br /&gt;
    {&lt;br /&gt;
      printf (&amp;quot;  CNST_LIMB (0x&amp;quot;);&lt;br /&gt;
      mpz_out_str (stdout, 16, f[i]);&lt;br /&gt;
      printf (&amp;quot;),  /* %d */\n&amp;quot;, i-1);&lt;br /&gt;
    }&lt;br /&gt;
  printf (&amp;quot;};\n&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for (i = 0; i &amp;lt; fnum; i++)&lt;br /&gt;
    {&lt;br /&gt;
      printf (&amp;quot;  CNST_LIMB (0x&amp;quot;);&lt;br /&gt;
      mpz_out_str (stdout, 16, f[i]);&lt;br /&gt;
      printf (&amp;quot;)%c  /* %d */\n&amp;quot;, (i == (fnum-1)) ? ' ' : ',', i-1);&lt;br /&gt;
    }&lt;br /&gt;
  printf (&amp;quot;};\n&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The patch file looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@@ -100,7 +100,7 @@&lt;br /&gt;
     {&lt;br /&gt;
       printf (&amp;quot;  CNST_LIMB (0x&amp;quot;);&lt;br /&gt;
       mpz_out_str (stdout, 16, f[i]);&lt;br /&gt;
-      printf (&amp;quot;),  /* %d */\n&amp;quot;, i-1);&lt;br /&gt;
+      printf (&amp;quot;)%c  /* %d */\n&amp;quot;, (i == (fnum-1)) ? ' ' : ',', i-1);&lt;br /&gt;
     }&lt;br /&gt;
   printf (&amp;quot;};\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compiling with MinGW does not work, so you will need to compile with Cygwin. At the prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./configure --disable-static --enable-shared&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;--disable-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--enable-shared&amp;lt;/code&amp;gt; flags configure GMP to build a DLL instead of a static library. You may optionally perform &amp;lt;code&amp;gt;make install&amp;lt;/code&amp;gt;. Additional compilation instructions [http://www.cs.nyu.edu/exact/core/gmp/ are available].&lt;br /&gt;
&amp;lt;p&amp;gt;If you experience difficulties with compilation and it appears that MinGW gcc is being detected by &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; and not Cygwin gcc, you can try editing your &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt; variable:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PATH=`echo $PATH | sed &amp;quot;s|/cygdrive/c/MinGW/bin:||&amp;quot;`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Re-run &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Download the [http://www.libsdl.org/release/SDL-1.2.15-win32.zip latest stable version] of SDL for Windows. Extract the archive and copy &amp;lt;code&amp;gt;SDL.dll&amp;lt;/code&amp;gt; from it to the root of your build directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Set the following CMake flags:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Setting&lt;br /&gt;
! Description&lt;br /&gt;
! Type&lt;br /&gt;
! Value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt;&lt;br /&gt;
| Use the provided copies of crypto libraries. &amp;lt;!-- FIXME: I think these are nettle and something else --&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_INTERNAL_GLEW&amp;lt;/code&amp;gt;&lt;br /&gt;
| Use the provided copy of GLEW.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_INTERNAL_JPEG&amp;lt;/code&amp;gt;&lt;br /&gt;
| Use the provided copy of JPEG.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_INTERNAL_SDL&amp;lt;/code&amp;gt;&lt;br /&gt;
| Use the provided copy of SDL.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt;&lt;br /&gt;
| Use the provided copy of Speex.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_INTERNAL_WEBP&amp;lt;/code&amp;gt;&lt;br /&gt;
| Use the provided copy of WebP.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt;&lt;br /&gt;
| Enables/disables curses.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;PNG_LIBRARY&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the PNG library DLL.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/libpng/libs/win32/libpng.lib&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;PNG_PNG_INCLUDE_DIR&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the PNG library header files.&lt;br /&gt;
| &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/libpng&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;FREETYPE_LIBRARY&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the compiled FreeType library.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/freetype/lib/freetype.lib&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;FREETYPE_INCLUDE_DIR_freetype2&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the FreeType library header files.&lt;br /&gt;
| &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/freetype/include/freetype2&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;FREETYPE_INCLUDE_DIR_ft2build&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the FreeType library file &amp;quot;ftbuild.h&amp;quot;.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/freetype/include/&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GMP_INCLUDE_DIR&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the GMP library header files.&lt;br /&gt;
| &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/gmp/include&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GMP_LIBRARY&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the GMP library.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;path/to/compiled/gmp/&amp;lt;/var&amp;gt;.libs/cyggmp-10.dll&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ZLIB_INCLUDE_DIR&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the zlib library header files.&lt;br /&gt;
| &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/zlibwapi/include&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ZLIB_LIBRARY&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the zlib library.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/zlibwapi/lib/x32/zlib1.dll&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;CURL_LIBRARY&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the CURL library.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/curl-7.21.6/lib/win32/release/libcurl.dll&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;CURL_INCLUDE_DIR&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the zlib library.&lt;br /&gt;
| &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/curl-7.21.6/include/curl&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt;&lt;br /&gt;
| Enables/disables OpenAL support.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt;&lt;br /&gt;
| Enables/disables Theora support.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt;&lt;br /&gt;
| Enables/disables Xvid support.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_CODEC_THEORA&amp;lt;/code&amp;gt;&lt;br /&gt;
| Enables/disables Ogg support.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SDL_LIBRARY&amp;lt;/code&amp;gt;&lt;br /&gt;
| The path to the SDL DLL.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;BuildPath&amp;lt;/var&amp;gt;/SDL.dll&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt;&lt;br /&gt;
| Enables/disables Ogg support.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/libsdl/src/main/win32/SDL_win32_main.c&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
Do note that CMake is slash-direction&amp;amp;ndash;agnostic; it can handle both forward- and backslashes on Windows.&lt;br /&gt;
&amp;lt;p&amp;gt;If you would like to compile a debug build, change &amp;lt;code&amp;gt;CMAKE_RELEASE_TYPE&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;Release&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Debug&amp;lt;/code&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/CMakeLists.txt&amp;lt;/code&amp;gt; and edit the line&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    set( OS_LIBRARIES m winmm ws2_32 psapi z )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(around line 1040) to look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    set( OS_LIBRARIES m winmm ws2_32 psapi )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also edit around line 1700:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
###########################&lt;br /&gt;
#Configure Download Script#&lt;br /&gt;
###########################&lt;br /&gt;
&lt;br /&gt;
if( NOT MSVC )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
###########################&lt;br /&gt;
#Configure Download Script#&lt;br /&gt;
###########################&lt;br /&gt;
&lt;br /&gt;
if( NOT WIN32 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/libsdl/src/main/win32/SDL_win32_main.c&amp;lt;/code&amp;gt; and edit the lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* Include the SDL main definition header */&lt;br /&gt;
#include &amp;quot;SDL.h&amp;quot;&lt;br /&gt;
#include &amp;quot;SDL_main.h&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* Include the SDL main definition header */&lt;br /&gt;
#include &amp;quot;../../../include/SDL.h&amp;quot;&lt;br /&gt;
#include &amp;quot;../../../include/SDL_main.h&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a command prompt and &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; to your source directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; mingw32-make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you would like verbose output, set the &amp;lt;code&amp;gt;VERBOSE&amp;lt;/code&amp;gt; environment variable before running &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; set VERBOSE=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To make it easier to build the source, you can create a batch file (call it something like &amp;lt;code&amp;gt;compile.bat&amp;lt;/code&amp;gt;) and place it in your build directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
&lt;br /&gt;
set RETURN=compile&lt;br /&gt;
&lt;br /&gt;
:get_time&lt;br /&gt;
	:: Thank you, Rob van der Woude:&lt;br /&gt;
	:: (http://www.robvanderwoude.com/datetimentparse.php)&lt;br /&gt;
	FOR /F &amp;quot;tokens=1,2,3 delims=:.&amp;quot; %%A IN (&amp;quot;%Time%&amp;quot;) DO (&lt;br /&gt;
		SET /A HOURS   = 100%%A %% 100&lt;br /&gt;
		SET /A MINUTES = 100%%B %% 100&lt;br /&gt;
		SET /A SECONDS = 100%%C %% 100&lt;br /&gt;
	)&lt;br /&gt;
	SET /A TICKS=( %HOURS% * 3600 ) + ( %MINUTES% * 60 ) + %SECONDS%&lt;br /&gt;
	GOTO %RETURN%&lt;br /&gt;
&lt;br /&gt;
:compile&lt;br /&gt;
	SET START_TICKS=%TICKS%&lt;br /&gt;
&lt;br /&gt;
	SET VERBOSE=1&lt;br /&gt;
	:: mingw32-make clean&lt;br /&gt;
	mingw32-make -j4&lt;br /&gt;
&lt;br /&gt;
	set RETURN=finish&lt;br /&gt;
	GOTO get_time&lt;br /&gt;
&lt;br /&gt;
:finish&lt;br /&gt;
	SET /A COMPILE_TIME=%TICKS% - %START_TICKS%&lt;br /&gt;
	SET /A MINUTES=%COMPILE_TIME% / 60&lt;br /&gt;
	SET /A SECONDS=%COMPILE_TIME% %% 60&lt;br /&gt;
	ECHO.&lt;br /&gt;
	ECHO Compilation took %MINUTES%m %SECONDS%s.&lt;br /&gt;
	PAUSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once compilation finishes, you will find that the game will fail to run due to DLL dependencies. To resolve these:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You will need to move &amp;lt;code&amp;gt;INTERNAL_GLEW&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;Release/&amp;lt;/code&amp;gt; folder of the build directory to the root of the build directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You will need to place the following other DLLs in your build directory:&lt;br /&gt;
* freetype6.dll&lt;br /&gt;
* libcurl.dll&lt;br /&gt;
* libpng14-14.dll&lt;br /&gt;
* zlib1.dll&lt;br /&gt;
If the renderer's DLL dependencies are not met, you will be informed that the game failed to load a renderer. If you receive an error stating that the application failed to start at all, then you are likely missing some version of the Microsoft Visual C runtime redistributable.&lt;br /&gt;
&amp;lt;p&amp;gt;You may find that you also need these DLLs (if you configured your build differently):&amp;lt;/p&amp;gt;&lt;br /&gt;
* libbz2.dll&lt;br /&gt;
* libogg.dll&lt;br /&gt;
* libtheora.dll&lt;br /&gt;
* libvorbis.dll&lt;br /&gt;
* libvorbisfile.dll&lt;br /&gt;
* msvcr100.dll&lt;br /&gt;
* msvcr100d.dll&lt;br /&gt;
* zlibwapi.dll&lt;br /&gt;
The easiest way to obtain these DLLs is by copying them from the installation directory of an [http://sourceforge.net/projects/unvanquished/files/latest/download official release] of Unvanquished.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You will need to copy your compiled DLL of GMP to your build directory. It may be found in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;path/to/compiled/gmp/&amp;lt;/var&amp;gt;.libs/cyggmp-10.dll&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;As you compiled GMP with Cygwin, it in turn depends on &amp;lt;code&amp;gt;cygwin1.dll&amp;lt;/code&amp;gt;, which may typically be found in &amp;lt;code&amp;gt;C:\cygwin\bin\&amp;lt;/code&amp;gt;. Copy and paste it into your build directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
Once you have completed these steps, you should never have to do them again.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Notes====&lt;br /&gt;
&lt;br /&gt;
* If you would like to use curses, try using [http://sourceforge.net/projects/pdcurses/files/pdcurses PDCurses].&lt;br /&gt;
&lt;br /&gt;
===QtCreator===&lt;br /&gt;
&lt;br /&gt;
# Install MinGW and follow the above instructions, except select Code::Blocks as the generator.&lt;br /&gt;
# Start QtCreator, and select &amp;quot;Open File or Project&amp;amp;hellip;&amp;quot; from the File menu.&lt;br /&gt;
# Navigate to your source directory and open CMakeLists.txt.&lt;br /&gt;
# At the CMake Wizard, select the same build directory you already configured using CMake. (If you did not chose Code::Blocks as the generator, you will have to start over again, as QtCreator requires a Code::Blocks project file in order to compile the source.)&lt;br /&gt;
# Ensure that a generator is selected in the combo box, and click &amp;quot;Run CMake&amp;quot;. If there is no generator listed, see the [[#Troubleshooting|troubleshooting]] section below.&lt;br /&gt;
# Click &amp;quot;Finish&amp;quot; to close the wizard.&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile, run, and debug the code using QtCreator.&lt;br /&gt;
&lt;br /&gt;
====Troubleshooting====&lt;br /&gt;
&lt;br /&gt;
If at the &amp;quot;Run CMake&amp;quot; prompt of the the CMake Wizard, select &amp;quot;Run CMake&amp;quot; and are warned that no generator was selected, and notice that there are no generators in the combo box, you will likely have to [http://doc.qt.digia.com/qtcreator-2.4/creator-tool-chains.html manually configure your toolchain]. Select &amp;quot;Options&amp;amp;hellip;&amp;quot; from the &amp;quot;Tools&amp;quot; menu, then navigate to &amp;quot;Build &amp;amp;amp; Run&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
At the options window,&lt;br /&gt;
* Go to the &amp;quot;Kits&amp;quot; tab, and mouse over the &amp;quot;Desktop (default)&amp;quot; kit under &amp;quot;Manual&amp;quot;. If there were any errors in configuring this kit, they will be displayed in the tool tip. If there are problems, select the kit. You may need to manually specify the location of the MinGW debugger, for example, which is typically &amp;lt;code&amp;gt;C:\MinGW\bin\gdb.exe&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Go to the &amp;quot;Compilers&amp;quot; tab, and ensure that MinGW is present. If not, you will need to add it manually.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install g++ gcc cmake libcurl4-gnutls-dev libfreetype6-dev \&lt;br /&gt;
   libglew-dev libgmp-dev nettle-dev zlib1g-dev libncursesw5-dev \&lt;br /&gt;
   libsdl2-dev libopenal-dev libjpeg8-dev libpng12-dev libwebp-dev \&lt;br /&gt;
   libogg-dev libvorbis-dev libspeexdsp-dev libtheora-dev libopusfile-dev \&lt;br /&gt;
   libxvidcore-dev libgeoip-dev&lt;br /&gt;
&lt;br /&gt;
If libsdl2-dev isn't available, you can use libsdl1.2-dev instead.&lt;br /&gt;
&lt;br /&gt;
If the version of WebP supplied by your version of Debian or Ubuntu is older than v0.2.0, you will need to [https://code.google.com/p/webp/downloads/detail?name=libwebp-0.2.0.tar.gz download] and [https://developers.google.com/speed/webp/docs/compiling#unix compile it from source]. After compiling and installing with &amp;lt;code&amp;gt;sudo make install&amp;lt;/code&amp;gt;, in CMake, you'll need to set &amp;lt;code&amp;gt;WEBP_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/usr/local/include/webp&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WEBP_LIBRARY&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/usr/local/lib/libwebp.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''We currently provide ready-to-use libwebp-dev, libogg-dev libopusfile-dev where needed in our [http://{{SERVERNAME}}/index.php/Download#ubuntu Debian and Ubuntu repositories], alongside .debs of the game and server.'''&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp3-dev instead of libgmp-dev and libglew1.7-dev instead of libglew-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
====openSUSE====&lt;br /&gt;
&lt;br /&gt;
 $ sudo install zypper gcc gcc-c++ Mesa-libGL-devel SDL-devel libjpeg8-devel \&lt;br /&gt;
   libpng12-devel glew-devel webp-devel ncurses-devel gmp-devel libcurl-devel \&lt;br /&gt;
   libnettle-devel openal-soft-devel speex-devel libvorbis-devel \&lt;br /&gt;
   libtheora-devel&lt;br /&gt;
&lt;br /&gt;
The latest version of WebP must be installed manually:&lt;br /&gt;
&lt;br /&gt;
 $ wget https://webp.googlecode.com/files/libwebp-0.2.1.tar.gz&lt;br /&gt;
 $ tar xvzf libwebp-0.2.1.tar.gz&lt;br /&gt;
 $ cd libwebp-0.2.1&lt;br /&gt;
 $ ./configure &amp;amp;&amp;amp; make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
You must disable curses (set &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; appropriately in CMake) as failing to do so will cause Unvanquished to crash on startup.&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Optionally: to use clang (rather than the default gcc and g++ compilers) export the CC and CXX variables before running cmake:&lt;br /&gt;
&lt;br /&gt;
 $ export CC=&amp;quot;clang&amp;quot;&lt;br /&gt;
 $ export CXX=&amp;quot;clang++ -stdlib=libc++ -lc++abi&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press {{Hotkey|c}} to configure. If an error occurs during this phase, make note of it and press {{Hotkey|e}} to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press {{Hotkey|Enter}} to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press {{Hotkey|Esc}} when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press {{Hotkey|C}} again, then {{Hotkey|G}} to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
==Acquiring the Game Files==&lt;br /&gt;
&lt;br /&gt;
===Acquiring mandatory game files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately. This may be done on the command line or from your web browser. The downloads may be found on [http://sourceforge.net/projects/unvanquished/files/Assets SourceForge.net]. If you download the files from your browser, just download the files named &amp;quot;pak*.pk3&amp;quot;, and save them to the [[Running_the_game#Data_locations|data location]] for your system.&lt;br /&gt;
&lt;br /&gt;
On Linux, this may be done as follows:&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;[path to Unvanquished installation or build]&amp;lt;/var&amp;gt;/main&lt;br /&gt;
 $ for file in {{CurrentVersion|PakFiles}}; do&lt;br /&gt;
 if [ ! -e $file ]; then&lt;br /&gt;
 wget -O $file &amp;quot;http://sourceforge.net/projects/unvanquished/files/Assets/$file/download&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
On FreeBSD, using the &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt; shell:&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;[path to Unvanquished installation or build]&amp;lt;/var&amp;gt;/main&lt;br /&gt;
 $ for file in {{CurrentVersion|PakFiles}}; do&lt;br /&gt;
 if [ ! -e $file ]; then&lt;br /&gt;
 fetch -r -o $file &amp;quot;http://sourceforge.net/projects/unvanquished/files/Assets/$file/download&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
On Mac OS X:&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/Library/Application\ Support/Unvanquished/main&lt;br /&gt;
 $ for file in {{CurrentVersion|PakFiles}}; do&lt;br /&gt;
 if [ ! -e $file ]; then&lt;br /&gt;
 curl -L &amp;quot;http://sourceforge.net/projects/unvanquished/files/Assets/$file/download&amp;quot; &amp;gt; $file&lt;br /&gt;
 fi&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
Linux users may also use the &amp;lt;code&amp;gt;download-pk3.sh&amp;lt;/code&amp;gt; script that is distributed with the source code, which requires that curl be installed:&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;[path to Unvanquished source code]&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir -p ~/.Unvanquished/main&lt;br /&gt;
 $ ./download-pk3.sh ~/.unvanquished/pkg&lt;br /&gt;
&lt;br /&gt;
===Downloading the map pack===&lt;br /&gt;
&lt;br /&gt;
The map pack exists only for convenience; if you do not download the map pack, Unvanquished will automatically download maps as needed when you attempt to play online.&lt;br /&gt;
&lt;br /&gt;
To download the map pack on Linux:&lt;br /&gt;
&lt;br /&gt;
 $ wget -O maps.7z &amp;quot;http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
To download the map pack on Mac OS X:&lt;br /&gt;
&lt;br /&gt;
 $ curl -L &amp;quot;http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z&amp;quot; &amp;gt; maps.7z; done&lt;br /&gt;
&lt;br /&gt;
Note that you will need to unzip the map pack on either system as it is compressed with LZMA. Mac users can use the [http://wakaba.c3.cx/s/apps/unarchiver.html Unarchiver]. Uncompressing the archive on Linux is highly dependent on your distribution.&lt;br /&gt;
&lt;br /&gt;
===Verifying the Files===&lt;br /&gt;
&lt;br /&gt;
Download the latest [http://sourceforge.net/projects/unvanquished/files/Assets/{{CurrentVersion|MD5HashFile}} MD5 hash file] and save it to your system's [[Running_the_game#Data_directory|data location]].&lt;br /&gt;
&lt;br /&gt;
On systems with the &amp;lt;code&amp;gt;md5&amp;lt;/code&amp;gt; command (Mac OS X):&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/Library/Application\ Support/Unvanquished/main&lt;br /&gt;
 $ cat {{CurrentVersion|MD5HashFile}} | while read line; do&lt;br /&gt;
 file=&amp;quot;`echo &amp;quot;$line&amp;quot; | sed -E &amp;quot;s/^[a-fA-F0-9]+ +\*?//&amp;quot;`&amp;quot;&lt;br /&gt;
 if [ -e &amp;quot;$file&amp;quot; ]; then&lt;br /&gt;
 if [ `md5 -r &amp;quot;$file&amp;quot; | cut -d\  -f1` = &amp;quot;`echo &amp;quot;$line&amp;quot; | cut -d\  -f1`&amp;quot; ]&lt;br /&gt;
 then echo &amp;quot;File \&amp;quot;$file\&amp;quot; appears okay.&amp;quot;&lt;br /&gt;
 else echo &amp;quot;File \&amp;quot;$file\&amp;quot; is corrupt&amp;quot;'!' &amp;gt;&amp;amp;2&lt;br /&gt;
 fi; fi; done&lt;br /&gt;
&lt;br /&gt;
On systems with the &amp;lt;code&amp;gt;md5sum&amp;lt;/code&amp;gt; command (most Linux distributions):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;[[Running_the_game#Data_directory|/path/to/data/files]]&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ md5sum -c {{CurrentVersion|MD5HashFile}} 2&amp;gt;&amp;amp;1 | grep -v &amp;quot;open or read\|file or directory&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;grep&amp;lt;/code&amp;gt; invocation is used to strip output complaining about missing files.&lt;br /&gt;
&lt;br /&gt;
Any files that are found to be corrupt should be replaced; just download a [http://sourceforge.net/projects/unvanquished/files/Assets new copy] of the affected file(s).&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===CMake cannot locate Newton===&lt;br /&gt;
&lt;br /&gt;
If CMake cannot find Newton, you'll need to set it up yourself.&lt;br /&gt;
&lt;br /&gt;
It should be in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;/path/to/Unvanquished&amp;lt;/var&amp;gt;/src/libs/libnewton/libs/&amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt;/libNewton.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
Be sure to replace &amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt; with the proper directory name.&lt;br /&gt;
&lt;br /&gt;
Use CMake as before to change the &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt; build setting to the said path:&lt;br /&gt;
&lt;br /&gt;
# Start the CMake configurator:&amp;lt;pre&amp;gt;$ ccmake ..&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Scroll down and highlight &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Press {{Hotkey|Enter}} to begin editing and input in the path.&lt;br /&gt;
# Press {{Hotkey|C}} to configure and {{Hotkey|G}} to generate the new makefiles.&lt;br /&gt;
# Press {{Hotkey|Q}} to quit.&lt;br /&gt;
# Recompile the source:&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The C Compiler is not able to compile a simple test program===&lt;br /&gt;
&lt;br /&gt;
When attempting to generate a solution for Xcode CMake fails with the following error&lt;br /&gt;
  -- Check for working C compiler using: Xcode -- broken&lt;br /&gt;
  CMake Error at /Applications/CMake 2.8-8.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):&lt;br /&gt;
   The C compiler &amp;quot;/usr/bin/gcc&amp;quot; is not able to compile a simple test program.&lt;br /&gt;
  &lt;br /&gt;
    It fails with the following output:&lt;br /&gt;
  &lt;br /&gt;
     Change Dir: /Users/danielmaloney/Documents/Unvanquished/build-xcode/CMakeFiles/CMakeTmp&lt;br /&gt;
  &lt;br /&gt;
    &lt;br /&gt;
  &lt;br /&gt;
    Run Build Command:/Applications/CMake\ 2.8-8.app/Contents/bin/cmakexbuild&lt;br /&gt;
    -project CMAKE_TRY_COMPILE.xcodeproj build -target&lt;br /&gt;
    cmTryCompileExec1400153232 -configuration Debug&lt;br /&gt;
  &lt;br /&gt;
    Error: No developer directory found at /Developer.  Run&lt;br /&gt;
    /usr/bin/xcode-select to update the developer directory path.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
  &lt;br /&gt;
 &lt;br /&gt;
    CMake will not be able to correctly generate this project.&lt;br /&gt;
  Call Stack (most recent call first):&lt;br /&gt;
    CMakeLists.txt:19 (project)&lt;br /&gt;
&lt;br /&gt;
This is due to Xcode 4.3 having a different directory structure to previous versions. Simply running the following command will correct this error:&lt;br /&gt;
 sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer/&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=2920</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=2920"/>
		<updated>2014-05-12T01:56:59Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* With Xcode */ Bug has been corrected. Initial step no longer required&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
Regardless of what interface you may use to compile the source, you will need [http://www.cmake.org/cmake/resources/software.html CMake] to generate makefiles. You will also need to install [https://developer.apple.com/xcode/ Xcode] (making sure to choose to install the command-line utilities when prompted by the installer).&lt;br /&gt;
&lt;br /&gt;
Then, you will need to acquire (and in some cases, manually compile) at a minimum the [[#Dependencies|necessary libraries]].&lt;br /&gt;
&lt;br /&gt;
Once you have the source code and the libraries installed, you may actually proceed to compile the source. You have several options:&lt;br /&gt;
* '''Compile the source at the command line'''. This is the easiest if you would just like to compile the game to use yourself and you do not intend to work on the code.&lt;br /&gt;
* '''Compile the source using an IDE'''. This is preferred if you intend on developing the source.&lt;br /&gt;
** Xcode is Apple's flagship IDE and you should have installed to compile the source regardless of which method you use.&lt;br /&gt;
** [http://qt-project.org/downloads QtCreator] is cross-platform and provides real-time feedback of syntax errors, a Vim mode, as well as other features.&lt;br /&gt;
** [http://www.codeblocks.org/ Code::Blcoks] is also cross-platform but lacks some of the features of Xcode and QtCreator.&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
You only need to use one of the following methods (HomeBrew or compiling by hand). Please try and avoid mixing methods as this may produce unexpected results.&lt;br /&gt;
&lt;br /&gt;
Unvanquished requires the following libraries:&lt;br /&gt;
* [[#JPEG|JPEG]], version 8 or higher. (Version 6 was known to have problems)&lt;br /&gt;
* [[#Simple_DirectMedia_Layer_.28SDL.29|Simple DirectMedia Layer]] (The binary provided by libsdl.org causes graphical corruptions. Compile from source or use homebrew/macports)&lt;br /&gt;
* [[#The_OpenGL_Extension_Wrangler_Library_.28GLEW.29|The OpenGL Extension Wrangler Library]]&lt;br /&gt;
* CuRL&lt;br /&gt;
* [[#The_GNU_MP_Bignum_Library_.28libgmp.29|GMP]]&lt;br /&gt;
* [[#WebP|WebP]] (v0.2.0 or newer)&lt;br /&gt;
&lt;br /&gt;
The following libraries are optional:&lt;br /&gt;
* Theora&lt;br /&gt;
* Speex&lt;br /&gt;
* [[#Ogg|Ogg]]&lt;br /&gt;
* [[#Vorbis|Vorbis]]&lt;br /&gt;
&lt;br /&gt;
====HomeBrew====&lt;br /&gt;
Install [http://mxcl.github.com/homebrew/ HomeBrew] and then run the following command&lt;br /&gt;
&lt;br /&gt;
 $ brew install nettle libjpeg curl sdl webp xvid gmp glew speex libvorbis theora&lt;br /&gt;
&lt;br /&gt;
All the necessary libraries should now have been installed.&lt;br /&gt;
&lt;br /&gt;
====Compiling by hand====&lt;br /&gt;
The following are shell scripts that download, compile, and install various libraries. This is more time consuming then other methods but might be useful if you need more control over your libraries&lt;br /&gt;
&lt;br /&gt;
=====JPEG=====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz &amp;gt; jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ tar xvzf jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ cd jpeg-8d&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====The OpenGL Extension Wrangler Library (GLEW)=====&lt;br /&gt;
&lt;br /&gt;
 $ curl -L https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz/download &amp;gt; glew-1.7.0.tgz&lt;br /&gt;
 $ tar xvzf glew-1.7.0.tgz&lt;br /&gt;
 $ cd glew-1.7.0&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====Simple DirectMedia Layer (SDL)=====&lt;br /&gt;
&lt;br /&gt;
Do not use the binaries provided by libsdl.org, as these are known to cause issues with gamma and color display. Instead, compile your own:&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15.tar.gz &amp;gt; SDL-1.2.15.tar.gz&lt;br /&gt;
 $ tar xvzf SDL-1.2.15.tar.gz&lt;br /&gt;
 $ cd SDL-1.2.15&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====The GNU MP Bignum Library (libgmp)=====&lt;br /&gt;
&lt;br /&gt;
 $ curl ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 &amp;gt; gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ tar xvjf gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ cd gmp-5.0.5&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====Ogg=====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz &amp;gt; libogg-1.3.0.tar.gz&lt;br /&gt;
 $ tar xvzf libogg-1.3.0.tar.gz&lt;br /&gt;
 $ cd libogg-1.3.0&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====Vorbis=====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz &amp;gt; libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ tar xvzf libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ cd libvorbis-1.3.3&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====WebP=====&lt;br /&gt;
&lt;br /&gt;
You do not need to compile WebP by hand; Google provides binaries for Mac OS X available from their [https://code.google.com/p/webp/downloads/detail?name=libwebp-0.2.0-mac-10.5.tar.gz project page]. You will need version 0.2.0 or newer.&lt;br /&gt;
&lt;br /&gt;
Once downloaded, you must still install the header files and the binary:&lt;br /&gt;
&lt;br /&gt;
 $ curl https://webp.googlecode.com/files/libwebp-0.2.0-mac-10.5.tar.gz &amp;gt; libwebp-0.2.0-mac-10.5.tar.gz&lt;br /&gt;
 $ tar xvzf libwebp-0.2.0-mac-10.5.tar.gz&lt;br /&gt;
 $ cd libwebp-0.2.0-mac-10.5&lt;br /&gt;
 $ sudo cp include/webp /usr/local/include&lt;br /&gt;
 $ sudo cp lib/libwebp.a /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
===Configuring with CMake===&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This should be a different directory.&lt;br /&gt;
# Hit &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that. Wait while the configuration process runs. You may have to set the following:&lt;br /&gt;
## If CMake did not find your jpeg headers for some reason, set &amp;lt;code&amp;gt;JPEG_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/path/to/Unvanquished/src/libs/jpeg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; to avoid having to compile nettle and hogweed yourself.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; to avoid having to compile Speex yourself.&lt;br /&gt;
## Uncheck &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; to avoid having to compile Theora or Xvid. (At present, there are not cutscenes or any such that require it.)&lt;br /&gt;
## '''You will probably not be able to compile with the GLSL optimizer enabled; uncheck &amp;lt;code&amp;gt;USE_GLSL_OPTIMIZER&amp;lt;/code&amp;gt;'''&lt;br /&gt;
## If you have selected to generate Xcode project files, make the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank. This option is not available if you have the generator set to Unix makefiles.&lt;br /&gt;
# Hit &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# You may now close CMake.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
====With Xcode====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Either start Xcode and open the project file (in the build directory you specified) or double-click the project file in Finder.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open the project file created by CMake, which should be in the build directory you specified.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Change the active target to &amp;quot;ALL_BUILD&amp;quot; and click Product&amp;amp;rarr;Build.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start Terminal (Applications &amp;amp;rarr; Utilities &amp;amp;rarr; Terminal).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Input the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are on a multi-core or multi-processor machine, you may speed up the process by passing the &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; argument followed by the number of available cores to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;; e.g., &amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;. Note that doing so makes reading error messages more difficult, as multiple instances of the compiler will print to the screen at once, causing information to appear out of order.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing the build===&lt;br /&gt;
&lt;br /&gt;
====With Xcode 4====&lt;br /&gt;
&lt;br /&gt;
To test the game, select the &amp;quot;client&amp;quot; scheme from the combo box on the toolbar, and click the run button or press {{Hotkey|MacCommand}}{{Hotkey|R}}.&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
After compiling, you'll have to place the data files in the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; directory in your build directory. [[#Acquiring the Game Files|For download instructions, see below.]]&lt;br /&gt;
&lt;br /&gt;
Your file structure should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Build_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
You may now start the application as such:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386&lt;br /&gt;
&lt;br /&gt;
Note that older machines will not support the new OpenGL 3 renderer, and must be started specifying the &amp;quot;vanilla&amp;quot; (aka &amp;quot;GL&amp;quot;) renderer:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386 +set cl_renderer GL&lt;br /&gt;
&lt;br /&gt;
===Bundling the Application===&lt;br /&gt;
&lt;br /&gt;
====With CPack====&lt;br /&gt;
&lt;br /&gt;
CPack is able to create standalone bundles (as well as many other types of installers). However you must generate the files using Unix Makefiles instead of Xcode.&lt;br /&gt;
&lt;br /&gt;
 $ cd /path/to/Unvanquished-build&lt;br /&gt;
 $ cpack -G Bundle&lt;br /&gt;
&lt;br /&gt;
Some warnings will be printed however these can be safely ignored. There should be a file called Unvanquished.dmg in the Unvanquished-build folder.&lt;br /&gt;
&lt;br /&gt;
====Manually====&lt;br /&gt;
&lt;br /&gt;
{{Note|header=Important|content=&lt;br /&gt;
Please be aware that these instructions are very much out of date, and may not work. Also note that the dynamic library bundler does '''not''' work as intended and although you will be able to run your build on your machine, it will most likely not work on other machines. It is strongly suggested that you compile the source using Xcode.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
You'll find the Mac [http://macdylibbundler.sourceforge.net/ dynamic library bundler] to be quite useful (you must generate the files using Unix Makefiles instead of Xcode):&lt;br /&gt;
&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/macdylibbundler/files/macdylibbundler/0.4.1/dylibbundler0.4.1.zip/download &amp;gt; \&lt;br /&gt;
    dylibbundler0.4.1.zip&lt;br /&gt;
 $ unzip dylibbundler0.4.1.zip&lt;br /&gt;
 $ cd dylibbundler&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once you've done that, you can proceed to create the application bundle. Note that these steps assume that you have downloaded the data files to &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; as shown above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git=/path/to/Unvanquished-git-repo&lt;br /&gt;
$ build=/path/to/Unvanquished-build-dir&lt;br /&gt;
$ mkdir -pv Unvanquished.app/Contents/{libs,MacOS,Resources,Frameworks}&lt;br /&gt;
$ cp -r $build/main Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ sips -s format tiff $git/debian/unvanquished.png --out temp.tiff&lt;br /&gt;
$ tiff2icns temp.tiff Unvanquished.app/Contents/Resources/Unvanquished.icns&lt;br /&gt;
$ rm temp.tiff&lt;br /&gt;
$ cp $build/daemon{,ded}.i386 $build/*.dylib Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ cp -r /Library/Frameworks/SDL.framework Unvanquished.app/Contents/Frameworks&lt;br /&gt;
$ install_name_tool -id \&lt;br /&gt;
    @executable_path/../Frameworks/SDL.framework/Versions/A/SDL \&lt;br /&gt;
    Unvanquished.app/Contents/Frameworks/SDL.framework/Versions/A/SDL&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL \&lt;br /&gt;
    @executable_path/../Frameworks/SDL.framework/Versions/A/SDL \&lt;br /&gt;
    Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL \&lt;br /&gt;
    @executable_path/../Frameworks/SDL.framework/Versions/A/SDL \&lt;br /&gt;
    Unvanquished.app/Contents/MacOS/librendererGLi386.dylib&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL \&lt;br /&gt;
    @executable_path/../Frameworks/SDL.framework/Versions/A/SDL \&lt;br /&gt;
    Unvanquished.app/Contents/MacOS/librendererGL3i386.dylib&lt;br /&gt;
$ for binary in Unvanquished.app/Contents/MacOS/*.{i386,dylib}; do&lt;br /&gt;
    dylibbundler -b -x $binary -d $dest/Unvanquished.app/Contents/libs/; done&lt;br /&gt;
$ cp /usr/lib/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ chmod +w ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -id @executable_path/../libs/libGLEW.1.7.0.dylib \&lt;br /&gt;
    ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -change /usr/lib/libGLEW.1.7.0.dylib \&lt;br /&gt;
    @executable_path/../libs/libGLEW.1.7.0.dylib \&lt;br /&gt;
    ./Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ cat &amp;gt; Unvanquished.app/Contents/Info.plist&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot;&lt;br /&gt;
          &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;daemon.i386&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIconFile&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished.icns&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;net.Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleShortVersionString&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
^d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;^d&amp;lt;/code&amp;gt; indicates pressing {{Hotkey|Ctrl}}{{Hotkey|D}} on the keyboard.&lt;br /&gt;
&lt;br /&gt;
The contents of the completed application bundle should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Bundle_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
'''Note''': If you compiled SDL from source, you will not see a directory titled &amp;lt;code&amp;gt;SDL.framework&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
===Visual Studio===&lt;br /&gt;
&lt;br /&gt;
CMake can generate Visual Studio projects for Unvanquished.&lt;br /&gt;
&lt;br /&gt;
# Run the &amp;lt;code&amp;gt;Visual_Studio32.bat&amp;lt;/code&amp;gt; batch script in your source directory by double-clicking it. Alternatively, you may use the &amp;lt;code&amp;gt;Visual_Studio64.bat&amp;lt;/code&amp;gt; shell script if you have the [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7 SDK] installed and a 64-bit system.&lt;br /&gt;
# Open &amp;lt;code&amp;gt;build-32/Daemon.sln&amp;lt;/code&amp;gt; in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; or &amp;quot;Debug&amp;quot; in the first one and Win32 in the second one&lt;br /&gt;
# Press {{Hotkey|F5}} to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
====Important Notes====&lt;br /&gt;
&lt;br /&gt;
* LLVM is disabled and does not work correctly with CMake generated Visual Studio projects.&lt;br /&gt;
* ncurses is not supported under Visual Studio.&lt;br /&gt;
* The path to the build folder must not have any spaces otherwise generation of QVMs will fail. See {{Issue|102}}.&lt;br /&gt;
* Due to limitations with CMake, neither the startup project nor the working directory can be specified. These must be set manually to debug the client with Visual Studio:&lt;br /&gt;
** Right click on client and select &amp;quot;Set as StartUp project&amp;quot;.&lt;br /&gt;
** Right click on client, select properties, select Debugging and set &amp;quot;Working Directory&amp;quot; to &amp;lt;code&amp;gt;$(TargetPath)\..&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Troubleshooting====&lt;br /&gt;
&lt;br /&gt;
If installing the Windows 7 SDK [http://support.microsoft.com/kb/2717426?ppud=4&amp;amp;wa=wsignin1.0 fails with error code 5100] (when the installation fails, click &amp;quot;View Log&amp;quot;, and search for &amp;quot;5100&amp;quot;), remove any installed copies of the Microsoft Visual C++ 2010 x86 Redistributable and Microsoft Visual C++ 2010 x64 Redistributable via the control panel (Control Panel &amp;amp;rarr; Programs and Features), then run the installer again.&lt;br /&gt;
&lt;br /&gt;
===MinGW===&lt;br /&gt;
&lt;br /&gt;
It is possible to build Unvanquished with MinGW, although the process is rather arduous compared to Visual Studio or compiling for other platforms. Currently, you will also need [http://cygwin.com/setup.exe Cygwin] to build the GMP library as well.&lt;br /&gt;
&lt;br /&gt;
====Notes====&lt;br /&gt;
&lt;br /&gt;
* The easiest way to acquire and install MinGW is with the graphical [http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/ mingw-get-inst installer]. At a minimum, you will need to install the C and C++ compilers. &amp;lt;!-- TODO: maybe walk the user through the installer? --&amp;gt;&lt;br /&gt;
* When configuring the build with CMake, you will find that you will have to set a number of libraries manually. You can find precompiled DLLs for most of the dependencies; those that are not pre-compiled can be built with the corresponding &amp;lt;code&amp;gt;USE_INTERNAL_&amp;lt;/code&amp;gt; setting.&lt;br /&gt;
* '''The build will fail during QVM compilation if your source or build directories contain spaces.''' This is due to a bug with lcc. If your home directory contains a space, you may want to create source and build directories at the root of one of your drives (e.g., &amp;lt;code&amp;gt;C:\Unvanquished\Source&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;C:\Unvanquished\Build&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
====Instructions====&lt;br /&gt;
&lt;br /&gt;
The easiest way to get a build up (at the time of writing) is as follows:&lt;br /&gt;
&lt;br /&gt;
{{Note|content=Although there are 64-bit binaries of most of the libraries required to build the game, these do not work with MinGW at present, so the following instructions all use the 32-bit binaries.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You will need to download and install some version of the DirectX SDK to compile the source. You may download the June 2010 release from [http://www.microsoft.com/en-us/download/details.aspx?id=6812 Microsoft].&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Although there are binaries of gmp distributed with the source, they have are dependent on Visual Studio's implementations of &amp;lt;code&amp;gt;_ftol2_sse&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_alloca_probe_16&amp;lt;/code&amp;gt;. A fix may be found on [http://stackoverflow.com/questions/6753111/static-linking-with-openssl Stack Exchange], but requires that Visual Studio be installed, which defeats the purpose of attempting to use MinGW to compile the source. You can build gmp yourself:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Download and extract the latest version of the [http://gmplib.org/ GNU MP Bignum Library (GMP)]. (You will need either cygwin with tar and bz2 installed or 7-zip to extract the archive.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the following Cygwin packages if you have not already:&lt;br /&gt;
* binutils&lt;br /&gt;
* gcc&lt;br /&gt;
* gcc-g++&lt;br /&gt;
* m4&lt;br /&gt;
* make&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;As part of the GMP compilation process, a file called &amp;lt;code&amp;gt;gen-fib.c&amp;lt;/code&amp;gt; generates a table of numbers in the Fibonacci sequence. The generated file does not play nicely with Cygwin or MinGW, so you must fix it. Edit &amp;lt;code&amp;gt;gen-fib.c&amp;lt;/code&amp;gt;, and at around line 100, change these lines&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for (i = 0; i &amp;lt; fnum; i++)&lt;br /&gt;
    {&lt;br /&gt;
      printf (&amp;quot;  CNST_LIMB (0x&amp;quot;);&lt;br /&gt;
      mpz_out_str (stdout, 16, f[i]);&lt;br /&gt;
      printf (&amp;quot;),  /* %d */\n&amp;quot;, i-1);&lt;br /&gt;
    }&lt;br /&gt;
  printf (&amp;quot;};\n&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for (i = 0; i &amp;lt; fnum; i++)&lt;br /&gt;
    {&lt;br /&gt;
      printf (&amp;quot;  CNST_LIMB (0x&amp;quot;);&lt;br /&gt;
      mpz_out_str (stdout, 16, f[i]);&lt;br /&gt;
      printf (&amp;quot;)%c  /* %d */\n&amp;quot;, (i == (fnum-1)) ? ' ' : ',', i-1);&lt;br /&gt;
    }&lt;br /&gt;
  printf (&amp;quot;};\n&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The patch file looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@@ -100,7 +100,7 @@&lt;br /&gt;
     {&lt;br /&gt;
       printf (&amp;quot;  CNST_LIMB (0x&amp;quot;);&lt;br /&gt;
       mpz_out_str (stdout, 16, f[i]);&lt;br /&gt;
-      printf (&amp;quot;),  /* %d */\n&amp;quot;, i-1);&lt;br /&gt;
+      printf (&amp;quot;)%c  /* %d */\n&amp;quot;, (i == (fnum-1)) ? ' ' : ',', i-1);&lt;br /&gt;
     }&lt;br /&gt;
   printf (&amp;quot;};\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compiling with MinGW does not work, so you will need to compile with Cygwin. At the prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./configure --disable-static --enable-shared&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;--disable-static&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--enable-shared&amp;lt;/code&amp;gt; flags configure GMP to build a DLL instead of a static library. You may optionally perform &amp;lt;code&amp;gt;make install&amp;lt;/code&amp;gt;. Additional compilation instructions [http://www.cs.nyu.edu/exact/core/gmp/ are available].&lt;br /&gt;
&amp;lt;p&amp;gt;If you experience difficulties with compilation and it appears that MinGW gcc is being detected by &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; and not Cygwin gcc, you can try editing your &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt; variable:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PATH=`echo $PATH | sed &amp;quot;s|/cygdrive/c/MinGW/bin:||&amp;quot;`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Re-run &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Download the [http://www.libsdl.org/release/SDL-1.2.15-win32.zip latest stable version] of SDL for Windows. Extract the archive and copy &amp;lt;code&amp;gt;SDL.dll&amp;lt;/code&amp;gt; from it to the root of your build directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Set the following CMake flags:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Setting&lt;br /&gt;
! Description&lt;br /&gt;
! Type&lt;br /&gt;
! Value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt;&lt;br /&gt;
| Use the provided copies of crypto libraries. &amp;lt;!-- FIXME: I think these are nettle and something else --&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_INTERNAL_GLEW&amp;lt;/code&amp;gt;&lt;br /&gt;
| Use the provided copy of GLEW.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_INTERNAL_JPEG&amp;lt;/code&amp;gt;&lt;br /&gt;
| Use the provided copy of JPEG.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_INTERNAL_SDL&amp;lt;/code&amp;gt;&lt;br /&gt;
| Use the provided copy of SDL.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt;&lt;br /&gt;
| Use the provided copy of Speex.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_INTERNAL_WEBP&amp;lt;/code&amp;gt;&lt;br /&gt;
| Use the provided copy of WebP.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt;&lt;br /&gt;
| Enables/disables curses.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;PNG_LIBRARY&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the PNG library DLL.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/libpng/libs/win32/libpng.lib&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;PNG_PNG_INCLUDE_DIR&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the PNG library header files.&lt;br /&gt;
| &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/libpng&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;FREETYPE_LIBRARY&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the compiled FreeType library.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/freetype/lib/freetype.lib&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;FREETYPE_INCLUDE_DIR_freetype2&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the FreeType library header files.&lt;br /&gt;
| &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/freetype/include/freetype2&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;FREETYPE_INCLUDE_DIR_ft2build&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the FreeType library file &amp;quot;ftbuild.h&amp;quot;.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/freetype/include/&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GMP_INCLUDE_DIR&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the GMP library header files.&lt;br /&gt;
| &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/gmp/include&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GMP_LIBRARY&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the GMP library.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;path/to/compiled/gmp/&amp;lt;/var&amp;gt;.libs/cyggmp-10.dll&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ZLIB_INCLUDE_DIR&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the zlib library header files.&lt;br /&gt;
| &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/zlibwapi/include&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ZLIB_LIBRARY&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the zlib library.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/zlibwapi/lib/x32/zlib1.dll&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;CURL_LIBRARY&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the CURL library.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/curl-7.21.6/lib/win32/release/libcurl.dll&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;CURL_INCLUDE_DIR&amp;lt;/code&amp;gt;&lt;br /&gt;
| Path to the zlib library.&lt;br /&gt;
| &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/curl-7.21.6/include/curl&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt;&lt;br /&gt;
| Enables/disables OpenAL support.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt;&lt;br /&gt;
| Enables/disables Theora support.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt;&lt;br /&gt;
| Enables/disables Xvid support.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;USE_CODEC_THEORA&amp;lt;/code&amp;gt;&lt;br /&gt;
| Enables/disables Ogg support.&lt;br /&gt;
| &amp;lt;code&amp;gt;BOOL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SDL_LIBRARY&amp;lt;/code&amp;gt;&lt;br /&gt;
| The path to the SDL DLL.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;BuildPath&amp;lt;/var&amp;gt;/SDL.dll&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt;&lt;br /&gt;
| Enables/disables Ogg support.&lt;br /&gt;
| &amp;lt;code&amp;gt;FILEPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/libsdl/src/main/win32/SDL_win32_main.c&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
Do note that CMake is slash-direction&amp;amp;ndash;agnostic; it can handle both forward- and backslashes on Windows.&lt;br /&gt;
&amp;lt;p&amp;gt;If you would like to compile a debug build, change &amp;lt;code&amp;gt;CMAKE_RELEASE_TYPE&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;Release&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Debug&amp;lt;/code&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/CMakeLists.txt&amp;lt;/code&amp;gt; and edit the line&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    set( OS_LIBRARIES m winmm ws2_32 psapi z )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(around line 1040) to look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    set( OS_LIBRARIES m winmm ws2_32 psapi )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also edit around line 1700:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
###########################&lt;br /&gt;
#Configure Download Script#&lt;br /&gt;
###########################&lt;br /&gt;
&lt;br /&gt;
if( NOT MSVC )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
###########################&lt;br /&gt;
#Configure Download Script#&lt;br /&gt;
###########################&lt;br /&gt;
&lt;br /&gt;
if( NOT WIN32 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;SourcePath&amp;lt;/var&amp;gt;/src/libs/libsdl/src/main/win32/SDL_win32_main.c&amp;lt;/code&amp;gt; and edit the lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* Include the SDL main definition header */&lt;br /&gt;
#include &amp;quot;SDL.h&amp;quot;&lt;br /&gt;
#include &amp;quot;SDL_main.h&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* Include the SDL main definition header */&lt;br /&gt;
#include &amp;quot;../../../include/SDL.h&amp;quot;&lt;br /&gt;
#include &amp;quot;../../../include/SDL_main.h&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a command prompt and &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; to your source directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; mingw32-make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you would like verbose output, set the &amp;lt;code&amp;gt;VERBOSE&amp;lt;/code&amp;gt; environment variable before running &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; set VERBOSE=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To make it easier to build the source, you can create a batch file (call it something like &amp;lt;code&amp;gt;compile.bat&amp;lt;/code&amp;gt;) and place it in your build directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
&lt;br /&gt;
set RETURN=compile&lt;br /&gt;
&lt;br /&gt;
:get_time&lt;br /&gt;
	:: Thank you, Rob van der Woude:&lt;br /&gt;
	:: (http://www.robvanderwoude.com/datetimentparse.php)&lt;br /&gt;
	FOR /F &amp;quot;tokens=1,2,3 delims=:.&amp;quot; %%A IN (&amp;quot;%Time%&amp;quot;) DO (&lt;br /&gt;
		SET /A HOURS   = 100%%A %% 100&lt;br /&gt;
		SET /A MINUTES = 100%%B %% 100&lt;br /&gt;
		SET /A SECONDS = 100%%C %% 100&lt;br /&gt;
	)&lt;br /&gt;
	SET /A TICKS=( %HOURS% * 3600 ) + ( %MINUTES% * 60 ) + %SECONDS%&lt;br /&gt;
	GOTO %RETURN%&lt;br /&gt;
&lt;br /&gt;
:compile&lt;br /&gt;
	SET START_TICKS=%TICKS%&lt;br /&gt;
&lt;br /&gt;
	SET VERBOSE=1&lt;br /&gt;
	:: mingw32-make clean&lt;br /&gt;
	mingw32-make -j4&lt;br /&gt;
&lt;br /&gt;
	set RETURN=finish&lt;br /&gt;
	GOTO get_time&lt;br /&gt;
&lt;br /&gt;
:finish&lt;br /&gt;
	SET /A COMPILE_TIME=%TICKS% - %START_TICKS%&lt;br /&gt;
	SET /A MINUTES=%COMPILE_TIME% / 60&lt;br /&gt;
	SET /A SECONDS=%COMPILE_TIME% %% 60&lt;br /&gt;
	ECHO.&lt;br /&gt;
	ECHO Compilation took %MINUTES%m %SECONDS%s.&lt;br /&gt;
	PAUSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once compilation finishes, you will find that the game will fail to run due to DLL dependencies. To resolve these:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You will need to move &amp;lt;code&amp;gt;INTERNAL_GLEW&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;Release/&amp;lt;/code&amp;gt; folder of the build directory to the root of the build directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You will need to place the following other DLLs in your build directory:&lt;br /&gt;
* freetype6.dll&lt;br /&gt;
* libcurl.dll&lt;br /&gt;
* libpng14-14.dll&lt;br /&gt;
* zlib1.dll&lt;br /&gt;
If the renderer's DLL dependencies are not met, you will be informed that the game failed to load a renderer. If you receive an error stating that the application failed to start at all, then you are likely missing some version of the Microsoft Visual C runtime redistributable.&lt;br /&gt;
&amp;lt;p&amp;gt;You may find that you also need these DLLs (if you configured your build differently):&amp;lt;/p&amp;gt;&lt;br /&gt;
* libbz2.dll&lt;br /&gt;
* libogg.dll&lt;br /&gt;
* libtheora.dll&lt;br /&gt;
* libvorbis.dll&lt;br /&gt;
* libvorbisfile.dll&lt;br /&gt;
* msvcr100.dll&lt;br /&gt;
* msvcr100d.dll&lt;br /&gt;
* zlibwapi.dll&lt;br /&gt;
The easiest way to obtain these DLLs is by copying them from the installation directory of an [http://sourceforge.net/projects/unvanquished/files/latest/download official release] of Unvanquished.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You will need to copy your compiled DLL of GMP to your build directory. It may be found in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;path/to/compiled/gmp/&amp;lt;/var&amp;gt;.libs/cyggmp-10.dll&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;As you compiled GMP with Cygwin, it in turn depends on &amp;lt;code&amp;gt;cygwin1.dll&amp;lt;/code&amp;gt;, which may typically be found in &amp;lt;code&amp;gt;C:\cygwin\bin\&amp;lt;/code&amp;gt;. Copy and paste it into your build directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
Once you have completed these steps, you should never have to do them again.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Notes====&lt;br /&gt;
&lt;br /&gt;
* If you would like to use curses, try using [http://sourceforge.net/projects/pdcurses/files/pdcurses PDCurses].&lt;br /&gt;
&lt;br /&gt;
===QtCreator===&lt;br /&gt;
&lt;br /&gt;
# Install MinGW and follow the above instructions, except select Code::Blocks as the generator.&lt;br /&gt;
# Start QtCreator, and select &amp;quot;Open File or Project&amp;amp;hellip;&amp;quot; from the File menu.&lt;br /&gt;
# Navigate to your source directory and open CMakeLists.txt.&lt;br /&gt;
# At the CMake Wizard, select the same build directory you already configured using CMake. (If you did not chose Code::Blocks as the generator, you will have to start over again, as QtCreator requires a Code::Blocks project file in order to compile the source.)&lt;br /&gt;
# Ensure that a generator is selected in the combo box, and click &amp;quot;Run CMake&amp;quot;. If there is no generator listed, see the [[#Troubleshooting|troubleshooting]] section below.&lt;br /&gt;
# Click &amp;quot;Finish&amp;quot; to close the wizard.&lt;br /&gt;
&lt;br /&gt;
You should now be able to compile, run, and debug the code using QtCreator.&lt;br /&gt;
&lt;br /&gt;
====Troubleshooting====&lt;br /&gt;
&lt;br /&gt;
If at the &amp;quot;Run CMake&amp;quot; prompt of the the CMake Wizard, select &amp;quot;Run CMake&amp;quot; and are warned that no generator was selected, and notice that there are no generators in the combo box, you will likely have to [http://doc.qt.digia.com/qtcreator-2.4/creator-tool-chains.html manually configure your toolchain]. Select &amp;quot;Options&amp;amp;hellip;&amp;quot; from the &amp;quot;Tools&amp;quot; menu, then navigate to &amp;quot;Build &amp;amp;amp; Run&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
At the options window,&lt;br /&gt;
* Go to the &amp;quot;Kits&amp;quot; tab, and mouse over the &amp;quot;Desktop (default)&amp;quot; kit under &amp;quot;Manual&amp;quot;. If there were any errors in configuring this kit, they will be displayed in the tool tip. If there are problems, select the kit. You may need to manually specify the location of the MinGW debugger, for example, which is typically &amp;lt;code&amp;gt;C:\MinGW\bin\gdb.exe&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Go to the &amp;quot;Compilers&amp;quot; tab, and ensure that MinGW is present. If not, you will need to add it manually.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install g++ gcc cmake libcurl4-gnutls-dev libfreetype6-dev \&lt;br /&gt;
   libglew-dev libgmp-dev nettle-dev zlib1g-dev libncursesw5-dev \&lt;br /&gt;
   libsdl2-dev libopenal-dev libjpeg8-dev libpng12-dev libwebp-dev \&lt;br /&gt;
   libogg-dev libvorbis-dev libspeexdsp-dev libtheora-dev libopusfile-dev \&lt;br /&gt;
   libxvidcore-dev libgeoip-dev&lt;br /&gt;
&lt;br /&gt;
If libsdl2-dev isn't available, you can use libsdl1.2-dev instead.&lt;br /&gt;
&lt;br /&gt;
If the version of WebP supplied by your version of Debian or Ubuntu is older than v0.2.0, you will need to [https://code.google.com/p/webp/downloads/detail?name=libwebp-0.2.0.tar.gz download] and [https://developers.google.com/speed/webp/docs/compiling#unix compile it from source]. After compiling and installing with &amp;lt;code&amp;gt;sudo make install&amp;lt;/code&amp;gt;, in CMake, you'll need to set &amp;lt;code&amp;gt;WEBP_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/usr/local/include/webp&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WEBP_LIBRARY&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/usr/local/lib/libwebp.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''We currently provide ready-to-use libwebp-dev, libogg-dev libopusfile-dev where needed in our [http://{{SERVERNAME}}/index.php/Download#ubuntu Debian and Ubuntu repositories], alongside .debs of the game and server.'''&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp3-dev instead of libgmp-dev and libglew1.7-dev instead of libglew-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
====openSUSE====&lt;br /&gt;
&lt;br /&gt;
 $ sudo install zypper gcc gcc-c++ Mesa-libGL-devel SDL-devel libjpeg8-devel \&lt;br /&gt;
   libpng12-devel glew-devel webp-devel ncurses-devel gmp-devel libcurl-devel \&lt;br /&gt;
   libnettle-devel openal-soft-devel speex-devel libvorbis-devel \&lt;br /&gt;
   libtheora-devel&lt;br /&gt;
&lt;br /&gt;
The latest version of WebP must be installed manually:&lt;br /&gt;
&lt;br /&gt;
 $ wget https://webp.googlecode.com/files/libwebp-0.2.1.tar.gz&lt;br /&gt;
 $ tar xvzf libwebp-0.2.1.tar.gz&lt;br /&gt;
 $ cd libwebp-0.2.1&lt;br /&gt;
 $ ./configure &amp;amp;&amp;amp; make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
You must disable curses (set &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; appropriately in CMake) as failing to do so will cause Unvanquished to crash on startup.&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Optionally: to use clang (rather than the default gcc and g++ compilers) export the CC and CXX variables before running cmake:&lt;br /&gt;
&lt;br /&gt;
 $ export CC=&amp;quot;clang&amp;quot;&lt;br /&gt;
 $ export CXX=&amp;quot;clang++ -stdlib=libc++ -lc++abi&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press {{Hotkey|c}} to configure. If an error occurs during this phase, make note of it and press {{Hotkey|e}} to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press {{Hotkey|Enter}} to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press {{Hotkey|Esc}} when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press {{Hotkey|C}} again, then {{Hotkey|G}} to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
==Acquiring the Game Files==&lt;br /&gt;
&lt;br /&gt;
===Acquiring mandatory game files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately. This may be done on the command line or from your web browser. The downloads may be found on [http://sourceforge.net/projects/unvanquished/files/Assets SourceForge.net]. If you download the files from your browser, just download the files named &amp;quot;pak*.pk3&amp;quot;, and save them to the [[Running_the_game#Data_locations|data location]] for your system.&lt;br /&gt;
&lt;br /&gt;
On Linux, this may be done as follows:&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;[path to Unvanquished installation or build]&amp;lt;/var&amp;gt;/main&lt;br /&gt;
 $ for file in {{CurrentVersion|PakFiles}}; do&lt;br /&gt;
 if [ ! -e $file ]; then&lt;br /&gt;
 wget -O $file &amp;quot;http://sourceforge.net/projects/unvanquished/files/Assets/$file/download&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
On FreeBSD, using the &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt; shell:&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;[path to Unvanquished installation or build]&amp;lt;/var&amp;gt;/main&lt;br /&gt;
 $ for file in {{CurrentVersion|PakFiles}}; do&lt;br /&gt;
 if [ ! -e $file ]; then&lt;br /&gt;
 fetch -r -o $file &amp;quot;http://sourceforge.net/projects/unvanquished/files/Assets/$file/download&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
On Mac OS X:&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/Library/Application\ Support/Unvanquished/main&lt;br /&gt;
 $ for file in {{CurrentVersion|PakFiles}}; do&lt;br /&gt;
 if [ ! -e $file ]; then&lt;br /&gt;
 curl -L &amp;quot;http://sourceforge.net/projects/unvanquished/files/Assets/$file/download&amp;quot; &amp;gt; $file&lt;br /&gt;
 fi&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
Linux users may also use the &amp;lt;code&amp;gt;download-pk3.sh&amp;lt;/code&amp;gt; script that is distributed with the source code, which requires that curl be installed:&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;[path to Unvanquished source code]&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir -p ~/.Unvanquished/main&lt;br /&gt;
 $ ./download-pk3.sh ~/.unvanquished/pkg&lt;br /&gt;
&lt;br /&gt;
===Downloading the map pack===&lt;br /&gt;
&lt;br /&gt;
The map pack exists only for convenience; if you do not download the map pack, Unvanquished will automatically download maps as needed when you attempt to play online.&lt;br /&gt;
&lt;br /&gt;
To download the map pack on Linux:&lt;br /&gt;
&lt;br /&gt;
 $ wget -O maps.7z &amp;quot;http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
To download the map pack on Mac OS X:&lt;br /&gt;
&lt;br /&gt;
 $ curl -L &amp;quot;http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z&amp;quot; &amp;gt; maps.7z; done&lt;br /&gt;
&lt;br /&gt;
Note that you will need to unzip the map pack on either system as it is compressed with LZMA. Mac users can use the [http://wakaba.c3.cx/s/apps/unarchiver.html Unarchiver]. Uncompressing the archive on Linux is highly dependent on your distribution.&lt;br /&gt;
&lt;br /&gt;
===Verifying the Files===&lt;br /&gt;
&lt;br /&gt;
Download the latest [http://sourceforge.net/projects/unvanquished/files/Assets/{{CurrentVersion|MD5HashFile}} MD5 hash file] and save it to your system's [[Running_the_game#Data_directory|data location]].&lt;br /&gt;
&lt;br /&gt;
On systems with the &amp;lt;code&amp;gt;md5&amp;lt;/code&amp;gt; command (Mac OS X):&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/Library/Application\ Support/Unvanquished/main&lt;br /&gt;
 $ cat {{CurrentVersion|MD5HashFile}} | while read line; do&lt;br /&gt;
 file=&amp;quot;`echo &amp;quot;$line&amp;quot; | sed -E &amp;quot;s/^[a-fA-F0-9]+ +\*?//&amp;quot;`&amp;quot;&lt;br /&gt;
 if [ -e &amp;quot;$file&amp;quot; ]; then&lt;br /&gt;
 if [ `md5 -r &amp;quot;$file&amp;quot; | cut -d\  -f1` = &amp;quot;`echo &amp;quot;$line&amp;quot; | cut -d\  -f1`&amp;quot; ]&lt;br /&gt;
 then echo &amp;quot;File \&amp;quot;$file\&amp;quot; appears okay.&amp;quot;&lt;br /&gt;
 else echo &amp;quot;File \&amp;quot;$file\&amp;quot; is corrupt&amp;quot;'!' &amp;gt;&amp;amp;2&lt;br /&gt;
 fi; fi; done&lt;br /&gt;
&lt;br /&gt;
On systems with the &amp;lt;code&amp;gt;md5sum&amp;lt;/code&amp;gt; command (most Linux distributions):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;[[Running_the_game#Data_directory|/path/to/data/files]]&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ md5sum -c {{CurrentVersion|MD5HashFile}} 2&amp;gt;&amp;amp;1 | grep -v &amp;quot;open or read\|file or directory&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;grep&amp;lt;/code&amp;gt; invocation is used to strip output complaining about missing files.&lt;br /&gt;
&lt;br /&gt;
Any files that are found to be corrupt should be replaced; just download a [http://sourceforge.net/projects/unvanquished/files/Assets new copy] of the affected file(s).&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===CMake cannot locate Newton===&lt;br /&gt;
&lt;br /&gt;
If CMake cannot find Newton, you'll need to set it up yourself.&lt;br /&gt;
&lt;br /&gt;
It should be in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;/path/to/Unvanquished&amp;lt;/var&amp;gt;/src/libs/libnewton/libs/&amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt;/libNewton.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
Be sure to replace &amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt; with the proper directory name.&lt;br /&gt;
&lt;br /&gt;
Use CMake as before to change the &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt; build setting to the said path:&lt;br /&gt;
&lt;br /&gt;
# Start the CMake configurator:&amp;lt;pre&amp;gt;$ ccmake ..&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Scroll down and highlight &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Press {{Hotkey|Enter}} to begin editing and input in the path.&lt;br /&gt;
# Press {{Hotkey|C}} to configure and {{Hotkey|G}} to generate the new makefiles.&lt;br /&gt;
# Press {{Hotkey|Q}} to quit.&lt;br /&gt;
# Recompile the source:&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The C Compiler is not able to compile a simple test program===&lt;br /&gt;
&lt;br /&gt;
When attempting to generate a solution for Xcode CMake fails with the following error&lt;br /&gt;
  -- Check for working C compiler using: Xcode -- broken&lt;br /&gt;
  CMake Error at /Applications/CMake 2.8-8.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):&lt;br /&gt;
   The C compiler &amp;quot;/usr/bin/gcc&amp;quot; is not able to compile a simple test program.&lt;br /&gt;
  &lt;br /&gt;
    It fails with the following output:&lt;br /&gt;
  &lt;br /&gt;
     Change Dir: /Users/danielmaloney/Documents/Unvanquished/build-xcode/CMakeFiles/CMakeTmp&lt;br /&gt;
  &lt;br /&gt;
    &lt;br /&gt;
  &lt;br /&gt;
    Run Build Command:/Applications/CMake\ 2.8-8.app/Contents/bin/cmakexbuild&lt;br /&gt;
    -project CMAKE_TRY_COMPILE.xcodeproj build -target&lt;br /&gt;
    cmTryCompileExec1400153232 -configuration Debug&lt;br /&gt;
  &lt;br /&gt;
    Error: No developer directory found at /Developer.  Run&lt;br /&gt;
    /usr/bin/xcode-select to update the developer directory path.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
  &lt;br /&gt;
 &lt;br /&gt;
    CMake will not be able to correctly generate this project.&lt;br /&gt;
  Call Stack (most recent call first):&lt;br /&gt;
    CMakeLists.txt:19 (project)&lt;br /&gt;
&lt;br /&gt;
This is due to Xcode 4.3 having a different directory structure to previous versions. Simply running the following command will correct this error:&lt;br /&gt;
 sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer/&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Technical_Documentation&amp;diff=1136</id>
		<title>Technical Documentation</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Technical_Documentation&amp;diff=1136"/>
		<updated>2012-12-10T07:25:27Z</updated>

		<summary type="html">&lt;p&gt;Danmal: Add info about valgrind + fglrx&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently, this page isn't of much help, but you can change that by editing it!&lt;br /&gt;
&lt;br /&gt;
==Source code &amp;amp; data structure==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; Data associated with the game.&lt;br /&gt;
** &amp;lt;code&amp;gt;def/&amp;lt;/code&amp;gt; Entity definitions for [[Mapping|Radiant]].&lt;br /&gt;
** &amp;lt;code&amp;gt;fonts/&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;gfx/&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;glsl/&amp;lt;/code&amp;gt; OpenGL shader code.&lt;br /&gt;
** &amp;lt;code&amp;gt;lights/&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;models/&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;scripts/&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;sound/&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;translation/&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;ui/&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;src/&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;engine/&amp;lt;/code&amp;gt; Engine source code.&lt;br /&gt;
*** &amp;lt;code&amp;gt;asm/&amp;lt;/code&amp;gt;&lt;br /&gt;
*** &amp;lt;code&amp;gt;client/&amp;lt;/code&amp;gt;&lt;br /&gt;
*** &amp;lt;code&amp;gt;null/&amp;lt;/code&amp;gt;&lt;br /&gt;
*** &amp;lt;code&amp;gt;qcommon/&amp;lt;/code&amp;gt;&lt;br /&gt;
*** &amp;lt;code&amp;gt;renderer/&amp;lt;/code&amp;gt; Vanilla (fixed-function pipeline) renderer&lt;br /&gt;
*** &amp;lt;code&amp;gt;rendererGL/&amp;lt;/code&amp;gt; Modern XReal-based renderer&lt;br /&gt;
*** &amp;lt;code&amp;gt;server/&amp;lt;/code&amp;gt;&lt;br /&gt;
*** &amp;lt;code&amp;gt;sys/&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;gamelogic/&amp;lt;/code&amp;gt; Code that falls outside the scope of the core engine. These are all run in separate [[virtual machines]].&lt;br /&gt;
*** &amp;lt;code&amp;gt;cgame/&amp;lt;/code&amp;gt; Client-side game code.&lt;br /&gt;
*** &amp;lt;code&amp;gt;game/&amp;lt;/code&amp;gt; Server-side game code.&lt;br /&gt;
*** &amp;lt;code&amp;gt;ui/&amp;lt;/code&amp;gt; User interface code.&lt;br /&gt;
&lt;br /&gt;
==Program entry point==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function may be found at around line 591 of {{SourceFile|src/engine/sys/sys_main.c}}. Note that some magic happens on the Mac in {{SourceFile|src/engine/sys/SDLMain.m}}.&lt;br /&gt;
&lt;br /&gt;
==Lag compensation==&lt;br /&gt;
&lt;br /&gt;
Daemon uses Neil &amp;quot;haste&amp;quot; Toronto's [http://www.ra.is/unlagged/ Unlagged mod].&lt;br /&gt;
&lt;br /&gt;
==Game logic==&lt;br /&gt;
&lt;br /&gt;
Buildable information is encapsulated in the &amp;lt;code&amp;gt;cg_buildables&amp;lt;/code&amp;gt; array (declared in {{SourceFile|src/gamelogic/cgame/cg_main.c|cg_main.c}})&lt;br /&gt;
&lt;br /&gt;
Constants used to define gamelogic variables are in {{SourceFile|src/gamelogic/game/tremulous.h}}.&lt;br /&gt;
&lt;br /&gt;
Types:&lt;br /&gt;
* &amp;lt;code&amp;gt;buildableInfo_t&amp;lt;/code&amp;gt; &amp;amp;mdash; Encapsulates data associated with buildables (sounds, animations, etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;buildable_t&amp;lt;/code&amp;gt; &amp;amp;mdash; An enumeration of all buildable types.&lt;br /&gt;
* &amp;lt;code&amp;gt;buildableAttributes_t&amp;lt;/code&amp;gt; &amp;amp;mdash; Encapsulates gameplay information associated with buildables. There is an array of these called &amp;lt;code&amp;gt;bg_buildableList&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Server-side==&lt;br /&gt;
&lt;br /&gt;
Server game state initialization occurs in &amp;lt;code&amp;gt;G_InitGame()&amp;lt;/code&amp;gt; in {{SourceFile|src/gamelogic/game/g_main.c}}.&lt;br /&gt;
&lt;br /&gt;
==Particle &amp;amp;amp; trail system==&lt;br /&gt;
&lt;br /&gt;
For now, please see the [http://tremulous.net/manual/#x1-130003.2 Tremulous documentation].&lt;br /&gt;
&lt;br /&gt;
==GL3 Renderer==&lt;br /&gt;
&lt;br /&gt;
This section is a work-in-progress.&lt;br /&gt;
&lt;br /&gt;
Source code for the OpenGL 3 renderer is located in {{SourceFile|src/engine/rendererGL}}.&lt;br /&gt;
&lt;br /&gt;
Shaders are implemented as subclasses of the &amp;lt;code&amp;gt;GLShader&amp;lt;/code&amp;gt; class. All are defined in {{SourceFile|src/engine/rendererGL/gl_shader.h}}.&lt;br /&gt;
&lt;br /&gt;
Compiled GLSL shader files (located in the hard-coded location &amp;lt;code&amp;gt;&amp;quot;glsl/&amp;quot;&amp;lt;/code&amp;gt; with the &amp;lt;code&amp;gt;.bin&amp;lt;/code&amp;gt; filename extension) are read by &amp;lt;code&amp;gt;GLShader::LoadShaderBinary()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
All possible parameters (what OpenGL calls [http://www.opengl.org/sdk/docs/man4/xhtml/glUniform.xml &amp;quot;uniform variables&amp;quot;]) that may be passed to a shader are enumerated in the &amp;lt;code&amp;gt;shaderProgram_t&amp;lt;/code&amp;gt; structure in {{SourceFile|src/engine/rendererGL/tr_local.h}}.&lt;br /&gt;
&lt;br /&gt;
Shaders with duplicate functionality is achieved with multiple inheritance. E.g., &amp;lt;code&amp;gt;gl_genericShader&amp;lt;/code&amp;gt; is of type &amp;lt;code&amp;gt;GLShader_generic*&amp;lt;/code&amp;gt; which derives from the following classes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;GLShader&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;u_ColorMap&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;u_ColorTextureMatrix&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;u_ViewOrigin&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;u_AlphaTest&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;u_ModelMatrix&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;u_ModelViewProjectionMatrix&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;u_ColorModulate&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;u_Color&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;u_BoneMatrix&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;u_VertexInterpolation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;u_PortalPlane&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLDeformStage&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_PORTAL_CLIPPING&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_ALPHA_TESTING&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_VERTEX_SKINNING&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_VERTEX_ANIMATION&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_DEFORM_VERTEXES&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_TCGEN_ENVIRONMENT&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_TCGEN_LIGHTMAP&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GLSL shaders may be found in &amp;lt;code&amp;gt;main/glsl/&amp;lt;/code&amp;gt;. Please see the [[GLSL Shaders|full article]] for a complete listing.&lt;br /&gt;
&lt;br /&gt;
===Helper classes===&lt;br /&gt;
&lt;br /&gt;
As mentioned above, shader classes make use of multiple inheritance to give them the relevant methods for controlling their behavior.&lt;br /&gt;
&lt;br /&gt;
====Uniform variables====&lt;br /&gt;
&lt;br /&gt;
Uniform variables are controlled with classes with the &amp;lt;code&amp;gt;u_&amp;lt;/code&amp;gt; prefix:&lt;br /&gt;
&lt;br /&gt;
* u_BoneMatrix &amp;amp;mdash; Provides the convenience method &amp;lt;code&amp;gt;SetUniform_BoneMatrix&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Compile macros====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_ALPHA_TESTING&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_PORTAL_CLIPPING&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_FRUSTUM_CLIPPING&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_VERTEX_SKINNING&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_VERTEX_ANIMATION&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_DEFORM_VERTEXES&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_TCGEN_ENVIRONMENT&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_TCGEN_LIGHTMAP&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_NORMAL_MAPPING&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_PARALLAX_MAPPING&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_REFLECTIVE_SPECULAR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_TWOSIDED&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_EYE_OUTSIDE&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_BRIGHTPASS_FILTER&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_LIGHT_DIRECTIONAL&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_SHADOWING&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GLCompileMacro_USE_GBUFFER&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Resources===&lt;br /&gt;
&lt;br /&gt;
Mac OS X users with XCode installed can access OpenGL man pages via the terminal. &amp;lt;!-- TODO: discuss how to get these on windows or linux? --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, OpenGL API reference documentation is available online:&lt;br /&gt;
* [http://www.opengl.org/sdk/docs/man3/ OpenGL 3.3 Reference Pages]&lt;br /&gt;
* [http://www.opengl.org/sdk/docs/manglsl/ OpenGL Shading Language (GLSL) Reference Pages]&lt;br /&gt;
* [http://www.khronos.org/files/opengl-quick-reference-card.pdf OpenGL 3.3 &amp;amp;amp; GLSL Quick Reference Card]&lt;br /&gt;
&lt;br /&gt;
==Valgrind and fglrx==&lt;br /&gt;
&lt;br /&gt;
fglrx drivers cause Valgrind to spew out a lot of false errors. You can suppress these by using the --suppressions=/path/to/file.supp flag. You must pass the full path (no use of the tilde symbol). The following [http://www.mediafire.com/?z6ehwrxpw2m469h file] can be used as a template for your suppression file. Keep in mind that the location of the fglrx library may need to be changed.&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
===General Game Development===&lt;br /&gt;
&lt;br /&gt;
* [http://devmaster.net/ Devmaster.net]&lt;br /&gt;
&lt;br /&gt;
===OpenGL===&lt;br /&gt;
&lt;br /&gt;
* [http://www.opengl.org/ Official OpenGL page]&lt;br /&gt;
* [http://www.opengl.org/sdk/docs/man3/ OpenGL 3.3 Reference Pages]&lt;br /&gt;
* [http://www.opengl.org/sdk/docs/manglsl/ OpenGL Shading Language Reference Pages]&lt;br /&gt;
* [http://arcsynthesis.org/gltut/ Learning Modern 3D Graphics Programming]&lt;br /&gt;
&lt;br /&gt;
===Quake===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;Looking at the Quake 3 Source&amp;quot;&lt;br /&gt;
** [http://element61.blogspot.com/2005/08/looking-at-quake-3-source-part-1.html Part 1]&lt;br /&gt;
** [http://element61.blogspot.com/2005/08/looking-at-quake-3-source-part-2.html Part 2]&lt;br /&gt;
** [http://element61.blogspot.com/2005/09/looking-at-quake-3-source-part-3.html Part 3]&lt;br /&gt;
* [http://www.quakewiki.net/archives/code3arena/ Code3Arena]&lt;br /&gt;
* [http://www.modwiki.net/wiki/MD5_(file_format) MD5 file format]&lt;br /&gt;
* [http://tfc.duke.free.fr/coding/md5-specs-en.html Another MD5 format article]&lt;br /&gt;
* [http://fabiensanglard.net/quake3/index.php Quake 3 Source Code Review]&lt;br /&gt;
* [http://www.quake3world.com/forum/index.php Quake3World Discussion Forums]&lt;br /&gt;
* [http://wiki.ioquake3.org/ ioquake3 project wiki] &amp;amp;mdash; Primarily oriented for users, developers and server administrators.&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=1098</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=1098"/>
		<updated>2012-11-19T06:48:17Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Dependencies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
Regardless of what interface you may use to compile the source, you will need [http://www.cmake.org/cmake/resources/software.html CMake] to generate makefiles. You will also need to install [https://developer.apple.com/xcode/ XCode] (making sure to choose to install the command-line utilities when prompted by the installer).&lt;br /&gt;
&lt;br /&gt;
Then, you will need to acquire (and in some cases, manually compile) at a minimum the [[#Dependencies|necessary libraries]].&lt;br /&gt;
&lt;br /&gt;
Once you have the source code and the libraries installed, you may actually proceed to compile the source. You have several options:&lt;br /&gt;
* '''Compile the source at the command line'''. This is the easiest if you would just like to compile the game to use yourself and you do not intend to work on the code.&lt;br /&gt;
* '''Compile the source using an IDE'''. This is preferred if you intend on developing the source.&lt;br /&gt;
** XCode is Apple's flagship IDE and you should have installed to compile the source regardless of which method you use.&lt;br /&gt;
** [http://qt-project.org/downloads QtCreator] is cross-platform and provides real-time feedback of syntax errors, a Vim mode, as well as other features.&lt;br /&gt;
** [http://www.codeblocks.org/ Code::Blcoks] is also cross-platform but lacks some of the features of XCode and QtCreator.&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
You only need to use one of the following methods (HomeBrew or compiling by hand). Please try and avoid mixing methods as this may produce unexpected results.&lt;br /&gt;
&lt;br /&gt;
Unvanquished requires the following libraries:&lt;br /&gt;
* [[#JPEG|JPEG]], version 8 or higher. (Version 6 was known to have problems)&lt;br /&gt;
* [[#Simple_DirectMedia_Layer_.28SDL.29|Simple DirectMedia Layer]] (The binary provided by libsdl.org causes graphical corruptions. Compile from source or use homebrew/macports)&lt;br /&gt;
* [[#The_OpenGL_Extension_Wrangler_Library_.28GLEW.29|The OpenGL Extension Wrangler Library]]&lt;br /&gt;
* CuRL&lt;br /&gt;
* [[#The_GNU_MP_Bignum_Library_.28libgmp.29|GMP]]&lt;br /&gt;
* [[#WebP|WebP]] (v0.2.0 or newer)&lt;br /&gt;
&lt;br /&gt;
The following libraries are optional:&lt;br /&gt;
* Theora&lt;br /&gt;
* Speex&lt;br /&gt;
* [[#Ogg|Ogg]]&lt;br /&gt;
* [[#Vorbis|Vorbis]]&lt;br /&gt;
&lt;br /&gt;
====HomeBrew====&lt;br /&gt;
Install [http://mxcl.github.com/homebrew/ HomeBrew] and then run the following command&lt;br /&gt;
&lt;br /&gt;
 $ brew install nettle libjpeg curl sdl webp xvid gmp glew speex libvorbis theora&lt;br /&gt;
&lt;br /&gt;
All the necessary libraries should now have been installed.&lt;br /&gt;
&lt;br /&gt;
====Compiling by hand====&lt;br /&gt;
The following are shell scripts that download, compile, and install various libraries. This is more time consuming then other methods but might be useful if you need more control over your libraries&lt;br /&gt;
&lt;br /&gt;
=====JPEG=====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz &amp;gt; jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ tar xvzf jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ cd jpeg-8d&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====The OpenGL Extension Wrangler Library (GLEW)=====&lt;br /&gt;
&lt;br /&gt;
 $ curl -L https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz/download &amp;gt; glew-1.7.0.tgz&lt;br /&gt;
 $ tar xvzf glew-1.7.0.tgz&lt;br /&gt;
 $ cd glew-1.7.0&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====Simple DirectMedia Layer (SDL)=====&lt;br /&gt;
&lt;br /&gt;
Do not use the binaries provided by libsdl.org, as these are known to cause issues with gamma and color display. Instead, compile your own:&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15.tar.gz &amp;gt; SDL-1.2.15.tar.gz&lt;br /&gt;
 $ tar xvzf SDL-1.2.15.tar.gz&lt;br /&gt;
 $ cd SDL-1.2.15&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====The GNU MP Bignum Library (libgmp)=====&lt;br /&gt;
&lt;br /&gt;
 $ curl ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 &amp;gt; gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ tar xvjf gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ cd gmp-5.0.5&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====Ogg=====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz &amp;gt; libogg-1.3.0.tar.gz&lt;br /&gt;
 $ tar xvzf libogg-1.3.0.tar.gz&lt;br /&gt;
 $ cd libogg-1.3.0&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====Vorbis=====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz &amp;gt; libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ tar xvzf libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ cd libvorbis-1.3.3&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====WebP=====&lt;br /&gt;
&lt;br /&gt;
You do not need to compile WebP by hand; Google provides binaries for Mac OS X available from their [https://code.google.com/p/webp/downloads/detail?name=libwebp-0.2.0-mac-10.5.tar.gz project page]. You will need version 0.2.0 or newer.&lt;br /&gt;
&lt;br /&gt;
Once downloaded, you must still install the header files and the binary:&lt;br /&gt;
&lt;br /&gt;
 $ curl https://webp.googlecode.com/files/libwebp-0.2.0-mac-10.5.tar.gz &amp;gt; libwebp-0.2.0-mac-10.5.tar.gz&lt;br /&gt;
 $ tar xvzf libwebp-0.2.0-mac-10.5.tar.gz&lt;br /&gt;
 $ cd libwebp-0.2.0-mac-10.5&lt;br /&gt;
 $ sudo cp include/webp /usr/local/include&lt;br /&gt;
 $ sudo cp lib/libwebp.a /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
===Configuring with CMake===&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This should be a different directory.&lt;br /&gt;
# Hit &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that. Wait while the configuration process runs. You may have to set the following:&lt;br /&gt;
## If CMake did not find your jpeg headers for some reason, set &amp;lt;code&amp;gt;JPEG_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/path/to/Unvanquished/src/libs/jpeg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; to avoid having to compile nettle and hogweed.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; to avoid having to compile Speex.&lt;br /&gt;
## Uncheck &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; to avoid having to compile Theora or Xvid. (At present, there are not cutscenes or any such that require it.)&lt;br /&gt;
## '''You will probably not be able to compile with the GLSL optimizer enabled; uncheck &amp;lt;code&amp;gt;USE_GLSL_OPTIMIZER&amp;lt;/code&amp;gt;'''&lt;br /&gt;
## If you have selected to generate XCode project files, make the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank. This option is not available if you have the generator set to Unix makefiles.&lt;br /&gt;
# Hit &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# You may now close XCode.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
====With XCode====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compilation will fail unless you manually create certain directories needed by the build scripts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/build/dir/CMakeFiles&lt;br /&gt;
$ mkdir gpp{game,trem,ui}-qvm.dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a workaround to [https://github.com/Unvanquished/Unvanquished/issues/101 issue 101].&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Either start XCode and open the project file (in the build directory you specified) or double-click the project file in Finder.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open the project file created by CMake, which should be in the build directory you specified.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Change the active target to &amp;quot;ALL_BUILD&amp;quot; and click Product&amp;amp;rarr;Build.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start Terminal (Applications &amp;amp;rarr; Utilities &amp;amp;rarr; Terminal).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Input the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are on a multi-core or multi-processor machine, you may speed up the process by passing the &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; argument followed by the number of available cores to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;; e.g., &amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;. Note that doing so makes reading error messages more difficult, as multiple instances of the compiler will print to the screen at once, causing information to appear out of order.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing the build===&lt;br /&gt;
&lt;br /&gt;
====With XCode 4====&lt;br /&gt;
&lt;br /&gt;
To test the game, select the &amp;quot;client&amp;quot; scheme from the combo box on the toolbar, and click the run button or press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;&amp;amp;#8984;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;R&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
After compiling, you'll have to place the data files in the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; directory in your build directory. [[#Acquiring the Game Files|For download instructions, see below.]]&lt;br /&gt;
&lt;br /&gt;
Your file structure should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Build_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
You may now start the application as such:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386&lt;br /&gt;
&lt;br /&gt;
Note that older machines will not support the new OpenGL 3 renderer, and must be started specifying the &amp;quot;vanilla&amp;quot; (aka &amp;quot;GL&amp;quot;) renderer:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386 +set cl_renderer GL&lt;br /&gt;
&lt;br /&gt;
===Bundling the Application===&lt;br /&gt;
&lt;br /&gt;
====With CPack====&lt;br /&gt;
&lt;br /&gt;
CPack is able to create standalone bundles (as well as many other types of installers). However you must generate the files using Unix Makefiles instead of XCode.&lt;br /&gt;
&lt;br /&gt;
 $ cd /path/to/Unvanquished-build&lt;br /&gt;
 $ cpack -G Bundle&lt;br /&gt;
&lt;br /&gt;
Some warnings will be printed however these can be safely ignored. There should be a file called Unvanquished.dmg in the Unvanquished-build folder.&lt;br /&gt;
&lt;br /&gt;
====Manually====&lt;br /&gt;
&lt;br /&gt;
You'll find the Mac [http://macdylibbundler.sourceforge.net/ dynamic library bundler] to be quite useful (you must generate the files using Unix Makefiles instead of XCode):&lt;br /&gt;
&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/macdylibbundler/files/macdylibbundler/0.4.1/dylibbundler0.4.1.zip/download &amp;gt; dylibbundler0.4.1.zip&lt;br /&gt;
 $ unzip dylibbundler0.4.1.zip&lt;br /&gt;
 $ cd dylibbundler&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once you've done that, you can proceed to create the application bundle. Note that these steps assume that you have downloaded the data files to &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; as shown above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git=/path/to/Unvanquished-git-repo&lt;br /&gt;
$ build=/path/to/Unvanquished-build-dir&lt;br /&gt;
$ mkdir -pv Unvanquished.app/Contents/{libs,MacOS,Resources,Frameworks}&lt;br /&gt;
$ cp -r $build/main Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ sips -s format tiff $git/debian/unvanquished.png --out temp.tiff&lt;br /&gt;
$ tiff2icns temp.tiff Unvanquished.app/Contents/Resources/Unvanquished.icns&lt;br /&gt;
$ rm temp.tiff&lt;br /&gt;
$ cp $build/daemon{,ded}.i386 $build/*.dylib Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ cp -r /Library/Frameworks/SDL.framework Unvanquished.app/Contents/Frameworks&lt;br /&gt;
$ install_name_tool -id @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/Frameworks/SDL.framework/Versions/A/SDL&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGLi386.dylib&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGL3i386.dylib&lt;br /&gt;
$ for binary in Unvanquished.app/Contents/MacOS/*.{i386,dylib}; do dylibbundler -b -x $binary -d $dest/Unvanquished.app/Contents/libs/; done&lt;br /&gt;
$ cp /usr/lib/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ chmod +w ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -id @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -change /usr/lib/libGLEW.1.7.0.dylib @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ cat &amp;gt; Unvanquished.app/Contents/Info.plist&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;daemon.i386&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIconFile&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished.icns&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;net.Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleShortVersionString&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
^d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;^d&amp;lt;/code&amp;gt; indicates pressing &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Ctrl&amp;lt;/span&amp;gt;+&amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;D&amp;lt;/span&amp;gt; on the keyboard.&lt;br /&gt;
&lt;br /&gt;
The contents of the completed application bundle should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Bundle_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
'''Note''': If you compiled SDL from source, you will not see a directory titled &amp;lt;code&amp;gt;SDL.framework&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
===Visual Studio===&lt;br /&gt;
&lt;br /&gt;
CMake can generate Visual Studio projects for unvanquished however this feature is relatively new and may have some bugs.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
# Double click on Visual_Studio32.bat&lt;br /&gt;
# Open build-32/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; or &amp;quot;Debug&amp;quot; in the first one and Win32 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
====Important Notes====&lt;br /&gt;
&lt;br /&gt;
* LLVM is disabled and does not work correctly with CMake generated Visual Studio projects.&lt;br /&gt;
* ncurses is not supported under Visual Studio.&lt;br /&gt;
* The path to the build folder must not have any spaces otherwise generation of QVMs will fail. See [https://github.com/Unvanquished/Unvanquished/issues/102 issue 102]&lt;br /&gt;
* Due to limitations with cmake neither the startup project nor the working directory can be specified. These must be manually set to the following values for debugging the client under Visual Studio&lt;br /&gt;
** Right click on client and select &amp;quot;Set as StartUp project&amp;quot;.&lt;br /&gt;
** Right click on client, select properties, select Debugging and set &amp;quot;Working Directory&amp;quot; to $(TargetPath)\..&lt;br /&gt;
&lt;br /&gt;
===MinGW===&lt;br /&gt;
Unvanquished is supported under MinGW. The build process should be fairly similar to the Linux instructions.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
If the version of WebP supplied by your version of Debian or Ubuntu is older than v0.2.0, you will need to [https://code.google.com/p/webp/downloads/detail?name=libwebp-0.2.0.tar.gz download] and [https://developers.google.com/speed/webp/docs/compiling#unix compile it from source]. After compiling and installing with &amp;lt;code&amp;gt;sudo make install&amp;lt;/code&amp;gt;, in CMake, you'll need to set &amp;lt;code&amp;gt;WEBP_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/usr/local/include/webp&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WEBP_LIBRARY&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/usr/local/lib/libwebp.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
====openSUSE====&lt;br /&gt;
&lt;br /&gt;
 $ sudo install zypper gcc gcc-c++ Mesa-libGL-devel SDL-devel libjpeg8-devel \&lt;br /&gt;
   libpng12-devel glew-devel webp-devel ncurses-devel gmp-devel libcurl-devel \&lt;br /&gt;
   libnettle-devel openal-soft-devel speex-devel libvorbis-devel \&lt;br /&gt;
   libtheora-devel&lt;br /&gt;
&lt;br /&gt;
WebP must be installed manually. Run the following commands to install WebP&lt;br /&gt;
&lt;br /&gt;
 $ wget https://webp.googlecode.com/files/libwebp-0.2.1.tar.gz&lt;br /&gt;
   gunzip &amp;lt; libwebp-0.2.1.tar.gz | tar xvf -&lt;br /&gt;
   cd libwebp-0.2.1.tar.gz&lt;br /&gt;
   ./configure &amp;amp;&amp;amp; make&lt;br /&gt;
   sudo make install&lt;br /&gt;
&lt;br /&gt;
curses must be disabled otherwise Unvanquished will crash on startup. Ensure USE_CURSES is disabled.&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
====Acquiring mandatory game files====&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately. This may be done on the command line or from your web browser. The downloads may be found on [http://sourceforge.net/projects/unvanquished/files/Assets SourceForge.net]. If you download the files from your browser, just download the files named &amp;quot;pak#.pk3&amp;quot;, and save them to the [[Running_the_game#Data_locations|data location]] for your system.&lt;br /&gt;
&lt;br /&gt;
On Linux, this may be done as follows:&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;[path to Unvanquished installation or build]&amp;lt;/var&amp;gt;/main&lt;br /&gt;
 $ for file in pak{0..6}.pk3; do&lt;br /&gt;
 wget -O $file &amp;quot;http://sourceforge.net/projects/unvanquished/files/Assets/$file/download&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
On FreeBSD, using the &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt; shell:&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;[path to Unvanquished installation or build]&amp;lt;/var&amp;gt;/main&lt;br /&gt;
 $ for file in pak{0..6}.pk3; do&lt;br /&gt;
 fetch -r -o $file &amp;quot;http://sourceforge.net/projects/unvanquished/files/Assets/$file/download&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
On Mac OS X:&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/Library/Application Support/Unvanquished/main&lt;br /&gt;
 $ for file in pak{0..6}.pk3; do&lt;br /&gt;
 curl -L &amp;quot;http://sourceforge.net/projects/unvanquished/files/Assets/$file/download&amp;quot; &amp;gt; $file&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
Linux users may also use the &amp;lt;code&amp;gt;download-pk3.sh&amp;lt;/code&amp;gt; script that is distributed with the source code, which requires that curl be installed:&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;[path to Unvanquished source code]&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir -p ~/.Unvanquished/main&lt;br /&gt;
 $ ./download-pk3.sh ~/.Unvanquished/main&lt;br /&gt;
&lt;br /&gt;
====Downloading the map pack====&lt;br /&gt;
&lt;br /&gt;
The map pack exists only for convenience; if you do not download the map pack, Unvanquished will automatically download maps as needed when you attempt to play online.&lt;br /&gt;
&lt;br /&gt;
To download the map pack on Linux:&lt;br /&gt;
&lt;br /&gt;
 $ wget -O maps.7z &amp;quot;http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z&amp;quot;; done&lt;br /&gt;
&lt;br /&gt;
To download the map pack on Mac OS X:&lt;br /&gt;
&lt;br /&gt;
 $ curl -L &amp;quot;http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z&amp;quot; &amp;gt; maps.7z; done&lt;br /&gt;
&lt;br /&gt;
Note that you will need to unzip the map pack on either system as it is compressed with LZMA. Mac users can use the [http://wakaba.c3.cx/s/apps/unarchiver.html Unarchiver]. Uncompressing the archive on Linux is highly dependent on your distribution.&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===CMake cannot locate Newton===&lt;br /&gt;
&lt;br /&gt;
If CMake cannot find Newton, you'll need to set it up yourself.&lt;br /&gt;
&lt;br /&gt;
It should be in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;/path/to/Unvanquished&amp;lt;/var&amp;gt;/src/libs/libnewton/libs/&amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt;/libNewton.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
Be sure to replace &amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt; with the proper directory name.&lt;br /&gt;
&lt;br /&gt;
Use CMake as before to change the &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt; build setting to the said path:&lt;br /&gt;
&lt;br /&gt;
# Start the CMake configurator:&amp;lt;pre&amp;gt;$ ccmake ..&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Scroll down and highlight &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to begin editing and input in the path.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; to configure and &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the new makefiles.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Q&amp;lt;/span&amp;gt; to quit.&lt;br /&gt;
# Recompile the source:&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The C Compiler is not able to compile a simple test program===&lt;br /&gt;
&lt;br /&gt;
When attempting to generate a solution for Xcode CMake fails with the following error&lt;br /&gt;
  -- Check for working C compiler using: Xcode -- broken&lt;br /&gt;
  CMake Error at /Applications/CMake 2.8-8.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):&lt;br /&gt;
   The C compiler &amp;quot;/usr/bin/gcc&amp;quot; is not able to compile a simple test program.&lt;br /&gt;
  &lt;br /&gt;
    It fails with the following output:&lt;br /&gt;
  &lt;br /&gt;
     Change Dir: /Users/danielmaloney/Documents/Unvanquished/build-xcode/CMakeFiles/CMakeTmp&lt;br /&gt;
  &lt;br /&gt;
    &lt;br /&gt;
  &lt;br /&gt;
    Run Build Command:/Applications/CMake\ 2.8-8.app/Contents/bin/cmakexbuild&lt;br /&gt;
    -project CMAKE_TRY_COMPILE.xcodeproj build -target&lt;br /&gt;
    cmTryCompileExec1400153232 -configuration Debug&lt;br /&gt;
  &lt;br /&gt;
    Error: No developer directory found at /Developer.  Run&lt;br /&gt;
    /usr/bin/xcode-select to update the developer directory path.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
  &lt;br /&gt;
 &lt;br /&gt;
    CMake will not be able to correctly generate this project.&lt;br /&gt;
  Call Stack (most recent call first):&lt;br /&gt;
    CMakeLists.txt:19 (project)&lt;br /&gt;
&lt;br /&gt;
This is due to Xcode 4.3 having a different directory structure to previous versions. Simply running the following command will correct this error:&lt;br /&gt;
 sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer/&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=563</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=563"/>
		<updated>2012-07-27T04:19:09Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code. Note: Xcode currently does not build QVMs due to [https://github.com/Unvanquished/Unvanquished/issues/101 issue 101].&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
You will also need to build the libraries from source.&lt;br /&gt;
&lt;br /&gt;
Unvanquished requires the following libraries:&lt;br /&gt;
* The jpeg library, version 8 or higher. (Version 6 was known to have problems)&lt;br /&gt;
* Simple DirectMedia Layer (The binary provided by libsdl.org causes graphical corruptions. Compile from source or use homebrew/macports)&lt;br /&gt;
* OpenGL Extension Wrangler Library&lt;br /&gt;
* CuRL&lt;br /&gt;
* GMP&lt;br /&gt;
&lt;br /&gt;
Optional libraries:&lt;br /&gt;
* WebP&lt;br /&gt;
* Theora&lt;br /&gt;
* Speex&lt;br /&gt;
* XVid&lt;br /&gt;
* Vorbis&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
You only need to use one of the following methods (HomeBrew or compiling by hand). Please try and avoid mixing methods as this may produce unexpected results.&lt;br /&gt;
&lt;br /&gt;
====HomeBrew====&lt;br /&gt;
Install [http://mxcl.github.com/homebrew/ HomeBrew] and then run the following command&lt;br /&gt;
&lt;br /&gt;
 $ brew install nettle libjpeg curl sdl webp xvid gmp glew speex libvorbis theora&lt;br /&gt;
&lt;br /&gt;
All the necessary libraries should now have been installed.&lt;br /&gt;
&lt;br /&gt;
====Compiling by hand====&lt;br /&gt;
The following are shell scripts that download, compile, and install various libraries. This is more time consuming then other methods but might be useful if you need more control over your libraries&lt;br /&gt;
&lt;br /&gt;
=====JPEG=====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz &amp;gt; jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ tar xvzf jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ cd jpeg-8d&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====The OpenGL Extension Wrangler Library (GLEW)=====&lt;br /&gt;
&lt;br /&gt;
 $ curl -L https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz/download &amp;gt; glew-1.7.0.tgz&lt;br /&gt;
 $ tar xvzf glew-1.7.0.tgz&lt;br /&gt;
 $ cd glew-1.7.0&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====Simple DirectMedia Layer (SDL)=====&lt;br /&gt;
&lt;br /&gt;
Do not use the binaries provided by libsdl.org, as these are known to cause issues with gamma and color display. Instead, compile your own:&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15.tar.gz &amp;gt; SDL-1.2.15.tar.gz&lt;br /&gt;
 $ tar xvzf SDL-1.2.15.tar.gz&lt;br /&gt;
 $ cd SDL-1.2.15&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====The GNU MP Bignum Library (libgmp)=====&lt;br /&gt;
&lt;br /&gt;
 $ curl ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 &amp;gt; gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ tar xvjf gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ cd gmp-5.0.5&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====Ogg=====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz &amp;gt; libogg-1.3.0.tar.gz&lt;br /&gt;
 $ tar xvzf libogg-1.3.0.tar.gz&lt;br /&gt;
 $ cd libogg-1.3.0&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====Vorbis=====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz &amp;gt; libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ tar xvzf libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ cd libvorbis-1.3.3&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
===Configuring with CMake===&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This should be a different directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that. Wait while the configuration process runs. You may have to set the following:&lt;br /&gt;
## If CMake did not find your jpeg headers for some reason, set &amp;lt;code&amp;gt;JPEG_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/path/to/Unvanquished/src/libs/jpeg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## You may safely disable &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; to avoid having to compile the library. (At present, the format is not used by any game assets.)&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; to avoid having to compile nettle and hogweed.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; to avoid having to compile Speex.&lt;br /&gt;
## Uncheck &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; to avoid having to compile Theora or Xvid. (At present, there are not cutscenes or any such that require it.)&lt;br /&gt;
## '''You will probably not be able to compile with the GLSL optimizer enabled; uncheck &amp;lt;code&amp;gt;USE_GLSL_OPTIMIZER&amp;lt;/code&amp;gt;'''&lt;br /&gt;
## If you have selected to generate XCode project files, make the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank. This option is not available if you have the generator set to Unix makefiles.&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# You may now close XCode.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
====With XCode====&lt;br /&gt;
# Either start XCode and open the project file (in the build directory you specified) or double-click the project file in Finder.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Change the active target to &amp;quot;ALL_BUILD&amp;quot; and click Product&amp;amp;rarr;Build.&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start Terminal (Applications &amp;amp;rarr; Utilities &amp;amp;rarr; Terminal).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are on a multi-core or multi-processor machine, you may speed up the process by passing the &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; argument followed by the number of available cores to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;; e.g., &amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;. Note that doing so makes reading error messages more difficult, as multiple instances of the compiler will print to the screen at once, causing information to appear out of order.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing the build===&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
After compiling, you'll have to place the data files in the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; directory in your build directory. [[#Acquiring the Game Files|For download instructions, see below.]]&lt;br /&gt;
&lt;br /&gt;
Your file structure should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Build_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
You may now start the application as such:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386&lt;br /&gt;
&lt;br /&gt;
Note that older machines will not support the new OpenGL 3 renderer, and must be started specifying the &amp;quot;vanilla&amp;quot; (aka &amp;quot;GL&amp;quot;) renderer:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386 +set cl_renderer GL&lt;br /&gt;
&lt;br /&gt;
===Bundling the Application===&lt;br /&gt;
&lt;br /&gt;
====With CPack====&lt;br /&gt;
&lt;br /&gt;
CPack is able to create standalone bundles (as well as many other types of installers). However you must generate the files using Unix Makefiles instead of XCode.&lt;br /&gt;
&lt;br /&gt;
 $ cd /path/to/Unvanquished-build&lt;br /&gt;
 $ cpack -G Bundle&lt;br /&gt;
&lt;br /&gt;
Some warnings will be printed however these can be safely ignored. There should be a file called Unvanquished.dmg in the Unvanquished-build folder.&lt;br /&gt;
&lt;br /&gt;
====Manually====&lt;br /&gt;
&lt;br /&gt;
You'll find the Mac [http://macdylibbundler.sourceforge.net/ dynamic library bundler] to be quite useful (you must generate the files using Unix Makefiles instead of XCode):&lt;br /&gt;
&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/macdylibbundler/files/macdylibbundler/0.4.1/dylibbundler0.4.1.zip/download &amp;gt; dylibbundler0.4.1.zip&lt;br /&gt;
 $ unzip dylibbundler0.4.1.zip&lt;br /&gt;
 $ cd dylibbundler&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once you've done that, you can proceed to create the application bundle. Note that these steps assume that you have downloaded the data files to &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; as shown above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git=/path/to/Unvanquished-git-repo&lt;br /&gt;
$ build=/path/to/Unvanquished-build-dir&lt;br /&gt;
$ mkdir -pv Unvanquished.app/Contents/{libs,MacOS,Resources,Frameworks}&lt;br /&gt;
$ cp -r $build/main Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ sips -s format tiff $git/debian/unvanquished.png --out temp.tiff&lt;br /&gt;
$ tiff2icns temp.tiff Unvanquished.app/Contents/Resources/Unvanquished.icns&lt;br /&gt;
$ rm temp.tiff&lt;br /&gt;
$ cp $build/daemon{,ded}.i386 $build/*.dylib Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ cp -r /Library/Frameworks/SDL.framework Unvanquished.app/Contents/Frameworks&lt;br /&gt;
$ install_name_tool -id @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/Frameworks/SDL.framework/Versions/A/SDL&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGLi386.dylib&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGL3i386.dylib&lt;br /&gt;
$ for binary in Unvanquished.app/Contents/MacOS/*.{i386,dylib}; do dylibbundler -b -x $binary -d $dest/Unvanquished.app/Contents/libs/; done&lt;br /&gt;
$ cp /usr/lib/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ chmod +w ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -id @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -change /usr/lib/libGLEW.1.7.0.dylib @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ cat &amp;gt; Unvanquished.app/Contents/Info.plist&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;daemon.i386&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIconFile&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished.icns&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;net.Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleShortVersionString&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
^d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;^d&amp;lt;/code&amp;gt; indicates pressing &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Ctrl&amp;lt;/span&amp;gt;+&amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;D&amp;lt;/span&amp;gt; on the keyboard.&lt;br /&gt;
&lt;br /&gt;
The contents of the completed application bundle should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Bundle_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
'''Note''': If you compiled SDL from source, you will not see a directory titled &amp;lt;code&amp;gt;SDL.framework&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
===Visual Studio===&lt;br /&gt;
&lt;br /&gt;
CMake can generate Visual Studio projects for unvanquished however this feature is relatively new and may have some bugs.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
# Double click on Visual_Studio32.bat&lt;br /&gt;
# Open build-32/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; or &amp;quot;Debug&amp;quot; in the first one and Win32 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
====Important Notes====&lt;br /&gt;
&lt;br /&gt;
* LLVM is disabled and does not work correctly with CMake generated Visual Studio projects.&lt;br /&gt;
* ncurses is not supported under Visual Studio.&lt;br /&gt;
* The path to the build folder must not have any spaces otherwise generation of QVMs will fail. See [https://github.com/Unvanquished/Unvanquished/issues/102 issue 102]&lt;br /&gt;
* Due to limitations with cmake neither the startup project nor the working directory can be specified. These must be manually set to the following values for debugging the client under Visual Studio&lt;br /&gt;
** Right click on client and select &amp;quot;Set as StartUp project&amp;quot;.&lt;br /&gt;
** Right click on client, select properties, select Debugging and set &amp;quot;Working Directory&amp;quot; to $(TargetPath)\..&lt;br /&gt;
&lt;br /&gt;
===MinGW===&lt;br /&gt;
Unvanquished is supported under MinGW. The build process should be fairly similar to the Linux instructions.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak2.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak3.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak4.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
On FreeBSD, use &amp;lt;code&amp;gt;fetch -r&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;. You can also get the pak files in this way (requires cURL):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir -p ~/.Unvanquished/main&lt;br /&gt;
 $ ./download-pk3.sh ~/.Unvanquished/main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will, by default, download missing files for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===CMake cannot locate Newton===&lt;br /&gt;
&lt;br /&gt;
If CMake cannot find Newton, you'll need to set it up yourself.&lt;br /&gt;
&lt;br /&gt;
It should be in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;/path/to/Unvanquished&amp;lt;/var&amp;gt;/src/libs/libnewton/libs/&amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt;/libNewton.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
Be sure to replace &amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt; with the proper directory name.&lt;br /&gt;
&lt;br /&gt;
Use CMake as before to change the &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt; build setting to the said path:&lt;br /&gt;
&lt;br /&gt;
# Start the CMake configurator:&amp;lt;pre&amp;gt;$ ccmake ..&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Scroll down and highlight &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to begin editing and input in the path.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; to configure and &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the new makefiles.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Q&amp;lt;/span&amp;gt; to quit.&lt;br /&gt;
# Recompile the source:&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The C Compiler is not able to compile a simple test program===&lt;br /&gt;
&lt;br /&gt;
When attempting to generate a solution for Xcode CMake fails with the following error&lt;br /&gt;
  -- Check for working C compiler using: Xcode -- broken&lt;br /&gt;
  CMake Error at /Applications/CMake 2.8-8.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):&lt;br /&gt;
   The C compiler &amp;quot;/usr/bin/gcc&amp;quot; is not able to compile a simple test program.&lt;br /&gt;
  &lt;br /&gt;
    It fails with the following output:&lt;br /&gt;
  &lt;br /&gt;
     Change Dir: /Users/danielmaloney/Documents/Unvanquished/build-xcode/CMakeFiles/CMakeTmp&lt;br /&gt;
  &lt;br /&gt;
    &lt;br /&gt;
  &lt;br /&gt;
    Run Build Command:/Applications/CMake\ 2.8-8.app/Contents/bin/cmakexbuild&lt;br /&gt;
    -project CMAKE_TRY_COMPILE.xcodeproj build -target&lt;br /&gt;
    cmTryCompileExec1400153232 -configuration Debug&lt;br /&gt;
  &lt;br /&gt;
    Error: No developer directory found at /Developer.  Run&lt;br /&gt;
    /usr/bin/xcode-select to update the developer directory path.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
  &lt;br /&gt;
 &lt;br /&gt;
    CMake will not be able to correctly generate this project.&lt;br /&gt;
  Call Stack (most recent call first):&lt;br /&gt;
    CMakeLists.txt:19 (project)&lt;br /&gt;
&lt;br /&gt;
This is due to Xcode 4.3 having a different directory structure to previous versions. Simply running the following command will correct this error:&lt;br /&gt;
 sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer/&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=562</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=562"/>
		<updated>2012-07-27T04:06:38Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Mac OS X */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code. Note: Xcode currently does not build QVMs due to [https://github.com/Unvanquished/Unvanquished/issues/101 issue 101].&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
You will also need to build the libraries from source.&lt;br /&gt;
&lt;br /&gt;
Unvanquished requires the following libraries:&lt;br /&gt;
* The jpeg library, version 8 or higher. (Version 6 was known to have problems)&lt;br /&gt;
* Simple DirectMedia Layer (The binary provided by libsdl.org causes graphical corruptions. Compile from source or use homebrew/macports)&lt;br /&gt;
* OpenGL Extension Wrangler Library&lt;br /&gt;
* CuRL&lt;br /&gt;
* GMP&lt;br /&gt;
&lt;br /&gt;
Optional libraries:&lt;br /&gt;
* WebP&lt;br /&gt;
* Theora&lt;br /&gt;
* Speex&lt;br /&gt;
* XVid&lt;br /&gt;
* Vorbis&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
You only need to use one of the following methods (HomeBrew or compiling by hand). Please try and avoid mixing methods as this may produce unexpected results.&lt;br /&gt;
&lt;br /&gt;
====HomeBrew====&lt;br /&gt;
Install [http://mxcl.github.com/homebrew/ HomeBrew] and then run the following command&lt;br /&gt;
&lt;br /&gt;
 $ brew install nettle libjpeg curl sdl webp xvid gmp glew speex libvorbis theora&lt;br /&gt;
&lt;br /&gt;
All the necessary libraries should now have been installed.&lt;br /&gt;
&lt;br /&gt;
====Compiling by hand====&lt;br /&gt;
The following are shell scripts that download, compile, and install various libraries. This is more time consuming then other methods but might be useful if you need more control over your libraries&lt;br /&gt;
&lt;br /&gt;
=====JPEG=====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz &amp;gt; jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ tar xvzf jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ cd jpeg-8d&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====The OpenGL Extension Wrangler Library (GLEW)=====&lt;br /&gt;
&lt;br /&gt;
 $ curl -L https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz/download &amp;gt; glew-1.7.0.tgz&lt;br /&gt;
 $ tar xvzf glew-1.7.0.tgz&lt;br /&gt;
 $ cd glew-1.7.0&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====Simple DirectMedia Layer (SDL)=====&lt;br /&gt;
&lt;br /&gt;
Do not use the binaries provided by libsdl.org, as these are known to cause issues with gamma and color display. Instead, compile your own:&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15.tar.gz &amp;gt; SDL-1.2.15.tar.gz&lt;br /&gt;
 $ tar xvzf SDL-1.2.15.tar.gz&lt;br /&gt;
 $ cd SDL-1.2.15&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====The GNU MP Bignum Library (libgmp)=====&lt;br /&gt;
&lt;br /&gt;
 $ curl ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 &amp;gt; gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ tar xvjf gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ cd gmp-5.0.5&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====Ogg=====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz &amp;gt; libogg-1.3.0.tar.gz&lt;br /&gt;
 $ tar xvzf libogg-1.3.0.tar.gz&lt;br /&gt;
 $ cd libogg-1.3.0&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
=====Vorbis=====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz &amp;gt; libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ tar xvzf libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ cd libvorbis-1.3.3&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
===Configuring with CMake===&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This should be a different directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that. Wait while the configuration process runs. You may have to set the following:&lt;br /&gt;
## If CMake did not find your jpeg headers for some reason, set &amp;lt;code&amp;gt;JPEG_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/path/to/Unvanquished/src/libs/jpeg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## You may safely disable &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; to avoid having to compile the library. (At present, the format is not used by any game assets.)&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; to avoid having to compile nettle and hogweed.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; to avoid having to compile Speex.&lt;br /&gt;
## Uncheck &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; to avoid having to compile Theora or Xvid. (At present, there are not cutscenes or any such that require it.)&lt;br /&gt;
## '''You will probably not be able to compile with the GLSL optimizer enabled; uncheck &amp;lt;code&amp;gt;USE_GLSL_OPTIMIZER&amp;lt;/code&amp;gt;'''&lt;br /&gt;
## If you have selected to generate XCode project files, make the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank. This option is not available if you have the generator set to Unix makefiles.&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# You may now close XCode.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
====With XCode====&lt;br /&gt;
# Either start XCode and open the project file (in the build directory you specified) or double-click the project file in Finder.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Change the active target to &amp;quot;ALL_BUILD&amp;quot; and click Product&amp;amp;rarr;Build.&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start Terminal (Applications &amp;amp;rarr; Utilities &amp;amp;rarr; Terminal).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are on a multi-core or multi-processor machine, you may speed up the process by passing the &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; argument followed by the number of available cores to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;; e.g., &amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;. Note that doing so makes reading error messages more difficult, as multiple instances of the compiler will print to the screen at once, causing information to appear out of order.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing the build===&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
After compiling, you'll have to place the data files in the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; directory in your build directory. [[#Acquiring the Game Files|For download instructions, see below.]]&lt;br /&gt;
&lt;br /&gt;
Your file structure should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Build_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
You may now start the application as such:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386&lt;br /&gt;
&lt;br /&gt;
Note that older machines will not support the new OpenGL 3 renderer, and must be started specifying the &amp;quot;vanilla&amp;quot; (aka &amp;quot;GL&amp;quot;) renderer:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386 +set cl_renderer GL&lt;br /&gt;
&lt;br /&gt;
===Bundling the Application===&lt;br /&gt;
&lt;br /&gt;
====With CPack====&lt;br /&gt;
&lt;br /&gt;
CPack is able to create standalone bundles (as well as many other types of installers). However you must generate the files using Unix Makefiles instead of XCode.&lt;br /&gt;
&lt;br /&gt;
 $ cd /path/to/Unvanquished-build&lt;br /&gt;
 $ cpack -G Bundle&lt;br /&gt;
&lt;br /&gt;
Some warnings will be printed however these can be safely ignored. There should be a file called Unvanquished.dmg in the Unvanquished-build folder.&lt;br /&gt;
&lt;br /&gt;
====Manually====&lt;br /&gt;
&lt;br /&gt;
You'll find the Mac [http://macdylibbundler.sourceforge.net/ dynamic library bundler] to be quite useful (you must generate the files using Unix Makefiles instead of XCode):&lt;br /&gt;
&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/macdylibbundler/files/macdylibbundler/0.4.1/dylibbundler0.4.1.zip/download &amp;gt; dylibbundler0.4.1.zip&lt;br /&gt;
 $ unzip dylibbundler0.4.1.zip&lt;br /&gt;
 $ cd dylibbundler&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once you've done that, you can proceed to create the application bundle. Note that these steps assume that you have downloaded the data files to &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; as shown above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git=/path/to/Unvanquished-git-repo&lt;br /&gt;
$ build=/path/to/Unvanquished-build-dir&lt;br /&gt;
$ mkdir -pv Unvanquished.app/Contents/{libs,MacOS,Resources,Frameworks}&lt;br /&gt;
$ cp -r $build/main Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ sips -s format tiff $git/debian/unvanquished.png --out temp.tiff&lt;br /&gt;
$ tiff2icns temp.tiff Unvanquished.app/Contents/Resources/Unvanquished.icns&lt;br /&gt;
$ rm temp.tiff&lt;br /&gt;
$ cp $build/daemon{,ded}.i386 $build/*.dylib Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ cp -r /Library/Frameworks/SDL.framework Unvanquished.app/Contents/Frameworks&lt;br /&gt;
$ install_name_tool -id @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/Frameworks/SDL.framework/Versions/A/SDL&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGLi386.dylib&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGL3i386.dylib&lt;br /&gt;
$ for binary in Unvanquished.app/Contents/MacOS/*.{i386,dylib}; do dylibbundler -b -x $binary -d $dest/Unvanquished.app/Contents/libs/; done&lt;br /&gt;
$ cp /usr/lib/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ chmod +w ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -id @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -change /usr/lib/libGLEW.1.7.0.dylib @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ cat &amp;gt; Unvanquished.app/Contents/Info.plist&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;daemon.i386&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIconFile&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished.icns&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;net.Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleShortVersionString&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
^d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;^d&amp;lt;/code&amp;gt; indicates pressing &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Ctrl&amp;lt;/span&amp;gt;+&amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;D&amp;lt;/span&amp;gt; on the keyboard.&lt;br /&gt;
&lt;br /&gt;
The contents of the completed application bundle should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Bundle_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
'''Note''': If you compiled SDL from source, you will not see a directory titled &amp;lt;code&amp;gt;SDL.framework&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
===Visual Studio===&lt;br /&gt;
&lt;br /&gt;
CMake can generate Visual Studio projects for unvanquished however this feature is relatively new and may have some bugs.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
# Double click on Visual_Studio32.bat&lt;br /&gt;
# Open build-32/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; or &amp;quot;Debug&amp;quot; in the first one and Win32 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
====Important Notes====&lt;br /&gt;
&lt;br /&gt;
* LLVM is disabled and does not work correctly with CMake generated Visual Studio projects.&lt;br /&gt;
* ncurses is not supported under Visual Studio.&lt;br /&gt;
* The path to the build folder must not have any spaces otherwise generation of QVMs will fail. See [https://github.com/Unvanquished/Unvanquished/issues/102 issue 102]&lt;br /&gt;
* Due to limitations with cmake neither the startup project nor the working directory can be specified. These must be manually set to the following values for debugging the client under Visual Studio&lt;br /&gt;
** Right click on client and select &amp;quot;Set as StartUp project&amp;quot;.&lt;br /&gt;
** Right click on client, select properties, select Debugging and set &amp;quot;Working Directory&amp;quot; to $(TargetPath)\..&lt;br /&gt;
&lt;br /&gt;
===MinGW===&lt;br /&gt;
Unvanquished is supported under MinGW. The build process should be fairly similar to the Linux instructions.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak2.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak3.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak4.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
On FreeBSD, use &amp;lt;code&amp;gt;fetch -r&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;. You can also get the pak files in this way (requires cURL):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir -p ~/.Unvanquished/main&lt;br /&gt;
 $ ./download-pk3.sh ~/.Unvanquished/main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will, by default, download missing files for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===CMake cannot locate Newton===&lt;br /&gt;
&lt;br /&gt;
If CMake cannot find Newton, you'll need to set it up yourself.&lt;br /&gt;
&lt;br /&gt;
It should be in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;/path/to/Unvanquished&amp;lt;/var&amp;gt;/src/libs/libnewton/libs/&amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt;/libNewton.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
Be sure to replace &amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt; with the proper directory name.&lt;br /&gt;
&lt;br /&gt;
Use CMake as before to change the &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt; build setting to the said path:&lt;br /&gt;
&lt;br /&gt;
# Start the CMake configurator:&amp;lt;pre&amp;gt;$ ccmake ..&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Scroll down and highlight &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to begin editing and input in the path.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; to configure and &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the new makefiles.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Q&amp;lt;/span&amp;gt; to quit.&lt;br /&gt;
# Recompile the source:&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=561</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=561"/>
		<updated>2012-07-27T02:45:05Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Mac OS X */ Remove library download + compile script. Out of date&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code. Note: Xcode currently does not build QVMs due to [https://github.com/Unvanquished/Unvanquished/issues/101 issue 101].&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
You will also need to build the libraries from source.&lt;br /&gt;
&lt;br /&gt;
Unvanquished requires the following libraries:&lt;br /&gt;
* The jpeg library, version 8 or higher. (Version 6 was known to have problems)&lt;br /&gt;
* Simple DirectMedia Layer (The binary provided by libsdl.org causes graphical corruptions. Compile from source or use homebrew/macports)&lt;br /&gt;
* OpenGL Extension Wrangler Library&lt;br /&gt;
&lt;br /&gt;
Optional libraries:&lt;br /&gt;
* WebP&lt;br /&gt;
* Theora&lt;br /&gt;
* Speex&lt;br /&gt;
* XVid&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
The following are shell scripts that download, compile, and install various libraries.&lt;br /&gt;
&lt;br /&gt;
====JPEG====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz &amp;gt; jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ tar xvzf jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ cd jpeg-8d&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The OpenGL Extension Wrangler Library (GLEW)====&lt;br /&gt;
&lt;br /&gt;
 $ curl -L https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz/download &amp;gt; glew-1.7.0.tgz&lt;br /&gt;
 $ tar xvzf glew-1.7.0.tgz&lt;br /&gt;
 $ cd glew-1.7.0&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Simple DirectMedia Layer (SDL)====&lt;br /&gt;
&lt;br /&gt;
Do not use the binaries provided by libsdl.org, as these are known to cause issues with gamma and color display. Instead, compile your own:&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15.tar.gz &amp;gt; SDL-1.2.15.tar.gz&lt;br /&gt;
 $ tar xvzf SDL-1.2.15.tar.gz&lt;br /&gt;
 $ cd SDL-1.2.15&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The GNU MP Bignum Library (libgmp)====&lt;br /&gt;
&lt;br /&gt;
 $ curl ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 &amp;gt; gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ tar xvjf gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ cd gmp-5.0.5&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Ogg====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz &amp;gt; libogg-1.3.0.tar.gz&lt;br /&gt;
 $ tar xvzf libogg-1.3.0.tar.gz&lt;br /&gt;
 $ cd libogg-1.3.0&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Vorbis====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz &amp;gt; libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ tar xvzf libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ cd libvorbis-1.3.3&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
===Configuring with CMake===&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This should be a different directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that. Wait while the configuration process runs. You may have to set the following:&lt;br /&gt;
## If CMake did not find your jpeg headers for some reason, set &amp;lt;code&amp;gt;JPEG_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/path/to/Unvanquished/src/libs/jpeg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## You may safely disable &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; to avoid having to compile the library. (At present, the format is not used by any game assets.)&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; to avoid having to compile nettle and hogweed.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; to avoid having to compile Speex.&lt;br /&gt;
## Uncheck &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; to avoid having to compile Theora or Xvid. (At present, there are not cutscenes or any such that require it.)&lt;br /&gt;
## '''You will probably not be able to compile with the GLSL optimizer enabled; uncheck &amp;lt;code&amp;gt;USE_GLSL_OPTIMIZER&amp;lt;/code&amp;gt;'''&lt;br /&gt;
## If you have selected to generate XCode project files, make the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank. This option is not available if you have the generator set to Unix makefiles.&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# You may now close XCode.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
====With XCode====&lt;br /&gt;
# Either start XCode and open the project file (in the build directory you specified) or double-click the project file in Finder.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Change the active target to &amp;quot;ALL_BUILD&amp;quot; and click Product&amp;amp;rarr;Build.&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start Terminal (Applications &amp;amp;rarr; Utilities &amp;amp;rarr; Terminal).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are on a multi-core or multi-processor machine, you may speed up the process by passing the &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; argument followed by the number of available cores to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;; e.g., &amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;. Note that doing so makes reading error messages more difficult, as multiple instances of the compiler will print to the screen at once, causing information to appear out of order.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing the build===&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
After compiling, you'll have to place the data files in the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; directory in your build directory. [[#Acquiring the Game Files|For download instructions, see below.]]&lt;br /&gt;
&lt;br /&gt;
Your file structure should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Build_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
You may now start the application as such:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386&lt;br /&gt;
&lt;br /&gt;
Note that older machines will not support the new OpenGL 3 renderer, and must be started specifying the &amp;quot;vanilla&amp;quot; (aka &amp;quot;GL&amp;quot;) renderer:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386 +set cl_renderer GL&lt;br /&gt;
&lt;br /&gt;
===Bundling the Application===&lt;br /&gt;
&lt;br /&gt;
====With CPack====&lt;br /&gt;
&lt;br /&gt;
CPack is able to create standalone bundles (as well as many other types of installers). However you must generate the files using Unix Makefiles instead of XCode.&lt;br /&gt;
&lt;br /&gt;
 $ cd /path/to/Unvanquished-build&lt;br /&gt;
 $ cpack -G Bundle&lt;br /&gt;
&lt;br /&gt;
Some warnings will be printed however these can be safely ignored. There should be a file called Unvanquished.dmg in the Unvanquished-build folder.&lt;br /&gt;
&lt;br /&gt;
====Manually====&lt;br /&gt;
&lt;br /&gt;
You'll find the Mac [http://macdylibbundler.sourceforge.net/ dynamic library bundler] to be quite useful (you must generate the files using Unix Makefiles instead of XCode):&lt;br /&gt;
&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/macdylibbundler/files/macdylibbundler/0.4.1/dylibbundler0.4.1.zip/download &amp;gt; dylibbundler0.4.1.zip&lt;br /&gt;
 $ unzip dylibbundler0.4.1.zip&lt;br /&gt;
 $ cd dylibbundler&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once you've done that, you can proceed to create the application bundle. Note that these steps assume that you have downloaded the data files to &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; as shown above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git=/path/to/Unvanquished-git-repo&lt;br /&gt;
$ build=/path/to/Unvanquished-build-dir&lt;br /&gt;
$ mkdir -pv Unvanquished.app/Contents/{libs,MacOS,Resources,Frameworks}&lt;br /&gt;
$ cp -r $build/main Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ sips -s format tiff $git/debian/unvanquished.png --out temp.tiff&lt;br /&gt;
$ tiff2icns temp.tiff Unvanquished.app/Contents/Resources/Unvanquished.icns&lt;br /&gt;
$ rm temp.tiff&lt;br /&gt;
$ cp $build/daemon{,ded}.i386 $build/*.dylib Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ cp -r /Library/Frameworks/SDL.framework Unvanquished.app/Contents/Frameworks&lt;br /&gt;
$ install_name_tool -id @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/Frameworks/SDL.framework/Versions/A/SDL&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGLi386.dylib&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGL3i386.dylib&lt;br /&gt;
$ for binary in Unvanquished.app/Contents/MacOS/*.{i386,dylib}; do dylibbundler -b -x $binary -d $dest/Unvanquished.app/Contents/libs/; done&lt;br /&gt;
$ cp /usr/lib/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ chmod +w ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -id @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -change /usr/lib/libGLEW.1.7.0.dylib @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ cat &amp;gt; Unvanquished.app/Contents/Info.plist&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;daemon.i386&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIconFile&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished.icns&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;net.Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleShortVersionString&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
^d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;^d&amp;lt;/code&amp;gt; indicates pressing &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Ctrl&amp;lt;/span&amp;gt;+&amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;D&amp;lt;/span&amp;gt; on the keyboard.&lt;br /&gt;
&lt;br /&gt;
The contents of the completed application bundle should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Bundle_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
'''Note''': If you compiled SDL from source, you will not see a directory titled &amp;lt;code&amp;gt;SDL.framework&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
===Visual Studio===&lt;br /&gt;
&lt;br /&gt;
CMake can generate Visual Studio projects for unvanquished however this feature is relatively new and may have some bugs.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
# Double click on Visual_Studio32.bat&lt;br /&gt;
# Open build-32/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; or &amp;quot;Debug&amp;quot; in the first one and Win32 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
====Important Notes====&lt;br /&gt;
&lt;br /&gt;
* LLVM is disabled and does not work correctly with CMake generated Visual Studio projects.&lt;br /&gt;
* ncurses is not supported under Visual Studio.&lt;br /&gt;
* The path to the build folder must not have any spaces otherwise generation of QVMs will fail. See [https://github.com/Unvanquished/Unvanquished/issues/102 issue 102]&lt;br /&gt;
* Due to limitations with cmake neither the startup project nor the working directory can be specified. These must be manually set to the following values for debugging the client under Visual Studio&lt;br /&gt;
** Right click on client and select &amp;quot;Set as StartUp project&amp;quot;.&lt;br /&gt;
** Right click on client, select properties, select Debugging and set &amp;quot;Working Directory&amp;quot; to $(TargetPath)\..&lt;br /&gt;
&lt;br /&gt;
===MinGW===&lt;br /&gt;
Unvanquished is supported under MinGW. The build process should be fairly similar to the Linux instructions.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak2.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak3.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak4.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
On FreeBSD, use &amp;lt;code&amp;gt;fetch -r&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;. You can also get the pak files in this way (requires cURL):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir -p ~/.Unvanquished/main&lt;br /&gt;
 $ ./download-pk3.sh ~/.Unvanquished/main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will, by default, download missing files for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===CMake cannot locate Newton===&lt;br /&gt;
&lt;br /&gt;
If CMake cannot find Newton, you'll need to set it up yourself.&lt;br /&gt;
&lt;br /&gt;
It should be in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;/path/to/Unvanquished&amp;lt;/var&amp;gt;/src/libs/libnewton/libs/&amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt;/libNewton.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
Be sure to replace &amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt; with the proper directory name.&lt;br /&gt;
&lt;br /&gt;
Use CMake as before to change the &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt; build setting to the said path:&lt;br /&gt;
&lt;br /&gt;
# Start the CMake configurator:&amp;lt;pre&amp;gt;$ ccmake ..&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Scroll down and highlight &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to begin editing and input in the path.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; to configure and &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the new makefiles.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Q&amp;lt;/span&amp;gt; to quit.&lt;br /&gt;
# Recompile the source:&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=528</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=528"/>
		<updated>2012-07-14T07:02:45Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Visual Studio */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code. Note: Xcode currently does not build QVMs due to [https://github.com/Unvanquished/Unvanquished/issues/101 issue 101].&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
You may use this [http://home.comcast.net/~chet102103/compile.sh script] to perform these tasks. If you've downloaded the source to a folder named ''Unvanquished'' in the current directory, a typical invocation would look like this:&lt;br /&gt;
&lt;br /&gt;
 $ ./compile.sh --bundle --compile -s Unvanquished --build Unvanquished-build --bundle-dest .&lt;br /&gt;
&lt;br /&gt;
You will also need to build the libraries from source.&lt;br /&gt;
&lt;br /&gt;
Unvanquished requires the following libraries:&lt;br /&gt;
* The jpeg library, version 8 or higher. (Version 6 was known to have problems)&lt;br /&gt;
* Simple DirectMedia Layer (The binary provided by libsdl.org causes graphical corruptions. Compile from source or use homebrew/macports)&lt;br /&gt;
* OpenGL Extension Wrangler Library&lt;br /&gt;
&lt;br /&gt;
Optional libraries:&lt;br /&gt;
* WebP&lt;br /&gt;
* Theora&lt;br /&gt;
* Speex&lt;br /&gt;
* XVid&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
The following are shell scripts that download, compile, and install various libraries.&lt;br /&gt;
&lt;br /&gt;
====JPEG====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz &amp;gt; jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ tar xvzf jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ cd jpeg-8d&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The OpenGL Extension Wrangler Library (GLEW)====&lt;br /&gt;
&lt;br /&gt;
 $ curl -L https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz/download &amp;gt; glew-1.7.0.tgz&lt;br /&gt;
 $ tar xvzf glew-1.7.0.tgz&lt;br /&gt;
 $ cd glew-1.7.0&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Simple DirectMedia Layer (SDL)====&lt;br /&gt;
&lt;br /&gt;
Do not use the binaries provided by libsdl.org, as these are known to cause issues with gamma and color display. Instead, compile your own:&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15.tar.gz &amp;gt; SDL-1.2.15.tar.gz&lt;br /&gt;
 $ tar xvzf SDL-1.2.15.tar.gz&lt;br /&gt;
 $ cd SDL-1.2.15&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The GNU MP Bignum Library (libgmp)====&lt;br /&gt;
&lt;br /&gt;
 $ curl ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 &amp;gt; gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ tar xvjf gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ cd gmp-5.0.5&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Ogg====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz &amp;gt; libogg-1.3.0.tar.gz&lt;br /&gt;
 $ tar xvzf libogg-1.3.0.tar.gz&lt;br /&gt;
 $ cd libogg-1.3.0&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Vorbis====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz &amp;gt; libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ tar xvzf libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ cd libvorbis-1.3.3&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
===Configuring with CMake===&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This should be a different directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that. Wait while the configuration process runs. You may have to set the following:&lt;br /&gt;
## If CMake did not find your jpeg headers for some reason, set &amp;lt;code&amp;gt;JPEG_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/path/to/Unvanquished/src/libs/jpeg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## You may safely disable &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; to avoid having to compile the library. (At present, the format is not used by any game assets.)&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; to avoid having to compile nettle and hogweed.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; to avoid having to compile Speex.&lt;br /&gt;
## Uncheck &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; to avoid having to compile Theora or Xvid. (At present, there are not cutscenes or any such that require it.)&lt;br /&gt;
## '''You will probably not be able to compile with the GLSL optimizer enabled; uncheck &amp;lt;code&amp;gt;USE_GLSL_OPTIMIZER&amp;lt;/code&amp;gt;'''&lt;br /&gt;
## If you have selected to generate XCode project files, make the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank. This option is not available if you have the generator set to Unix makefiles.&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# You may now close XCode.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
====With XCode====&lt;br /&gt;
# Either start XCode and open the project file (in the build directory you specified) or double-click the project file in Finder.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Change the active target to &amp;quot;ALL_BUILD&amp;quot; and click Product&amp;amp;rarr;Build.&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start Terminal (Applications &amp;amp;rarr; Utilities &amp;amp;rarr; Terminal).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are on a multi-core or multi-processor machine, you may speed up the process by passing the &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; argument followed by the number of available cores to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;; e.g., &amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;. Note that doing so makes reading error messages more difficult, as multiple instances of the compiler will print to the screen at once, causing information to appear out of order.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing the build===&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
After compiling, you'll have to place the data files in the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; directory in your build directory. [[#Acquiring the Game Files|For download instructions, see below.]]&lt;br /&gt;
&lt;br /&gt;
Your file structure should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Build_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
You may now start the application as such:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386&lt;br /&gt;
&lt;br /&gt;
Note that older machines will not support the new OpenGL 3 renderer, and must be started specifying the &amp;quot;vanilla&amp;quot; (aka &amp;quot;GL&amp;quot;) renderer:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386 +set cl_renderer GL&lt;br /&gt;
&lt;br /&gt;
===Bundling the Application===&lt;br /&gt;
&lt;br /&gt;
====With CPack====&lt;br /&gt;
&lt;br /&gt;
CPack is able to create standalone bundles (as well as many other types of installers). However you must generate the files using Unix Makefiles instead of XCode.&lt;br /&gt;
&lt;br /&gt;
 $ cd /path/to/Unvanquished-build&lt;br /&gt;
 $ cpack -G Bundle&lt;br /&gt;
&lt;br /&gt;
Some warnings will be printed however these can be safely ignored. There should be a file called Unvanquished.dmg in the Unvanquished-build folder.&lt;br /&gt;
&lt;br /&gt;
====Manually====&lt;br /&gt;
&lt;br /&gt;
You'll find the Mac [http://macdylibbundler.sourceforge.net/ dynamic library bundler] to be quite useful (you must generate the files using Unix Makefiles instead of XCode):&lt;br /&gt;
&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/macdylibbundler/files/macdylibbundler/0.4.1/dylibbundler0.4.1.zip/download &amp;gt; dylibbundler0.4.1.zip&lt;br /&gt;
 $ unzip dylibbundler0.4.1.zip&lt;br /&gt;
 $ cd dylibbundler&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once you've done that, you can proceed to create the application bundle. Note that these steps assume that you have downloaded the data files to &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; as shown above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git=/path/to/Unvanquished-git-repo&lt;br /&gt;
$ build=/path/to/Unvanquished-build-dir&lt;br /&gt;
$ mkdir -pv Unvanquished.app/Contents/{libs,MacOS,Resources,Frameworks}&lt;br /&gt;
$ cp -r $build/main Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ sips -s format tiff $git/debian/unvanquished.png --out temp.tiff&lt;br /&gt;
$ tiff2icns temp.tiff Unvanquished.app/Contents/Resources/Unvanquished.icns&lt;br /&gt;
$ rm temp.tiff&lt;br /&gt;
$ cp $build/daemon{,ded}.i386 $build/*.dylib Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ cp -r /Library/Frameworks/SDL.framework Unvanquished.app/Contents/Frameworks&lt;br /&gt;
$ install_name_tool -id @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/Frameworks/SDL.framework/Versions/A/SDL&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGLi386.dylib&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGL3i386.dylib&lt;br /&gt;
$ for binary in Unvanquished.app/Contents/MacOS/*.{i386,dylib}; do dylibbundler -b -x $binary -d $dest/Unvanquished.app/Contents/libs/; done&lt;br /&gt;
$ cp /usr/lib/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ chmod +w ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -id @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -change /usr/lib/libGLEW.1.7.0.dylib @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ cat &amp;gt; Unvanquished.app/Contents/Info.plist&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;daemon.i386&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIconFile&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished.icns&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;net.Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleShortVersionString&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
^d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;^d&amp;lt;/code&amp;gt; indicates pressing &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Ctrl&amp;lt;/span&amp;gt;+&amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;D&amp;lt;/span&amp;gt; on the keyboard.&lt;br /&gt;
&lt;br /&gt;
The contents of the completed application bundle should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Bundle_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
'''Note''': If you compiled SDL from source, you will not see a directory titled &amp;lt;code&amp;gt;SDL.framework&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
===Visual Studio===&lt;br /&gt;
&lt;br /&gt;
CMake can generate Visual Studio projects for unvanquished however this feature is relatively new and may have some bugs.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
# Double click on Visual_Studio32.bat&lt;br /&gt;
# Open build-32/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; or &amp;quot;Debug&amp;quot; in the first one and Win32 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
====Important Notes====&lt;br /&gt;
&lt;br /&gt;
* LLVM is disabled and does not work correctly with CMake generated Visual Studio projects.&lt;br /&gt;
* ncurses is not supported under Visual Studio.&lt;br /&gt;
* The path to the build folder must not have any spaces otherwise generation of QVMs will fail. See [https://github.com/Unvanquished/Unvanquished/issues/102 issue 102]&lt;br /&gt;
* Due to limitations with cmake neither the startup project nor the working directory can be specified. These must be manually set to the following values for debugging the client under Visual Studio&lt;br /&gt;
** Right click on client and select &amp;quot;Set as StartUp project&amp;quot;.&lt;br /&gt;
** Right click on client, select properties, select Debugging and set &amp;quot;Working Directory&amp;quot; to $(TargetPath)\..&lt;br /&gt;
&lt;br /&gt;
===MinGW===&lt;br /&gt;
Unvanquished is supported under MinGW. The build process should be fairly similar to the Linux instructions.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak2.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak3.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak4.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
On FreeBSD, use &amp;lt;code&amp;gt;fetch -r&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;. You can also get the pak files in this way (requires cURL):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir -p ~/.Unvanquished/main&lt;br /&gt;
 $ ./download-pk3.sh ~/.Unvanquished/main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will, by default, download missing files for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===CMake cannot locate Newton===&lt;br /&gt;
&lt;br /&gt;
If CMake cannot find Newton, you'll need to set it up yourself.&lt;br /&gt;
&lt;br /&gt;
It should be in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;/path/to/Unvanquished&amp;lt;/var&amp;gt;/src/libs/libnewton/libs/&amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt;/libNewton.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
Be sure to replace &amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt; with the proper directory name.&lt;br /&gt;
&lt;br /&gt;
Use CMake as before to change the &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt; build setting to the said path:&lt;br /&gt;
&lt;br /&gt;
# Start the CMake configurator:&amp;lt;pre&amp;gt;$ ccmake ..&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Scroll down and highlight &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to begin editing and input in the path.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; to configure and &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the new makefiles.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Q&amp;lt;/span&amp;gt; to quit.&lt;br /&gt;
# Recompile the source:&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=486</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=486"/>
		<updated>2012-07-03T06:10:32Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Acquiring the Game Files */ Add new pak3 files&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code. Note: Xcode currently does not build QVMs due to [https://github.com/Unvanquished/Unvanquished/issues/101 issue 101].&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
You may use this [http://home.comcast.net/~chet102103/compile.sh script] to perform these tasks. If you've downloaded the source to a folder named ''Unvanquished'' in the current directory, a typical invocation would look like this:&lt;br /&gt;
&lt;br /&gt;
 $ ./compile.sh --bundle --compile -s Unvanquished --build Unvanquished-build --bundle-dest .&lt;br /&gt;
&lt;br /&gt;
You will also need to build the libraries from source.&lt;br /&gt;
&lt;br /&gt;
Unvanquished requires the following libraries:&lt;br /&gt;
* The jpeg library, version 8 or higher. (Version 6 was known to have problems)&lt;br /&gt;
* Simple DirectMedia Layer (The binary provided by libsdl.org causes graphical corruptions. Compile from source or use homebrew/macports)&lt;br /&gt;
* OpenGL Extension Wrangler Library&lt;br /&gt;
&lt;br /&gt;
Optional libraries:&lt;br /&gt;
* WebP&lt;br /&gt;
* Theora&lt;br /&gt;
* Speex&lt;br /&gt;
* XVid&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
The following are shell scripts that download, compile, and install various libraries.&lt;br /&gt;
&lt;br /&gt;
====JPEG====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz &amp;gt; jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ tar xvzf jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ cd jpeg-8d&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The OpenGL Extension Wrangler Library (GLEW)====&lt;br /&gt;
&lt;br /&gt;
 $ curl -L https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz/download &amp;gt; glew-1.7.0.tgz&lt;br /&gt;
 $ tar xvzf glew-1.7.0.tgz&lt;br /&gt;
 $ cd glew-1.7.0&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Simple DirectMedia Layer (SDL)====&lt;br /&gt;
&lt;br /&gt;
Do not use the binaries provided by libsdl.org instead compile your own.&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15.tar.gz &amp;gt; SDL-1.2.15.tar.gz&lt;br /&gt;
 $ tar xvzf SDL-1.2.15.tar.gz&lt;br /&gt;
 $ cd SDL-1.2.15&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The GNU MP Bignum Library (libgmp)====&lt;br /&gt;
&lt;br /&gt;
 $ curl ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 &amp;gt; gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ tar xvjf gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ cd gmp-5.0.5&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Ogg====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz &amp;gt; libogg-1.3.0.tar.gz&lt;br /&gt;
 $ tar xvzf libogg-1.3.0.tar.gz&lt;br /&gt;
 $ cd libogg-1.3.0&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Vorbis====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz &amp;gt; libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ tar xvzf libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ cd libvorbis-1.3.3&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
===Configuring with CMake===&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This should be a different directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that. Wait while the configuration process runs. You may have to set the following:&lt;br /&gt;
## If CMake did not find your jpeg headers for some reason, set &amp;lt;code&amp;gt;JPEG_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/path/to/Unvanquished/src/libs/jpeg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## You may safely disable &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; to avoid having to compile the library. (At present, the format is not used by any game assets.)&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; to avoid having to compile nettle and hogweed.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; to avoid having to compile Speex.&lt;br /&gt;
## Uncheck &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; to avoid having to compile Theora or Xvid. (At present, there are not cutscenes or any such that require it.)&lt;br /&gt;
## '''You will probably not be able to compile with the GLSL optimizer enabled; uncheck &amp;lt;code&amp;gt;USE_GLSL_OPTIMIZER&amp;lt;/code&amp;gt;'''&lt;br /&gt;
## If you have selected to generate XCode project files, make the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank. This option is not available if you have the generator set to Unix makefiles.&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# You may now close XCode.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
====With XCode====&lt;br /&gt;
# Either start XCode and open the project file (in the build directory you specified) or double-click the project file in Finder.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Change the active target to &amp;quot;ALL_BUILD&amp;quot; and click Product&amp;amp;rarr;Build.&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start Terminal (Applications &amp;amp;rarr; Utilities &amp;amp;rarr; Terminal).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are on a multi-core or multi-processor machine, you may speed up the process by passing the &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; argument followed by the number of available cores to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;; e.g., &amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;. Note that doing so makes reading error messages more difficult, as multiple instances of the compiler will print to the screen at once, causing information to appear out of order.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing the build===&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
After compiling, you'll have to place the data files in the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; directory in your build directory. [[#Acquiring the Game Files|For download instructions, see below.]]&lt;br /&gt;
&lt;br /&gt;
Your file structure should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Build_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
You may now start the application as such:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386&lt;br /&gt;
&lt;br /&gt;
Note that older machines will not support the new OpenGL 3 renderer, and must be started specifying the &amp;quot;vanilla&amp;quot; (aka &amp;quot;GL&amp;quot;) renderer:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386 +set cl_renderer GL&lt;br /&gt;
&lt;br /&gt;
===Bundling the Application===&lt;br /&gt;
&lt;br /&gt;
====With CPack====&lt;br /&gt;
&lt;br /&gt;
CPack is able to create standalone bundles (as well as many other types of installers). However you must generate the files using Unix Makefiles instead of XCode.&lt;br /&gt;
* cd /path/to/Unvanquished-build&lt;br /&gt;
* cpack -G Bundle&lt;br /&gt;
Some warnings will be printed however these can be safely ignored. There should be a file called Unvanquished.dmg in the Unvanquished-build folder.&lt;br /&gt;
&lt;br /&gt;
====Manually====&lt;br /&gt;
&lt;br /&gt;
You'll find the Mac [http://macdylibbundler.sourceforge.net/ dynamic library bundler] to be quite useful (you must generate the files using Unix Makefiles instead of XCode):&lt;br /&gt;
&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/macdylibbundler/files/macdylibbundler/0.4.1/dylibbundler0.4.1.zip/download &amp;gt; dylibbundler0.4.1.zip&lt;br /&gt;
 $ unzip dylibbundler0.4.1.zip&lt;br /&gt;
 $ cd dylibbundler&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once you've done that, you can proceed to create the application bundle. Note that these steps assume that you have downloaded the data files to &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; as shown above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git=/path/to/Unvanquished-git-repo&lt;br /&gt;
$ build=/path/to/Unvanquished-build-dir&lt;br /&gt;
$ mkdir -pv Unvanquished.app/Contents/{libs,MacOS,Resources,Frameworks}&lt;br /&gt;
$ cp -r $build/main Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ sips -s format tiff $git/debian/unvanquished.png --out temp.tiff&lt;br /&gt;
$ tiff2icns temp.tiff Unvanquished.app/Contents/Resources/Unvanquished.icns&lt;br /&gt;
$ rm temp.tiff&lt;br /&gt;
$ cp $build/daemon{,ded}.i386 $build/*.dylib Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ cp -r /Library/Frameworks/SDL.framework Unvanquished.app/Contents/Frameworks&lt;br /&gt;
$ install_name_tool -id @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/Frameworks/SDL.framework/Versions/A/SDL&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGLi386.dylib&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGL3i386.dylib&lt;br /&gt;
$ for binary in Unvanquished.app/Contents/MacOS/*.{i386,dylib}; do dylibbundler -b -x $binary -d $dest/Unvanquished.app/Contents/libs/; done&lt;br /&gt;
$ cp /usr/lib/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ chmod +w ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -id @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -change /usr/lib/libGLEW.1.7.0.dylib @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ cat &amp;gt; Unvanquished.app/Contents/Info.plist&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;daemon.i386&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIconFile&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished.icns&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;net.Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleShortVersionString&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
^d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;^d&amp;lt;/code&amp;gt; indicates pressing &amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;Ctrl&amp;lt;/span&amp;gt;+&amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;D&amp;lt;/span&amp;gt; on the keyboard.&lt;br /&gt;
&lt;br /&gt;
The contents of the completed application bundle should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Bundle_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
===Visual Studio===&lt;br /&gt;
&lt;br /&gt;
CMake can generate Visual Studio projects for unvanquished however this feature is relatively new and may have some bugs.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
# Double click on Visual_Studio32.bat&lt;br /&gt;
# Open build-32/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; or &amp;quot;Debug&amp;quot; in the first one and Win32 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
====Important Notes====&lt;br /&gt;
&lt;br /&gt;
* LLVM is disabled and does not work correctly with CMake generated Visual Studio projects.&lt;br /&gt;
* ncurses is not supported under Visual Studio.&lt;br /&gt;
* The path to the build folder must not have any spaces otherwise generation of QVMs will fail. See [https://github.com/Unvanquished/Unvanquished/issues/102 issue 102]&lt;br /&gt;
&lt;br /&gt;
===MinGW===&lt;br /&gt;
Unvanquished is supported under MinGW. The build process should be fairly similar to the Linux instructions.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak2.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak3.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak4.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
On FreeBSD, use &amp;lt;code&amp;gt;fetch -r&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;. You can also get the pak files in this way (requires cURL):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir -p ~/.Unvanquished/main&lt;br /&gt;
 $ ./download-pk3.sh ~/.Unvanquished/main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will, by default, download missing files for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===CMake cannot locate Newton===&lt;br /&gt;
&lt;br /&gt;
If CMake cannot find Newton, you'll need to set it up yourself.&lt;br /&gt;
&lt;br /&gt;
It should be in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;/path/to/Unvanquished&amp;lt;/var&amp;gt;/src/libs/libnewton/libs/&amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt;/libNewton.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
Be sure to replace &amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt; with the proper directory name.&lt;br /&gt;
&lt;br /&gt;
Use CMake as before to change the &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt; build setting to the said path:&lt;br /&gt;
&lt;br /&gt;
# Start the CMake configurator:&amp;lt;pre&amp;gt;$ ccmake ..&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Scroll down and highlight &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to begin editing and input in the path.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; to configure and &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the new makefiles.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Q&amp;lt;/span&amp;gt; to quit.&lt;br /&gt;
# Recompile the source:&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=485</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=485"/>
		<updated>2012-07-03T06:09:35Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Important Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code. Note: Xcode currently does not build QVMs due to [https://github.com/Unvanquished/Unvanquished/issues/101 issue 101].&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
You may use this [http://home.comcast.net/~chet102103/compile.sh script] to perform these tasks. If you've downloaded the source to a folder named ''Unvanquished'' in the current directory, a typical invocation would look like this:&lt;br /&gt;
&lt;br /&gt;
 $ ./compile.sh --bundle --compile -s Unvanquished --build Unvanquished-build --bundle-dest .&lt;br /&gt;
&lt;br /&gt;
You will also need to build the libraries from source.&lt;br /&gt;
&lt;br /&gt;
Unvanquished requires the following libraries:&lt;br /&gt;
* The jpeg library, version 8 or higher. (Version 6 was known to have problems)&lt;br /&gt;
* Simple DirectMedia Layer (The binary provided by libsdl.org causes graphical corruptions. Compile from source or use homebrew/macports)&lt;br /&gt;
* OpenGL Extension Wrangler Library&lt;br /&gt;
&lt;br /&gt;
Optional libraries:&lt;br /&gt;
* WebP&lt;br /&gt;
* Theora&lt;br /&gt;
* Speex&lt;br /&gt;
* XVid&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
The following are shell scripts that download, compile, and install various libraries.&lt;br /&gt;
&lt;br /&gt;
====JPEG====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz &amp;gt; jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ tar xvzf jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ cd jpeg-8d&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The OpenGL Extension Wrangler Library (GLEW)====&lt;br /&gt;
&lt;br /&gt;
 $ curl -L https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz/download &amp;gt; glew-1.7.0.tgz&lt;br /&gt;
 $ tar xvzf glew-1.7.0.tgz&lt;br /&gt;
 $ cd glew-1.7.0&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Simple DirectMedia Layer (SDL)====&lt;br /&gt;
&lt;br /&gt;
Do not use the binaries provided by libsdl.org instead compile your own.&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15.tar.gz &amp;gt; SDL-1.2.15.tar.gz&lt;br /&gt;
 $ tar xvzf SDL-1.2.15.tar.gz&lt;br /&gt;
 $ cd SDL-1.2.15&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The GNU MP Bignum Library (libgmp)====&lt;br /&gt;
&lt;br /&gt;
 $ curl ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 &amp;gt; gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ tar xvjf gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ cd gmp-5.0.5&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Ogg====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz &amp;gt; libogg-1.3.0.tar.gz&lt;br /&gt;
 $ tar xvzf libogg-1.3.0.tar.gz&lt;br /&gt;
 $ cd libogg-1.3.0&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Vorbis====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz &amp;gt; libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ tar xvzf libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ cd libvorbis-1.3.3&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
===Configuring with CMake===&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This should be a different directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that. Wait while the configuration process runs. You may have to set the following:&lt;br /&gt;
## If CMake did not find your jpeg headers for some reason, set &amp;lt;code&amp;gt;JPEG_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/path/to/Unvanquished/src/libs/jpeg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## You may safely disable &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; to avoid having to compile the library. (At present, the format is not used by any game assets.)&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; to avoid having to compile nettle and hogweed.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; to avoid having to compile Speex.&lt;br /&gt;
## Uncheck &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; to avoid having to compile Theora or Xvid. (At present, there are not cutscenes or any such that require it.)&lt;br /&gt;
## '''You will probably not be able to compile with the GLSL optimizer enabled; uncheck &amp;lt;code&amp;gt;USE_GLSL_OPTIMIZER&amp;lt;/code&amp;gt;'''&lt;br /&gt;
## If you have selected to generate XCode project files, make the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank. This option is not available if you have the generator set to Unix makefiles.&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# You may now close XCode.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
====With XCode====&lt;br /&gt;
# Either start XCode and open the project file (in the build directory you specified) or double-click the project file in Finder.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Change the active target to &amp;quot;ALL_BUILD&amp;quot; and click Product&amp;amp;rarr;Build.&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start Terminal (Applications &amp;amp;rarr; Utilities &amp;amp;rarr; Terminal).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are on a multi-core or multi-processor machine, you may speed up the process by passing the &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; argument followed by the number of available cores to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;; e.g., &amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;. Note that doing so makes reading error messages more difficult, as multiple instances of the compiler will print to the screen at once, causing information to appear out of order.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing the build===&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
After compiling, you'll have to place the data files in the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; directory in your build directory. [[#Acquiring the Game Files|For download instructions, see below.]]&lt;br /&gt;
&lt;br /&gt;
Your file structure should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Build_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
You may now start the application as such:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386&lt;br /&gt;
&lt;br /&gt;
Note that older machines will not support the new OpenGL 3 renderer, and must be started specifying the &amp;quot;vanilla&amp;quot; (aka &amp;quot;GL&amp;quot;) renderer:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386 +set cl_renderer GL&lt;br /&gt;
&lt;br /&gt;
===Bundling the Application===&lt;br /&gt;
&lt;br /&gt;
====With CPack====&lt;br /&gt;
&lt;br /&gt;
CPack is able to create standalone bundles (as well as many other types of installers). However you must generate the files using Unix Makefiles instead of XCode.&lt;br /&gt;
* cd /path/to/Unvanquished-build&lt;br /&gt;
* cpack -G Bundle&lt;br /&gt;
Some warnings will be printed however these can be safely ignored. There should be a file called Unvanquished.dmg in the Unvanquished-build folder.&lt;br /&gt;
&lt;br /&gt;
====Manually====&lt;br /&gt;
&lt;br /&gt;
You'll find the Mac [http://macdylibbundler.sourceforge.net/ dynamic library bundler] to be quite useful (you must generate the files using Unix Makefiles instead of XCode):&lt;br /&gt;
&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/macdylibbundler/files/macdylibbundler/0.4.1/dylibbundler0.4.1.zip/download &amp;gt; dylibbundler0.4.1.zip&lt;br /&gt;
 $ unzip dylibbundler0.4.1.zip&lt;br /&gt;
 $ cd dylibbundler&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once you've done that, you can proceed to create the application bundle. Note that these steps assume that you have downloaded the data files to &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; as shown above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git=/path/to/Unvanquished-git-repo&lt;br /&gt;
$ build=/path/to/Unvanquished-build-dir&lt;br /&gt;
$ mkdir -pv Unvanquished.app/Contents/{libs,MacOS,Resources,Frameworks}&lt;br /&gt;
$ cp -r $build/main Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ sips -s format tiff $git/debian/unvanquished.png --out temp.tiff&lt;br /&gt;
$ tiff2icns temp.tiff Unvanquished.app/Contents/Resources/Unvanquished.icns&lt;br /&gt;
$ rm temp.tiff&lt;br /&gt;
$ cp $build/daemon{,ded}.i386 $build/*.dylib Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ cp -r /Library/Frameworks/SDL.framework Unvanquished.app/Contents/Frameworks&lt;br /&gt;
$ install_name_tool -id @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/Frameworks/SDL.framework/Versions/A/SDL&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGLi386.dylib&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGL3i386.dylib&lt;br /&gt;
$ for binary in Unvanquished.app/Contents/MacOS/*.{i386,dylib}; do dylibbundler -b -x $binary -d $dest/Unvanquished.app/Contents/libs/; done&lt;br /&gt;
$ cp /usr/lib/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ chmod +w ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -id @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -change /usr/lib/libGLEW.1.7.0.dylib @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ cat &amp;gt; Unvanquished.app/Contents/Info.plist&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;daemon.i386&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIconFile&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished.icns&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;net.Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleShortVersionString&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
^d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;^d&amp;lt;/code&amp;gt; indicates pressing &amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;Ctrl&amp;lt;/span&amp;gt;+&amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;D&amp;lt;/span&amp;gt; on the keyboard.&lt;br /&gt;
&lt;br /&gt;
The contents of the completed application bundle should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Bundle_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
===Visual Studio===&lt;br /&gt;
&lt;br /&gt;
CMake can generate Visual Studio projects for unvanquished however this feature is relatively new and may have some bugs.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
# Double click on Visual_Studio32.bat&lt;br /&gt;
# Open build-32/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; or &amp;quot;Debug&amp;quot; in the first one and Win32 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
====Important Notes====&lt;br /&gt;
&lt;br /&gt;
* LLVM is disabled and does not work correctly with CMake generated Visual Studio projects.&lt;br /&gt;
* ncurses is not supported under Visual Studio.&lt;br /&gt;
* The path to the build folder must not have any spaces otherwise generation of QVMs will fail. See [https://github.com/Unvanquished/Unvanquished/issues/102 issue 102]&lt;br /&gt;
&lt;br /&gt;
===MinGW===&lt;br /&gt;
Unvanquished is supported under MinGW. The build process should be fairly similar to the Linux instructions.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak2.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
On FreeBSD, use &amp;lt;code&amp;gt;fetch -r&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;. You can also get the pak files in this way (requires cURL):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir -p ~/.Unvanquished/main&lt;br /&gt;
 $ ./download-pk3.sh ~/.Unvanquished/main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will, by default, download missing files for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===CMake cannot locate Newton===&lt;br /&gt;
&lt;br /&gt;
If CMake cannot find Newton, you'll need to set it up yourself.&lt;br /&gt;
&lt;br /&gt;
It should be in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;/path/to/Unvanquished&amp;lt;/var&amp;gt;/src/libs/libnewton/libs/&amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt;/libNewton.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
Be sure to replace &amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt; with the proper directory name.&lt;br /&gt;
&lt;br /&gt;
Use CMake as before to change the &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt; build setting to the said path:&lt;br /&gt;
&lt;br /&gt;
# Start the CMake configurator:&amp;lt;pre&amp;gt;$ ccmake ..&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Scroll down and highlight &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to begin editing and input in the path.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; to configure and &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the new makefiles.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Q&amp;lt;/span&amp;gt; to quit.&lt;br /&gt;
# Recompile the source:&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=484</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=484"/>
		<updated>2012-07-03T06:04:40Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Mac OS X */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code. Note: Xcode currently does not build QVMs due to [https://github.com/Unvanquished/Unvanquished/issues/101 issue 101].&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
You may use this [http://home.comcast.net/~chet102103/compile.sh script] to perform these tasks. If you've downloaded the source to a folder named ''Unvanquished'' in the current directory, a typical invocation would look like this:&lt;br /&gt;
&lt;br /&gt;
 $ ./compile.sh --bundle --compile -s Unvanquished --build Unvanquished-build --bundle-dest .&lt;br /&gt;
&lt;br /&gt;
You will also need to build the libraries from source.&lt;br /&gt;
&lt;br /&gt;
Unvanquished requires the following libraries:&lt;br /&gt;
* The jpeg library, version 8 or higher. (Version 6 was known to have problems)&lt;br /&gt;
* Simple DirectMedia Layer (The binary provided by libsdl.org causes graphical corruptions. Compile from source or use homebrew/macports)&lt;br /&gt;
* OpenGL Extension Wrangler Library&lt;br /&gt;
&lt;br /&gt;
Optional libraries:&lt;br /&gt;
* WebP&lt;br /&gt;
* Theora&lt;br /&gt;
* Speex&lt;br /&gt;
* XVid&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
The following are shell scripts that download, compile, and install various libraries.&lt;br /&gt;
&lt;br /&gt;
====JPEG====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz &amp;gt; jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ tar xvzf jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ cd jpeg-8d&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The OpenGL Extension Wrangler Library (GLEW)====&lt;br /&gt;
&lt;br /&gt;
 $ curl -L https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz/download &amp;gt; glew-1.7.0.tgz&lt;br /&gt;
 $ tar xvzf glew-1.7.0.tgz&lt;br /&gt;
 $ cd glew-1.7.0&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Simple DirectMedia Layer (SDL)====&lt;br /&gt;
&lt;br /&gt;
Do not use the binaries provided by libsdl.org instead compile your own.&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15.tar.gz &amp;gt; SDL-1.2.15.tar.gz&lt;br /&gt;
 $ tar xvzf SDL-1.2.15.tar.gz&lt;br /&gt;
 $ cd SDL-1.2.15&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The GNU MP Bignum Library (libgmp)====&lt;br /&gt;
&lt;br /&gt;
 $ curl ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 &amp;gt; gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ tar xvjf gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ cd gmp-5.0.5&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Ogg====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz &amp;gt; libogg-1.3.0.tar.gz&lt;br /&gt;
 $ tar xvzf libogg-1.3.0.tar.gz&lt;br /&gt;
 $ cd libogg-1.3.0&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Vorbis====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz &amp;gt; libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ tar xvzf libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ cd libvorbis-1.3.3&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
===Configuring with CMake===&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This should be a different directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that. Wait while the configuration process runs. You may have to set the following:&lt;br /&gt;
## If CMake did not find your jpeg headers for some reason, set &amp;lt;code&amp;gt;JPEG_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/path/to/Unvanquished/src/libs/jpeg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## You may safely disable &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; to avoid having to compile the library. (At present, the format is not used by any game assets.)&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; to avoid having to compile nettle and hogweed.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; to avoid having to compile Speex.&lt;br /&gt;
## Uncheck &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; to avoid having to compile Theora or Xvid. (At present, there are not cutscenes or any such that require it.)&lt;br /&gt;
## '''You will probably not be able to compile with the GLSL optimizer enabled; uncheck &amp;lt;code&amp;gt;USE_GLSL_OPTIMIZER&amp;lt;/code&amp;gt;'''&lt;br /&gt;
## If you have selected to generate XCode project files, make the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank. This option is not available if you have the generator set to Unix makefiles.&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# You may now close XCode.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
====With XCode====&lt;br /&gt;
# Either start XCode and open the project file (in the build directory you specified) or double-click the project file in Finder.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Change the active target to &amp;quot;ALL_BUILD&amp;quot; and click Product&amp;amp;rarr;Build.&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start Terminal (Applications &amp;amp;rarr; Utilities &amp;amp;rarr; Terminal).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are on a multi-core or multi-processor machine, you may speed up the process by passing the &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; argument followed by the number of available cores to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;; e.g., &amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;. Note that doing so makes reading error messages more difficult, as multiple instances of the compiler will print to the screen at once, causing information to appear out of order.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing the build===&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
After compiling, you'll have to place the data files in the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; directory in your build directory. [[#Acquiring the Game Files|For download instructions, see below.]]&lt;br /&gt;
&lt;br /&gt;
Your file structure should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Build_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
You may now start the application as such:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386&lt;br /&gt;
&lt;br /&gt;
Note that older machines will not support the new OpenGL 3 renderer, and must be started specifying the &amp;quot;vanilla&amp;quot; (aka &amp;quot;GL&amp;quot;) renderer:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386 +set cl_renderer GL&lt;br /&gt;
&lt;br /&gt;
===Bundling the Application===&lt;br /&gt;
&lt;br /&gt;
====With CPack====&lt;br /&gt;
&lt;br /&gt;
CPack is able to create standalone bundles (as well as many other types of installers). However you must generate the files using Unix Makefiles instead of XCode.&lt;br /&gt;
* cd /path/to/Unvanquished-build&lt;br /&gt;
* cpack -G Bundle&lt;br /&gt;
Some warnings will be printed however these can be safely ignored. There should be a file called Unvanquished.dmg in the Unvanquished-build folder.&lt;br /&gt;
&lt;br /&gt;
====Manually====&lt;br /&gt;
&lt;br /&gt;
You'll find the Mac [http://macdylibbundler.sourceforge.net/ dynamic library bundler] to be quite useful (you must generate the files using Unix Makefiles instead of XCode):&lt;br /&gt;
&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/macdylibbundler/files/macdylibbundler/0.4.1/dylibbundler0.4.1.zip/download &amp;gt; dylibbundler0.4.1.zip&lt;br /&gt;
 $ unzip dylibbundler0.4.1.zip&lt;br /&gt;
 $ cd dylibbundler&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once you've done that, you can proceed to create the application bundle. Note that these steps assume that you have downloaded the data files to &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; as shown above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git=/path/to/Unvanquished-git-repo&lt;br /&gt;
$ build=/path/to/Unvanquished-build-dir&lt;br /&gt;
$ mkdir -pv Unvanquished.app/Contents/{libs,MacOS,Resources,Frameworks}&lt;br /&gt;
$ cp -r $build/main Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ sips -s format tiff $git/debian/unvanquished.png --out temp.tiff&lt;br /&gt;
$ tiff2icns temp.tiff Unvanquished.app/Contents/Resources/Unvanquished.icns&lt;br /&gt;
$ rm temp.tiff&lt;br /&gt;
$ cp $build/daemon{,ded}.i386 $build/*.dylib Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ cp -r /Library/Frameworks/SDL.framework Unvanquished.app/Contents/Frameworks&lt;br /&gt;
$ install_name_tool -id @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/Frameworks/SDL.framework/Versions/A/SDL&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGLi386.dylib&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGL3i386.dylib&lt;br /&gt;
$ for binary in Unvanquished.app/Contents/MacOS/*.{i386,dylib}; do dylibbundler -b -x $binary -d $dest/Unvanquished.app/Contents/libs/; done&lt;br /&gt;
$ cp /usr/lib/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ chmod +w ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -id @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -change /usr/lib/libGLEW.1.7.0.dylib @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ cat &amp;gt; Unvanquished.app/Contents/Info.plist&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;daemon.i386&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIconFile&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished.icns&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;net.Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleShortVersionString&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
^d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;^d&amp;lt;/code&amp;gt; indicates pressing &amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;Ctrl&amp;lt;/span&amp;gt;+&amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;D&amp;lt;/span&amp;gt; on the keyboard.&lt;br /&gt;
&lt;br /&gt;
The contents of the completed application bundle should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Bundle_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
===Visual Studio===&lt;br /&gt;
&lt;br /&gt;
CMake can generate Visual Studio projects for unvanquished however this feature is relatively new and may have some bugs.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
# Double click on Visual_Studio32.bat&lt;br /&gt;
# Open build-32/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; or &amp;quot;Debug&amp;quot; in the first one and Win32 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
====Important Notes====&lt;br /&gt;
&lt;br /&gt;
* The CMake script currently only supports 32 bit builds however this will change in the future&lt;br /&gt;
* QVM, LLVM and glsl-optimizer are disabled and probably do not work correctly with CMake generated Visual Studio projects.&lt;br /&gt;
* ncurses is not supported under Visual Studio.&lt;br /&gt;
&lt;br /&gt;
===MinGW===&lt;br /&gt;
Unvanquished is supported under MinGW. The build process should be fairly similar to the Linux instructions.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak2.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
On FreeBSD, use &amp;lt;code&amp;gt;fetch -r&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;. You can also get the pak files in this way (requires cURL):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir -p ~/.Unvanquished/main&lt;br /&gt;
 $ ./download-pk3.sh ~/.Unvanquished/main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will, by default, download missing files for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===CMake cannot locate Newton===&lt;br /&gt;
&lt;br /&gt;
If CMake cannot find Newton, you'll need to set it up yourself.&lt;br /&gt;
&lt;br /&gt;
It should be in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;/path/to/Unvanquished&amp;lt;/var&amp;gt;/src/libs/libnewton/libs/&amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt;/libNewton.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
Be sure to replace &amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt; with the proper directory name.&lt;br /&gt;
&lt;br /&gt;
Use CMake as before to change the &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt; build setting to the said path:&lt;br /&gt;
&lt;br /&gt;
# Start the CMake configurator:&amp;lt;pre&amp;gt;$ ccmake ..&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Scroll down and highlight &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to begin editing and input in the path.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; to configure and &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the new makefiles.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Q&amp;lt;/span&amp;gt; to quit.&lt;br /&gt;
# Recompile the source:&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=482</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=482"/>
		<updated>2012-07-01T14:36:33Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Mac OS X */ Changed SDL instructions to indicate that users should compile from source.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code.&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
You may use this [http://home.comcast.net/~chet102103/compile.sh script] to perform these tasks. If you've downloaded the source to a folder named ''Unvanquished'' in the current directory, a typical invocation would look like this:&lt;br /&gt;
&lt;br /&gt;
 $ ./compile.sh --bundle --compile -s Unvanquished --build Unvanquished-build --bundle-dest .&lt;br /&gt;
&lt;br /&gt;
You will also need to build the libraries from source.&lt;br /&gt;
&lt;br /&gt;
Unvanquished requires the following libraries:&lt;br /&gt;
* The jpeg library, version 8 or higher. (Version 6 was known to have problems)&lt;br /&gt;
* Simple DirectMedia Layer (The binary provided by libsdl.org causes graphical corruptions. Compile from source or use homebrew/macports)&lt;br /&gt;
* OpenGL Extension Wrangler Library&lt;br /&gt;
&lt;br /&gt;
Optional libraries:&lt;br /&gt;
* WebP&lt;br /&gt;
* Theora&lt;br /&gt;
* Speex&lt;br /&gt;
* XVid&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
The following are shell scripts that download, compile, and install various libraries.&lt;br /&gt;
&lt;br /&gt;
====JPEG====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz &amp;gt; jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ tar xvzf jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ cd jpeg-8d&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The OpenGL Extension Wrangler Library (GLEW)====&lt;br /&gt;
&lt;br /&gt;
 $ curl -L https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz/download &amp;gt; glew-1.7.0.tgz&lt;br /&gt;
 $ tar xvzf glew-1.7.0.tgz&lt;br /&gt;
 $ cd glew-1.7.0&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Simple DirectMedia Layer (SDL)====&lt;br /&gt;
&lt;br /&gt;
Do not use the binaries provided by libsdl.org instead compile your own.&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15.tar.gz &amp;gt; SDL-1.2.15.tar.gz&lt;br /&gt;
 $ tar xvzf SDL-1.2.15.tar.gz&lt;br /&gt;
 $ cd SDL-1.2.15&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The GNU MP Bignum Library (libgmp)====&lt;br /&gt;
&lt;br /&gt;
 $ curl ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 &amp;gt; gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ tar xvjf gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ cd gmp-5.0.5&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Ogg====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz &amp;gt; libogg-1.3.0.tar.gz&lt;br /&gt;
 $ tar xvzf libogg-1.3.0.tar.gz&lt;br /&gt;
 $ cd libogg-1.3.0&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Vorbis====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz &amp;gt; libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ tar xvzf libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ cd libvorbis-1.3.3&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
===Configuring with CMake===&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This should be a different directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that. Wait while the configuration process runs. You may have to set the following:&lt;br /&gt;
## If CMake did not find your jpeg headers for some reason, set &amp;lt;code&amp;gt;JPEG_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/path/to/Unvanquished/src/libs/jpeg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## You may safely disable &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; to avoid having to compile the library. (At present, the format is not used by any game assets.)&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; to avoid having to compile nettle and hogweed.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; to avoid having to compile Speex.&lt;br /&gt;
## Uncheck &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; to avoid having to compile Theora or Xvid. (At present, there are not cutscenes or any such that require it.)&lt;br /&gt;
## '''You will probably not be able to compile with the GLSL optimizer enabled; uncheck &amp;lt;code&amp;gt;USE_GLSL_OPTIMIZER&amp;lt;/code&amp;gt;'''&lt;br /&gt;
## If you have selected to generate XCode project files, make the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank. This option is not available if you have the generator set to Unix makefiles.&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# You may now close XCode.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
====With XCode====&lt;br /&gt;
# Either start XCode and open the project file (in the build directory you specified) or double-click the project file in Finder.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Change the active target to &amp;quot;ALL_BUILD&amp;quot; and click Product&amp;amp;rarr;Build.&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start Terminal (Applications &amp;amp;rarr; Utilities &amp;amp;rarr; Terminal).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are on a multi-core or multi-processor machine, you may speed up the process by passing the &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; argument followed by the number of available cores to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;; e.g., &amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;. Note that doing so makes reading error messages more difficult, as multiple instances of the compiler will print to the screen at once, causing information to appear out of order.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing the build===&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
After compiling, you'll have to place the data files in the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; directory in your build directory. [[#Acquiring the Game Files|For download instructions, see below.]]&lt;br /&gt;
&lt;br /&gt;
Your file structure should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Build_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
You may now start the application as such:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386&lt;br /&gt;
&lt;br /&gt;
Note that older machines will not support the new OpenGL 3 renderer, and must be started specifying the &amp;quot;vanilla&amp;quot; (aka &amp;quot;GL&amp;quot;) renderer:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386 +set cl_renderer GL&lt;br /&gt;
&lt;br /&gt;
===Bundling the Application===&lt;br /&gt;
&lt;br /&gt;
====With CPack====&lt;br /&gt;
&lt;br /&gt;
CPack is able to create standalone bundles (as well as many other types of installers). However you must generate the files using Unix Makefiles instead of XCode.&lt;br /&gt;
* cd /path/to/Unvanquished-build&lt;br /&gt;
* cpack -G Bundle&lt;br /&gt;
Some warnings will be printed however these can be safely ignored. There should be a file called Unvanquished.dmg in the Unvanquished-build folder.&lt;br /&gt;
&lt;br /&gt;
====Manually====&lt;br /&gt;
&lt;br /&gt;
You'll find the Mac [http://macdylibbundler.sourceforge.net/ dynamic library bundler] to be quite useful (you must generate the files using Unix Makefiles instead of XCode):&lt;br /&gt;
&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/macdylibbundler/files/macdylibbundler/0.4.1/dylibbundler0.4.1.zip/download &amp;gt; dylibbundler0.4.1.zip&lt;br /&gt;
 $ unzip dylibbundler0.4.1.zip&lt;br /&gt;
 $ cd dylibbundler&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once you've done that, you can proceed to create the application bundle. Note that these steps assume that you have downloaded the data files to &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; as shown above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git=/path/to/Unvanquished-git-repo&lt;br /&gt;
$ build=/path/to/Unvanquished-build-dir&lt;br /&gt;
$ mkdir -pv Unvanquished.app/Contents/{libs,MacOS,Resources,Frameworks}&lt;br /&gt;
$ cp -r $build/main Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ sips -s format tiff $git/debian/unvanquished.png --out temp.tiff&lt;br /&gt;
$ tiff2icns temp.tiff Unvanquished.app/Contents/Resources/Unvanquished.icns&lt;br /&gt;
$ rm temp.tiff&lt;br /&gt;
$ cp $build/daemon{,ded}.i386 $build/*.dylib Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ cp -r /Library/Frameworks/SDL.framework Unvanquished.app/Contents/Frameworks&lt;br /&gt;
$ install_name_tool -id @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/Frameworks/SDL.framework/Versions/A/SDL&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGLi386.dylib&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGL3i386.dylib&lt;br /&gt;
$ for binary in Unvanquished.app/Contents/MacOS/*.{i386,dylib}; do dylibbundler -b -x $binary -d $dest/Unvanquished.app/Contents/libs/; done&lt;br /&gt;
$ cp /usr/lib/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ chmod +w ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -id @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -change /usr/lib/libGLEW.1.7.0.dylib @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ cat &amp;gt; Unvanquished.app/Contents/Info.plist&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;daemon.i386&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIconFile&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished.icns&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;net.Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleShortVersionString&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
^d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;^d&amp;lt;/code&amp;gt; indicates pressing &amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;Ctrl&amp;lt;/span&amp;gt;+&amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;D&amp;lt;/span&amp;gt; on the keyboard.&lt;br /&gt;
&lt;br /&gt;
The contents of the completed application bundle should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Bundle_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
===Visual Studio===&lt;br /&gt;
&lt;br /&gt;
CMake can generate Visual Studio projects for unvanquished however this feature is relatively new and may have some bugs.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
# Double click on Visual_Studio32.bat&lt;br /&gt;
# Open build-32/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; or &amp;quot;Debug&amp;quot; in the first one and Win32 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
====Important Notes====&lt;br /&gt;
&lt;br /&gt;
* The CMake script currently only supports 32 bit builds however this will change in the future&lt;br /&gt;
* QVM, LLVM and glsl-optimizer are disabled and probably do not work correctly with CMake generated Visual Studio projects.&lt;br /&gt;
* ncurses is not supported under Visual Studio.&lt;br /&gt;
&lt;br /&gt;
===MinGW===&lt;br /&gt;
Unvanquished is supported under MinGW. The build process should be fairly similar to the Linux instructions.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak2.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
On FreeBSD, use &amp;lt;code&amp;gt;fetch -r&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;. You can also get the pak files in this way (requires cURL):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir -p ~/.Unvanquished/main&lt;br /&gt;
 $ ./download-pk3.sh ~/.Unvanquished/main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will, by default, download missing files for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===CMake cannot locate Newton===&lt;br /&gt;
&lt;br /&gt;
If CMake cannot find Newton, you'll need to set it up yourself.&lt;br /&gt;
&lt;br /&gt;
It should be in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;/path/to/Unvanquished&amp;lt;/var&amp;gt;/src/libs/libnewton/libs/&amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt;/libNewton.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
Be sure to replace &amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt; with the proper directory name.&lt;br /&gt;
&lt;br /&gt;
Use CMake as before to change the &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt; build setting to the said path:&lt;br /&gt;
&lt;br /&gt;
# Start the CMake configurator:&amp;lt;pre&amp;gt;$ ccmake ..&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Scroll down and highlight &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to begin editing and input in the path.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; to configure and &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the new makefiles.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Q&amp;lt;/span&amp;gt; to quit.&lt;br /&gt;
# Recompile the source:&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=480</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=480"/>
		<updated>2012-07-01T13:48:10Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* With CPack */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code.&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
You may use this [http://home.comcast.net/~chet102103/compile.sh script] to perform these tasks. If you've downloaded the source to a folder named ''Unvanquished'' in the current directory, a typical invocation would look like this:&lt;br /&gt;
&lt;br /&gt;
 $ ./compile.sh --bundle --compile -s Unvanquished --build Unvanquished-build --bundle-dest .&lt;br /&gt;
&lt;br /&gt;
You will also need to build the libraries from source.&lt;br /&gt;
&lt;br /&gt;
Unvanquished requires the following libraries:&lt;br /&gt;
* The jpeg library, version 8 or higher. (Version 6 was known to have problems)&lt;br /&gt;
* Simple DirectMedia Layer&lt;br /&gt;
* OpenGL Extension Wrangler Library&lt;br /&gt;
&lt;br /&gt;
Optional libraries:&lt;br /&gt;
* WebP&lt;br /&gt;
* Theora&lt;br /&gt;
* Speex&lt;br /&gt;
* XVid&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
The following are shell scripts that download, compile, and install various libraries.&lt;br /&gt;
&lt;br /&gt;
====JPEG====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz &amp;gt; jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ tar xvzf jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ cd jpeg-8d&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The OpenGL Extension Wrangler Library (GLEW)====&lt;br /&gt;
&lt;br /&gt;
 $ curl -L https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz/download &amp;gt; glew-1.7.0.tgz&lt;br /&gt;
 $ tar xvzf glew-1.7.0.tgz&lt;br /&gt;
 $ cd glew-1.7.0&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Simple DirectMedia Layer (SDL)====&lt;br /&gt;
&lt;br /&gt;
At present, there are binaries for SDL.&lt;br /&gt;
&lt;br /&gt;
Intel systems running 10.5 or higher:&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15.dmg &amp;gt; SDL-1.2.15.dmg&lt;br /&gt;
 $ hdiutil attach SDL-1.2.15.dmg&lt;br /&gt;
 $ sudo cp -r /Volumes/SDL/SDL.framework /Library/Frameworks&lt;br /&gt;
 $ hdiutil detach /Volumes/SDL&lt;br /&gt;
&lt;br /&gt;
Intel or PPC systems running 10.4 or higher:&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15-OSX10.4.dmg &amp;gt; SDL-1.2.15-OSX10.4.dmg&lt;br /&gt;
 $ hdiutil attach SDL-1.2.15-OSX10.4.dmg&lt;br /&gt;
 $ sudo cp -r /Volumes/SDL/SDL.framework /Library/Frameworks&lt;br /&gt;
 $ hdiutil detach /Volumes/SDL&lt;br /&gt;
&lt;br /&gt;
====The GNU MP Bignum Library (libgmp)====&lt;br /&gt;
&lt;br /&gt;
 $ curl ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 &amp;gt; gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ tar xvjf gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ cd gmp-5.0.5&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Ogg====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz &amp;gt; libogg-1.3.0.tar.gz&lt;br /&gt;
 $ tar xvzf libogg-1.3.0.tar.gz&lt;br /&gt;
 $ cd libogg-1.3.0&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Vorbis====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz &amp;gt; libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ tar xvzf libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ cd libvorbis-1.3.3&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
===Configuring with CMake===&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This should be a different directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that. Wait while the configuration process runs. You may have to set the following:&lt;br /&gt;
## If CMake did not find your jpeg headers for some reason, set &amp;lt;code&amp;gt;JPEG_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/path/to/Unvanquished/src/libs/jpeg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## You may safely disable &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; to avoid having to compile the library. (At present, the format is not used by any game assets.)&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; to avoid having to compile nettle and hogweed.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; to avoid having to compile Speex.&lt;br /&gt;
## Uncheck &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; to avoid having to compile Theora or Xvid. (At present, there are not cutscenes or any such that require it.)&lt;br /&gt;
## '''You will probably not be able to compile with the GLSL optimizer enabled; uncheck &amp;lt;code&amp;gt;USE_GLSL_OPTIMIZER&amp;lt;/code&amp;gt;'''&lt;br /&gt;
## If you have selected to generate XCode project files, make the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank. This option is not available if you have the generator set to Unix makefiles.&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# You may now close XCode.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
====With XCode====&lt;br /&gt;
# Either start XCode and open the project file (in the build directory you specified) or double-click the project file in Finder.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Change the active target to &amp;quot;ALL_BUILD&amp;quot; and click Product&amp;amp;rarr;Build.&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start Terminal (Applications &amp;amp;rarr; Utilities &amp;amp;rarr; Terminal).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are on a multi-core or multi-processor machine, you may speed up the process by passing the &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; argument followed by the number of available cores to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;; e.g., &amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;. Note that doing so makes reading error messages more difficult, as multiple instances of the compiler will print to the screen at once, causing information to appear out of order.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing the build===&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
After compiling, you'll have to place the data files in the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; directory in your build directory. [[#Acquiring the Game Files|For download instructions, see below.]]&lt;br /&gt;
&lt;br /&gt;
Your file structure should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Build_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
You may now start the application as such:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386&lt;br /&gt;
&lt;br /&gt;
Note that older machines will not support the new OpenGL 3 renderer, and must be started specifying the &amp;quot;vanilla&amp;quot; (aka &amp;quot;GL&amp;quot;) renderer:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386 +set cl_renderer GL&lt;br /&gt;
&lt;br /&gt;
===Bundling the Application===&lt;br /&gt;
&lt;br /&gt;
====With CPack====&lt;br /&gt;
&lt;br /&gt;
CPack is able to create standalone bundles (as well as many other types of installers). However you must generate the files using Unix Makefiles instead of XCode.&lt;br /&gt;
* cd /path/to/Unvanquished-build&lt;br /&gt;
* cpack -G Bundle&lt;br /&gt;
Some warnings will be printed however these can be safely ignored. There should be a file called Unvanquished.dmg in the Unvanquished-build folder.&lt;br /&gt;
&lt;br /&gt;
====Manually====&lt;br /&gt;
&lt;br /&gt;
You'll find the Mac [http://macdylibbundler.sourceforge.net/ dynamic library bundler] to be quite useful (you must generate the files using Unix Makefiles instead of XCode):&lt;br /&gt;
&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/macdylibbundler/files/macdylibbundler/0.4.1/dylibbundler0.4.1.zip/download &amp;gt; dylibbundler0.4.1.zip&lt;br /&gt;
 $ unzip dylibbundler0.4.1.zip&lt;br /&gt;
 $ cd dylibbundler&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once you've done that, you can proceed to create the application bundle. Note that these steps assume that you have downloaded the data files to &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; as shown above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git=/path/to/Unvanquished-git-repo&lt;br /&gt;
$ build=/path/to/Unvanquished-build-dir&lt;br /&gt;
$ mkdir -pv Unvanquished.app/Contents/{libs,MacOS,Resources,Frameworks}&lt;br /&gt;
$ cp -r $build/main Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ sips -s format tiff $git/debian/unvanquished.png --out temp.tiff&lt;br /&gt;
$ tiff2icns temp.tiff Unvanquished.app/Contents/Resources/Unvanquished.icns&lt;br /&gt;
$ rm temp.tiff&lt;br /&gt;
$ cp $build/daemon{,ded}.i386 $build/*.dylib Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ cp -r /Library/Frameworks/SDL.framework Unvanquished.app/Contents/Frameworks&lt;br /&gt;
$ install_name_tool -id @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/Frameworks/SDL.framework/Versions/A/SDL&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGLi386.dylib&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGL3i386.dylib&lt;br /&gt;
$ for binary in Unvanquished.app/Contents/MacOS/*.{i386,dylib}; do dylibbundler -b -x $binary -d $dest/Unvanquished.app/Contents/libs/; done&lt;br /&gt;
$ cp /usr/lib/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ chmod +w ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -id @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -change /usr/lib/libGLEW.1.7.0.dylib @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ cat &amp;gt; Unvanquished.app/Contents/Info.plist&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;daemon.i386&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIconFile&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished.icns&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;net.Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleShortVersionString&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
^d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;^d&amp;lt;/code&amp;gt; indicates pressing &amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;Ctrl&amp;lt;/span&amp;gt;+&amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;D&amp;lt;/span&amp;gt; on the keyboard.&lt;br /&gt;
&lt;br /&gt;
The contents of the completed application bundle should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Bundle_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
===Visual Studio===&lt;br /&gt;
&lt;br /&gt;
CMake can generate Visual Studio projects for unvanquished however this feature is relatively new and may have some bugs.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
# Double click on Visual_Studio32.bat&lt;br /&gt;
# Open build-32/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; or &amp;quot;Debug&amp;quot; in the first one and Win32 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
====Important Notes====&lt;br /&gt;
&lt;br /&gt;
* The CMake script currently only supports 32 bit builds however this will change in the future&lt;br /&gt;
* QVM, LLVM and glsl-optimizer are disabled and probably do not work correctly with CMake generated Visual Studio projects.&lt;br /&gt;
* ncurses is not supported under Visual Studio.&lt;br /&gt;
&lt;br /&gt;
===MinGW===&lt;br /&gt;
Unvanquished is supported under MinGW. The build process should be fairly similar to the Linux instructions.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak2.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
On FreeBSD, use &amp;lt;code&amp;gt;fetch -r&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;. You can also get the pak files in this way (requires cURL):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir -p ~/.Unvanquished/main&lt;br /&gt;
 $ ./download-pk3.sh ~/.Unvanquished/main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will, by default, download missing files for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===CMake cannot locate Newton===&lt;br /&gt;
&lt;br /&gt;
If CMake cannot find Newton, you'll need to set it up yourself.&lt;br /&gt;
&lt;br /&gt;
It should be in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;/path/to/Unvanquished&amp;lt;/var&amp;gt;/src/libs/libnewton/libs/&amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt;/libNewton.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
Be sure to replace &amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt; with the proper directory name.&lt;br /&gt;
&lt;br /&gt;
Use CMake as before to change the &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt; build setting to the said path:&lt;br /&gt;
&lt;br /&gt;
# Start the CMake configurator:&amp;lt;pre&amp;gt;$ ccmake ..&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Scroll down and highlight &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to begin editing and input in the path.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; to configure and &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the new makefiles.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Q&amp;lt;/span&amp;gt; to quit.&lt;br /&gt;
# Recompile the source:&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Wiki_project_resources&amp;diff=479</id>
		<title>Wiki project resources</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Wiki_project_resources&amp;diff=479"/>
		<updated>2012-07-01T11:28:51Z</updated>

		<summary type="html">&lt;p&gt;Danmal: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At present, the wiki needs a lot of work.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, most article writers need to learn about web design ergonomics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: expand U***********, as i am forbidden to use the U word --&amp;gt;&lt;br /&gt;
Various contents, including ToDo lists, screenshots, release data files, large text messages, and other shared files are hosted at foreign websites. They should be moved to unvanquished.net, for which sufficient serving functionality should be installed. The priorities for these are based on the removal of ''web browsing analytics'', the ease of installation.&lt;br /&gt;
&lt;br /&gt;
==Pages in need of work==&lt;br /&gt;
&lt;br /&gt;
Aside from these pages, please also see the [[Special:WantedPages|the list of wanted pages]].&lt;br /&gt;
&lt;br /&gt;
===Technical documentation===&lt;br /&gt;
&lt;br /&gt;
* [[List of cvars]] and their documentation&lt;br /&gt;
* [[Creating custom keybinds]]&lt;br /&gt;
* [[Mapping]]&lt;br /&gt;
* [[Modeling Guide]]&lt;br /&gt;
* [[Music and sounds]]&lt;br /&gt;
&lt;br /&gt;
===Gameplay===&lt;br /&gt;
&lt;br /&gt;
* [[Aliens]]&lt;br /&gt;
** Buildables:&lt;br /&gt;
*** [[Egg]]&lt;br /&gt;
*** [[Overmind]]&lt;br /&gt;
*** [[Acid Tube]]&lt;br /&gt;
*** [[Hive]]&lt;br /&gt;
*** [[Trapper]]&lt;br /&gt;
*** [[Barricade]]&lt;br /&gt;
** Classes:&lt;br /&gt;
*** [[Dretch]]&lt;br /&gt;
*** [[Granger]]&lt;br /&gt;
*** [[Basilisk]]&lt;br /&gt;
*** [[Marauder]]&lt;br /&gt;
*** [[Dragoon]]&lt;br /&gt;
*** [[Tyrant]]&lt;br /&gt;
* [[Humans]]&lt;br /&gt;
** Upgrades/Armor:&lt;br /&gt;
*** [[Jetpack]]&lt;br /&gt;
*** [[Helmet]]&lt;br /&gt;
*** [[Battery Pack]]&lt;br /&gt;
*** [[Battlesuit]]&lt;br /&gt;
** Weapons:&lt;br /&gt;
*** [[Construction Kit]]&lt;br /&gt;
*** [[Blaster]]&lt;br /&gt;
*** [[Rifle]]&lt;br /&gt;
*** [[Pain Saw]]&lt;br /&gt;
*** [[Shotgun]]&lt;br /&gt;
*** [[Las Gun]]&lt;br /&gt;
*** [[Mass Driver]]&lt;br /&gt;
*** [[Chaingun]]&lt;br /&gt;
*** [[Plasma Rifle]]&lt;br /&gt;
*** [[Lucifer Cannon]]&lt;br /&gt;
** Buildables:&lt;br /&gt;
*** [[Telenode]]&lt;br /&gt;
*** [[Reactor]]&lt;br /&gt;
*** [[Machinegun Turret]]&lt;br /&gt;
*** [[Armory]]&lt;br /&gt;
*** [[Medistation]]&lt;br /&gt;
*** [[Defense Computer]]&lt;br /&gt;
*** [[Tesla Generator]]&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Creating_custom_keybinds&amp;diff=449</id>
		<title>Creating custom keybinds</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Creating_custom_keybinds&amp;diff=449"/>
		<updated>2012-06-27T15:05:16Z</updated>

		<summary type="html">&lt;p&gt;Danmal: changed Daemon to Unvanquished&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
'''''The information on this page is incomplete.'''''&lt;br /&gt;
&lt;br /&gt;
A number of commands for keybinds have changed since Tremulous, so keybind configurations cannot be directly copied from Tremulous to Unvanquished.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tremulous             || Unvanquished                 || Used for…&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;+button2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;+useitem&amp;lt;/code&amp;gt;  || Using an item; granger spit; dragoon barb&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;+button3&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;+taunt&amp;lt;/code&amp;gt;    || “Come on!” etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;+button5&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;+attack2&amp;lt;/code&amp;gt;  || Secondary attack&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;+button6&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;+dodge&amp;lt;/code&amp;gt;    || Dodging&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;+button7&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;+activate&amp;lt;/code&amp;gt; || Using a structure; evolving&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;+button8&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;+sprint&amp;lt;/code&amp;gt;   || Sprinting&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As of alpha 3, the &amp;lt;code&amp;gt;+button''N''&amp;lt;/code&amp;gt; commands are no longer present.&lt;br /&gt;
&lt;br /&gt;
You may want to bind the new [[Voice say system|vsays]] to different keys.&lt;br /&gt;
==New commands==&lt;br /&gt;
&lt;br /&gt;
This is a partial list of commands added, using Tremulous GPP r2259 as a reference point. Not everything listed is actually useful.&lt;br /&gt;
&lt;br /&gt;
===+activate===&lt;br /&gt;
Access an armoury; evolve.&lt;br /&gt;
&lt;br /&gt;
===+attack2===&lt;br /&gt;
Secondary attack.&lt;br /&gt;
&lt;br /&gt;
===+dodge===&lt;br /&gt;
Low jump sideways or backwards. (Humans only.)&lt;br /&gt;
&lt;br /&gt;
===+sprint===&lt;br /&gt;
Run. (Humans only.)&lt;br /&gt;
&lt;br /&gt;
===+taunt===&lt;br /&gt;
“Come on!” etc.&lt;br /&gt;
&lt;br /&gt;
===+useitem===&lt;br /&gt;
Use the highlighted item; tertiary attack (granger spit, dragoon snipe).&lt;br /&gt;
&lt;br /&gt;
===LoadTranslations===&lt;br /&gt;
&lt;br /&gt;
===SaveNewTranslations===&lt;br /&gt;
&lt;br /&gt;
===SaveTranslations===&lt;br /&gt;
&lt;br /&gt;
===alias===&lt;br /&gt;
&amp;lt;tt&amp;gt;alias NAME COMMAND [PARAMETERS…]&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create an alias for the given command. The alias is then useable as a command in its own right.&lt;br /&gt;
&lt;br /&gt;
===aliaslist===&lt;br /&gt;
Lists available command aliases.&lt;br /&gt;
&lt;br /&gt;
===animationlist===&lt;br /&gt;
&lt;br /&gt;
===buildcubemaps===&lt;br /&gt;
&lt;br /&gt;
===cache_endgather===&lt;br /&gt;
&lt;br /&gt;
===cache_mapchange===&lt;br /&gt;
&lt;br /&gt;
===cache_setindex===&lt;br /&gt;
&lt;br /&gt;
===cache_startgather===&lt;br /&gt;
&lt;br /&gt;
===cache_usedfile===&lt;br /&gt;
&lt;br /&gt;
===calc===&lt;br /&gt;
&lt;br /&gt;
===clearaliases===&lt;br /&gt;
Clears all command aliases.&lt;br /&gt;
&lt;br /&gt;
===concat===&lt;br /&gt;
&lt;br /&gt;
===cycle===&lt;br /&gt;
&lt;br /&gt;
===delay===&lt;br /&gt;
&lt;br /&gt;
===editbind===&lt;br /&gt;
&amp;lt;tt&amp;gt;editbind KEY&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This inserts a &amp;lt;tt&amp;gt;/bind&amp;lt;/tt&amp;gt; command into the in-game console, ready for editing. The console is opened if needed.&lt;br /&gt;
&lt;br /&gt;
===fbolist===&lt;br /&gt;
&lt;br /&gt;
===fieldinfo===&lt;br /&gt;
&lt;br /&gt;
===gameCompleteStatus===&lt;br /&gt;
&lt;br /&gt;
===glsl_restart===&lt;br /&gt;
Development use. For recompiling the GLSL shader code.&lt;br /&gt;
&lt;br /&gt;
===grep===&lt;br /&gt;
&amp;lt;tt&amp;gt;grep TEXT&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Searches the in-game console for occurrences of &amp;lt;tt&amp;gt;TEXT&amp;lt;/tt&amp;gt;. Matching lines are reprinted.&lt;br /&gt;
&lt;br /&gt;
===help===&lt;br /&gt;
&lt;br /&gt;
===if===&lt;br /&gt;
&amp;lt;tt&amp;gt;if VALUE CONDITION VALUE THEN [ELSE]&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;if MODIFIERS THEN [ELSE]&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;tt&amp;gt;VALUE&amp;lt;/tt&amp;gt; : a variable or number&lt;br /&gt;
; &amp;lt;tt&amp;gt;CONDITION&amp;lt;/tt&amp;gt; : comparison operator&lt;br /&gt;
; &amp;lt;tt&amp;gt;MODIFIERS&amp;lt;/tt&amp;gt; : comma-separated list of keyboard modifiers: Shift, Ctrl, Alt, Command (or Cmd), Mode, Super. Prefix any which must not be pressed with &amp;lt;kbd&amp;gt;!&amp;lt;/kbd&amp;gt;.&lt;br /&gt;
; &amp;lt;tt&amp;gt;THEN&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ELSE&amp;lt;/tt&amp;gt; : either a variable name or, if prefixed with &amp;lt;kbd&amp;gt;/&amp;lt;/kbd&amp;gt; or &amp;lt;kbd&amp;gt;\&amp;lt;/kbd&amp;gt;, a command string.&lt;br /&gt;
&lt;br /&gt;
Either the &amp;lt;tt&amp;gt;THEN&amp;lt;/tt&amp;gt; clause or the &amp;lt;tt&amp;gt;ELSE&amp;lt;/tt&amp;gt; clause (if present) will be executed. If it is a variable name, its content will be executed.&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;pre&amp;gt;/if shift &amp;quot;/echo Hello&amp;quot; &amp;quot;/echo Goodbye&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===irc_connect===&lt;br /&gt;
&lt;br /&gt;
===irc_quit===&lt;br /&gt;
&lt;br /&gt;
===irc_say===&lt;br /&gt;
&lt;br /&gt;
===listrotation===&lt;br /&gt;
Lists the current map rotation. The current map is highlighted.&lt;br /&gt;
&lt;br /&gt;
===loadgame===&lt;br /&gt;
&lt;br /&gt;
===math===&lt;br /&gt;
&lt;br /&gt;
===messagemode4===&lt;br /&gt;
This command opens a chat prompt for the built-in IRC client.&lt;br /&gt;
&lt;br /&gt;
===modcase===&lt;br /&gt;
&amp;lt;tt&amp;gt;modcase MODIFIERS THEN [MODIFIERS THEN]* [ELSE]&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This works like &amp;lt;tt&amp;gt;if&amp;lt;/tt&amp;gt;. The leftmost most-specific &amp;lt;tt&amp;gt;THEN&amp;lt;/tt&amp;gt; whose modifier list matches is the one which is executed; if none match, then &amp;lt;tt&amp;gt;ELSE&amp;lt;/tt&amp;gt; is executed if it is present.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;/modcase shift &amp;quot;/echo 1&amp;quot; ctrl &amp;quot;/echo 2&amp;quot; shift,ctrl &amp;quot;/echo 3&amp;quot; shift,!alt &amp;quot;/echo 4&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
works as follows:&lt;br /&gt;
&lt;br /&gt;
# if Shift and Alt (due to clause 4) but not Ctrl (due to clause 3) are pressed;&lt;br /&gt;
# if Ctrl but not Shift (due to clause 3);&lt;br /&gt;
# if Shift and Ctrl;&lt;br /&gt;
# if Shift but neither Alt nor Ctrl.&lt;br /&gt;
&lt;br /&gt;
===modelist===&lt;br /&gt;
&lt;br /&gt;
===openurl===&lt;br /&gt;
&lt;br /&gt;
===pubkey===&lt;br /&gt;
&lt;br /&gt;
===pubkey_identify===&lt;br /&gt;
&lt;br /&gt;
===random===&lt;br /&gt;
&lt;br /&gt;
===reloadhud===&lt;br /&gt;
&lt;br /&gt;
===say_area_team===&lt;br /&gt;
&lt;br /&gt;
===screenshotPNG===&lt;br /&gt;
Saves a screenshot.&lt;br /&gt;
&lt;br /&gt;
===search===&lt;br /&gt;
&amp;lt;tt&amp;gt;search TEXT&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Searches back through the in-game console for &amp;lt;tt&amp;gt;TEXT&amp;lt;/tt&amp;gt; and scrolls to it.&lt;br /&gt;
&lt;br /&gt;
===searchDown===&lt;br /&gt;
&amp;lt;tt&amp;gt;searchDown TEXT&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Searches forward through the in-game console for &amp;lt;tt&amp;gt;TEXT&amp;lt;/tt&amp;gt; and scrolls to it.&lt;br /&gt;
&lt;br /&gt;
===setRecommended===&lt;br /&gt;
&lt;br /&gt;
===shaderexp===&lt;br /&gt;
&lt;br /&gt;
===snd_reload===&lt;br /&gt;
&lt;br /&gt;
===spdevmap===&lt;br /&gt;
Does nothing.&lt;br /&gt;
&lt;br /&gt;
===speclock===&lt;br /&gt;
&lt;br /&gt;
===specunlock===&lt;br /&gt;
&lt;br /&gt;
===spmap===&lt;br /&gt;
Does nothing.&lt;br /&gt;
&lt;br /&gt;
===strcmp===&lt;br /&gt;
&lt;br /&gt;
===toggleConsole===&lt;br /&gt;
Opens or closes the in-game console.&lt;br /&gt;
&lt;br /&gt;
===ui_restart===&lt;br /&gt;
Reloads UI files.&lt;br /&gt;
&lt;br /&gt;
===unalias===&lt;br /&gt;
&amp;lt;tt&amp;gt;unalias NAME&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes the named alias.&lt;br /&gt;
&lt;br /&gt;
===undelay===&lt;br /&gt;
&lt;br /&gt;
===undelayAll===&lt;br /&gt;
&lt;br /&gt;
===unregister===&lt;br /&gt;
Removes registration of your GUID and name.&lt;br /&gt;
&lt;br /&gt;
===updatehunkusage===&lt;br /&gt;
&lt;br /&gt;
===updatescreen===&lt;br /&gt;
&lt;br /&gt;
===vbolist===&lt;br /&gt;
&lt;br /&gt;
===wav_record===&lt;br /&gt;
&lt;br /&gt;
===wav_stoprecord===&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=441</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=441"/>
		<updated>2012-06-18T11:24:57Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Visual Studio */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code.&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
You may use [http://home.comcast.net/~chet102103/compile.sh this script] to perform these tasks. If you downloaded the source to a folder named &amp;lt;code&amp;gt;Unvanquished&amp;lt;/code&amp;gt; in the current directory, a typical invocation would look like this:&lt;br /&gt;
&lt;br /&gt;
 $./compile.sh --bundle --compile -s Unvanquished --build Unvanquished-build --bundle-dest .&lt;br /&gt;
&lt;br /&gt;
You will also need to build the libraries from source.&lt;br /&gt;
&lt;br /&gt;
Unvanquished requires the following:&lt;br /&gt;
* The jpeg library from the [http://www.ijg.org/ Independent JPEG Group], version 8 or higher. (Version 6 was known to have problems).&lt;br /&gt;
* Simple DirectMedia Layer&lt;br /&gt;
* The OpenGL Extension Wrangler Library&lt;br /&gt;
&lt;br /&gt;
Optional libraries:&lt;br /&gt;
* WebP&lt;br /&gt;
* Theora&lt;br /&gt;
* Speex&lt;br /&gt;
* XVid&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
====JPEG====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz &amp;gt; jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ tar xvzf jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ cd jpeg-8d&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The OpenGL Extension Wrangler Library (GLEW)====&lt;br /&gt;
&lt;br /&gt;
 $ curl -L https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz/download &amp;gt; glew-1.7.0.tgz&lt;br /&gt;
 $ tar xvzf glew-1.7.0.tgz&lt;br /&gt;
 $ cd glew-1.7.0&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Simple DirectMedia Layer (SDL)====&lt;br /&gt;
&lt;br /&gt;
At present, there are binaries for SDL.&lt;br /&gt;
&lt;br /&gt;
Intel systems running 10.5 or higher:&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15.dmg &amp;gt; SDL-1.2.15.dmg&lt;br /&gt;
 $ hdiutil attach SDL-1.2.15.dmg&lt;br /&gt;
 $ sudo cp -r /Volumes/SDL/SDL.framework /Library/Frameworks&lt;br /&gt;
 $ hdiutil detach /Volumes/SDL&lt;br /&gt;
&lt;br /&gt;
Intel or PPC systems running 10.4 or higher:&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15-OSX10.4.dmg &amp;gt; SDL-1.2.15-OSX10.4.dmg&lt;br /&gt;
 $ hdiutil attach SDL-1.2.15-OSX10.4.dmg&lt;br /&gt;
 $ sudo cp -r /Volumes/SDL/SDL.framework /Library/Frameworks&lt;br /&gt;
 $ hdiutil detach /Volumes/SDL&lt;br /&gt;
&lt;br /&gt;
====The GNU MP Bignum Library (libgmp)====&lt;br /&gt;
&lt;br /&gt;
 $ curl ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 &amp;gt; gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ tar xvjf gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ cd gmp-5.0.5&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Ogg====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz &amp;gt; libogg-1.3.0.tar.gz&lt;br /&gt;
 $ tar xvzf libogg-1.3.0.tar.gz&lt;br /&gt;
 $ cd libogg-1.3.0&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Vorbis====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz &amp;gt; libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ tar xvzf libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ cd libvorbis-1.3.3&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
===Configuring with CMake===&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This should be a different directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that. Wait while the configuration process runs. You may have to set the following:&lt;br /&gt;
## If CMake did not find your jpeg headers for some reason, set &amp;lt;code&amp;gt;JPEG_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/path/to/Unvanquished/src/libs/jpeg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## You may safely disable &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; to avoid having to compile the library. (At present, the format is not used by any game assets.)&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; to avoid having to compile nettle and hogweed.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; to avoid having to compile Speex.&lt;br /&gt;
## Uncheck &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; to avoid having to compile Theora or Xvid. (At present, there are not cutscenes or any such that require it.)&lt;br /&gt;
## '''You will probably not be able to compile with the GLSL optimizer enabled; uncheck &amp;lt;code&amp;gt;USE_GLSL_OPTIMIZER&amp;lt;/code&amp;gt;'''&lt;br /&gt;
## If you have selected to generate XCode project files, make the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank. This option is not available if you have the generator set to Unix makefiles.&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# You may now close XCode.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
====With XCode====&lt;br /&gt;
# Either start XCode and open the project file (in the build directory you specified) or double-click the project file in Finder.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Change the active target to &amp;quot;ALL_BUILD&amp;quot; and click Product&amp;amp;rarr;Build.&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start Terminal (Applications &amp;amp;rarr; Utilities &amp;amp;rarr; Terminal).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are on a multi-core or multi-processor machine, you may speed up the process by passing the &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; argument followed by the number of available cores to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;; e.g., &amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;. Note that doing so makes reading error messages more difficult, as multiple instances of the compiler will print to the screen at once, causing information to appear out of order.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing the build===&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
After compiling, you'll have to place the data files (&amp;lt;code&amp;gt;[http://sourceforge.net/projects/Unvanquished/files/Assets/pak0.pk3/download pak0.pk3]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[http://sourceforge.net/projects/Unvanquished/files/Assets/pak1.pk3/download pak1.pk3]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[http://sourceforge.net/projects/Unvanquished/files/Assets/pak2.pk3/download pak2.pk3]&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; directory in your build directory.&lt;br /&gt;
&lt;br /&gt;
 $ cd /path/to/Unvanquished&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/Unvanquished/files/Assets/pak1.pk3/download &amp;gt; pak0.pk3&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/Unvanquished/files/Assets/pak1.pk3/download &amp;gt; pak1.pk3&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/Unvanquished/files/Assets/pak1.pk3/download &amp;gt; pak2.pk3&lt;br /&gt;
 $ cd ..&lt;br /&gt;
&lt;br /&gt;
Your file structure should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Build_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
You may now start the application as such:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386&lt;br /&gt;
&lt;br /&gt;
Note that older machines will not support the new OpenGL 3 renderer, and must be started specifying the &amp;quot;vanilla&amp;quot; (aka &amp;quot;GL&amp;quot;) renderer:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386 +set cl_renderer GL&lt;br /&gt;
&lt;br /&gt;
===Bundling the Application===&lt;br /&gt;
&lt;br /&gt;
====With CPack====&lt;br /&gt;
&lt;br /&gt;
CPack is able to create standalone bundles (as well as many other types of installers). However you must generate the files using Unix Makefiles instead of XCode.&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ cpack -G Bundle&lt;br /&gt;
Some warnings will be printed however these can be safely ignored. There should be a file called Unvanquished.dmg in the Unvanquished-build folder.&lt;br /&gt;
&lt;br /&gt;
====Manually====&lt;br /&gt;
&lt;br /&gt;
You'll find the Mac [http://macdylibbundler.sourceforge.net/ dynamic library bundler] to be quite useful (you must generate the files using Unix Makefiles instead of XCode):&lt;br /&gt;
&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/macdylibbundler/files/macdylibbundler/0.4.1/dylibbundler0.4.1.zip/download &amp;gt; dylibbundler0.4.1.zip&lt;br /&gt;
 $ unzip dylibbundler0.4.1.zip&lt;br /&gt;
 $ cd dylibbundler&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once you've done that, you can proceed to create the application bundle. Note that these steps assume that you have downloaded the data files to &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; as shown above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git=/path/to/Unvanquished-git-repo&lt;br /&gt;
$ build=/path/to/Unvanquished-build-dir&lt;br /&gt;
$ mkdir -pv Unvanquished.app/Contents/{libs,MacOS,Resources,Frameworks}&lt;br /&gt;
$ cp -r $build/main Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ sips -s format tiff $git/debian/unvanquished.png --out temp.tiff&lt;br /&gt;
$ tiff2icns temp.tiff Unvanquished.app/Contents/Resources/Unvanquished.icns&lt;br /&gt;
$ rm temp.tiff&lt;br /&gt;
$ cp $build/daemon{,ded}.i386 $build/*.dylib Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ cp -r /Library/Frameworks/SDL.framework Unvanquished.app/Contents/Frameworks&lt;br /&gt;
$ install_name_tool -id @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/Frameworks/SDL.framework/Versions/A/SDL&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGLi386.dylib&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGL3i386.dylib&lt;br /&gt;
$ for binary in Unvanquished.app/Contents/MacOS/*.{i386,dylib}; do dylibbundler -b -x $binary -d $dest/Unvanquished.app/Contents/libs/; done&lt;br /&gt;
$ cp /usr/lib/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ chmod +w ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -id @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -change /usr/lib/libGLEW.1.7.0.dylib @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ cat &amp;gt; Unvanquished.app/Contents/Info.plist&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;daemon.i386&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIconFile&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished.icns&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;net.Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleShortVersionString&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
^d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;^d&amp;lt;/code&amp;gt; indicates pressing &amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;Ctrl&amp;lt;/span&amp;gt;+&amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;D&amp;lt;/span&amp;gt; on the keyboard.&lt;br /&gt;
&lt;br /&gt;
The contents of the completed application bundle should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Bundle_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
===Visual Studio===&lt;br /&gt;
&lt;br /&gt;
CMake can generate Visual Studio projects for unvanquished however this feature is relatively new and may have some bugs.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
# Double click on Visual_Studio32.bat&lt;br /&gt;
# Open build-32/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; or &amp;quot;Debug&amp;quot; in the first one and Win32 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
====Important Notes====&lt;br /&gt;
&lt;br /&gt;
* The CMake script currently only supports 32 bit builds however this will change in the future&lt;br /&gt;
* QVM, LLVM and glsl-optimizer are disabled and probably do not work correctly with CMake generated Visual Studio projects.&lt;br /&gt;
* ncurses is not supported under Visual Studio.&lt;br /&gt;
&lt;br /&gt;
===MinGW===&lt;br /&gt;
Unvanquished is supported under MinGW. The build process should be fairly similar to the Linux instructions.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak2.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
You can also get the pak files in this way (requires curl):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir -p ~/.Unvanquished/main&lt;br /&gt;
 $ ./download-pk3.sh ~/.Unvanquished/main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will normally download it for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===CMake cannot locate Newton===&lt;br /&gt;
&lt;br /&gt;
If CMake cannot find Newton, you'll need to set it yourself.&lt;br /&gt;
&lt;br /&gt;
It should be in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;/path/to/Unvanquished&amp;lt;/var&amp;gt;/src/libs/libnewton/libs/&amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt;/libNewton.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
Be sure to replace &amp;lt;var&amp;gt;os&amp;lt;/var&amp;gt; with the proper location.&lt;br /&gt;
&lt;br /&gt;
Use CMake as before to change &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt; to said path:&lt;br /&gt;
&lt;br /&gt;
# Start CMake:&amp;lt;pre&amp;gt;$ ccmake ..&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Scroll down and highlight &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to begin editing and type in the path.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; to configure and &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the new makefiles.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Q&amp;lt;/span&amp;gt; to quit.&lt;br /&gt;
# Recompile the source:&amp;lt;pre&amp;gt;$make&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=440</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=440"/>
		<updated>2012-06-18T08:46:16Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Mac OS X */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code.&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
You may use [http://home.comcast.net/~chet102103/compile.sh this script] to perform these tasks. If you downloaded the source to a folder named &amp;lt;code&amp;gt;Unvanquished&amp;lt;/code&amp;gt; in the current directory, a typical invocation would look like this:&lt;br /&gt;
&lt;br /&gt;
 $./compile.sh --bundle --compile -s Unvanquished --build Unvanquished-build --bundle-dest .&lt;br /&gt;
&lt;br /&gt;
You will also need to build the libraries from source.&lt;br /&gt;
&lt;br /&gt;
Unvanquished requires the following:&lt;br /&gt;
* The jpeg library from the [http://www.ijg.org/ Independent JPEG Group], version 8 or higher. (Version 6 was known to have problems).&lt;br /&gt;
* Simple DirectMedia Layer&lt;br /&gt;
* The OpenGL Extension Wrangler Library&lt;br /&gt;
&lt;br /&gt;
Optional libraries:&lt;br /&gt;
* WebP&lt;br /&gt;
* Theora&lt;br /&gt;
* Speex&lt;br /&gt;
* XVid&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
====JPEG====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz &amp;gt; jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ tar xvzf jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ cd jpeg-8d&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The OpenGL Extension Wrangler Library (GLEW)====&lt;br /&gt;
&lt;br /&gt;
 $ curl -L https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz/download &amp;gt; glew-1.7.0.tgz&lt;br /&gt;
 $ tar xvzf glew-1.7.0.tgz&lt;br /&gt;
 $ cd glew-1.7.0&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Simple DirectMedia Layer (SDL)====&lt;br /&gt;
&lt;br /&gt;
At present, there are binaries for SDL.&lt;br /&gt;
&lt;br /&gt;
Intel systems running 10.5 or higher:&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15.dmg &amp;gt; SDL-1.2.15.dmg&lt;br /&gt;
 $ hdiutil attach SDL-1.2.15.dmg&lt;br /&gt;
 $ sudo cp -r /Volumes/SDL/SDL.framework /Library/Frameworks&lt;br /&gt;
 $ hdiutil detach /Volumes/SDL&lt;br /&gt;
&lt;br /&gt;
Intel or PPC systems running 10.4 or higher:&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15-OSX10.4.dmg &amp;gt; SDL-1.2.15-OSX10.4.dmg&lt;br /&gt;
 $ hdiutil attach SDL-1.2.15-OSX10.4.dmg&lt;br /&gt;
 $ sudo cp -r /Volumes/SDL/SDL.framework /Library/Frameworks&lt;br /&gt;
 $ hdiutil detach /Volumes/SDL&lt;br /&gt;
&lt;br /&gt;
====The GNU MP Bignum Library (libgmp)====&lt;br /&gt;
&lt;br /&gt;
 $ curl ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 &amp;gt; gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ tar xvjf gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ cd gmp-5.0.5&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Ogg====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz &amp;gt; libogg-1.3.0.tar.gz&lt;br /&gt;
 $ tar xvzf libogg-1.3.0.tar.gz&lt;br /&gt;
 $ cd libogg-1.3.0&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Vorbis====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz &amp;gt; libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ tar xvzf libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ cd libvorbis-1.3.3&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
===Configuring with CMake===&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This should be a different directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that. Wait while the configuration process runs. You may have to set the following:&lt;br /&gt;
## If CMake did not find your jpeg headers for some reason, set &amp;lt;code&amp;gt;JPEG_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/path/to/Unvanquished/src/libs/jpeg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## You may safely disable &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; to avoid having to compile the library. (At present, the format is not used by any game assets.)&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; to avoid having to compile nettle and hogweed.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; to avoid having to compile Speex.&lt;br /&gt;
## Uncheck &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; to avoid having to compile Theora or Xvid. (At present, there are not cutscenes or any such that require it.)&lt;br /&gt;
## '''You will probably not be able to compile with the GLSL optimizer enabled; uncheck &amp;lt;code&amp;gt;USE_GLSL_OPTIMIZER&amp;lt;/code&amp;gt;'''&lt;br /&gt;
## If you have selected to generate XCode project files, make the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank. This option is not available if you have the generator set to Unix makefiles.&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# You may now close XCode.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
====With XCode====&lt;br /&gt;
# Either start XCode and open the project file (in the build directory you specified) or double-click the project file in Finder.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Change the active target to &amp;quot;ALL_BUILD&amp;quot; and click Product&amp;amp;rarr;Build.&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start Terminal (Applications &amp;amp;rarr; Utilities &amp;amp;rarr; Terminal).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are on a multi-core or multi-processor machine, you may speed up the process by passing the &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; argument followed by the number of available cores to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;; e.g., &amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;. Note that doing so makes reading error messages more difficult, as multiple instances of the compiler will print to the screen at once, causing information to appear out of order.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing the build===&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
After compiling, you'll have to place the data files (&amp;lt;code&amp;gt;[http://sourceforge.net/projects/Unvanquished/files/Assets/pak0.pk3/download pak0.pk3]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[http://sourceforge.net/projects/Unvanquished/files/Assets/pak1.pk3/download pak1.pk3]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[http://sourceforge.net/projects/Unvanquished/files/Assets/pak2.pk3/download pak2.pk3]&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; directory in your build directory.&lt;br /&gt;
&lt;br /&gt;
 $ cd /path/to/Unvanquished&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/Unvanquished/files/Assets/pak1.pk3/download &amp;gt; pak0.pk3&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/Unvanquished/files/Assets/pak1.pk3/download &amp;gt; pak1.pk3&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/Unvanquished/files/Assets/pak1.pk3/download &amp;gt; pak2.pk3&lt;br /&gt;
 $ cd ..&lt;br /&gt;
&lt;br /&gt;
Your file structure should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Build_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
You may now start the application as such:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386&lt;br /&gt;
&lt;br /&gt;
Note that older machines will not support the new OpenGL 3 renderer, and must be started specifying the &amp;quot;vanilla&amp;quot; (aka &amp;quot;GL&amp;quot;) renderer:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386 +set cl_renderer GL&lt;br /&gt;
&lt;br /&gt;
===Bundling the Application===&lt;br /&gt;
&lt;br /&gt;
====With CPack====&lt;br /&gt;
&lt;br /&gt;
CPack is able to create standalone bundles (as well as many other types of installers). However you must generate the files using Unix Makefiles instead of XCode.&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ cpack -G Bundle&lt;br /&gt;
Some warnings will be printed however these can be safely ignored. There should be a file called Unvanquished.dmg in the Unvanquished-build folder.&lt;br /&gt;
&lt;br /&gt;
====Manually====&lt;br /&gt;
&lt;br /&gt;
You'll find the Mac [http://macdylibbundler.sourceforge.net/ dynamic library bundler] to be quite useful (you must generate the files using Unix Makefiles instead of XCode):&lt;br /&gt;
&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/macdylibbundler/files/macdylibbundler/0.4.1/dylibbundler0.4.1.zip/download &amp;gt; dylibbundler0.4.1.zip&lt;br /&gt;
 $ unzip dylibbundler0.4.1.zip&lt;br /&gt;
 $ cd dylibbundler&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once you've done that, you can proceed to create the application bundle. Note that these steps assume that you have downloaded the data files to &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; as shown above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git=/path/to/Unvanquished-git-repo&lt;br /&gt;
$ build=/path/to/Unvanquished-build-dir&lt;br /&gt;
$ mkdir -pv Unvanquished.app/Contents/{libs,MacOS,Resources,Frameworks}&lt;br /&gt;
$ cp -r $build/main Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ sips -s format tiff $git/debian/unvanquished.png --out temp.tiff&lt;br /&gt;
$ tiff2icns temp.tiff Unvanquished.app/Contents/Resources/Unvanquished.icns&lt;br /&gt;
$ rm temp.tiff&lt;br /&gt;
$ cp $build/daemon{,ded}.i386 $build/*.dylib Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ cp -r /Library/Frameworks/SDL.framework Unvanquished.app/Contents/Frameworks&lt;br /&gt;
$ install_name_tool -id @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/Frameworks/SDL.framework/Versions/A/SDL&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGLi386.dylib&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGL3i386.dylib&lt;br /&gt;
$ for binary in Unvanquished.app/Contents/MacOS/*.{i386,dylib}; do dylibbundler -b -x $binary -d $dest/Unvanquished.app/Contents/libs/; done&lt;br /&gt;
$ cp /usr/lib/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ chmod +w ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -id @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -change /usr/lib/libGLEW.1.7.0.dylib @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ cat &amp;gt; Unvanquished.app/Contents/Info.plist&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;daemon.i386&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIconFile&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished.icns&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;net.Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleShortVersionString&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
^d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;^d&amp;lt;/code&amp;gt; indicates pressing &amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;Ctrl&amp;lt;/span&amp;gt;+&amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;D&amp;lt;/span&amp;gt; on the keyboard.&lt;br /&gt;
&lt;br /&gt;
The contents of the completed application bundle should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Bundle_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
===Visual Studio===&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Windows is to use Microsoft Visual Studio 2010.&lt;br /&gt;
&lt;br /&gt;
The free Express version of the software works fine.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
# Open src/engine/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; in the first one and Win32 or Win64 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
CMake can generate Visual Studio projects for unvanquished however this feature is relatively new and may have some bugs.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
# Double click on Visual_Studio32.bat&lt;br /&gt;
# Open build-32/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; or &amp;quot;Debug&amp;quot; in the first one and Win32 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
====Important Notes====&lt;br /&gt;
&lt;br /&gt;
* The provided Visual Studio project file is out of date and may not work correctly. The CMake generated solutions will always be up to date however.&lt;br /&gt;
* The CMake script currently only supports 32 bit builds however this will change in the future&lt;br /&gt;
* QVM, LLVM, glsl-optimizer and OpenAL are disabled and probably do not work correctly with CMake generated Visual Studio projects. OpenAL and glsl-optimizer is supported by the included Visual Studio File (llvm and qvm are not however)&lt;br /&gt;
* ncurses is not supported under Visual Studio.&lt;br /&gt;
&lt;br /&gt;
===MinGW===&lt;br /&gt;
Unvanquished is supported under MinGW. The build process should be fairly similar to the Linux instructions.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak2.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
You can also get the pak files in this way (requires curl):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir -p ~/.Unvanquished/main&lt;br /&gt;
 $ ./download-pk3.sh ~/.Unvanquished/main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will normally download it for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===CMake cannot locate Newton===&lt;br /&gt;
&lt;br /&gt;
If CMake cannot find Newton, you'll need to set it yourself.&lt;br /&gt;
&lt;br /&gt;
It should be in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;/path/to/Unvanquished&amp;lt;/var&amp;gt;/src/libs/libnewton/libs/&amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt;/libNewton.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
Be sure to replace &amp;lt;var&amp;gt;os&amp;lt;/var&amp;gt; with the proper location.&lt;br /&gt;
&lt;br /&gt;
Use CMake as before to change &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt; to said path:&lt;br /&gt;
&lt;br /&gt;
# Start CMake:&amp;lt;pre&amp;gt;$ ccmake ..&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Scroll down and highlight &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to begin editing and type in the path.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; to configure and &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the new makefiles.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Q&amp;lt;/span&amp;gt; to quit.&lt;br /&gt;
# Recompile the source:&amp;lt;pre&amp;gt;$make&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=417</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=417"/>
		<updated>2012-06-03T12:42:06Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code.&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
You may use [http://home.comcast.net/~chet102103/compile.sh this script] to perform these tasks. If you downloaded the source to a folder named &amp;lt;code&amp;gt;Unvanquished&amp;lt;/code&amp;gt; in the current directory, a typical invocation would look like this:&lt;br /&gt;
&lt;br /&gt;
 $./compile.sh --bundle --compile -s Unvanquished --build Unvanquished-build --bundle-dest .&lt;br /&gt;
&lt;br /&gt;
You will also need to build the libraries from source.&lt;br /&gt;
&lt;br /&gt;
Unvanquished requires the following:&lt;br /&gt;
* The jpeg library from the [http://www.ijg.org/ Independent JPEG Group], version 8 or higher. (Version 6 was known to have problems).&lt;br /&gt;
* Simple DirectMedia Layer&lt;br /&gt;
* The OpenGL Extension Wrangler Library&lt;br /&gt;
&lt;br /&gt;
Optional libraries:&lt;br /&gt;
* WebP&lt;br /&gt;
* Theora&lt;br /&gt;
* Speex&lt;br /&gt;
* XVid&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
====JPEG====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://www.ijg.org/files/jpegsrc.v8d.tar.gz &amp;gt; jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ tar xvzf jpegsrc.v8d.tar.gz&lt;br /&gt;
 $ cd jpeg-8d&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====The OpenGL Extension Wrangler Library (GLEW)====&lt;br /&gt;
&lt;br /&gt;
 $ curl -L https://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz/download &amp;gt; glew-1.7.0.tgz&lt;br /&gt;
 $ tar xvzf glew-1.7.0.tgz&lt;br /&gt;
 $ cd glew-1.7.0&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Simple DirectMedia Layer (SDL)====&lt;br /&gt;
&lt;br /&gt;
At present, there are binaries for SDL.&lt;br /&gt;
&lt;br /&gt;
Intel systems running 10.5 or higher:&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15.dmg &amp;gt; SDL-1.2.15.dmg&lt;br /&gt;
 $ hdiutil attach SDL-1.2.15.dmg&lt;br /&gt;
 $ sudo cp -r /Volumes/SDL/SDL.framework /Library/Frameworks&lt;br /&gt;
 $ hdiutil detach /Volumes/SDL&lt;br /&gt;
&lt;br /&gt;
Intel or PPC systems running 10.4 or higher:&lt;br /&gt;
 $ curl http://www.libsdl.org/release/SDL-1.2.15-OSX10.4.dmg &amp;gt; SDL-1.2.15-OSX10.4.dmg&lt;br /&gt;
 $ hdiutil attach SDL-1.2.15-OSX10.4.dmg&lt;br /&gt;
 $ sudo cp -r /Volumes/SDL/SDL.framework /Library/Frameworks&lt;br /&gt;
 $ hdiutil detach /Volumes/SDL&lt;br /&gt;
&lt;br /&gt;
Note that during the configuration process in CMake, you need to set the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank.&lt;br /&gt;
&lt;br /&gt;
====The GNU MP Bignum Library (libgmp)====&lt;br /&gt;
&lt;br /&gt;
 $ curl ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 &amp;gt; gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ tar xvjf gmp-5.0.5.tar.bz2&lt;br /&gt;
 $ cd gmp-5.0.5&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Ogg====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz &amp;gt; libogg-1.3.0.tar.gz&lt;br /&gt;
 $ tar xvzf libogg-1.3.0.tar.gz&lt;br /&gt;
 $ cd libogg-1.3.0&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
====Vorbis====&lt;br /&gt;
&lt;br /&gt;
 $ curl http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz &amp;gt; libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ tar xvzf libvorbis-1.3.3.tar.gz&lt;br /&gt;
 $ cd libvorbis-1.3.3&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
===Configuring with CMake===&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This may be the same directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. &amp;lt;span style=&amp;quot;text-decoration:line-through;&amp;quot;&amp;gt;If you have Xcode installed, choose that.&amp;lt;/span&amp;gt; '''At the moment, the build process for XCode is not 100%. Select &amp;quot;Unix Makefiles&amp;quot; instead.''' Wait while the configuration process runs. You may have to set the following:&lt;br /&gt;
## If CMake did not find your jpeg headers for some reason, set &amp;lt;code&amp;gt;JPEG_INCLUDE_DIR&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/path/to/Unvanquished/src/libs/jpeg&amp;lt;/code&amp;gt;.&lt;br /&gt;
## You may safely disable &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; to avoid having to compile the library. (At present, the format is not used by any game assets.)&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; to avoid having to compile nettle and hogweed.&lt;br /&gt;
## Check &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; to avoid having to compile Speex.&lt;br /&gt;
## Uncheck &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; to avoid having to compile Theora or Xvid. (At present, there are not cutscenes or any such that require it.)&lt;br /&gt;
## '''You will probably not be able to compile with the GLSL optimizer enabled; uncheck &amp;lt;code&amp;gt;USE_GLSL_OPTIMIZER&amp;lt;/code&amp;gt;'''&lt;br /&gt;
## If you have selected to generate XCode project files, make the &amp;lt;code&amp;gt;SDLMAIN_LIBRARY&amp;lt;/code&amp;gt; field blank. This option is not available if you have the generator set to Unix makefiles.&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# You may now close XCode.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
====With XCode====&lt;br /&gt;
# Either start XCode and open the project file (in the build directory you specified) or double-click the project file in Finder.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Change the active target to &amp;quot;ALL_BUILD&amp;quot; and click Product&amp;amp;rarr;Build.&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start Terminal (Applications &amp;amp;rarr; Utilities &amp;amp;rarr; Terminal).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Type the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /path/to/Unvanquished-build&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are on a multi-core or multi-processor machine, you may speed up the process by passing the &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; argument followed by the number of available cores to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;; e.g., &amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;. Note that doing so makes reading error messages more difficult, as multiple instances of the compiler will print to the screen at once, causing information to appear out of order.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Testing the build===&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
After compiling, you'll have to place the data files (&amp;lt;code&amp;gt;[http://sourceforge.net/projects/Unvanquished/files/Assets/pak0.pk3/download pak0.pk3]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[http://sourceforge.net/projects/Unvanquished/files/Assets/pak1.pk3/download pak1.pk3]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[http://sourceforge.net/projects/Unvanquished/files/Assets/pak2.pk3/download pak2.pk3]&amp;lt;/code&amp;gt;) in the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; directory in your build directory.&lt;br /&gt;
&lt;br /&gt;
 $ cd /path/to/Unvanquished&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/Unvanquished/files/Assets/pak1.pk3/download &amp;gt; pak0.pk3&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/Unvanquished/files/Assets/pak1.pk3/download &amp;gt; pak1.pk3&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/Unvanquished/files/Assets/pak1.pk3/download &amp;gt; pak2.pk3&lt;br /&gt;
 $ cd ..&lt;br /&gt;
&lt;br /&gt;
Your file structure should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Build_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
You may now start the application as such:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386&lt;br /&gt;
&lt;br /&gt;
Note that older machines will not support the new OpenGL 3 renderer, and must be started specifying the &amp;quot;vanilla&amp;quot; (aka &amp;quot;GL&amp;quot;) renderer:&lt;br /&gt;
&lt;br /&gt;
 $ ./daemon.i386 +set cl_renderer GL&lt;br /&gt;
&lt;br /&gt;
===Bundling the Application===&lt;br /&gt;
&lt;br /&gt;
====With Unix Makefiles====&lt;br /&gt;
&lt;br /&gt;
You'll find the Mac [http://macdylibbundler.sourceforge.net/ dynamic library bundler] to be quite useful:&lt;br /&gt;
&lt;br /&gt;
 $ curl -L http://sourceforge.net/projects/macdylibbundler/files/macdylibbundler/0.4.1/dylibbundler0.4.1.zip/download &amp;gt; dylibbundler0.4.1.zip&lt;br /&gt;
 $ unzip dylibbundler0.4.1.zip&lt;br /&gt;
 $ cd dylibbundler&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once you've done that, you can proceed to create the application bundle. Note that these steps assume that you have downloaded the data files to &amp;lt;code&amp;gt;main/&amp;lt;/code&amp;gt; as shown above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git=/path/to/Unvanquished-git-repo&lt;br /&gt;
$ build=/path/to/Unvanquished-build-dir&lt;br /&gt;
$ mkdir -pv Unvanquished.app/Contents/{libs,MacOS,Resources,Frameworks}&lt;br /&gt;
$ cp -r $build/main Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ sips -s format tiff $git/debian/unvanquished.png --out temp.tiff&lt;br /&gt;
$ tiff2icns temp.tiff Unvanquished.app/Contents/Resources/Unvanquished.icns&lt;br /&gt;
$ rm temp.tiff&lt;br /&gt;
$ cp $build/daemon{,ded}.i386 $build/*.dylib Unvanquished.app/Contents/MacOS&lt;br /&gt;
$ cp -r /Library/Frameworks/SDL.framework Unvanquished.app/Contents/Frameworks&lt;br /&gt;
$ install_name_tool -id @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/Frameworks/SDL.framework/Versions/A/SDL&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGLi386.dylib&lt;br /&gt;
$ install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL Unvanquished.app/Contents/MacOS/librendererGL3i386.dylib&lt;br /&gt;
$ for binary in Unvanquished.app/Contents/MacOS/*.{i386,dylib}; do dylibbundler -b -x $binary -d $dest/Unvanquished.app/Contents/libs/; done&lt;br /&gt;
$ cp /usr/lib/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ chmod +w ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -id @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/libs/libGLEW.1.7.0.dylib&lt;br /&gt;
$ install_name_tool -change /usr/lib/libGLEW.1.7.0.dylib @executable_path/../libs/libGLEW.1.7.0.dylib ./Unvanquished.app/Contents/MacOS/daemon.i386&lt;br /&gt;
$ cat &amp;gt; Unvanquished.app/Contents/Info.plist&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleDisplayName&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleExecutable&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;daemon.i386&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIconFile&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;Unvanquished.icns&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;net.Unvanquished&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleInfoDictionaryVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;6.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundlePackageType&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;APPL&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleShortVersionString&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
	&amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
	&amp;lt;string&amp;gt;0.4.0&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;br /&gt;
^d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;^d&amp;lt;/code&amp;gt; indicates pressing &amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;Ctrl&amp;lt;/span&amp;gt;+&amp;lt;span class=&amp;quot;key&amp;quot;&amp;gt;D&amp;lt;/span&amp;gt; on the keyboard.&lt;br /&gt;
&lt;br /&gt;
The contents of the completed application bundle should look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Bundle_dir_Mac_OS_X.png]]&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
===Visual Studio===&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Windows is to use Microsoft Visual Studio 2010.&lt;br /&gt;
The free Express version of the software works fine.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
# Open src/engine/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; in the first one and Win32 or Win64 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CMake can generate Visual Studio projects for unvanquished however this feature is relatively new and may have some bugs.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
# Double click on Visual_Studio32.bat&lt;br /&gt;
# Open build-32/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; or &amp;quot;Debug&amp;quot; in the first one and Win32 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Important Notes====&lt;br /&gt;
* The provided Visual Studio project file is out of date and may not work correctly. The CMake generated solutions will always be up to date however.&lt;br /&gt;
* The CMake script currently only supports 32 bit builds however this will change in the future&lt;br /&gt;
* QVM, LLVM, glsl-optimizer and OpenAL are disabled and probably do not work correctly with CMake generated Visual Studio projects. OpenAL and glsl-optimizer is supported by the included Visual Studio File (llvm and qvm are not however)&lt;br /&gt;
* ncurses is not supported under Visual Studio.&lt;br /&gt;
&lt;br /&gt;
===MinGW===&lt;br /&gt;
Unvanquished is supported under MinGW. The build process should be fairly similar to the Linux instructions.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak2.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
You can also get the pak files in this way (requires curl):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir -p ~/.Unvanquished/main&lt;br /&gt;
 $ ./download-pk3.sh ~/.Unvanquished/main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will normally download it for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===CMake cannot locate Newton===&lt;br /&gt;
&lt;br /&gt;
If CMake cannot find Newton, you'll need to set it yourself.&lt;br /&gt;
&lt;br /&gt;
It should be in &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;/path/to/Unvanquished&amp;lt;/var&amp;gt;/src/libs/libnewton/libs/&amp;lt;var&amp;gt;your_os&amp;lt;/var&amp;gt;/libNewton.so&amp;lt;/code&amp;gt;.&lt;br /&gt;
Be sure to replace &amp;lt;var&amp;gt;os&amp;lt;/var&amp;gt; with the proper location.&lt;br /&gt;
&lt;br /&gt;
Use CMake as before to change &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt; to said path:&lt;br /&gt;
&lt;br /&gt;
# Start CMake:&amp;lt;pre&amp;gt;$ ccmake ..&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Scroll down and highlight &amp;lt;code&amp;gt;NEWTON_LIBRARY&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to begin editing and type in the path.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; to configure and &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the new makefiles.&lt;br /&gt;
# Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Q&amp;lt;/span&amp;gt; to quit.&lt;br /&gt;
# Recompile the source:&amp;lt;pre&amp;gt;$make&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=221</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=221"/>
		<updated>2012-04-15T09:04:39Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Crash/Freeze on Death */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code.&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source##Mac_OS_X_2|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
Next, perform the following:&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This may be the same directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that.&lt;br /&gt;
# Wait while the configuration process runs.&lt;br /&gt;
# '''''TODO: explain which libraries will likely have to be set'''''&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# Close CMake and open Xcode.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Click the build button.&lt;br /&gt;
&lt;br /&gt;
Unvanquished can also be built from the command line if you're not a fan of Xcode. The build process is the same as under Linux.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Windows is to use Microsoft Visual Studio 2010.&lt;br /&gt;
The free Express version of the software works fine.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
# Open src/engine/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; in the first one and Win32 or Win64 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
You can also get the pak files in this way (requires curl):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ ./download-pk3.sh build/main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will normally download it for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
===Crash/Freeze on Death===&lt;br /&gt;
Some Linux users may experience a bug where the game freezes whenever you die. The work around until this bug is fixed is to to run &amp;lt;code&amp;gt;ccmake ..&amp;lt;/code&amp;gt; and change &amp;lt;code&amp;gt;CMAKE_BUILD_TYPE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Debug&amp;lt;/code&amp;gt;. Run &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; and it should now work.&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=220</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=220"/>
		<updated>2012-04-15T09:04:07Z</updated>

		<summary type="html">&lt;p&gt;Danmal: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code.&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source##Mac_OS_X_2|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
Next, perform the following:&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This may be the same directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that.&lt;br /&gt;
# Wait while the configuration process runs.&lt;br /&gt;
# '''''TODO: explain which libraries will likely have to be set'''''&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# Close CMake and open Xcode.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Click the build button.&lt;br /&gt;
&lt;br /&gt;
Unvanquished can also be built from the command line if you're not a fan of Xcode. The build process is the same as under Linux.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Windows is to use Microsoft Visual Studio 2010.&lt;br /&gt;
The free Express version of the software works fine.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
# Open src/engine/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; in the first one and Win32 or Win64 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
You can also get the pak files in this way (requires curl):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ ./download-pk3.sh build/main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will normally download it for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
===Crash/Freeze on Death===&lt;br /&gt;
Some Linux users may experience a bug where the game freezes whenever you die. The work around until this bug is fixed is to to run &amp;lt;code&amp;gt;ccmake ..&amp;lt;/code&amp;gt; and change &amp;lt;code&amp;gt;CMAKE_BUILD_TYPE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Debug&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=219</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=219"/>
		<updated>2012-04-15T08:54:11Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Acquiring the Game Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code.&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source##Mac_OS_X_2|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
Next, perform the following:&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This may be the same directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that.&lt;br /&gt;
# Wait while the configuration process runs.&lt;br /&gt;
# '''''TODO: explain which libraries will likely have to be set'''''&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# Close CMake and open Xcode.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Click the build button.&lt;br /&gt;
&lt;br /&gt;
Unvanquished can also be built from the command line if you're not a fan of Xcode. The build process is the same as under Linux.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Windows is to use Microsoft Visual Studio 2010.&lt;br /&gt;
The free Express version of the software works fine.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
# Open src/engine/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; in the first one and Win32 or Win64 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
You can also get the pak files in this way (requires curl):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ ./download-pk3.sh build/main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will normally download it for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=218</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=218"/>
		<updated>2012-04-15T08:24:06Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Acquiring the Game Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code.&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source##Mac_OS_X_2|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
Next, perform the following:&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This may be the same directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that.&lt;br /&gt;
# Wait while the configuration process runs.&lt;br /&gt;
# '''''TODO: explain which libraries will likely have to be set'''''&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# Close CMake and open Xcode.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Click the build button.&lt;br /&gt;
&lt;br /&gt;
Unvanquished can also be built from the command line if you're not a fan of Xcode. The build process is the same as under Linux.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Windows is to use Microsoft Visual Studio 2010.&lt;br /&gt;
The free Express version of the software works fine.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
# Open src/engine/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; in the first one and Win32 or Win64 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libwebp-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
You can also get the pak files in this way (requires curl):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ ./download-pk3.sh main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will normally download it for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=216</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=216"/>
		<updated>2012-04-15T07:07:31Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Compiling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code.&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source##Mac_OS_X_2|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
Next, perform the following:&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This may be the same directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that.&lt;br /&gt;
# Wait while the configuration process runs.&lt;br /&gt;
# '''''TODO: explain which libraries will likely have to be set'''''&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# Close CMake and open Xcode.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Click the build button.&lt;br /&gt;
&lt;br /&gt;
Unvanquished can also be built from the command line if you're not a fan of Xcode. The build process is the same as under Linux.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Windows is to use Microsoft Visual Studio 2010.&lt;br /&gt;
The free Express version of the software works fine.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
# Open src/engine/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; in the first one and Win32 or Win64 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libhogweed2 libwebp-dev libspeex-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/unvanquished/build&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
You can also get the pak files in this way (requires curl):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ ./download-pk3.sh main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will normally download it for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=214</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=214"/>
		<updated>2012-04-15T06:56:53Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Debian/Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code.&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source##Mac_OS_X_2|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
Next, perform the following:&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This may be the same directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that.&lt;br /&gt;
# Wait while the configuration process runs.&lt;br /&gt;
# '''''TODO: explain which libraries will likely have to be set'''''&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# Close CMake and open Xcode.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Click the build button.&lt;br /&gt;
&lt;br /&gt;
Unvanquished can also be built from the command line if you're not a fan of Xcode. The build process is the same as under Linux.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Windows is to use Microsoft Visual Studio 2010.&lt;br /&gt;
The free Express version of the software works fine.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
# Open src/engine/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; in the first one and Win32 or Win64 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libhogweed2 libwebp-dev libspeex-dev libspeexdsp-dev libtheora-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
You can also get the pak files in this way (requires curl):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ ./download-pk3.sh main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will normally download it for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=213</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=213"/>
		<updated>2012-04-15T06:49:05Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Debian/Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code.&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source##Mac_OS_X_2|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
Next, perform the following:&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This may be the same directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that.&lt;br /&gt;
# Wait while the configuration process runs.&lt;br /&gt;
# '''''TODO: explain which libraries will likely have to be set'''''&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# Close CMake and open Xcode.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Click the build button.&lt;br /&gt;
&lt;br /&gt;
Unvanquished can also be built from the command line if you're not a fan of Xcode. The build process is the same as under Linux.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Windows is to use Microsoft Visual Studio 2010.&lt;br /&gt;
The free Express version of the software works fine.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
# Open src/engine/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; in the first one and Win32 or Win64 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \&lt;br /&gt;
   libhogweed2 libwebp-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
You can also get the pak files in this way (requires curl):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ ./download-pk3.sh main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will normally download it for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=212</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=212"/>
		<updated>2012-04-15T06:46:06Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Dependencies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code.&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source##Mac_OS_X_2|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
Next, perform the following:&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This may be the same directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that.&lt;br /&gt;
# Wait while the configuration process runs.&lt;br /&gt;
# '''''TODO: explain which libraries will likely have to be set'''''&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# Close CMake and open Xcode.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Click the build button.&lt;br /&gt;
&lt;br /&gt;
Unvanquished can also be built from the command line if you're not a fan of Xcode. The build process is the same as under Linux.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Windows is to use Microsoft Visual Studio 2010.&lt;br /&gt;
The free Express version of the software works fine.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
# Open src/engine/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; in the first one and Win32 or Win64 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev libhogweed2 libwebp-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
You can also get the pak files in this way (requires curl):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ ./download-pk3.sh main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will normally download it for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=211</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=211"/>
		<updated>2012-04-15T06:38:43Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Unnecessary libraries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code.&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source##Mac_OS_X_2|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
Next, perform the following:&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This may be the same directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that.&lt;br /&gt;
# Wait while the configuration process runs.&lt;br /&gt;
# '''''TODO: explain which libraries will likely have to be set'''''&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# Close CMake and open Xcode.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Click the build button.&lt;br /&gt;
&lt;br /&gt;
Unvanquished can also be built from the command line if you're not a fan of Xcode. The build process is the same as under Linux.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Windows is to use Microsoft Visual Studio 2010.&lt;br /&gt;
The free Express version of the software works fine.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
# Open src/engine/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; in the first one and Win32 or Win64 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev libhogweed2&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_THEORA&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Theora.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CIN_XVID&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this prevents videos from being recorded in Xvid.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_VOIP&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this removes VOIP support. Alternatively enabling &amp;lt;code&amp;gt;USE_INTERNAL_SPEEX&amp;lt;/code&amp;gt; will use the libraries distributed with Unvanquished for VoIP&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_INTERNAL_CRYPTO&amp;lt;/code&amp;gt; &amp;amp;mdash; Enable this to use the crypto libraries provided by Unvanquished.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
You can also get the pak files in this way (requires curl):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ ./download-pk3.sh main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will normally download it for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=207</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=207"/>
		<updated>2012-04-13T13:57:01Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Mac OS X */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code.&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source##Mac_OS_X_2|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
Next, perform the following:&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This may be the same directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that.&lt;br /&gt;
# Wait while the configuration process runs.&lt;br /&gt;
# '''''TODO: explain which libraries will likely have to be set'''''&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# Close CMake and open Xcode.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Click the build button.&lt;br /&gt;
&lt;br /&gt;
Unvanquished can also be built from the command line if you're not a fan of Xcode. The build process is the same as under Linux.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Windows is to use Microsoft Visual Studio 2010.&lt;br /&gt;
The free Express version of the software works fine.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
# Open src/engine/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; in the first one and Win32 or Win64 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may want to build the engine in the same directory.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ ccmake .&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
You can also get the pak files in this way (requires curl):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ ./download-pk3.sh main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will normally download it for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
	<entry>
		<id>https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=206</id>
		<title>Compiling the source</title>
		<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/index.php?title=Compiling_the_source&amp;diff=206"/>
		<updated>2012-04-13T13:54:35Z</updated>

		<summary type="html">&lt;p&gt;Danmal: /* Mac OS X */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Mac OS X is to use Apple's [https://developer.apple.com/xcode/ XCode] along with [http://www.cmake.org/cmake/resources/software.html CMake]; CMake is used to generate an XCode project file that is then used to compile the code. &amp;lt;!-- TODO: is it possible to build using gcc? --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, you need to [[Getting_the_source##Mac_OS_X_2|acquire the source code]].&lt;br /&gt;
&lt;br /&gt;
Next, perform the following:&lt;br /&gt;
&lt;br /&gt;
# Run CMake.&lt;br /&gt;
# Enter the location of the source code.&lt;br /&gt;
# Enter the location in which you would like to build the source code. This may be the same directory.&lt;br /&gt;
# Click &amp;quot;Configure&amp;quot;. You will be prompted as to which generator you would like to use. If you have Xcode installed, choose that.&lt;br /&gt;
# Wait while the configuration process runs.&lt;br /&gt;
# '''''TODO: explain which libraries will likely have to be set'''''&lt;br /&gt;
# Click &amp;quot;Generate&amp;quot;.&lt;br /&gt;
# Close CMake and open Xcode.&lt;br /&gt;
# Open the project file created by CMake, which should be in the build directory you specified.&lt;br /&gt;
# Click the build button.&lt;br /&gt;
&lt;br /&gt;
Unvanquished can also be built from the command line if you're not a fan of Xcode. The build process is the same as under Linux.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&lt;br /&gt;
The preferred way of building Unvanquished on Windows is to use Microsoft Visual Studio 2010.&lt;br /&gt;
The free Express version of the software works fine.&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
# Open src/engine/Daemon.sln in Visual Studio 2010.&lt;br /&gt;
# In the two text boxes in the toolbar, select &amp;quot;Release&amp;quot; in the first one and Win32 or Win64 in the second one&lt;br /&gt;
# Press F5 to build solution and run application, or just use Build &amp;amp;rarr; Build Solution to compile the code.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TODO: this may be incomplete --&amp;gt;&lt;br /&gt;
====Debian/Ubuntu====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \&lt;br /&gt;
   libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \&lt;br /&gt;
   libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev&lt;br /&gt;
&lt;br /&gt;
Actual dev package names may vary, e.g. libgmp-dev instead of libgmp3-dev and libglew-dev or libglew1.7-dev instead of libglew1.5-dev.&lt;br /&gt;
&lt;br /&gt;
Since we have a debian directory in the source, you can also to check what's needed then install the listed packages (choosing from alternatives as needed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ dpkg-checkbuilddeps&lt;br /&gt;
 …&lt;br /&gt;
 $ sudo apt-get install &amp;lt;var&amp;gt;package(s)&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If dpkg-checkbuilddeps produces no output, you have all necessary build dependencies. Also, debhelper's only needed if you're building .debs.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
&lt;br /&gt;
 $ emerge curl freetype glew gmp jpeg ncurses libogg openal libpng libsdl libvorbis zlib&lt;br /&gt;
&lt;br /&gt;
===Configuring the code with CMake===&lt;br /&gt;
&lt;br /&gt;
After you have [[Getting the source|acquired the source code]], you can proceed to compile. Unvanquished uses CMake, so you must have that installed. &lt;br /&gt;
&lt;br /&gt;
====Using ccmake (curses-based front-end)====&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-curses-gui&lt;br /&gt;
&lt;br /&gt;
On Gentoo you should set the '''ncurses''' USE flag either globally or individually, just for cmake.&lt;br /&gt;
To add the USE flag globally, edit the USE array in /etc/make.conf for it to include '''ncurses'''.&lt;br /&gt;
To only install cmake with ncurses functionality, you could do the following:&lt;br /&gt;
&lt;br /&gt;
 $ echo 'dev-util/cmake ncurses' &amp;gt;&amp;gt; /etc/portage/package.use &amp;amp;&amp;amp; emerge cmake&lt;br /&gt;
&lt;br /&gt;
Note that in Ubuntu, &amp;lt;code&amp;gt;cmake-curses-gui&amp;lt;/code&amp;gt; is in Universe, which you may have to enable with &amp;lt;code&amp;gt;software-properties-gtk&amp;lt;/code&amp;gt;. Make sure to reload the software sources with &amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt; afterwards.&lt;br /&gt;
&lt;br /&gt;
Next, configure the codebase.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ mkdir build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ ccmake ..&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may want to build the engine in the same directory.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ ccmake .&lt;br /&gt;
&lt;br /&gt;
Or, in Debian or Ubuntu, you can build a package (but you'll need to have devscripts and fakeroot installed):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ fakeroot dpkg-buildpackage -b -uc&lt;br /&gt;
 $ sudo dpkg -i &amp;lt;var&amp;gt;../unvanquished_*.deb&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once in &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;, use the following keys:&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;c&amp;lt;/span&amp;gt; to configure. If an error occurs during this phase, make note of it and press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;e&amp;lt;/span&amp;gt; to dismiss it.&lt;br /&gt;
* Use the up and down arrow keys to navigate the compilation options.&lt;br /&gt;
* Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; to enable or disable boolean options (i.e., on/off) or to edit textual options.&lt;br /&gt;
** Press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;Esc&amp;lt;/span&amp;gt; when editing a textual option to cancel the change.&lt;br /&gt;
&lt;br /&gt;
Once you have finished the configuration process, press &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;C&amp;lt;/span&amp;gt; again, then &amp;lt;span class=&amp;quot;hotkey&amp;quot;&amp;gt;G&amp;lt;/span&amp;gt; to generate the makefile.&lt;br /&gt;
&lt;br /&gt;
====Using cmake-qt-gui (graphical front-end)====&lt;br /&gt;
&lt;br /&gt;
This graphical front end for cmake has its own package you must install:&lt;br /&gt;
&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install cmake-qt-gui&lt;br /&gt;
&lt;br /&gt;
=====Gentoo=====&lt;br /&gt;
&lt;br /&gt;
With the '''qt4''' USE flag enabled:&lt;br /&gt;
&lt;br /&gt;
 $ emerge cmake&lt;br /&gt;
&lt;br /&gt;
Once installed, run with &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmake-qt-gui.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
# Set the path where you have the source code downloaded.&lt;br /&gt;
# Set the path where you would like to build the engine. This may be the same directory if you wish.&lt;br /&gt;
# Click 'Configure'.&lt;br /&gt;
# Click 'Generate'.&lt;br /&gt;
&lt;br /&gt;
====Unnecessary libraries====&lt;br /&gt;
&lt;br /&gt;
Regardless of which front-end to cmake you use, you may want to disable some libraries that are not strictly necessary:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_WEBP&amp;lt;/code&amp;gt; &amp;amp;mdash; Some maps use WebP to store their textures. Currently this should have little impact on gameplay but more maps will likely use this format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_OPENAL&amp;lt;/code&amp;gt; &amp;amp;mdash; If this is disabled, SDL is used instead for sound.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CODEC_VORBIS&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause certain sound effects (those using the &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt; format) not to play. At present, this has only a minor impact on gameplay, but more and more sounds will likely use the format in the future.&lt;br /&gt;
* &amp;lt;code&amp;gt;USE_CURSES&amp;lt;/code&amp;gt; &amp;amp;mdash; Disabling this will cause the external (not in-game) console to not use curses; it will not be scrollable and will be similar to the console in the original Tremulous. This does in no way affect gameplay.&lt;br /&gt;
&lt;br /&gt;
===Compiling===&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;/path/to/unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-j&amp;lt;/code&amp;gt; switch to make allows you to speed up the compilation process by running it in multiple threads; set the number following this to the number of cores your processor(s) have.&lt;br /&gt;
&lt;br /&gt;
===Acquiring the Game Files===&lt;br /&gt;
&lt;br /&gt;
The game files are not in the Git repository, and must be downloaded separately.&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ cd main&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak0.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download&lt;br /&gt;
 $ wget http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download&lt;br /&gt;
&lt;br /&gt;
You can also get the pak files in this way (requires curl):&lt;br /&gt;
&lt;br /&gt;
 $ cd &amp;lt;var&amp;gt;path/to/Unvanquished&amp;lt;/var&amp;gt;&lt;br /&gt;
 $ ./download-pk3.sh main&lt;br /&gt;
&lt;br /&gt;
The maps archive file isn't strictly necessary: if you don't have a particular map, the game will normally download it for you.&lt;br /&gt;
&lt;br /&gt;
Now you can proceed to [[running the game]].&lt;/div&gt;</summary>
		<author><name>Danmal</name></author>
	</entry>
</feed>