<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://springrts-wiki.p2004a.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Altie</id>
	<title>Spring - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://springrts-wiki.p2004a.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Altie"/>
	<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/wiki/Special:Contributions/Altie"/>
	<updated>2026-11-08T19:48:18Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_spring&amp;diff=3731</id>
		<title>Building spring</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_spring&amp;diff=3731"/>
		<updated>2008-11-26T17:22:26Z</updated>

		<summary type="html">&lt;p&gt;Altie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;NOTE: Outlined below is information on assisting with the development of the Spring source itself. For information about developing a mod (units, widgets, maps, etc.) see the [[Mod_and_Unit_development]] page.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Even if you are developing a mod, it is highly recommended that you get the engine source. Engine source + full text search: DO IT.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Below you can find information on how to work with the Spring source in the current mainline (Windows platform) if you like to work on another platform (Linux &amp;amp; Mac) please look at the bottem of this page under &amp;quot;Multiplatform development&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Starting Development==&lt;br /&gt;
To start development, you will need&lt;br /&gt;
#To read the [[Coding_Standards]]&lt;br /&gt;
#The latest version of the source &lt;br /&gt;
#A good code manipulation program&lt;br /&gt;
#Compiling your modified source&lt;br /&gt;
&lt;br /&gt;
== Keep track what others do ==&lt;br /&gt;
If you develop with others, you need to know what they do. We have [http://spring.clan-sy.com/fisheye/ fisheye], a very handy SVN helper, and [http://spring.clan-sy.com/websvn/ WebSVN] running on the server.&lt;br /&gt;
&lt;br /&gt;
===Source Code Documentation===&lt;br /&gt;
A good place to start is [http://buildbot.no-ip.org/~buildbot/spring/doxygen the source code documentation].&lt;br /&gt;
&lt;br /&gt;
An explanation on how the code is executed in game can be found in the [[Spring Engine Code]]&lt;br /&gt;
page.&lt;br /&gt;
&lt;br /&gt;
==Obtaining the Source==&lt;br /&gt;
The latest SVN is at: [https://spring.clan-sy.com/svn/spring https://spring.clan-sy.com/svn/spring]&amp;lt;br&amp;gt;&lt;br /&gt;
A hourly updated read-only mirror is available at: svn://caspring.org:3691/&lt;br /&gt;
&lt;br /&gt;
Another option is to manually [http://spring.clan-sy.com/download.php download] it along with the latest released version of the game. However, for serious developers, a better way would be to download the source straight from the subversion (SVN) repository. This will also allow you to make a patch out of the changes you make to the code, and send it to one of the developers with SVN access.&lt;br /&gt;
&lt;br /&gt;
Windows SVN clients : [http://subversion.tigris.org Subversion] (Win32-Console), &lt;br /&gt;
[http://www.syntevo.com/smartsvn/index.jsp SmartSVN] (Java) and [http://tortoisesvn.tigris.org TortoiseSVN] (MSI).&lt;br /&gt;
&lt;br /&gt;
Assuming that you are using the Subversion svn client you can download the latest SVN source with one of the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;svn.exe checkout https://spring.clan-sy.com/svn/spring/trunk&amp;lt;br&amp;gt;&lt;br /&gt;
svn.exe checkout svn://caspring.org:3691/trunk&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will create a trunk subdirectory in the directory from where you ran it, which will contain the source code root directory which will be later referred to as /spring&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using Git rather than SVN, you need to initialize local repository and fetch using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;git-svn clone https://spring.clan-sy.com/svn/spring&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(this may take a while)&lt;br /&gt;
&lt;br /&gt;
To update your local repository, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;git-svn fetch https://spring.clan-sy.com/svn/spring&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Learning C++==&lt;br /&gt;
You will need to know C++ to modify or understand Spring&#039;s source code. If you are interested in learning C++, see [[Learning_CPP]]&lt;br /&gt;
&lt;br /&gt;
However please note that badly designed code (code created by a C++ novice for example), even if working will likely not be included in the spring code. Spring is a large project, and therefore it is necessary to stay away from hack jobs and create general solutions to problems.&lt;br /&gt;
&lt;br /&gt;
==Setting up your development environment==&lt;br /&gt;
You have either to use the SCons build system that is multi platform, or use Microsoft Visual Studio for building spring. See also [[Development_IDEs]] for some more background information about the IDE to choose.&lt;br /&gt;
&lt;br /&gt;
===Visual Studio 8 (2005)===&lt;br /&gt;
(possibly the free Express Edition) &lt;br /&gt;
&lt;br /&gt;
* Install the [http://spring.clan-sy.com/dl/spring-vc8libs.exe vclibs library package]. You need to install this in the /spring directory from the SVN checkout or the zipped source. If done right, it will look like:&lt;br /&gt;
**/spring/&lt;br /&gt;
**/spring/installer&lt;br /&gt;
**/spring/rts&lt;br /&gt;
**/spring/... other dirs&lt;br /&gt;
**/spring/vclibs&lt;br /&gt;
* Install the [http://msdn.microsoft.com/directx/sdk/ DirectX SDK]&lt;br /&gt;
* Install the PlatformSDK. I got away with unchecking the parts of the PlatformSDK that were obviously not related (IIS, web stuff). Makes for a smaller download. Make &#039;&#039;&#039;sure&#039;&#039;&#039; the Platform SDK and DirectX SDK are in the VS search/include directories:&lt;br /&gt;
* After installing them, open Visual C++. Click Tools &amp;gt;&amp;gt; Options &amp;gt;&amp;gt; Projects and Solutions &amp;gt;&amp;gt; VC++ Directories. Add these entries to the corresponding sections (paths just a reference, yours may be different):&lt;br /&gt;
**Include files:&lt;br /&gt;
***$(ProgramFiles)\Microsoft DirectX SDK (August 2007)\Include&lt;br /&gt;
***$(ProgramFiles)\Microsoft Platform SDK\include&lt;br /&gt;
**Library files:&lt;br /&gt;
***$(ProgramFiles)\Microsoft DirectX SDK (August 2007)\Lib\x86 (Might need \x64 on a 64-bit platform, I don&#039;t know.)&lt;br /&gt;
***$(ProgramFiles)\Microsoft Platform SDK\lib&lt;br /&gt;
* Open the solution. /spring/rts/build/vstudio8/rts.sln&lt;br /&gt;
* Start building (usually you want to select the release/no debug build, debug is really too slow and is used only when you really know what you want to test)&lt;br /&gt;
* Select the working directory in the project properties, otherwise spring will not work correctly&lt;br /&gt;
&lt;br /&gt;
===Visual Studio 9 (2008)===&lt;br /&gt;
(possibly the free Express Edition)&lt;br /&gt;
&lt;br /&gt;
Not yet fully working as far as I know; you need at least this hotfix from Microsoft though:&lt;br /&gt;
&lt;br /&gt;
http://support.microsoft.com/kb/946040&lt;br /&gt;
&lt;br /&gt;
For the rest the Visual Studio 8 instructions should apply, mostly.&lt;br /&gt;
&lt;br /&gt;
===SCONS/MinGW===&lt;br /&gt;
Code::Blocks and Dev C++ use MinGW too, so if you are using one of these IDEs, you&#039;ll want to follow these instructions too.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Getting the compiler&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Compiling in MinGW requires GCC 4.x which is only available in experimental builds.  [http://www.tdragon.net/recentgcc/ TDM&#039;s experimental MinGW]&lt;br /&gt;
&lt;br /&gt;
Previous versions of this document suggested using [http://downloads.sourceforge.net/dev-cpp/devcpp-4.9.9.2_setup.exe Dev-C++] or [http://downloads.sourceforge.net/codeblocks/codeblocks-8.02mingw-setup.exe Code::Blocks] for their included MinGW. They both come with MinGW 3.4 which no longer compiles a fully working Spring.exe.  If you want to use Dev-C++ or Codeblocks, you can install the experimental MinGW build over the one that&#039;s included.&lt;br /&gt;
&lt;br /&gt;
Get at least the following packages:&lt;br /&gt;
* mingw-runtime&lt;br /&gt;
* core&lt;br /&gt;
* c++&lt;br /&gt;
* java (if MinGW 4.3.1 is out yet, you dont need this)&lt;br /&gt;
* binutils&lt;br /&gt;
* win32api&lt;br /&gt;
Use [http://spring.jobjol.nl/show_file.php?id=1102 v11 of the MinGW library package] if you have MinGW 4.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compiling spring&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Make sure you install the MinGW library package in the checkout directory, so the path is: /spring/mingwlibs. If done right, it will look like:&lt;br /&gt;
**/spring/&lt;br /&gt;
**/spring/installer&lt;br /&gt;
**/spring/rts&lt;br /&gt;
**/spring/... other dirs&lt;br /&gt;
**/spring/mingwlibs&lt;br /&gt;
&lt;br /&gt;
These programs are a must have if you want to compile Spring with MinGW, so install them now, if you don&#039;t have them already.&lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-210.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-0.96.96.win32.exe Scons 0.96 installer]&lt;br /&gt;
*[http://www.cmake.org/files/v2.6/cmake-2.6.0-win32-x86.exe CMake 2.6 installer]&lt;br /&gt;
&lt;br /&gt;
Oh, and quick instructions:&lt;br /&gt;
&lt;br /&gt;
* Grab and install the above programs.&lt;br /&gt;
* Make sure C:\Python25, C:\Python25\Scripts and C:\Dev-Cpp\bin are in your PATH environment variable. Set environment variables by: Start -&amp;gt; Settings -&amp;gt; Control Panel -&amp;gt; System -&amp;gt; Advanced -&amp;gt; Environment variables (for Windows XP).&lt;br /&gt;
* Make sure a MINGDIR environment variable with value C:\Dev-Cpp exists. (change paths where appropriate.)&lt;br /&gt;
* Checkout the Spring SVN repository, following the instructions above in obtaining source. (TODO:link)&lt;br /&gt;
* Open a console (Start -&amp;gt; Run -&amp;gt; cmd.exe -&amp;gt; Run), cd \where you checked it out in the previous step, if you checked it out on a different drive make sure to change drives with DriveLetter:&amp;lt;enter&amp;gt; first.&lt;br /&gt;
* Type scons configure&amp;lt;enter&amp;gt;. Refer to scons --help for options which can be passed to scons configure. Gotchas:&lt;br /&gt;
** If you get an error message starting with &amp;quot;EOFError: : env = Environement...&amp;quot;, try deleting the file build/scons_signatures.dblite&lt;br /&gt;
** If you get an error message stating &amp;quot;ImportError: No module named win32file:&amp;quot;, you have probably not installed the python-win32-extensions.&lt;br /&gt;
** If all proceeds as intended you will see a message similar to: &amp;quot;Everything seems OK.  Run `scons&#039; now to build.&amp;quot;&lt;br /&gt;
* Type scons&amp;lt;enter&amp;gt; to start the compilation.&lt;br /&gt;
** If you have Delphi installed and get an error message that the commandline params &amp;quot;--no-print-directory&amp;quot; &amp;amp; &amp;quot;-C&amp;quot; aren&#039;t supported, then you should remove the Delphi dirs from your &amp;lt;i&amp;gt;PATH&amp;lt;/i&amp;gt; variable, because scons tried to run the delphi&#039;s make.exe instead of using mingw32-make. (this will cause that streflop can&#039;t be build!)&lt;br /&gt;
* Wait for the compilation to finish, this may take a while.&lt;br /&gt;
* Copy datafiles and stuff from official Spring installation to the /spring/game directory (where spring.exe is located, after the compilation finished.)&lt;br /&gt;
* Copy missing DLLs from mingwlibs/dll.&lt;br /&gt;
* Start developing.&lt;br /&gt;
&lt;br /&gt;
If you are using Linux, refer to the [[SetupGuide]] to build Spring and get it running.&lt;br /&gt;
&lt;br /&gt;
=== CMake/GCC ===&lt;br /&gt;
Currently the CMake scripts are not capable of generating Visual Studio project files, so CMake can only be used for gcc compiling.&lt;br /&gt;
&lt;br /&gt;
* Install CMake (must be at least version 2.6.0) from either www.cmake.org or through your distributions package manager&lt;br /&gt;
* get the source code (from svn, tarballs...)&lt;br /&gt;
==== The GUI method ====&lt;br /&gt;
CMake offers a nice Qt4 gui to ease the following steps (to use the gui explained here, cmake must be at least version 2.6.1). Doing so should be straightforward:&lt;br /&gt;
* select source directory&lt;br /&gt;
* select (and/or create) build directory where temporary files are stored&lt;br /&gt;
* hit configure button&lt;br /&gt;
* choose your build type:&lt;br /&gt;
** Unix makefile if you are using linux and want to compile linux executables&lt;br /&gt;
** mingw makefiles if you are working on windows&lt;br /&gt;
** Unix makefile with cross compiler setup to cross-compile mingw32 executables, you have to select the toolchain file you want to use (see below)&lt;br /&gt;
* configure variables to your need (move the mouse over the options and read the tooltip for further informations on them and or see Section &amp;quot;Options&amp;quot;)&lt;br /&gt;
* push generate button&lt;br /&gt;
* open commandline and do &amp;quot;make&amp;quot; and &amp;quot;make install&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== The commandline method ====&lt;br /&gt;
Only works with the linux version of cmake, and is easiely scriptable.&lt;br /&gt;
* cd to (and/or create) build directory where temporary files are stored&lt;br /&gt;
* &amp;quot;cmake &amp;lt;path to source tree&amp;gt; &amp;lt;options&amp;gt;&amp;quot; where:&lt;br /&gt;
** &amp;lt;path to source tree&amp;gt; is the path to the spring source directory&lt;br /&gt;
**  &amp;lt;options&amp;gt; are defined like &amp;quot;-D&amp;lt;option name&amp;gt;=&amp;lt;value&amp;gt;&lt;br /&gt;
* depending on your settings you may need to run &amp;quot;cmake ...&amp;quot; twice&lt;br /&gt;
* run &amp;quot;make&amp;quot; and &amp;quot;make install&amp;quot;&lt;br /&gt;
* PACKAGE MAINTAINERS:&lt;br /&gt;
** doing &amp;quot;make install DESTDIR=/some/path&amp;quot; will install spring in the specified place, putting files in subdirectories like configured. This may be helpfull when making packages so spring don&#039;T get installed on your system for real (see also CMake FAQ [[http://www.vtk.org/Wiki/CMake_FAQ#Does_CMake.27s_.22make_install.22_support_DESTDIR.3F]]).&lt;br /&gt;
** You need to update the mime database (update-mime-database) and the kde database (kbuildsycoca) after installing to make the system aware of the newly installed mime types and desktop shortcuts.&lt;br /&gt;
&lt;br /&gt;
==== Some Options Explained ====&lt;br /&gt;
* MINGWLIBS: directory where the [http://spring.jobjol.nl/show_file.php?id=1102 v11 of the MinGW library package is] (only needed when compiling with mingw)&lt;br /&gt;
* CMAKE_BUILD_TYPE: either RELEASE, DEBUG, DEBUG2, DEBUG3 which compiler options to use&lt;br /&gt;
* CMAKE_INSTALL_PREFIX: installation prefix (defaults to /usr/local) defines the base directory for installing&lt;br /&gt;
* DATADIR, LIBDIR, BINDIR: where to install data, libraries or binaries (relative paths are based on CMAKE_INSTALL_PREFIX, absolute paths are absolute (DESTDIR is still respected))&lt;br /&gt;
* APPLICATIONS_DIR, MIME_DIR, PIXMAPS_DIR: where to install freedesktop-files (icons, mime-types and application-description)&lt;br /&gt;
&lt;br /&gt;
==== The toolchain file ====&lt;br /&gt;
An example should be self-explainatory:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 # the name of the target operating system&lt;br /&gt;
 SET(CMAKE_SYSTEM_NAME Windows)&lt;br /&gt;
&lt;br /&gt;
 # which compilers to use for C and C++&lt;br /&gt;
 SET(CMAKE_C_COMPILER i686-mingw32-gcc)&lt;br /&gt;
 SET(CMAKE_CXX_COMPILER i686-mingw32-g++)&lt;br /&gt;
&lt;br /&gt;
 # here is the target environment located&lt;br /&gt;
 SET(CMAKE_FIND_ROOT_PATH /usr/i686-mingw32)&lt;br /&gt;
&lt;br /&gt;
 SET(MINGWLIBS /home/karl/spring/mingwlibs_v11)&amp;lt;/code&amp;gt;&lt;br /&gt;
Pass this with &amp;quot;-DCMAKE_TOOLCHAIN_FILE=/your/toolchain/file&amp;quot; to cmake or select it in the gui to make a cross-compilation.&lt;br /&gt;
&lt;br /&gt;
==== Further reference ====&lt;br /&gt;
* CMake FAQ [[http://www.vtk.org/Wiki/CMake_FAQ]]&lt;br /&gt;
* man CMake&lt;br /&gt;
* the CMake documentation (long!) [[http://www.cmake.org/HTML/cmake-2.6.html]]&lt;br /&gt;
&lt;br /&gt;
==Development Suggestions==&lt;br /&gt;
Before starting to make modifications to the source, take a look at the [[development guidelines]] which outlines some important things to think about. To find something interesting to work on, look at [[SpringEngineTODO]]. You can also check the list of [[whois doing what]] to see what others are doing. If you do edit the code, please add [[Doxygen style comments]] to the code, which will then enhance the source code documentation.&lt;br /&gt;
&lt;br /&gt;
==How to get your code included==&lt;br /&gt;
If you create something that you think should be included in the official source tree, you can report a &amp;quot;bug&amp;quot; in [http://spring.clan-sy.com/mantis/ mantis, our BTS]. Add your patch as attachment, and put &amp;quot;[patch]&amp;quot; in front of the subject, so it is easy for us to separate patches from bugs.&lt;br /&gt;
&lt;br /&gt;
It&#039;s also considered standard practice to post one&#039;s modifications in the [http://spring.clan-sy.com/phpbb/viewforum.php?f=12 development forum] and get feedback.&lt;br /&gt;
&lt;br /&gt;
==Spring Engine TODO list==&lt;br /&gt;
There is a TODO list for developers who want to contribute to the engine itself:&lt;br /&gt;
[[SpringEngineTODO]]. There is also a [http://spring.clan-sy.com/phpbb/viewforum.php?f=21 feature request forum], which may give you some ideas. Don&#039;t be overwhelmed by the sheer number of (silly) requests though!&lt;br /&gt;
&lt;br /&gt;
==Development links==&lt;br /&gt;
* [http://planetspring.free.fr/spring/ Automatic installer builds (crosscompiled, mingw)]&lt;br /&gt;
* [http://spring.jobjol.nl/show_file.php?id=860 Spring base content files]&lt;br /&gt;
* [http://developer.berlios.de/projects/taspring-linux BerliOS project page (OLD)]&lt;br /&gt;
* [http://spring.clan-sy.com/mantis Bug Tracking System]&lt;br /&gt;
* [http://buildbot.no-ip.org:8010/ Buildbot]&lt;br /&gt;
* [https://lists.berlios.de/mailman/listinfo/taspring-linux-commit Commit mailing list]&lt;br /&gt;
* [http://spring.clan-sy.com/dl/spring-vc8libs.exe Development libraries for Visual Studio 2005]&lt;br /&gt;
* [http://spring.jobjol.nl/show_file.php?id=1102 Development libraries for MinGW]&lt;br /&gt;
* [http://sourceforge.net/projects/springrts SourceForge project page (OLD)]&lt;br /&gt;
* [http://buildbot.no-ip.org/~buildbot/spring/stacktraceTranslator.php StackTrace Translator]&lt;br /&gt;
* [https://spring.clan-sy.com/svn/spring/trunk/ Subversion repository]&lt;br /&gt;
* [http://spring.clan-sy.com/dl/docs/unitsync/group__unitsync__api.html Unitsync API docs]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/listing.php?repname=spring&amp;amp;path=%2F&amp;amp;sc=0 WebSVN]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/log.php?repname=spring&amp;amp;path=%2F&amp;amp;rev=0&amp;amp;sc=0&amp;amp;isdir=1 WebSVN link to &amp;quot;development log&amp;quot;]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/filedetails.php?repname=spring&amp;amp;path=%2Ftrunk%2FDocumentation%2Fchangelog.txt&amp;amp;rev=0&amp;amp;sc=0 WebSVN link to the most recent changelog.txt]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]] [[Category:Source development]]&lt;/div&gt;</summary>
		<author><name>Altie</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_spring&amp;diff=3730</id>
		<title>Building spring</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_spring&amp;diff=3730"/>
		<updated>2008-11-26T05:37:06Z</updated>

		<summary type="html">&lt;p&gt;Altie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;NOTE: Outlined below is information on assisting with the development of the Spring source itself. For information about developing a mod (units, widgets, maps, etc.) see the [[Mod_and_Unit_development]] page.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Even if you are developing a mod, it is highly recommended that you get the engine source. Engine source + full text search: DO IT.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Below you can find information on how to work with the Spring source in the current mainline (Windows platform) if you like to work on another platform (Linux &amp;amp; Mac) please look at the bottem of this page under &amp;quot;Multiplatform development&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Starting Development==&lt;br /&gt;
To start development, you will need&lt;br /&gt;
#To read the [[Coding_Standards]]&lt;br /&gt;
#The latest version of the source &lt;br /&gt;
#A good code manipulation program&lt;br /&gt;
#Compiling your modified source&lt;br /&gt;
&lt;br /&gt;
== Keep track what others do ==&lt;br /&gt;
If you develop with others, you need to know what they do. We have [http://spring.clan-sy.com/fisheye/ fisheye], a very handy SVN helper, and [http://spring.clan-sy.com/websvn/ WebSVN] running on the server.&lt;br /&gt;
&lt;br /&gt;
===Source Code Documentation===&lt;br /&gt;
A good place to start is [http://buildbot.no-ip.org/~buildbot/spring/doxygen the source code documentation].&lt;br /&gt;
&lt;br /&gt;
An explanation on how the code is executed in game can be found in the [[Spring Engine Code]]&lt;br /&gt;
page.&lt;br /&gt;
&lt;br /&gt;
==Obtaining the Source==&lt;br /&gt;
The latest SVN is at: [https://spring.clan-sy.com/svn/spring https://spring.clan-sy.com/svn/spring]&amp;lt;br&amp;gt;&lt;br /&gt;
A hourly updated read-only mirror is available at: svn://caspring.org:3691/&lt;br /&gt;
&lt;br /&gt;
Another option is to manually [http://spring.clan-sy.com/download.php download] it along with the latest released version of the game. However, for serious developers, a better way would be to download the source straight from the subversion (SVN) repository. This will also allow you to make a patch out of the changes you make to the code, and send it to one of the developers with SVN access.&lt;br /&gt;
&lt;br /&gt;
Windows SVN clients : [http://subversion.tigris.org Subversion] (Win32-Console), &lt;br /&gt;
[http://www.syntevo.com/smartsvn/index.jsp SmartSVN] (Java) and [http://tortoisesvn.tigris.org TortoiseSVN] (MSI).&lt;br /&gt;
&lt;br /&gt;
Assuming that you are using the Subversion svn client you can download the latest SVN source with one of the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;svn.exe checkout https://spring.clan-sy.com/svn/spring/trunk&amp;lt;br&amp;gt;&lt;br /&gt;
svn.exe checkout svn://caspring.org:3691/trunk&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will create a trunk subdirectory in the directory from where you ran it, which will contain the source code root directory which will be later referred to as /spring&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using Git rather than SVN, you need to initialize local repository and fetch using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;git-svn clone https://spring.clan-sy.com/svn/spring&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(this may take a while)&lt;br /&gt;
&lt;br /&gt;
To update your local repository, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;git-svn fetch https://spring.clan-sy.com/svn/spring&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Learning C++==&lt;br /&gt;
You will need to know C++ to modify or understand Spring&#039;s source code. If you are interested in learning C++, see [[Learning_CPP]]&lt;br /&gt;
&lt;br /&gt;
However please note that badly designed code (code created by a C++ novice for example), even if working will likely not be included in the spring code. Spring is a large project, and therefore it is necessary to stay away from hack jobs and create general solutions to problems.&lt;br /&gt;
&lt;br /&gt;
==Setting up your development environment==&lt;br /&gt;
You have either to use the SCons build system that is multi platform, or use Microsoft Visual Studio for building spring. See also [[Development_IDEs]] for some more background information about the IDE to choose.&lt;br /&gt;
&lt;br /&gt;
===Visual Studio 8 (2005)===&lt;br /&gt;
(possibly the free Express Edition) &lt;br /&gt;
&lt;br /&gt;
* Install the [http://spring.clan-sy.com/dl/spring-vc8libs.exe vclibs library package]. You need to install this in the /spring directory from the SVN checkout or the zipped source. If done right, it will look like:&lt;br /&gt;
**/spring/&lt;br /&gt;
**/spring/installer&lt;br /&gt;
**/spring/rts&lt;br /&gt;
**/spring/... other dirs&lt;br /&gt;
**/spring/vclibs&lt;br /&gt;
* Install the [http://msdn.microsoft.com/directx/sdk/ DirectX SDK]&lt;br /&gt;
* Install the PlatformSDK. I got away with unchecking the parts of the PlatformSDK that were obviously not related (IIS, web stuff). Makes for a smaller download. Make &#039;&#039;&#039;sure&#039;&#039;&#039; the Platform SDK and DirectX SDK are in the VS search/include directories:&lt;br /&gt;
* After installing them, open Visual C++. Click Tools &amp;gt;&amp;gt; Options &amp;gt;&amp;gt; Projects and Solutions &amp;gt;&amp;gt; VC++ Directories. Add these entries to the corresponding sections (paths just a reference, yours may be different):&lt;br /&gt;
**Include files:&lt;br /&gt;
***$(ProgramFiles)\Microsoft DirectX SDK (August 2007)\Include&lt;br /&gt;
***$(ProgramFiles)\Microsoft Platform SDK\include&lt;br /&gt;
**Library files:&lt;br /&gt;
***$(ProgramFiles)\Microsoft DirectX SDK (August 2007)\Lib\x86 (Might need \x64 on a 64-bit platform, I don&#039;t know.)&lt;br /&gt;
***$(ProgramFiles)\Microsoft Platform SDK\lib&lt;br /&gt;
* Open the solution. /spring/rts/build/vstudio8/rts.sln&lt;br /&gt;
* Start building (usually you want to select the release/no debug build, debug is really too slow and is used only when you really know what you want to test)&lt;br /&gt;
* Select the working directory in the project properties, otherwise spring will not work correctly&lt;br /&gt;
&lt;br /&gt;
===Visual Studio 9 (2008)===&lt;br /&gt;
(possibly the free Express Edition)&lt;br /&gt;
&lt;br /&gt;
Not yet fully working as far as I know; you need at least this hotfix from Microsoft though:&lt;br /&gt;
&lt;br /&gt;
http://support.microsoft.com/kb/946040&lt;br /&gt;
&lt;br /&gt;
For the rest the Visual Studio 8 instructions should apply, mostly.&lt;br /&gt;
&lt;br /&gt;
===SCONS/MinGW===&lt;br /&gt;
Code::Blocks and Dev C++ use MinGW too, so if you are using one of these IDEs, you&#039;ll want to follow these instructions too.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Getting the compiler&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Compiling in MinGW requires GCC 4.x which is only available in experimental builds.  [http://www.tdragon.net/recentgcc/ TDM&#039;s experimental MinGW]&lt;br /&gt;
&lt;br /&gt;
If you do not have MinGW installed yet, the easiest way to get it, is to install it together with one of the two IDEs [http://downloads.sourceforge.net/dev-cpp/devcpp-4.9.9.2_setup.exe Dev-C++] or [http://downloads.sourceforge.net/codeblocks/codeblocks-8.02mingw-setup.exe Code::Blocks]. They both come with MinGW 3.4.  After downloading one of the IDEs, move the MinGW subdirectories out of the way.  Install TDM&#039;s experimental MinGW into the Dev-C++ root or codeblocks/mingw.  &lt;br /&gt;
&lt;br /&gt;
Get at least the following packages:&lt;br /&gt;
* mingw-runtime&lt;br /&gt;
* core&lt;br /&gt;
* c++&lt;br /&gt;
* java (if MinGW 4.3.1 is out yet, you dont need this)&lt;br /&gt;
* binutils&lt;br /&gt;
* win32api&lt;br /&gt;
Use [http://spring.jobjol.nl/show_file.php?id=1102 v11 of the MinGW library package] if you have MinGW 4.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compiling spring&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Make sure you install the MinGW library package in the checkout directory, so the path is: /spring/mingwlibs. If done right, it will look like:&lt;br /&gt;
**/spring/&lt;br /&gt;
**/spring/installer&lt;br /&gt;
**/spring/rts&lt;br /&gt;
**/spring/... other dirs&lt;br /&gt;
**/spring/mingwlibs&lt;br /&gt;
&lt;br /&gt;
These programs are a must have if you want to compile Spring with MinGW, so install them now, if you don&#039;t have them already.&lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-210.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-0.96.96.win32.exe Scons 0.96 installer]&lt;br /&gt;
*[http://www.cmake.org/files/v2.6/cmake-2.6.0-win32-x86.exe CMake 2.6 installer]&lt;br /&gt;
&lt;br /&gt;
Oh, and quick instructions:&lt;br /&gt;
&lt;br /&gt;
* Grab and install the above programs.&lt;br /&gt;
* Make sure C:\Python25, C:\Python25\Scripts and C:\Dev-Cpp\bin are in your PATH environment variable. Set environment variables by: Start -&amp;gt; Settings -&amp;gt; Control Panel -&amp;gt; System -&amp;gt; Advanced -&amp;gt; Environment variables (for Windows XP).&lt;br /&gt;
* Make sure a MINGDIR environment variable with value C:\Dev-Cpp exists. (change paths where appropriate.)&lt;br /&gt;
* Checkout the Spring SVN repository, following the instructions above in obtaining source. (TODO:link)&lt;br /&gt;
* Open a console (Start -&amp;gt; Run -&amp;gt; cmd.exe -&amp;gt; Run), cd \where you checked it out in the previous step, if you checked it out on a different drive make sure to change drives with DriveLetter:&amp;lt;enter&amp;gt; first.&lt;br /&gt;
* Type scons configure&amp;lt;enter&amp;gt;. Refer to scons --help for options which can be passed to scons configure. Gotchas:&lt;br /&gt;
** If you get an error message starting with &amp;quot;EOFError: : env = Environement...&amp;quot;, try deleting the file build/scons_signatures.dblite&lt;br /&gt;
** If you get an error message stating &amp;quot;ImportError: No module named win32file:&amp;quot;, you have probably not installed the python-win32-extensions.&lt;br /&gt;
** If all proceeds as intended you will see a message similar to: &amp;quot;Everything seems OK.  Run `scons&#039; now to build.&amp;quot;&lt;br /&gt;
* Type scons&amp;lt;enter&amp;gt; to start the compilation.&lt;br /&gt;
** If you have Delphi installed and get an error message that the commandline params &amp;quot;--no-print-directory&amp;quot; &amp;amp; &amp;quot;-C&amp;quot; aren&#039;t supported, then you should remove the Delphi dirs from your &amp;lt;i&amp;gt;PATH&amp;lt;/i&amp;gt; variable, because scons tried to run the delphi&#039;s make.exe instead of using mingw32-make. (this will cause that streflop can&#039;t be build!)&lt;br /&gt;
* Wait for the compilation to finish, this may take a while.&lt;br /&gt;
* Copy datafiles and stuff from official Spring installation to the /spring/game directory (where spring.exe is located, after the compilation finished.)&lt;br /&gt;
* Copy missing DLLs from mingwlibs/dll.&lt;br /&gt;
* Start developing.&lt;br /&gt;
&lt;br /&gt;
If you are using Linux, refer to the [[SetupGuide]] to build Spring and get it running.&lt;br /&gt;
&lt;br /&gt;
=== CMake/GCC ===&lt;br /&gt;
Currently the CMake scripts are not capable of generating Visual Studio project files, so CMake can only be used for gcc compiling.&lt;br /&gt;
&lt;br /&gt;
* Install CMake (must be at least version 2.6.0) from either www.cmake.org or through your distributions package manager&lt;br /&gt;
* get the source code (from svn, tarballs...)&lt;br /&gt;
==== The GUI method ====&lt;br /&gt;
CMake offers a nice Qt4 gui to ease the following steps (to use the gui explained here, cmake must be at least version 2.6.1). Doing so should be straightforward:&lt;br /&gt;
* select source directory&lt;br /&gt;
* select (and/or create) build directory where temporary files are stored&lt;br /&gt;
* hit configure button&lt;br /&gt;
* choose your build type:&lt;br /&gt;
** Unix makefile if you are using linux and want to compile linux executables&lt;br /&gt;
** mingw makefiles if you are working on windows&lt;br /&gt;
** Unix makefile with cross compiler setup to cross-compile mingw32 executables, you have to select the toolchain file you want to use (see below)&lt;br /&gt;
* configure variables to your need (move the mouse over the options and read the tooltip for further informations on them and or see Section &amp;quot;Options&amp;quot;)&lt;br /&gt;
* push generate button&lt;br /&gt;
* open commandline and do &amp;quot;make&amp;quot; and &amp;quot;make install&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== The commandline method ====&lt;br /&gt;
Only works with the linux version of cmake, and is easiely scriptable.&lt;br /&gt;
* cd to (and/or create) build directory where temporary files are stored&lt;br /&gt;
* &amp;quot;cmake &amp;lt;path to source tree&amp;gt; &amp;lt;options&amp;gt;&amp;quot; where:&lt;br /&gt;
** &amp;lt;path to source tree&amp;gt; is the path to the spring source directory&lt;br /&gt;
**  &amp;lt;options&amp;gt; are defined like &amp;quot;-D&amp;lt;option name&amp;gt;=&amp;lt;value&amp;gt;&lt;br /&gt;
* depending on your settings you may need to run &amp;quot;cmake ...&amp;quot; twice&lt;br /&gt;
* run &amp;quot;make&amp;quot; and &amp;quot;make install&amp;quot;&lt;br /&gt;
* PACKAGE MAINTAINERS:&lt;br /&gt;
** doing &amp;quot;make install DESTDIR=/some/path&amp;quot; will install spring in the specified place, putting files in subdirectories like configured. This may be helpfull when making packages so spring don&#039;T get installed on your system for real (see also CMake FAQ [[http://www.vtk.org/Wiki/CMake_FAQ#Does_CMake.27s_.22make_install.22_support_DESTDIR.3F]]).&lt;br /&gt;
** You need to update the mime database (update-mime-database) and the kde database (kbuildsycoca) after installing to make the system aware of the newly installed mime types and desktop shortcuts.&lt;br /&gt;
&lt;br /&gt;
==== Some Options Explained ====&lt;br /&gt;
* MINGWLIBS: directory where the [http://spring.jobjol.nl/show_file.php?id=1102 v11 of the MinGW library package is] (only needed when compiling with mingw)&lt;br /&gt;
* CMAKE_BUILD_TYPE: either RELEASE, DEBUG, DEBUG2, DEBUG3 which compiler options to use&lt;br /&gt;
* CMAKE_INSTALL_PREFIX: installation prefix (defaults to /usr/local) defines the base directory for installing&lt;br /&gt;
* DATADIR, LIBDIR, BINDIR: where to install data, libraries or binaries (relative paths are based on CMAKE_INSTALL_PREFIX, absolute paths are absolute (DESTDIR is still respected))&lt;br /&gt;
* APPLICATIONS_DIR, MIME_DIR, PIXMAPS_DIR: where to install freedesktop-files (icons, mime-types and application-description)&lt;br /&gt;
&lt;br /&gt;
==== The toolchain file ====&lt;br /&gt;
An example should be self-explainatory:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 # the name of the target operating system&lt;br /&gt;
 SET(CMAKE_SYSTEM_NAME Windows)&lt;br /&gt;
&lt;br /&gt;
 # which compilers to use for C and C++&lt;br /&gt;
 SET(CMAKE_C_COMPILER i686-mingw32-gcc)&lt;br /&gt;
 SET(CMAKE_CXX_COMPILER i686-mingw32-g++)&lt;br /&gt;
&lt;br /&gt;
 # here is the target environment located&lt;br /&gt;
 SET(CMAKE_FIND_ROOT_PATH /usr/i686-mingw32)&lt;br /&gt;
&lt;br /&gt;
 SET(MINGWLIBS /home/karl/spring/mingwlibs_v11)&amp;lt;/code&amp;gt;&lt;br /&gt;
Pass this with &amp;quot;-DCMAKE_TOOLCHAIN_FILE=/your/toolchain/file&amp;quot; to cmake or select it in the gui to make a cross-compilation.&lt;br /&gt;
&lt;br /&gt;
==== Further reference ====&lt;br /&gt;
* CMake FAQ [[http://www.vtk.org/Wiki/CMake_FAQ]]&lt;br /&gt;
* man CMake&lt;br /&gt;
* the CMake documentation (long!) [[http://www.cmake.org/HTML/cmake-2.6.html]]&lt;br /&gt;
&lt;br /&gt;
==Development Suggestions==&lt;br /&gt;
Before starting to make modifications to the source, take a look at the [[development guidelines]] which outlines some important things to think about. To find something interesting to work on, look at [[SpringEngineTODO]]. You can also check the list of [[whois doing what]] to see what others are doing. If you do edit the code, please add [[Doxygen style comments]] to the code, which will then enhance the source code documentation.&lt;br /&gt;
&lt;br /&gt;
==How to get your code included==&lt;br /&gt;
If you create something that you think should be included in the official source tree, you can report a &amp;quot;bug&amp;quot; in [http://spring.clan-sy.com/mantis/ mantis, our BTS]. Add your patch as attachment, and put &amp;quot;[patch]&amp;quot; in front of the subject, so it is easy for us to separate patches from bugs.&lt;br /&gt;
&lt;br /&gt;
It&#039;s also considered standard practice to post one&#039;s modifications in the [http://spring.clan-sy.com/phpbb/viewforum.php?f=12 development forum] and get feedback.&lt;br /&gt;
&lt;br /&gt;
==Spring Engine TODO list==&lt;br /&gt;
There is a TODO list for developers who want to contribute to the engine itself:&lt;br /&gt;
[[SpringEngineTODO]]. There is also a [http://spring.clan-sy.com/phpbb/viewforum.php?f=21 feature request forum], which may give you some ideas. Don&#039;t be overwhelmed by the sheer number of (silly) requests though!&lt;br /&gt;
&lt;br /&gt;
==Development links==&lt;br /&gt;
* [http://planetspring.free.fr/spring/ Automatic installer builds (crosscompiled, mingw)]&lt;br /&gt;
* [http://spring.jobjol.nl/show_file.php?id=860 Spring base content files]&lt;br /&gt;
* [http://developer.berlios.de/projects/taspring-linux BerliOS project page (OLD)]&lt;br /&gt;
* [http://spring.clan-sy.com/mantis Bug Tracking System]&lt;br /&gt;
* [http://buildbot.no-ip.org:8010/ Buildbot]&lt;br /&gt;
* [https://lists.berlios.de/mailman/listinfo/taspring-linux-commit Commit mailing list]&lt;br /&gt;
* [http://spring.clan-sy.com/dl/spring-vc8libs.exe Development libraries for Visual Studio 2005]&lt;br /&gt;
* [http://spring.jobjol.nl/show_file.php?id=1102 Development libraries for MinGW]&lt;br /&gt;
* [http://sourceforge.net/projects/springrts SourceForge project page (OLD)]&lt;br /&gt;
* [http://buildbot.no-ip.org/~buildbot/spring/stacktraceTranslator.php StackTrace Translator]&lt;br /&gt;
* [https://spring.clan-sy.com/svn/spring/trunk/ Subversion repository]&lt;br /&gt;
* [http://spring.clan-sy.com/dl/docs/unitsync/group__unitsync__api.html Unitsync API docs]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/listing.php?repname=spring&amp;amp;path=%2F&amp;amp;sc=0 WebSVN]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/log.php?repname=spring&amp;amp;path=%2F&amp;amp;rev=0&amp;amp;sc=0&amp;amp;isdir=1 WebSVN link to &amp;quot;development log&amp;quot;]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/filedetails.php?repname=spring&amp;amp;path=%2Ftrunk%2FDocumentation%2Fchangelog.txt&amp;amp;rev=0&amp;amp;sc=0 WebSVN link to the most recent changelog.txt]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]] [[Category:Source development]]&lt;/div&gt;</summary>
		<author><name>Altie</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_spring&amp;diff=3729</id>
		<title>Building spring</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_spring&amp;diff=3729"/>
		<updated>2008-11-26T05:32:37Z</updated>

		<summary type="html">&lt;p&gt;Altie: Cleaning up links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;NOTE: Outlined below is information on assisting with the development of the Spring source itself. For information about developing a mod (units, widgets, maps, etc.) see the [[Mod_and_Unit_development]] page.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Even if you are developing a mod, it is highly recommended that you get the engine source. Engine source + full text search: DO IT.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Below you can find information on how to work with the Spring source in the current mainline (Windows platform) if you like to work on another platform (Linux &amp;amp; Mac) please look at the bottem of this page under &amp;quot;Multiplatform development&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Starting Development==&lt;br /&gt;
To start development, you will need&lt;br /&gt;
#To read the [[Coding_Standards]]&lt;br /&gt;
#The latest version of the source &lt;br /&gt;
#A good code manipulation program&lt;br /&gt;
#Compiling your modified source&lt;br /&gt;
&lt;br /&gt;
== Keep track what others do ==&lt;br /&gt;
If you develop with others, you need to know what they do. We have [http://spring.clan-sy.com/fisheye/ fisheye], a very handy SVN helper, and [http://spring.clan-sy.com/websvn/ WebSVN] running on the server.&lt;br /&gt;
&lt;br /&gt;
===Source Code Documentation===&lt;br /&gt;
A good place to start is [http://buildbot.no-ip.org/~buildbot/spring/doxygen the source code documentation].&lt;br /&gt;
&lt;br /&gt;
An explanation on how the code is executed in game can be found in the [[Spring Engine Code]]&lt;br /&gt;
page.&lt;br /&gt;
&lt;br /&gt;
==Obtaining the Source==&lt;br /&gt;
The latest SVN is at: [https://spring.clan-sy.com/svn/spring https://spring.clan-sy.com/svn/spring]&amp;lt;br&amp;gt;&lt;br /&gt;
A hourly updated read-only mirror is available at: svn://caspring.org:3691/&lt;br /&gt;
&lt;br /&gt;
Another option is to manually [http://spring.clan-sy.com/download.php download] it along with the latest released version of the game. However, for serious developers, a better way would be to download the source straight from the subversion (SVN) repository. This will also allow you to make a patch out of the changes you make to the code, and send it to one of the developers with SVN access.&lt;br /&gt;
&lt;br /&gt;
Windows SVN clients : [http://subversion.tigris.org Subversion] (Win32-Console), &lt;br /&gt;
[http://www.syntevo.com/smartsvn/index.jsp SmartSVN] (Java) and [http://tortoisesvn.tigris.org TortoiseSVN] (MSI).&lt;br /&gt;
&lt;br /&gt;
Assuming that you are using the Subversion svn client you can download the latest SVN source with one of the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;svn.exe checkout https://spring.clan-sy.com/svn/spring/trunk&amp;lt;br&amp;gt;&lt;br /&gt;
svn.exe checkout svn://caspring.org:3691/trunk&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will create a trunk subdirectory in the directory from where you ran it, which will contain the source code root directory which will be later referred to as /spring&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using Git rather than SVN, you need to initialize local repository and fetch using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;git-svn clone https://spring.clan-sy.com/svn/spring&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(this may take a while)&lt;br /&gt;
&lt;br /&gt;
To update your local repository, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;git-svn fetch https://spring.clan-sy.com/svn/spring&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Learning C++==&lt;br /&gt;
You will need to know C++ to modify or understand Spring&#039;s source code. If you are interested in learning C++, see [[Learning_CPP]]&lt;br /&gt;
&lt;br /&gt;
However please note that badly designed code (code created by a C++ novice for example), even if working will likely not be included in the spring code. Spring is a large project, and therefore it is necessary to stay away from hack jobs and create general solutions to problems.&lt;br /&gt;
&lt;br /&gt;
==Setting up your development environment==&lt;br /&gt;
You have either to use the SCons build system that is multi platform, or use Microsoft Visual Studio for building spring. See also [[Development_IDEs]] for some more background information about the IDE to choose.&lt;br /&gt;
&lt;br /&gt;
===Visual Studio 8 (2005)===&lt;br /&gt;
(possibly the free Express Edition) &lt;br /&gt;
&lt;br /&gt;
* Install the [http://spring.clan-sy.com/dl/spring-vc8libs.exe vclibs library package]. You need to install this in the /spring directory from the SVN checkout or the zipped source. If done right, it will look like:&lt;br /&gt;
**/spring/&lt;br /&gt;
**/spring/installer&lt;br /&gt;
**/spring/rts&lt;br /&gt;
**/spring/... other dirs&lt;br /&gt;
**/spring/vclibs&lt;br /&gt;
* Install the [http://msdn.microsoft.com/directx/sdk/ DirectX SDK]&lt;br /&gt;
* Install the PlatformSDK. I got away with unchecking the parts of the PlatformSDK that were obviously not related (IIS, web stuff). Makes for a smaller download. Make &#039;&#039;&#039;sure&#039;&#039;&#039; the Platform SDK and DirectX SDK are in the VS search/include directories:&lt;br /&gt;
* After installing them, open Visual C++. Click Tools &amp;gt;&amp;gt; Options &amp;gt;&amp;gt; Projects and Solutions &amp;gt;&amp;gt; VC++ Directories. Add these entries to the corresponding sections (paths just a reference, yours may be different):&lt;br /&gt;
**Include files:&lt;br /&gt;
***$(ProgramFiles)\Microsoft DirectX SDK (August 2007)\Include&lt;br /&gt;
***$(ProgramFiles)\Microsoft Platform SDK\include&lt;br /&gt;
**Library files:&lt;br /&gt;
***$(ProgramFiles)\Microsoft DirectX SDK (August 2007)\Lib\x86 (Might need \x64 on a 64-bit platform, I don&#039;t know.)&lt;br /&gt;
***$(ProgramFiles)\Microsoft Platform SDK\lib&lt;br /&gt;
* Open the solution. /spring/rts/build/vstudio8/rts.sln&lt;br /&gt;
* Start building (usually you want to select the release/no debug build, debug is really too slow and is used only when you really know what you want to test)&lt;br /&gt;
* Select the working directory in the project properties, otherwise spring will not work correctly&lt;br /&gt;
&lt;br /&gt;
===Visual Studio 9 (2008)===&lt;br /&gt;
(possibly the free Express Edition)&lt;br /&gt;
&lt;br /&gt;
Not yet fully working as far as I know; you need at least this hotfix from Microsoft though:&lt;br /&gt;
&lt;br /&gt;
http://support.microsoft.com/kb/946040&lt;br /&gt;
&lt;br /&gt;
For the rest the Visual Studio 8 instructions should apply, mostly.&lt;br /&gt;
&lt;br /&gt;
===SCONS/MinGW===&lt;br /&gt;
Code::Blocks and Dev C++ use MinGW too, so if you are using one of these IDEs, you&#039;ll want to follow these instructions too.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Getting the compiler&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Compiling in MinGW requires GCC 4.x which is only available in experimental builds.  [http://www.tdragon.net/recentgcc/ TDM&#039;s experimental MinGW]&lt;br /&gt;
&lt;br /&gt;
If you do not have MinGW installed yet, the easiest way to get it, is to install it together with one of the two IDEs [http://downloads.sourceforge.net/dev-cpp/devcpp-4.9.9.2_setup.exe Dev-C++] or [http://downloads.sourceforge.net/codeblocks/codeblocks-8.02mingw-setup.exe Code::Blocks]. They both come with MinGW 3.4.  After downloading one of the IDEs, move the MinGW subdirectories out of the way.  Install TDM&#039;s experimental MinGW into the Dev-C++ root or codeblocks/mingw.  &lt;br /&gt;
&lt;br /&gt;
Get at least the following packages:&lt;br /&gt;
* mingw-runtime&lt;br /&gt;
* core&lt;br /&gt;
* c++&lt;br /&gt;
* java (if MinGW 4.3.1 is out yet, you dont need this)&lt;br /&gt;
* binutils&lt;br /&gt;
* win32api&lt;br /&gt;
Use [http://spring.jobjol.nl/show_file.php?id=1102 v11 of the MinGW library package] if you have MinGW 4.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compiling spring&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Make sure you install the MinGW library package in the checkout directory, so the path is: /spring/mingwlibs. If done right, it will look like:&lt;br /&gt;
**/spring/&lt;br /&gt;
**/spring/installer&lt;br /&gt;
**/spring/rts&lt;br /&gt;
**/spring/... other dirs&lt;br /&gt;
**/spring/mingwlibs&lt;br /&gt;
&lt;br /&gt;
These programs are a must have if you want to compile Spring with MinGW, so install them now, if you don&#039;t have them already.&lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-210.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-0.96.96.win32.exe Scons 0.96 installer]&lt;br /&gt;
*[http://www.cmake.org/files/v2.6/cmake-2.6.0-win32-x86.exe CMake 2.6 installer]&lt;br /&gt;
&lt;br /&gt;
Oh, and quick instructions:&lt;br /&gt;
&lt;br /&gt;
* Grab and install the above programs.&lt;br /&gt;
* Make sure C:\Python25, C:\Python25\Scripts and C:\Dev-Cpp\bin are in your PATH environment variable. Set environment variables by: Start -&amp;gt; Settings -&amp;gt; Control Panel -&amp;gt; System -&amp;gt; Advanced -&amp;gt; Environment variables (for Windows XP).&lt;br /&gt;
* Make sure a MINGDIR environment variable with value C:\Dev-Cpp exists. (change paths where appropriate.)&lt;br /&gt;
* Checkout the Spring SVN repository, following the instructions above in obtaining source. (TODO:link)&lt;br /&gt;
* Open a console (Start -&amp;gt; Run -&amp;gt; cmd.exe -&amp;gt; Run), cd \where you checked it out in the previous step, if you checked it out on a different drive make sure to change drives with DriveLetter:&amp;lt;enter&amp;gt; first.&lt;br /&gt;
* Type scons configure&amp;lt;enter&amp;gt;. Refer to scons --help for options which can be passed to scons configure. Gotchas:&lt;br /&gt;
** If you get an error message starting with &amp;quot;EOFError: : env = Environement...&amp;quot;, try deleting the file build/scons_signatures.dblite&lt;br /&gt;
** If you get an error message stating &amp;quot;ImportError: No module named win32file:&amp;quot;, you have probably not installed the python-win32-extensions.&lt;br /&gt;
** If all proceeds as intended you will see a message similar to: &amp;quot;Everything seems OK.  Run `scons&#039; now to build.&amp;quot;&lt;br /&gt;
* Type scons&amp;lt;enter&amp;gt; to start the compilation.&lt;br /&gt;
** If you have Delphi installed and get an error message that the commandline params &amp;quot;--no-print-directory&amp;quot; &amp;amp; &amp;quot;-C&amp;quot; aren&#039;t supported, then you should remove the Delphi dirs from your &amp;lt;i&amp;gt;PATH&amp;lt;/i&amp;gt; variable, because scons tried to run the delphi&#039;s make.exe instead of using mingw32-make. (this will cause that streflop can&#039;t be build!)&lt;br /&gt;
* Wait for the compilation to finish, this may take a while.&lt;br /&gt;
* Copy datafiles and stuff from official Spring installation to the /spring/game directory (where spring.exe is located, after the compilation finished.)&lt;br /&gt;
* Copy missing DLLs from mingwlibs/dll.&lt;br /&gt;
* Start developing.&lt;br /&gt;
&lt;br /&gt;
If you are using Linux, refer to the [[SetupGuide]] to build Spring and get it running.&lt;br /&gt;
&lt;br /&gt;
=== CMake/GCC ===&lt;br /&gt;
Currently the CMake scripts are not capable of generating Visual Studio project files, so CMake can only be used for gcc compiling.&lt;br /&gt;
&lt;br /&gt;
* Install CMake (must be at least version 2.6.0) from either www.cmake.org or through your distributions package manager&lt;br /&gt;
* get the source code (from svn, tarballs...)&lt;br /&gt;
==== The GUI method ====&lt;br /&gt;
CMake offers a nice Qt4 gui to ease the following steps (to use the gui explained here, cmake must be at least version 2.6.1). Doing so should be straightforward:&lt;br /&gt;
* select source directory&lt;br /&gt;
* select (and/or create) build directory where temporary files are stored&lt;br /&gt;
* hit configure button&lt;br /&gt;
* choose your build type:&lt;br /&gt;
** Unix makefile if you are using linux and want to compile linux executables&lt;br /&gt;
** mingw makefiles if you are working on windows&lt;br /&gt;
** Unix makefile with cross compiler setup to cross-compile mingw32 executables, you have to select the toolchain file you want to use (see below)&lt;br /&gt;
* configure variables to your need (move the mouse over the options and read the tooltip for further informations on them and or see Section &amp;quot;Options&amp;quot;)&lt;br /&gt;
* push generate button&lt;br /&gt;
* open commandline and do &amp;quot;make&amp;quot; and &amp;quot;make install&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== The commandline method ====&lt;br /&gt;
Only works with the linux version of cmake, and is easiely scriptable.&lt;br /&gt;
* cd to (and/or create) build directory where temporary files are stored&lt;br /&gt;
* &amp;quot;cmake &amp;lt;path to source tree&amp;gt; &amp;lt;options&amp;gt;&amp;quot; where:&lt;br /&gt;
** &amp;lt;path to source tree&amp;gt; is the path to the spring source directory&lt;br /&gt;
**  &amp;lt;options&amp;gt; are defined like &amp;quot;-D&amp;lt;option name&amp;gt;=&amp;lt;value&amp;gt;&lt;br /&gt;
* depending on your settings you may need to run &amp;quot;cmake ...&amp;quot; twice&lt;br /&gt;
* run &amp;quot;make&amp;quot; and &amp;quot;make install&amp;quot;&lt;br /&gt;
* PACKAGE MAINTAINERS:&lt;br /&gt;
** doing &amp;quot;make install DESTDIR=/some/path&amp;quot; will install spring in the specified place, putting files in subdirectories like configured. This may be helpfull when making packages so spring don&#039;T get installed on your system for real (see also CMake FAQ [[http://www.vtk.org/Wiki/CMake_FAQ#Does_CMake.27s_.22make_install.22_support_DESTDIR.3F]]).&lt;br /&gt;
** You need to update the mime database (update-mime-database) and the kde database (kbuildsycoca) after installing to make the system aware of the newly installed mime types and desktop shortcuts.&lt;br /&gt;
&lt;br /&gt;
==== Some Options Explained ====&lt;br /&gt;
* MINGWLIBS: directory where the [http://spring.jobjol.nl/show_file.php?id=1102 v11 of the MinGW library package is] (only needed when compiling with mingw)&lt;br /&gt;
* CMAKE_BUILD_TYPE: either RELEASE, DEBUG, DEBUG2, DEBUG3 which compiler options to use&lt;br /&gt;
* CMAKE_INSTALL_PREFIX: installation prefix (defaults to /usr/local) defines the base directory for installing&lt;br /&gt;
* DATADIR, LIBDIR, BINDIR: where to install data, libraries or binaries (relative paths are based on CMAKE_INSTALL_PREFIX, absolute paths are absolute (DESTDIR is still respected))&lt;br /&gt;
* APPLICATIONS_DIR, MIME_DIR, PIXMAPS_DIR: where to install freedesktop-files (icons, mime-types and application-description)&lt;br /&gt;
&lt;br /&gt;
==== The toolchain file ====&lt;br /&gt;
An example should be self-explainatory:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 # the name of the target operating system&lt;br /&gt;
 SET(CMAKE_SYSTEM_NAME Windows)&lt;br /&gt;
&lt;br /&gt;
 # which compilers to use for C and C++&lt;br /&gt;
 SET(CMAKE_C_COMPILER i686-mingw32-gcc)&lt;br /&gt;
 SET(CMAKE_CXX_COMPILER i686-mingw32-g++)&lt;br /&gt;
&lt;br /&gt;
 # here is the target environment located&lt;br /&gt;
 SET(CMAKE_FIND_ROOT_PATH /usr/i686-mingw32)&lt;br /&gt;
&lt;br /&gt;
 SET(MINGWLIBS /home/karl/spring/mingwlibs_v11)&amp;lt;/code&amp;gt;&lt;br /&gt;
Pass this with &amp;quot;-DCMAKE_TOOLCHAIN_FILE=/your/toolchain/file&amp;quot; to cmake or select it in the gui to make a cross-compilation.&lt;br /&gt;
&lt;br /&gt;
==== Further reference ====&lt;br /&gt;
* CMake FAQ [[http://www.vtk.org/Wiki/CMake_FAQ]]&lt;br /&gt;
* man CMake&lt;br /&gt;
* the CMake documentation (long!) [[http://www.cmake.org/HTML/cmake-2.6.html]]&lt;br /&gt;
&lt;br /&gt;
==Development Suggestions==&lt;br /&gt;
Before starting to make modifications to the source, take a look at the [[development guidelines]] which outlines some important things to think about. To find something interesting to work on, look at [[SpringEngineTODO]]. You can also check the list of [[whois doing what]] to see what others are doing. If you do edit the code, please add [[Doxygen style comments]] to the code, which will then enhance the source code documentation.&lt;br /&gt;
&lt;br /&gt;
==How to get your code included==&lt;br /&gt;
If you create something that you think should be included in the official source tree, you can report a &amp;quot;bug&amp;quot; in [http://spring.clan-sy.com/mantis/ mantis, our BTS]. Add your patch as attachment, and put &amp;quot;[patch]&amp;quot; in front of the subject, so it is easy for us to separate patches from bugs.&lt;br /&gt;
&lt;br /&gt;
It&#039;s also considered standard practice to post one&#039;s modifications in the [http://spring.clan-sy.com/phpbb/viewforum.php?f=12 development forum] and get feedback.&lt;br /&gt;
&lt;br /&gt;
==Spring Engine TODO list==&lt;br /&gt;
There is a TODO list for developers who want to contribute to the engine itself:&lt;br /&gt;
[[SpringEngineTODO]]. There is also a [http://spring.clan-sy.com/phpbb/viewforum.php?f=21 feature request forum], which may give you some ideas. Don&#039;t be overwhelmed by the sheer number of (silly) requests though!&lt;br /&gt;
&lt;br /&gt;
==Development links==&lt;br /&gt;
* [http://planetspring.free.fr/spring/ Automatic installer builds (crosscompiled, mingw)]&lt;br /&gt;
* [http://spring.jobjol.nl/show_file.php?id=860 Spring base content files]&lt;br /&gt;
* [http://developer.berlios.de/projects/taspring-linux BerliOS project page (OLD)]&lt;br /&gt;
* [http://spring.clan-sy.com/mantis Bug Tracking System]&lt;br /&gt;
* [http://buildbot.no-ip.org:8010/ Buildbot]&lt;br /&gt;
* [https://lists.berlios.de/mailman/listinfo/taspring-linux-commit Commit mailing list]&lt;br /&gt;
* [http://spring.clan-sy.com/dl/spring-vc8libs.exe Development libraries for Visual Studio 2005]&lt;br /&gt;
* [http://www.unknown-files.net/spring/3839/mingwlibsv10/ Development libraries for MinGW]&lt;br /&gt;
* [http://sourceforge.net/projects/springrts SourceForge project page (OLD)]&lt;br /&gt;
* [http://buildbot.no-ip.org/~buildbot/spring/stacktraceTranslator.php StackTrace Translator]&lt;br /&gt;
* [https://spring.clan-sy.com/svn/spring/trunk/ Subversion repository]&lt;br /&gt;
* [http://spring.clan-sy.com/dl/docs/unitsync/group__unitsync__api.html Unitsync API docs]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/listing.php?repname=spring&amp;amp;path=%2F&amp;amp;sc=0 WebSVN]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/log.php?repname=spring&amp;amp;path=%2F&amp;amp;rev=0&amp;amp;sc=0&amp;amp;isdir=1 WebSVN link to &amp;quot;development log&amp;quot;]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/filedetails.php?repname=spring&amp;amp;path=%2Ftrunk%2FDocumentation%2Fchangelog.txt&amp;amp;rev=0&amp;amp;sc=0 WebSVN link to the most recent changelog.txt]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]] [[Category:Source development]]&lt;/div&gt;</summary>
		<author><name>Altie</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_spring&amp;diff=3728</id>
		<title>Building spring</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_spring&amp;diff=3728"/>
		<updated>2008-11-26T05:23:39Z</updated>

		<summary type="html">&lt;p&gt;Altie: Updating with experimental MinGW info and links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;NOTE: Outlined below is information on assisting with the development of the Spring source itself. For information about developing a mod (units, widgets, maps, etc.) see the [[Mod_and_Unit_development]] page.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Even if you are developing a mod, it is highly recommended that you get the engine source. Engine source + full text search: DO IT.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Below you can find information on how to work with the Spring source in the current mainline (Windows platform) if you like to work on another platform (Linux &amp;amp; Mac) please look at the bottem of this page under &amp;quot;Multiplatform development&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Starting Development==&lt;br /&gt;
To start development, you will need&lt;br /&gt;
#To read the [[Coding_Standards]]&lt;br /&gt;
#The latest version of the source &lt;br /&gt;
#A good code manipulation program&lt;br /&gt;
#Compiling your modified source&lt;br /&gt;
&lt;br /&gt;
== Keep track what others do ==&lt;br /&gt;
If you develop with others, you need to know what they do. We have [http://spring.clan-sy.com/fisheye/ fisheye], a very handy SVN helper, and [http://spring.clan-sy.com/websvn/ WebSVN] running on the server.&lt;br /&gt;
&lt;br /&gt;
===Source Code Documentation===&lt;br /&gt;
A good place to start is [http://buildbot.no-ip.org/~buildbot/spring/doxygen the source code documentation].&lt;br /&gt;
&lt;br /&gt;
An explanation on how the code is executed in game can be found in the [[Spring Engine Code]]&lt;br /&gt;
page.&lt;br /&gt;
&lt;br /&gt;
==Obtaining the Source==&lt;br /&gt;
The latest SVN is at: [https://spring.clan-sy.com/svn/spring https://spring.clan-sy.com/svn/spring]&amp;lt;br&amp;gt;&lt;br /&gt;
A hourly updated read-only mirror is available at: svn://caspring.org:3691/&lt;br /&gt;
&lt;br /&gt;
Another option is to manually [http://spring.clan-sy.com/download.php download] it along with the latest released version of the game. However, for serious developers, a better way would be to download the source straight from the subversion (SVN) repository. This will also allow you to make a patch out of the changes you make to the code, and send it to one of the developers with SVN access.&lt;br /&gt;
&lt;br /&gt;
Windows SVN clients : [http://subversion.tigris.org Subversion] (Win32-Console), &lt;br /&gt;
[http://www.syntevo.com/smartsvn/index.jsp SmartSVN] (Java) and [http://tortoisesvn.tigris.org TortoiseSVN] (MSI).&lt;br /&gt;
&lt;br /&gt;
Assuming that you are using the Subversion svn client you can download the latest SVN source with one of the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;svn.exe checkout https://spring.clan-sy.com/svn/spring/trunk&amp;lt;br&amp;gt;&lt;br /&gt;
svn.exe checkout svn://caspring.org:3691/trunk&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will create a trunk subdirectory in the directory from where you ran it, which will contain the source code root directory which will be later referred to as /spring&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using Git rather than SVN, you need to initialize local repository and fetch using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;git-svn clone https://spring.clan-sy.com/svn/spring&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(this may take a while)&lt;br /&gt;
&lt;br /&gt;
To update your local repository, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;git-svn fetch https://spring.clan-sy.com/svn/spring&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Learning C++==&lt;br /&gt;
You will need to know C++ to modify or understand Spring&#039;s source code. If you are interested in learning C++, see [[Learning_CPP]]&lt;br /&gt;
&lt;br /&gt;
However please note that badly designed code (code created by a C++ novice for example), even if working will likely not be included in the spring code. Spring is a large project, and therefore it is necessary to stay away from hack jobs and create general solutions to problems.&lt;br /&gt;
&lt;br /&gt;
==Setting up your development environment==&lt;br /&gt;
You have either to use the SCons build system that is multi platform, or use Microsoft Visual Studio for building spring. See also [[Development_IDEs]] for some more background information about the IDE to choose.&lt;br /&gt;
&lt;br /&gt;
===Visual Studio 8 (2005)===&lt;br /&gt;
(possibly the free Express Edition) &lt;br /&gt;
&lt;br /&gt;
* Install the [http://spring.clan-sy.com/dl/spring-vc8libs.exe vclibs library package]. You need to install this in the /spring directory from the SVN checkout or the zipped source. If done right, it will look like:&lt;br /&gt;
**/spring/&lt;br /&gt;
**/spring/installer&lt;br /&gt;
**/spring/rts&lt;br /&gt;
**/spring/... other dirs&lt;br /&gt;
**/spring/vclibs&lt;br /&gt;
* Install the [http://msdn.microsoft.com/directx/sdk/ DirectX SDK]&lt;br /&gt;
* Install the PlatformSDK. I got away with unchecking the parts of the PlatformSDK that were obviously not related (IIS, web stuff). Makes for a smaller download. Make &#039;&#039;&#039;sure&#039;&#039;&#039; the Platform SDK and DirectX SDK are in the VS search/include directories:&lt;br /&gt;
* After installing them, open Visual C++. Click Tools &amp;gt;&amp;gt; Options &amp;gt;&amp;gt; Projects and Solutions &amp;gt;&amp;gt; VC++ Directories. Add these entries to the corresponding sections (paths just a reference, yours may be different):&lt;br /&gt;
**Include files:&lt;br /&gt;
***$(ProgramFiles)\Microsoft DirectX SDK (August 2007)\Include&lt;br /&gt;
***$(ProgramFiles)\Microsoft Platform SDK\include&lt;br /&gt;
**Library files:&lt;br /&gt;
***$(ProgramFiles)\Microsoft DirectX SDK (August 2007)\Lib\x86 (Might need \x64 on a 64-bit platform, I don&#039;t know.)&lt;br /&gt;
***$(ProgramFiles)\Microsoft Platform SDK\lib&lt;br /&gt;
* Open the solution. /spring/rts/build/vstudio8/rts.sln&lt;br /&gt;
* Start building (usually you want to select the release/no debug build, debug is really too slow and is used only when you really know what you want to test)&lt;br /&gt;
* Select the working directory in the project properties, otherwise spring will not work correctly&lt;br /&gt;
&lt;br /&gt;
===Visual Studio 9 (2008)===&lt;br /&gt;
(possibly the free Express Edition)&lt;br /&gt;
&lt;br /&gt;
Not yet fully working as far as I know; you need at least this hotfix from Microsoft though:&lt;br /&gt;
&lt;br /&gt;
http://support.microsoft.com/kb/946040&lt;br /&gt;
&lt;br /&gt;
For the rest the Visual Studio 8 instructions should apply, mostly.&lt;br /&gt;
&lt;br /&gt;
===SCONS/MinGW===&lt;br /&gt;
Code::Blocks and Dev C++ use MinGW too, so if you are using one of these IDEs, you&#039;ll want to follow these instructions too.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Getting the compiler&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Compiling in MinGW requires GCC 4.x which is only available in experimental builds.  [http://www.tdragon.net/recentgcc/ TDM&#039;s experimental MinGW]&lt;br /&gt;
&lt;br /&gt;
If you do not have MinGW installed yet, the easiest way to get it, is to install it together with one of the two IDEs [http://downloads.sourceforge.net/dev-cpp/devcpp-4.9.9.2_setup.exe Dev-C++] or [http://downloads.sourceforge.net/codeblocks/codeblocks-8.02mingw-setup.exe Code::Blocks]. They both come with MinGW 3.4.  After downloading one of the IDEs, move the MinGW subdirectories out of the way.  Install TDM&#039;s experimental MinGW into the Dev-C++ root or codeblocks/mingw.  &lt;br /&gt;
&lt;br /&gt;
Get at least the following packages:&lt;br /&gt;
* mingw-runtime&lt;br /&gt;
* core&lt;br /&gt;
* c++&lt;br /&gt;
* java (if MinGW 4.3.1 is out yet, you dont need this)&lt;br /&gt;
* binutils&lt;br /&gt;
* win32api&lt;br /&gt;
Use [http://spring.jobjol.nl/show_file.php?id=1102 v11 of the MinGW library package] if you have MinGW 4.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compiling spring&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Make sure you install the MinGW library package in the checkout directory, so the path is: /spring/mingwlibs. If done right, it will look like:&lt;br /&gt;
**/spring/&lt;br /&gt;
**/spring/installer&lt;br /&gt;
**/spring/rts&lt;br /&gt;
**/spring/... other dirs&lt;br /&gt;
**/spring/mingwlibs&lt;br /&gt;
&lt;br /&gt;
These programs are a must have if you want to compile Spring with MinGW, so install them now, if you don&#039;t have them already.&lt;br /&gt;
&lt;br /&gt;
*[http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-210.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-0.96.96.win32.exe Scons 0.96 installer]&lt;br /&gt;
*[http://www.cmake.org/files/v2.6/cmake-2.6.0-win32-x86.exe CMake 2.6 installer]&lt;br /&gt;
&lt;br /&gt;
Oh, and quick instructions:&lt;br /&gt;
&lt;br /&gt;
* Grab and install the above programs.&lt;br /&gt;
* Make sure C:\Python25, C:\Python25\Scripts and C:\Dev-Cpp\bin are in your PATH environment variable. Set environment variables by: Start -&amp;gt; Settings -&amp;gt; Control Panel -&amp;gt; System -&amp;gt; Advanced -&amp;gt; Environment variables (for Windows XP).&lt;br /&gt;
* Make sure a MINGDIR environment variable with value C:\Dev-Cpp exists. (change paths where appropriate.)&lt;br /&gt;
* Checkout the Spring SVN repository, following the instructions above in obtaining source. (TODO:link)&lt;br /&gt;
* Open a console (Start -&amp;gt; Run -&amp;gt; cmd.exe -&amp;gt; Run), cd \where you checked it out in the previous step, if you checked it out on a different drive make sure to change drives with DriveLetter:&amp;lt;enter&amp;gt; first.&lt;br /&gt;
* Type scons configure&amp;lt;enter&amp;gt;. Refer to scons --help for options which can be passed to scons configure. Gotchas:&lt;br /&gt;
** If you get an error message starting with &amp;quot;EOFError: : env = Environement...&amp;quot;, try deleting the file build/scons_signatures.dblite&lt;br /&gt;
** If you get an error message stating &amp;quot;ImportError: No module named win32file:&amp;quot;, you have probably not installed the python-win32-extensions.&lt;br /&gt;
** If all proceeds as intended you will see a message similar to: &amp;quot;Everything seems OK.  Run `scons&#039; now to build.&amp;quot;&lt;br /&gt;
* Type scons&amp;lt;enter&amp;gt; to start the compilation.&lt;br /&gt;
** If you have Delphi installed and get an error message that the commandline params &amp;quot;--no-print-directory&amp;quot; &amp;amp; &amp;quot;-C&amp;quot; aren&#039;t supported, then you should remove the Delphi dirs from your &amp;lt;i&amp;gt;PATH&amp;lt;/i&amp;gt; variable, because scons tried to run the delphi&#039;s make.exe instead of using mingw32-make. (this will cause that streflop can&#039;t be build!)&lt;br /&gt;
* Wait for the compilation to finish, this may take a while.&lt;br /&gt;
* Copy datafiles and stuff from official Spring installation to the /spring/game directory (where spring.exe is located, after the compilation finished.)&lt;br /&gt;
* Copy missing DLLs from mingwlibs/dll.&lt;br /&gt;
* Start developing.&lt;br /&gt;
&lt;br /&gt;
If you are using Linux, refer to the [[SetupGuide]] to build Spring and get it running.&lt;br /&gt;
&lt;br /&gt;
=== CMake/GCC ===&lt;br /&gt;
Currently the CMake scripts are not capable of generating Visual Studio project files, so CMake can only be used for gcc compiling.&lt;br /&gt;
&lt;br /&gt;
* Install CMake (must be at least version 2.6.0) from either www.cmake.org or through your distributions package manager&lt;br /&gt;
* get the source code (from svn, tarballs...)&lt;br /&gt;
==== The GUI method ====&lt;br /&gt;
CMake offers a nice Qt4 gui to ease the following steps (to use the gui explained here, cmake must be at least version 2.6.1). Doing so should be straightforward:&lt;br /&gt;
* select source directory&lt;br /&gt;
* select (and/or create) build directory where temporary files are stored&lt;br /&gt;
* hit configure button&lt;br /&gt;
* choose your build type:&lt;br /&gt;
** Unix makefile if you are using linux and want to compile linux executables&lt;br /&gt;
** mingw makefiles if you are working on windows&lt;br /&gt;
** Unix makefile with cross compiler setup to cross-compile mingw32 executables, you have to select the toolchain file you want to use (see below)&lt;br /&gt;
* configure variables to your need (move the mouse over the options and read the tooltip for further informations on them and or see Section &amp;quot;Options&amp;quot;)&lt;br /&gt;
* push generate button&lt;br /&gt;
* open commandline and do &amp;quot;make&amp;quot; and &amp;quot;make install&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== The commandline method ====&lt;br /&gt;
Only works with the linux version of cmake, and is easiely scriptable.&lt;br /&gt;
* cd to (and/or create) build directory where temporary files are stored&lt;br /&gt;
* &amp;quot;cmake &amp;lt;path to source tree&amp;gt; &amp;lt;options&amp;gt;&amp;quot; where:&lt;br /&gt;
** &amp;lt;path to source tree&amp;gt; is the path to the spring source directory&lt;br /&gt;
**  &amp;lt;options&amp;gt; are defined like &amp;quot;-D&amp;lt;option name&amp;gt;=&amp;lt;value&amp;gt;&lt;br /&gt;
* depending on your settings you may need to run &amp;quot;cmake ...&amp;quot; twice&lt;br /&gt;
* run &amp;quot;make&amp;quot; and &amp;quot;make install&amp;quot;&lt;br /&gt;
* PACKAGE MAINTAINERS:&lt;br /&gt;
** doing &amp;quot;make install DESTDIR=/some/path&amp;quot; will install spring in the specified place, putting files in subdirectories like configured. This may be helpfull when making packages so spring don&#039;T get installed on your system for real (see also CMake FAQ [[http://www.vtk.org/Wiki/CMake_FAQ#Does_CMake.27s_.22make_install.22_support_DESTDIR.3F]]).&lt;br /&gt;
** You need to update the mime database (update-mime-database) and the kde database (kbuildsycoca) after installing to make the system aware of the newly installed mime types and desktop shortcuts.&lt;br /&gt;
&lt;br /&gt;
==== Some Options Explained ====&lt;br /&gt;
* MINGWLIBS: directory where the [http://spring.jobjol.nl/show_file.php?id=1102 v11 of the MinGW library package is] (only needed when compiling with mingw)&lt;br /&gt;
* CMAKE_BUILD_TYPE: either RELEASE, DEBUG, DEBUG2, DEBUG3 which compiler options to use&lt;br /&gt;
* CMAKE_INSTALL_PREFIX: installation prefix (defaults to /usr/local) defines the base directory for installing&lt;br /&gt;
* DATADIR, LIBDIR, BINDIR: where to install data, libraries or binaries (relative paths are based on CMAKE_INSTALL_PREFIX, absolute paths are absolute (DESTDIR is still respected))&lt;br /&gt;
* APPLICATIONS_DIR, MIME_DIR, PIXMAPS_DIR: where to install freedesktop-files (icons, mime-types and application-description)&lt;br /&gt;
&lt;br /&gt;
==== The toolchain file ====&lt;br /&gt;
An example should be self-explainatory:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 # the name of the target operating system&lt;br /&gt;
 SET(CMAKE_SYSTEM_NAME Windows)&lt;br /&gt;
&lt;br /&gt;
 # which compilers to use for C and C++&lt;br /&gt;
 SET(CMAKE_C_COMPILER i686-mingw32-gcc)&lt;br /&gt;
 SET(CMAKE_CXX_COMPILER i686-mingw32-g++)&lt;br /&gt;
&lt;br /&gt;
 # here is the target environment located&lt;br /&gt;
 SET(CMAKE_FIND_ROOT_PATH /usr/i686-mingw32)&lt;br /&gt;
&lt;br /&gt;
 SET(MINGWLIBS /home/karl/spring/mingwlibs_v11)&amp;lt;/code&amp;gt;&lt;br /&gt;
Pass this with &amp;quot;-DCMAKE_TOOLCHAIN_FILE=/your/toolchain/file&amp;quot; to cmake or select it in the gui to make a cross-compilation.&lt;br /&gt;
&lt;br /&gt;
==== Further reference ====&lt;br /&gt;
* CMake FAQ [[http://www.vtk.org/Wiki/CMake_FAQ]]&lt;br /&gt;
* man CMake&lt;br /&gt;
* the CMake documentation (long!) [[http://www.cmake.org/HTML/cmake-2.6.html]]&lt;br /&gt;
&lt;br /&gt;
==Development Suggestions==&lt;br /&gt;
Before starting to make modifications to the source, take a look at the [[development guidelines]] which outlines some important things to think about. To find something interesting to work on, look at [[SpringEngineTODO]]. You can also check the list of [[whois doing what]] to see what others are doing. If you do edit the code, please add [[Doxygen style comments]] to the code, which will then enhance the source code documentation.&lt;br /&gt;
&lt;br /&gt;
==How to get your code included==&lt;br /&gt;
If you create something that you think should be included in the official source tree, you can report a &amp;quot;bug&amp;quot; in [http://spring.clan-sy.com/mantis/ mantis, our BTS]. Add your patch as attachment, and put &amp;quot;[patch]&amp;quot; in front of the subject, so it is easy for us to separate patches from bugs.&lt;br /&gt;
&lt;br /&gt;
It&#039;s also considered standard practice to post one&#039;s modifications in the [http://spring.clan-sy.com/phpbb/viewforum.php?f=12 development forum] and get feedback.&lt;br /&gt;
&lt;br /&gt;
==Spring Engine TODO list==&lt;br /&gt;
There is a TODO list for developers who want to contribute to the engine itself:&lt;br /&gt;
[[SpringEngineTODO]]. There is also a [http://spring.clan-sy.com/phpbb/viewforum.php?f=21 feature request forum], which may give you some ideas. Don&#039;t be overwhelmed by the sheer number of (silly) requests though!&lt;br /&gt;
&lt;br /&gt;
==Development links==&lt;br /&gt;
* [http://planetspring.free.fr/spring/ Automatic installer builds (crosscompiled, mingw)]&lt;br /&gt;
* [http://spring.jobjol.nl/show_file.php?id=860 Spring base content files]&lt;br /&gt;
* [http://developer.berlios.de/projects/taspring-linux BerliOS project page (OLD)]&lt;br /&gt;
* [http://spring.clan-sy.com/mantis Bug Tracking System]&lt;br /&gt;
* [http://buildbot.no-ip.org:8010/ Buildbot]&lt;br /&gt;
* [https://lists.berlios.de/mailman/listinfo/taspring-linux-commit Commit mailing list]&lt;br /&gt;
* [http://spring.clan-sy.com/dl/spring-vc8libs.exe Development libraries for Visual Studio 2005]&lt;br /&gt;
* [http://www.unknown-files.net/spring/3839/mingwlibsv10/ Development libraries for MinGW]&lt;br /&gt;
* [http://lolut.utbm.info/cgi-bin/mailman/listinfo/taspring-linux Developers mailing list (practically dead, use this forum instead) (DOWN)]&lt;br /&gt;
* [http://buildbot.no-ip.org/~buildbot/spring/doxygen Doxygen pages of the latest source (regenerated nightly, currently DOWN)]&lt;br /&gt;
* [http://spring.clan-sy.com/fisheye Fisheye interface to SVN]&lt;br /&gt;
* [http://sourceforge.net/projects/springrts SourceForge project page (OLD)]&lt;br /&gt;
* [http://buildbot.no-ip.org/~buildbot/spring/stacktraceTranslator.php StackTrace Translator]&lt;br /&gt;
* [https://spring.clan-sy.com/svn/spring/trunk/ Subversion repository]&lt;br /&gt;
* [http://spring.clan-sy.com/dl/docs/unitsync/group__unitsync__api.html Unitsync API docs]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/listing.php?repname=spring&amp;amp;path=%2F&amp;amp;sc=0 WebSVN]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/log.php?repname=spring&amp;amp;path=%2F&amp;amp;rev=0&amp;amp;sc=0&amp;amp;isdir=1 WebSVN link to &amp;quot;development log&amp;quot;]&lt;br /&gt;
* [http://spring.clan-sy.com/websvn/filedetails.php?repname=spring&amp;amp;path=%2Ftrunk%2FDocumentation%2Fchangelog.txt&amp;amp;rev=0&amp;amp;sc=0 WebSVN link to the most recent changelog.txt]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]] [[Category:Source development]]&lt;/div&gt;</summary>
		<author><name>Altie</name></author>
	</entry>
</feed>