<?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=DevilishFreak</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=DevilishFreak"/>
	<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/wiki/Special:Contributions/DevilishFreak"/>
	<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=2116</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=2116"/>
		<updated>2013-09-23T15:08:16Z</updated>

		<summary type="html">&lt;p&gt;DevilishFreak: Added libxvidcore-dev to the 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 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;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 {{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 {{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 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 libxvidcore-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;
'''We currently provide a ready-to-use libwebp-dev 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. 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;
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;
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/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;
===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>DevilishFreak</name></author>
	</entry>
</feed>