<?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=Gfx0</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=Gfx0"/>
	<link rel="alternate" type="text/html" href="https://staging-wiki.unvanquished.net/wiki/Special:Contributions/Gfx0"/>
	<updated>2026-04-04T19:45:10Z</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=119</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=119"/>
		<updated>2012-03-27T21:00:46Z</updated>

		<summary type="html">&lt;p&gt;Gfx0: /* Windows */&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, follow the instructions on [[Getting_the_source##Mac_OS_X_2|this page]] to 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;
==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;
   libgmp-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;
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;
Debian/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;
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 (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>Gfx0</name></author>
	</entry>
</feed>