<?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=Spliff</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=Spliff"/>
	<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/wiki/Special:Contributions/Spliff"/>
	<updated>2026-11-08T17:59:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=3DModels:Textures&amp;diff=314</id>
		<title>3DModels:Textures</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=3DModels:Textures&amp;diff=314"/>
		<updated>2013-04-10T04:08:58Z</updated>

		<summary type="html">&lt;p&gt;Spliff: /* Textures for S3O */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Game_and_Unit_development|Game Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
==Textures for S3O==&lt;br /&gt;
&lt;br /&gt;
S3O has some tricky bits.  One of them is learning to use the right texture formats to achieve your goals.  Luckily for would-be content developers, Spring is very forgiving about image file-types, and allows users to make use of the TGA, PNG, BMP and DDS image file formats.&lt;br /&gt;
&lt;br /&gt;
S3Os that are being rendered with Spring&#039;s ARB shaders (i.e., the default rendering pipeline) have &amp;lt;u&amp;gt;two&amp;lt;/u&amp;gt; textures, each of which is supposed to be RGBA, not just RGB- i.e., 32-bit, not 24-bit.  The alpha channel, which something many new modelers / painters aren&#039;t familiar with, has specific uses.  If you don&#039;t know what an alpha channel is, please Google it and read a bit before continuing with this lesson.&lt;br /&gt;
&lt;br /&gt;
===Texture1=== &lt;br /&gt;
&lt;br /&gt;
This texture is used to store the color values of the model (i.e., what people usually call the &amp;quot;skin&amp;quot;) and the team-color values are stored in the alpha channel, as a grayscale, where white is pure team-color, black is none at all, and all gray values are in between.  This is blended with the color values, reflective and glow values to arrive at a final color in the engine.  Until you have more experience with graphics programming, it&#039;s enough to know that if you don&#039;t put any colors into your alpha channel, the model won&#039;t have team-color, and if you fill it with white, you will not see your colors at all.&lt;br /&gt;
&lt;br /&gt;
===Texture2===&lt;br /&gt;
&lt;br /&gt;
This is the &amp;quot;secondary&amp;quot; texture, but it is probably the most important, in terms of your final quality.  &lt;br /&gt;
&lt;br /&gt;
This texture uses RGBA, just like Texture1, but it uses each color channel indepedently, due to the way the ARB shader works.  If you haven&#039;t learned to view the Channels in your images yet, this is where you should start learning, right now.  To get the most out of this area of Spring (or for that matter, practically any game engine these days) it&#039;s important to understand how to work with image channels for precise control over the color values of any given pixel.&lt;br /&gt;
&lt;br /&gt;
Green values are reflectivity.  The more green in a given pixel, the more reflective it will be.&lt;br /&gt;
&lt;br /&gt;
Red values are glow.  The more red in a given pixel, the more glow it will have, overriding the light levels in a scene.  A white Texture1 pixel with a totally red Texture2 pixel will always be completely white, no matter what.&lt;br /&gt;
&lt;br /&gt;
Blue values do not have a use, in the standard ARB shader.  There are variants of the ARB shader available, where the blue value does various things.  These derivative versions of Spring&#039;s ARB shader code are Open Source, so please ask around if you want to know more about these, people will be happy to share them with you.&lt;br /&gt;
&lt;br /&gt;
The alpha channel is one bit, if you&#039;re using Spring&#039;s default ARB shader.  Black pixels == &amp;quot;clear&amp;quot;, and will not be rendered at all.  White pixels are &amp;quot;solid&amp;quot;.  This can be used to create &amp;quot;holes&amp;quot; in your models, etc.&lt;br /&gt;
&lt;br /&gt;
===Texture Formats For S3O===&lt;br /&gt;
&lt;br /&gt;
Spring supports TGA, PNG, and DDS.&lt;br /&gt;
&lt;br /&gt;
TGA and PNG have no performance advantages, are rendered upside-down in [[upspring]] (which makes it hard to see if the final model is correct, without running the engine), and take up full texture RAM on the GPU.  Neither format is recommended, but they are easier for newbies to use.&lt;br /&gt;
&lt;br /&gt;
DDS is the preferred image format, and is what UpSpring was designed to use.&lt;br /&gt;
&lt;br /&gt;
===General Guidelines For DDS Textures===&lt;br /&gt;
&lt;br /&gt;
* It is recommended to use DXT5 or DXT3 compression for Texture 1, and DXT1 with alpha channel for Texture2&lt;br /&gt;
* Turn on mipmaps.  You MUST make all of the mipmaps.  Not one, not two, not four... all of them.  This means when making a DDS, it may take a few moments to compress, especially if it&#039;s large.  This is normal, do not be alarmed.&lt;br /&gt;
* If your texture is invisible ingame or is just plain black/white, make sure you have turned on Mipmaps, set a radius and height for your model in UpSpring, and not have pure black or white backgrounds (255,255,255)/(0,0,0), set them to anything other than those.&lt;br /&gt;
* DDS requires specific settings, in order to reduce compression artifacts and sharpen the mipmaps so that the resulting images look their best in Spring.  This gives you much more control over quality than PNG or TGA, where the end-user&#039;s hardware determines what the mipmaps look like (which frequently will look a lot worse than DDS), but it requires some study.&lt;br /&gt;
&lt;br /&gt;
[http://developer.nvidia.com/object/photoshop_dds_plugins.html However, if you have Photoshop, you can just get the nVidia DDS Plugin from here], and use Argh&#039;s DDS compression settings, which work well with DXT1, DXT3 and DXT5 (but are not yet optimized for DXT5 normalmaps). [http://www.wolfegames.com/TA_Section/Standard_DDS_Settings.7z Download that here.]&lt;br /&gt;
&lt;br /&gt;
==Textures - Assimp Model Formats (DAE,MDL,MD3 and others except OBJ)==&lt;br /&gt;
Assimp is a library used by Spring to handle a large variety of common model formats. In general Assimp follows the same rules for textures as S3O models but there are some issues to be aware of - especially with regards to DDS textures.&lt;br /&gt;
&lt;br /&gt;
Assimp supports a metadata file (&amp;lt;modelname&amp;gt;.lua or &amp;lt;modelname&amp;gt;.&amp;lt;model extension&amp;gt;.lua) in the same directory as your model. The file should return a lua table that will be hereafter refered to simply as &#039;metadata&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; It&#039;s important to know that there are 2 seperate texture loading processes. DDS textures are passed directly from Spring to the nv_dds library (NVIDIA DDS Library). All other Assimp textures are handled by Spring&#039;s S30Texture and Bitmap classes which perform loading and editing tasks via the DevIL library. For content developers the primary distinction is that DDS images cannot be modified by Spring and as a consequence &#039;&#039;the metadata properties invertteamcolor and fliptextures have no effect on DDS.&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Unlike S3O models the Assimp loader allows you to define relative paths to your texture in the metadata using the string keys tex1 and tex2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Issue 1:&#039;&#039;&#039; DDS has different coordinates (y-axis flip) from other textures because it was designed for DirectX which is backwards from OpenGL and normal image orientation. Assimp can flip textures for you using fliptextures=true/false in your metadata. By default this value is false. This key has no effect on DDS however (See Note 1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Issue 2:&#039;&#039;&#039; S3O textures use the alpha channel of tex1 for teamcolor however it treats opaque (0 alpha) as full teamcolor. This makes a normal JPG/PNG appear entirely as teamcolor and makes those textures hard to edit in normal tools. Assimp tries to correct this issue by inverting teamcolor automatically so &amp;quot;normal&amp;quot; textures work as expected. If you took a texture from an existing Spring model or created your texture following any existing S3O texture guide then it will be incorrect in Assimp UNLESS you create a metadata file with an invertteamcolor=false telling Assimp to leave it alone. If you create a texture/model from any other source it will just work. As far as Assimp (and common sense) is concerned existing Spring textures are busted and you should probably just invert your alpha channel in an image editor prior to moving content from S3O to Assimp. &#039;&#039;Be aware that DDS are not automatically inverted (or controlled by inverteamcolor) so PNG/JPG and DDS textures may be the inverse of each other for teamcolor (See Note 1)&#039;&#039;. If you convert PNG-&amp;gt;DDS your models may turn red until you invert your alpha in an image editor.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Issue 3:&#039;&#039;&#039; Assimp does not currently handle textures stored inside the model file or &amp;quot;material&amp;quot; properties like specular, diffuse defined in the model. If you want to use the textures stored in an existing model you should extract/export them to normal textures and set them up according to the method used by S3O.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Issue 4:&#039;&#039;&#039; Spring does not currently support per-node/per-piece textures or other multitexture arrangements. Your textures must be per-model and follow the rules for S3O (see above).&lt;br /&gt;
&lt;br /&gt;
==Textures- 3DO (i.e., OTA game ports)==&lt;br /&gt;
Textures are stored in the &amp;lt;b&amp;gt;UnitTextures&amp;lt;/b&amp;gt; directory of your game. They may be Windows .BMP format at 24 bit color depth, or a Targa .TGA file in 32 bit (alpha layer) color depth.&lt;br /&gt;
&lt;br /&gt;
==Rules for textures==&lt;br /&gt;
OTA mods using 3DO models store their textures in a Texture Atlas.  This is a single 2048 / 2048 image that is built by Spring automatically from the small images used as tiles in OTA.  Thus, the total size of all of your 3DO textures cannot exceed 2048 / 2048.  This is rarely a problem, if you&#039;re just porting an OTA mod.&lt;br /&gt;
&lt;br /&gt;
===Logo Textures / Team Color===&lt;br /&gt;
In the case of logo textures, you must edit the file &amp;lt;b&amp;gt;teamtex.txt&amp;lt;/b&amp;gt; in the &amp;lt;b&amp;gt;UnitTextures/tatex&amp;lt;/b&amp;gt; directory (or in your game / mod, as it will overwrite Spring&#039;s values).&lt;br /&gt;
&lt;br /&gt;
Just add the name of your texture to the list, without the &amp;quot;00&amp;quot;. For example, if you wanted to add ArmLogo00.bmp to the team color list, you would put ArmLogo in the teamtex.txt file. The image must have only values in the Red, Blue and Alpha channels, to function correctly as teamcolor- the Green channel should be left black.  So the resulting image will look &amp;quot;purple&amp;quot;.  If you are not experienced working with color channels, ask somebody for help, or read some tutorials.&lt;br /&gt;
&lt;br /&gt;
===Reflections===&lt;br /&gt;
To make a texture reflect its environment, you must create a Targa file with an alpha layer with a program such as the [http://gimp-win.sourceforge.net/stable.html GIMP] or [http://www.adobe.com/products/tryadobe/main.jsp#product=39 Photoshop]. &lt;br /&gt;
&lt;br /&gt;
The procedure is the same as making team-color textures, but with two twists:&lt;br /&gt;
&lt;br /&gt;
1.  &amp;lt;u&amp;gt;Don&#039;t&amp;lt;/u&amp;gt; name the file in the &amp;lt;b&amp;gt;teamtex.txt&amp;lt;/b&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
2.  You can use all four channels- RGBA, for full colors and alpha- and the alpha layer&#039;s white / black values determine how reflective the object is.  If white, that area is totally reflective.  If black, it will not reflect the world at all.  It should be noted that some image editors have trouble setting alpha layers to 100% and cause Spring to display the image as completely black, hence it is suggested you make it about 99%.&lt;br /&gt;
&lt;br /&gt;
===Conversion from .GAF===&lt;br /&gt;
In Total Annihilation textures were stored in /Textures/*.gaf. If you&#039;re porting an old TA mods, there will be hundreds of textures to convert to Spring format. There is an easy way to automatically extract all the texture from all the .gaf into well named .bmp: Download [http://www.planetannihilation.com/bsr/downloads/GAFDump.zip GAF Dump]. Then run GAFDump.exe, from inside the folder your textures are, and with the &#039;&#039;&#039;-b&#039;&#039;&#039; commandline option.&lt;br /&gt;
&lt;br /&gt;
To save yourself some more trouble, we strongly suggest that you use 3DOBleacher to remove all of the &amp;quot;shading&amp;quot; versions of the textures from the mod you&#039;re porting, as well.  This will save a huge amount of space on the Texture Atlas and the final results will look a lot more professional in Spring.  3DOBleacher requires some reading and a lot of work to set up, however.&lt;br /&gt;
&lt;br /&gt;
[[Category:3D Models]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=3DModels:Textures&amp;diff=313</id>
		<title>3DModels:Textures</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=3DModels:Textures&amp;diff=313"/>
		<updated>2013-04-10T04:07:28Z</updated>

		<summary type="html">&lt;p&gt;Spliff: Added breadcrumb&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Game_and_Unit_development|Game Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
==Textures for S3O==&lt;br /&gt;
&lt;br /&gt;
S3O, as the most modern file format for models in the Spring engine, has some tricky bits.  One of them is learning to use the right texture formats to achieve your goals.  Luckily for would-be content developers, Spring is very forgiving about image file-types, and allows users to make use of the TGA, PNG, BMP and DDS image file formats.&lt;br /&gt;
&lt;br /&gt;
S3Os that are being rendered with Spring&#039;s ARB shaders (i.e., the default rendering pipeline) have &amp;lt;u&amp;gt;two&amp;lt;/u&amp;gt; textures, each of which is supposed to be RGBA, not just RGB- i.e., 32-bit, not 24-bit.  The alpha channel, which something many new modelers / painters aren&#039;t familiar with, has specific uses.  If you don&#039;t know what an alpha channel is, please Google it and read a bit before continuing with this lesson.&lt;br /&gt;
&lt;br /&gt;
===Texture1=== &lt;br /&gt;
&lt;br /&gt;
This texture is used to store the color values of the model (i.e., what people usually call the &amp;quot;skin&amp;quot;) and the team-color values are stored in the alpha channel, as a grayscale, where white is pure team-color, black is none at all, and all gray values are in between.  This is blended with the color values, reflective and glow values to arrive at a final color in the engine.  Until you have more experience with graphics programming, it&#039;s enough to know that if you don&#039;t put any colors into your alpha channel, the model won&#039;t have team-color, and if you fill it with white, you will not see your colors at all.&lt;br /&gt;
&lt;br /&gt;
===Texture2===&lt;br /&gt;
&lt;br /&gt;
This is the &amp;quot;secondary&amp;quot; texture, but it is probably the most important, in terms of your final quality.  &lt;br /&gt;
&lt;br /&gt;
This texture uses RGBA, just like Texture1, but it uses each color channel indepedently, due to the way the ARB shader works.  If you haven&#039;t learned to view the Channels in your images yet, this is where you should start learning, right now.  To get the most out of this area of Spring (or for that matter, practically any game engine these days) it&#039;s important to understand how to work with image channels for precise control over the color values of any given pixel.&lt;br /&gt;
&lt;br /&gt;
Green values are reflectivity.  The more green in a given pixel, the more reflective it will be.&lt;br /&gt;
&lt;br /&gt;
Red values are glow.  The more red in a given pixel, the more glow it will have, overriding the light levels in a scene.  A white Texture1 pixel with a totally red Texture2 pixel will always be completely white, no matter what.&lt;br /&gt;
&lt;br /&gt;
Blue values do not have a use, in the standard ARB shader.  There are variants of the ARB shader available, where the blue value does various things.  These derivative versions of Spring&#039;s ARB shader code are Open Source, so please ask around if you want to know more about these, people will be happy to share them with you.&lt;br /&gt;
&lt;br /&gt;
The alpha channel is one bit, if you&#039;re using Spring&#039;s default ARB shader.  Black pixels == &amp;quot;clear&amp;quot;, and will not be rendered at all.  White pixels are &amp;quot;solid&amp;quot;.  This can be used to create &amp;quot;holes&amp;quot; in your models, etc.&lt;br /&gt;
&lt;br /&gt;
===Texture Formats For S3O===&lt;br /&gt;
&lt;br /&gt;
Spring supports TGA, PNG, and DDS.&lt;br /&gt;
&lt;br /&gt;
TGA and PNG have no performance advantages, are rendered upside-down in [[upspring]] (which makes it hard to see if the final model is correct, without running the engine), and take up full texture RAM on the GPU.  Neither format is recommended, but they are easier for newbies to use.&lt;br /&gt;
&lt;br /&gt;
DDS is the preferred image format, and is what UpSpring was designed to use.&lt;br /&gt;
&lt;br /&gt;
===General Guidelines For DDS Textures===&lt;br /&gt;
&lt;br /&gt;
* It is recommended to use DXT5 or DXT3 compression for Texture 1, and DXT1 with alpha channel for Texture2&lt;br /&gt;
* Turn on mipmaps.  You MUST make all of the mipmaps.  Not one, not two, not four... all of them.  This means when making a DDS, it may take a few moments to compress, especially if it&#039;s large.  This is normal, do not be alarmed.&lt;br /&gt;
* If your texture is invisible ingame or is just plain black/white, make sure you have turned on Mipmaps, set a radius and height for your model in UpSpring, and not have pure black or white backgrounds (255,255,255)/(0,0,0), set them to anything other than those.&lt;br /&gt;
* DDS requires specific settings, in order to reduce compression artifacts and sharpen the mipmaps so that the resulting images look their best in Spring.  This gives you much more control over quality than PNG or TGA, where the end-user&#039;s hardware determines what the mipmaps look like (which frequently will look a lot worse than DDS), but it requires some study.&lt;br /&gt;
&lt;br /&gt;
[http://developer.nvidia.com/object/photoshop_dds_plugins.html However, if you have Photoshop, you can just get the nVidia DDS Plugin from here], and use Argh&#039;s DDS compression settings, which work well with DXT1, DXT3 and DXT5 (but are not yet optimized for DXT5 normalmaps). [http://www.wolfegames.com/TA_Section/Standard_DDS_Settings.7z Download that here.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Textures - Assimp Model Formats (DAE,MDL,MD3 and others except OBJ)==&lt;br /&gt;
Assimp is a library used by Spring to handle a large variety of common model formats. In general Assimp follows the same rules for textures as S3O models but there are some issues to be aware of - especially with regards to DDS textures.&lt;br /&gt;
&lt;br /&gt;
Assimp supports a metadata file (&amp;lt;modelname&amp;gt;.lua or &amp;lt;modelname&amp;gt;.&amp;lt;model extension&amp;gt;.lua) in the same directory as your model. The file should return a lua table that will be hereafter refered to simply as &#039;metadata&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; It&#039;s important to know that there are 2 seperate texture loading processes. DDS textures are passed directly from Spring to the nv_dds library (NVIDIA DDS Library). All other Assimp textures are handled by Spring&#039;s S30Texture and Bitmap classes which perform loading and editing tasks via the DevIL library. For content developers the primary distinction is that DDS images cannot be modified by Spring and as a consequence &#039;&#039;the metadata properties invertteamcolor and fliptextures have no effect on DDS.&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Unlike S3O models the Assimp loader allows you to define relative paths to your texture in the metadata using the string keys tex1 and tex2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Issue 1:&#039;&#039;&#039; DDS has different coordinates (y-axis flip) from other textures because it was designed for DirectX which is backwards from OpenGL and normal image orientation. Assimp can flip textures for you using fliptextures=true/false in your metadata. By default this value is false. This key has no effect on DDS however (See Note 1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Issue 2:&#039;&#039;&#039; S3O textures use the alpha channel of tex1 for teamcolor however it treats opaque (0 alpha) as full teamcolor. This makes a normal JPG/PNG appear entirely as teamcolor and makes those textures hard to edit in normal tools. Assimp tries to correct this issue by inverting teamcolor automatically so &amp;quot;normal&amp;quot; textures work as expected. If you took a texture from an existing Spring model or created your texture following any existing S3O texture guide then it will be incorrect in Assimp UNLESS you create a metadata file with an invertteamcolor=false telling Assimp to leave it alone. If you create a texture/model from any other source it will just work. As far as Assimp (and common sense) is concerned existing Spring textures are busted and you should probably just invert your alpha channel in an image editor prior to moving content from S3O to Assimp. &#039;&#039;Be aware that DDS are not automatically inverted (or controlled by inverteamcolor) so PNG/JPG and DDS textures may be the inverse of each other for teamcolor (See Note 1)&#039;&#039;. If you convert PNG-&amp;gt;DDS your models may turn red until you invert your alpha in an image editor.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Issue 3:&#039;&#039;&#039; Assimp does not currently handle textures stored inside the model file or &amp;quot;material&amp;quot; properties like specular, diffuse defined in the model. If you want to use the textures stored in an existing model you should extract/export them to normal textures and set them up according to the method used by S3O.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Issue 4:&#039;&#039;&#039; Spring does not currently support per-node/per-piece textures or other multitexture arrangements. Your textures must be per-model and follow the rules for S3O (see above).&lt;br /&gt;
&lt;br /&gt;
==Textures- 3DO (i.e., OTA game ports)==&lt;br /&gt;
Textures are stored in the &amp;lt;b&amp;gt;UnitTextures&amp;lt;/b&amp;gt; directory of your game. They may be Windows .BMP format at 24 bit color depth, or a Targa .TGA file in 32 bit (alpha layer) color depth.&lt;br /&gt;
&lt;br /&gt;
==Rules for textures==&lt;br /&gt;
OTA mods using 3DO models store their textures in a Texture Atlas.  This is a single 2048 / 2048 image that is built by Spring automatically from the small images used as tiles in OTA.  Thus, the total size of all of your 3DO textures cannot exceed 2048 / 2048.  This is rarely a problem, if you&#039;re just porting an OTA mod.&lt;br /&gt;
&lt;br /&gt;
===Logo Textures / Team Color===&lt;br /&gt;
In the case of logo textures, you must edit the file &amp;lt;b&amp;gt;teamtex.txt&amp;lt;/b&amp;gt; in the &amp;lt;b&amp;gt;UnitTextures/tatex&amp;lt;/b&amp;gt; directory (or in your game / mod, as it will overwrite Spring&#039;s values).&lt;br /&gt;
&lt;br /&gt;
Just add the name of your texture to the list, without the &amp;quot;00&amp;quot;. For example, if you wanted to add ArmLogo00.bmp to the team color list, you would put ArmLogo in the teamtex.txt file. The image must have only values in the Red, Blue and Alpha channels, to function correctly as teamcolor- the Green channel should be left black.  So the resulting image will look &amp;quot;purple&amp;quot;.  If you are not experienced working with color channels, ask somebody for help, or read some tutorials.&lt;br /&gt;
&lt;br /&gt;
===Reflections===&lt;br /&gt;
To make a texture reflect its environment, you must create a Targa file with an alpha layer with a program such as the [http://gimp-win.sourceforge.net/stable.html GIMP] or [http://www.adobe.com/products/tryadobe/main.jsp#product=39 Photoshop]. &lt;br /&gt;
&lt;br /&gt;
The procedure is the same as making team-color textures, but with two twists:&lt;br /&gt;
&lt;br /&gt;
1.  &amp;lt;u&amp;gt;Don&#039;t&amp;lt;/u&amp;gt; name the file in the &amp;lt;b&amp;gt;teamtex.txt&amp;lt;/b&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
2.  You can use all four channels- RGBA, for full colors and alpha- and the alpha layer&#039;s white / black values determine how reflective the object is.  If white, that area is totally reflective.  If black, it will not reflect the world at all.  It should be noted that some image editors have trouble setting alpha layers to 100% and cause Spring to display the image as completely black, hence it is suggested you make it about 99%.&lt;br /&gt;
&lt;br /&gt;
===Conversion from .GAF===&lt;br /&gt;
In Total Annihilation textures were stored in /Textures/*.gaf. If you&#039;re porting an old TA mods, there will be hundreds of textures to convert to Spring format. There is an easy way to automatically extract all the texture from all the .gaf into well named .bmp: Download [http://www.planetannihilation.com/bsr/downloads/GAFDump.zip GAF Dump]. Then run GAFDump.exe, from inside the folder your textures are, and with the &#039;&#039;&#039;-b&#039;&#039;&#039; commandline option.&lt;br /&gt;
&lt;br /&gt;
To save yourself some more trouble, we strongly suggest that you use 3DOBleacher to remove all of the &amp;quot;shading&amp;quot; versions of the textures from the mod you&#039;re porting, as well.  This will save a huge amount of space on the Texture Atlas and the final results will look a lot more professional in Spring.  3DOBleacher requires some reading and a lot of work to set up, however.&lt;br /&gt;
&lt;br /&gt;
[[Category:3D Models]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Assimp&amp;diff=2169</id>
		<title>Assimp</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Assimp&amp;diff=2169"/>
		<updated>2013-04-10T03:55:52Z</updated>

		<summary type="html">&lt;p&gt;Spliff: /* Assimp Textures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Game_and_Unit_development|Game Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
=Assimp=&lt;br /&gt;
Open Asset Import Library (short name: Assimp) is used in Spring for loading a number of model formats including Collada &amp;amp; 3ds (currently obj is parsed by a different codepaths).&lt;br /&gt;
&lt;br /&gt;
What Spring supports in its Assimp renderer:&lt;br /&gt;
* extended metafile (&amp;lt;code&amp;gt;%modelfilename%.lua&amp;lt;/code&amp;gt; next to the modefile)&lt;br /&gt;
* still uses tex1 &amp;amp; tex2 texture system of S3O (same shader as S3O)&lt;br /&gt;
* 2nd texcoord&lt;br /&gt;
* loading of the texture filepaths from the model (don&#039;t have to be in &amp;lt;code&amp;gt;unittextures/&amp;lt;/code&amp;gt;)&lt;br /&gt;
* when texture filepaths aren&#039;t included in the model, it searches for &amp;lt;code&amp;gt;%modelfilename%.*&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;%modelfilename%2.*&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;unittextures/&amp;lt;/code&amp;gt;&lt;br /&gt;
* special modelpieces `SpringHeight` &amp;amp; `SpringRadius`&lt;br /&gt;
&lt;br /&gt;
=Assimp Textures=&lt;br /&gt;
See [[Units:Textures]] (Assimp Section)&lt;br /&gt;
&lt;br /&gt;
=Blender Workflow Tutorial=&lt;br /&gt;
This is a stub containing a simple outline of a Blender workflow. Disclaimer: I&#039;m no modeling expert, there may be a better way to do this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;&#039;&#039;&#039;1)&#039;&#039;&#039; Open an existing Blender model or import a different format through the File menu (File &amp;gt; Import).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;&#039;&#039;&#039;2)&#039;&#039;&#039; In the 3D view, at the top right, there will be a &#039;+&#039; icon. click this &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt; [[File:3-12-2013 5-02-21 PM.pngâ€Žâ€Ž|secret panel]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;&#039;&#039;&#039;3)&#039;&#039;&#039; In that panel, select Display &amp;gt; Shading &amp;gt; GLSL &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[File:3-12-2013 5-02-04 PM.pngâ€Žâ€Ž|display settings]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;&#039;&#039;&#039;4)&#039;&#039;&#039; Make sure you have a lamp in your scene while in this mode or your model will be dark.&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt; [[File:3-12-2013_5-11-14_PM.pngâ€Žâ€Ž|blend light source]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;&#039;&#039;&#039;5)&#039;&#039;&#039; Applying texture: &lt;br /&gt;
## In the UV/Image editor, click the image icon (Tooltip: Browse Image to be linked) to select your texture. If it&#039;s not there, click on Image &amp;gt; Open Image to browse for it.&lt;br /&gt;
## In the 3D View, select (right-click) your object and hit Tab to enter Mesh Mode.&lt;br /&gt;
## Hit A to select all your faces.&lt;br /&gt;
## In the 3D View, hit A to select all the faces there and select your image with the image icon. Assuming there&#039;s a UVMap, you should see your texture.&lt;br /&gt;
## If you don&#039;t see any faces you&#039;ll need to add the UVMap to a new texture:&lt;br /&gt;
### In the Properties view click on Textures (checkerboard icon).&lt;br /&gt;
### Click on Add New Texture (plus icon).&lt;br /&gt;
### Select Type = Image or Movie.&lt;br /&gt;
### Under Image, click on the image icon and choose your image file.&lt;br /&gt;
### Under Mapping, select Coordinates = UV.&lt;br /&gt;
### Under Influence &amp;gt; Diffuse, check Color and make sure it&#039;s 1.00.&lt;br /&gt;
## To add a normalmap:&lt;br /&gt;
### Repeat steps 5.1 to 5.5.&lt;br /&gt;
### Under Image Sampling, check Normal Map.&lt;br /&gt;
### Under Influence &amp;gt; Geometry, check Normal. Make sure it.s 1.00.&lt;br /&gt;
## You&#039;ll need to do this for each piece.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;&#039;&#039;&#039;7)&#039;&#039;&#039; Piece hierarchy:&lt;br /&gt;
## Select piece A, hold shift and select piece B. Hit Ctrl+P and it will make piece A a child of piece B.&lt;br /&gt;
## Make sure all the pieces are descending from one single piece.&lt;br /&gt;
# Setting piece origins:&lt;br /&gt;
## Select a piece.&lt;br /&gt;
## Place the 3D cursor where you want the origin to be (left-click).&lt;br /&gt;
## Click on Object &amp;gt; Transform &amp;gt; Origin to 3D Cursor.&lt;br /&gt;
## You can now rotate your pieces:&lt;br /&gt;
### Click on the dropdown &amp;quot;Pivot Center for Rotation/Scaling&amp;quot; and select Individual Origins.&lt;br /&gt;
### Rotate.&lt;br /&gt;
## Repeat this for all your pieces.&lt;br /&gt;
# Save your model.&lt;br /&gt;
# Select all the pieces of your model, ignore the lamp.&lt;br /&gt;
# Click on File &amp;gt; Export &amp;gt; Collada.&lt;br /&gt;
# Check &amp;quot;Export Only Selected&amp;quot; and export.&lt;br /&gt;
# The dae file will be used as your object.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:3D Models]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=3DModels:Textures&amp;diff=312</id>
		<title>3DModels:Textures</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=3DModels:Textures&amp;diff=312"/>
		<updated>2013-04-10T03:49:01Z</updated>

		<summary type="html">&lt;p&gt;Spliff: /* Textures- Assimp added*/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Textures for S3O==&lt;br /&gt;
&lt;br /&gt;
S3O, as the most modern file format for models in the Spring engine, has some tricky bits.  One of them is learning to use the right texture formats to achieve your goals.  Luckily for would-be content developers, Spring is very forgiving about image file-types, and allows users to make use of the TGA, PNG, BMP and DDS image file formats.&lt;br /&gt;
&lt;br /&gt;
S3Os that are being rendered with Spring&#039;s ARB shaders (i.e., the default rendering pipeline) have &amp;lt;u&amp;gt;two&amp;lt;/u&amp;gt; textures, each of which is supposed to be RGBA, not just RGB- i.e., 32-bit, not 24-bit.  The alpha channel, which something many new modelers / painters aren&#039;t familiar with, has specific uses.  If you don&#039;t know what an alpha channel is, please Google it and read a bit before continuing with this lesson.&lt;br /&gt;
&lt;br /&gt;
===Texture1=== &lt;br /&gt;
&lt;br /&gt;
This texture is used to store the color values of the model (i.e., what people usually call the &amp;quot;skin&amp;quot;) and the team-color values are stored in the alpha channel, as a grayscale, where white is pure team-color, black is none at all, and all gray values are in between.  This is blended with the color values, reflective and glow values to arrive at a final color in the engine.  Until you have more experience with graphics programming, it&#039;s enough to know that if you don&#039;t put any colors into your alpha channel, the model won&#039;t have team-color, and if you fill it with white, you will not see your colors at all.&lt;br /&gt;
&lt;br /&gt;
===Texture2===&lt;br /&gt;
&lt;br /&gt;
This is the &amp;quot;secondary&amp;quot; texture, but it is probably the most important, in terms of your final quality.  &lt;br /&gt;
&lt;br /&gt;
This texture uses RGBA, just like Texture1, but it uses each color channel indepedently, due to the way the ARB shader works.  If you haven&#039;t learned to view the Channels in your images yet, this is where you should start learning, right now.  To get the most out of this area of Spring (or for that matter, practically any game engine these days) it&#039;s important to understand how to work with image channels for precise control over the color values of any given pixel.&lt;br /&gt;
&lt;br /&gt;
Green values are reflectivity.  The more green in a given pixel, the more reflective it will be.&lt;br /&gt;
&lt;br /&gt;
Red values are glow.  The more red in a given pixel, the more glow it will have, overriding the light levels in a scene.  A white Texture1 pixel with a totally red Texture2 pixel will always be completely white, no matter what.&lt;br /&gt;
&lt;br /&gt;
Blue values do not have a use, in the standard ARB shader.  There are variants of the ARB shader available, where the blue value does various things.  These derivative versions of Spring&#039;s ARB shader code are Open Source, so please ask around if you want to know more about these, people will be happy to share them with you.&lt;br /&gt;
&lt;br /&gt;
The alpha channel is one bit, if you&#039;re using Spring&#039;s default ARB shader.  Black pixels == &amp;quot;clear&amp;quot;, and will not be rendered at all.  White pixels are &amp;quot;solid&amp;quot;.  This can be used to create &amp;quot;holes&amp;quot; in your models, etc.&lt;br /&gt;
&lt;br /&gt;
===Texture Formats For S3O===&lt;br /&gt;
&lt;br /&gt;
Spring supports TGA, PNG, and DDS.&lt;br /&gt;
&lt;br /&gt;
TGA and PNG have no performance advantages, are rendered upside-down in [[upspring]] (which makes it hard to see if the final model is correct, without running the engine), and take up full texture RAM on the GPU.  Neither format is recommended, but they are easier for newbies to use.&lt;br /&gt;
&lt;br /&gt;
DDS is the preferred image format, and is what UpSpring was designed to use.&lt;br /&gt;
&lt;br /&gt;
===General Guidelines For DDS Textures===&lt;br /&gt;
&lt;br /&gt;
* It is recommended to use DXT5 or DXT3 compression for Texture 1, and DXT1 with alpha channel for Texture2&lt;br /&gt;
* Turn on mipmaps.  You MUST make all of the mipmaps.  Not one, not two, not four... all of them.  This means when making a DDS, it may take a few moments to compress, especially if it&#039;s large.  This is normal, do not be alarmed.&lt;br /&gt;
* If your texture is invisible ingame or is just plain black/white, make sure you have turned on Mipmaps, set a radius and height for your model in UpSpring, and not have pure black or white backgrounds (255,255,255)/(0,0,0), set them to anything other than those.&lt;br /&gt;
* DDS requires specific settings, in order to reduce compression artifacts and sharpen the mipmaps so that the resulting images look their best in Spring.  This gives you much more control over quality than PNG or TGA, where the end-user&#039;s hardware determines what the mipmaps look like (which frequently will look a lot worse than DDS), but it requires some study.&lt;br /&gt;
&lt;br /&gt;
[http://developer.nvidia.com/object/photoshop_dds_plugins.html However, if you have Photoshop, you can just get the nVidia DDS Plugin from here], and use Argh&#039;s DDS compression settings, which work well with DXT1, DXT3 and DXT5 (but are not yet optimized for DXT5 normalmaps). [http://www.wolfegames.com/TA_Section/Standard_DDS_Settings.7z Download that here.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Textures - Assimp Model Formats (DAE,MDL,MD3 and others except OBJ)==&lt;br /&gt;
Assimp is a library used by Spring to handle a large variety of common model formats. In general Assimp follows the same rules for textures as S3O models but there are some issues to be aware of - especially with regards to DDS textures.&lt;br /&gt;
&lt;br /&gt;
Assimp supports a metadata file (&amp;lt;modelname&amp;gt;.lua or &amp;lt;modelname&amp;gt;.&amp;lt;model extension&amp;gt;.lua) in the same directory as your model. The file should return a lua table that will be hereafter refered to simply as &#039;metadata&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note 1:&#039;&#039;&#039; It&#039;s important to know that there are 2 seperate texture loading processes. DDS textures are passed directly from Spring to the nv_dds library (NVIDIA DDS Library). All other Assimp textures are handled by Spring&#039;s S30Texture and Bitmap classes which perform loading and editing tasks via the DevIL library. For content developers the primary distinction is that DDS images cannot be modified by Spring and as a consequence &#039;&#039;the metadata properties invertteamcolor and fliptextures have no effect on DDS.&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Note 2:&#039;&#039;&#039; Unlike S3O models the Assimp loader allows you to define relative paths to your texture in the metadata using the string keys tex1 and tex2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Issue 1:&#039;&#039;&#039; DDS has different coordinates (y-axis flip) from other textures because it was designed for DirectX which is backwards from OpenGL and normal image orientation. Assimp can flip textures for you using fliptextures=true/false in your metadata. By default this value is false. This key has no effect on DDS however (See Note 1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Issue 2:&#039;&#039;&#039; S3O textures use the alpha channel of tex1 for teamcolor however it treats opaque (0 alpha) as full teamcolor. This makes a normal JPG/PNG appear entirely as teamcolor and makes those textures hard to edit in normal tools. Assimp tries to correct this issue by inverting teamcolor automatically so &amp;quot;normal&amp;quot; textures work as expected. If you took a texture from an existing Spring model or created your texture following any existing S3O texture guide then it will be incorrect in Assimp UNLESS you create a metadata file with an invertteamcolor=false telling Assimp to leave it alone. If you create a texture/model from any other source it will just work. As far as Assimp (and common sense) is concerned existing Spring textures are busted and you should probably just invert your alpha channel in an image editor prior to moving content from S3O to Assimp. &#039;&#039;Be aware that DDS are not automatically inverted (or controlled by inverteamcolor) so PNG/JPG and DDS textures may be the inverse of each other for teamcolor (See Note 1)&#039;&#039;. If you convert PNG-&amp;gt;DDS your models may turn red until you invert your alpha in an image editor.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Issue 3:&#039;&#039;&#039; Assimp does not currently handle textures stored inside the model file or &amp;quot;material&amp;quot; properties like specular, diffuse defined in the model. If you want to use the textures stored in an existing model you should extract/export them to normal textures and set them up according to the method used by S3O.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Issue 4:&#039;&#039;&#039; Spring does not currently support per-node/per-piece textures or other multitexture arrangements. Your textures must be per-model and follow the rules for S3O (see above).&lt;br /&gt;
&lt;br /&gt;
==Textures- 3DO (i.e., OTA game ports)==&lt;br /&gt;
Textures are stored in the &amp;lt;b&amp;gt;UnitTextures&amp;lt;/b&amp;gt; directory of your game. They may be Windows .BMP format at 24 bit color depth, or a Targa .TGA file in 32 bit (alpha layer) color depth.&lt;br /&gt;
&lt;br /&gt;
==Rules for textures==&lt;br /&gt;
OTA mods using 3DO models store their textures in a Texture Atlas.  This is a single 2048 / 2048 image that is built by Spring automatically from the small images used as tiles in OTA.  Thus, the total size of all of your 3DO textures cannot exceed 2048 / 2048.  This is rarely a problem, if you&#039;re just porting an OTA mod.&lt;br /&gt;
&lt;br /&gt;
===Logo Textures / Team Color===&lt;br /&gt;
In the case of logo textures, you must edit the file &amp;lt;b&amp;gt;teamtex.txt&amp;lt;/b&amp;gt; in the &amp;lt;b&amp;gt;UnitTextures/tatex&amp;lt;/b&amp;gt; directory (or in your game / mod, as it will overwrite Spring&#039;s values).&lt;br /&gt;
&lt;br /&gt;
Just add the name of your texture to the list, without the &amp;quot;00&amp;quot;. For example, if you wanted to add ArmLogo00.bmp to the team color list, you would put ArmLogo in the teamtex.txt file. The image must have only values in the Red, Blue and Alpha channels, to function correctly as teamcolor- the Green channel should be left black.  So the resulting image will look &amp;quot;purple&amp;quot;.  If you are not experienced working with color channels, ask somebody for help, or read some tutorials.&lt;br /&gt;
&lt;br /&gt;
===Reflections===&lt;br /&gt;
To make a texture reflect its environment, you must create a Targa file with an alpha layer with a program such as the [http://gimp-win.sourceforge.net/stable.html GIMP] or [http://www.adobe.com/products/tryadobe/main.jsp#product=39 Photoshop]. &lt;br /&gt;
&lt;br /&gt;
The procedure is the same as making team-color textures, but with two twists:&lt;br /&gt;
&lt;br /&gt;
1.  &amp;lt;u&amp;gt;Don&#039;t&amp;lt;/u&amp;gt; name the file in the &amp;lt;b&amp;gt;teamtex.txt&amp;lt;/b&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
2.  You can use all four channels- RGBA, for full colors and alpha- and the alpha layer&#039;s white / black values determine how reflective the object is.  If white, that area is totally reflective.  If black, it will not reflect the world at all.  It should be noted that some image editors have trouble setting alpha layers to 100% and cause Spring to display the image as completely black, hence it is suggested you make it about 99%.&lt;br /&gt;
&lt;br /&gt;
===Conversion from .GAF===&lt;br /&gt;
In Total Annihilation textures were stored in /Textures/*.gaf. If you&#039;re porting an old TA mods, there will be hundreds of textures to convert to Spring format. There is an easy way to automatically extract all the texture from all the .gaf into well named .bmp: Download [http://www.planetannihilation.com/bsr/downloads/GAFDump.zip GAF Dump]. Then run GAFDump.exe, from inside the folder your textures are, and with the &#039;&#039;&#039;-b&#039;&#039;&#039; commandline option.&lt;br /&gt;
&lt;br /&gt;
To save yourself some more trouble, we strongly suggest that you use 3DOBleacher to remove all of the &amp;quot;shading&amp;quot; versions of the textures from the mod you&#039;re porting, as well.  This will save a huge amount of space on the Texture Atlas and the final results will look a lot more professional in Spring.  3DOBleacher requires some reading and a lot of work to set up, however.&lt;br /&gt;
&lt;br /&gt;
[[Category:3D Models]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Assimp&amp;diff=2168</id>
		<title>Assimp</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Assimp&amp;diff=2168"/>
		<updated>2013-04-10T02:58:47Z</updated>

		<summary type="html">&lt;p&gt;Spliff: /* Assimp */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Game_and_Unit_development|Game Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
=Assimp=&lt;br /&gt;
Open Asset Import Library (short name: Assimp) is used in Spring for loading a number of model formats including Collada &amp;amp; 3ds (currently obj is parsed by a different codepaths).&lt;br /&gt;
&lt;br /&gt;
What Spring supports in its Assimp renderer:&lt;br /&gt;
* extended metafile (&amp;lt;code&amp;gt;%modelfilename%.lua&amp;lt;/code&amp;gt; next to the modefile)&lt;br /&gt;
* still uses tex1 &amp;amp; tex2 texture system of S3O (same shader as S3O)&lt;br /&gt;
* 2nd texcoord&lt;br /&gt;
* loading of the texture filepaths from the model (don&#039;t have to be in &amp;lt;code&amp;gt;unittextures/&amp;lt;/code&amp;gt;)&lt;br /&gt;
* when texture filepaths aren&#039;t included in the model, it searches for &amp;lt;code&amp;gt;%modelfilename%.*&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;%modelfilename%2.*&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;unittextures/&amp;lt;/code&amp;gt;&lt;br /&gt;
* special modelpieces `SpringHeight` &amp;amp; `SpringRadius`&lt;br /&gt;
&lt;br /&gt;
=Assimp Textures=&lt;br /&gt;
See textures page (Assimp Section)&lt;br /&gt;
&lt;br /&gt;
=Blender Workflow Tutorial=&lt;br /&gt;
This is a stub containing a simple outline of a Blender workflow. Disclaimer: I&#039;m no modeling expert, there may be a better way to do this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;&#039;&#039;&#039;1)&#039;&#039;&#039; Open an existing Blender model or import a different format through the File menu (File &amp;gt; Import).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;&#039;&#039;&#039;2)&#039;&#039;&#039; In the 3D view, at the top right, there will be a &#039;+&#039; icon. click this &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt; [[File:3-12-2013 5-02-21 PM.pngâ€Žâ€Ž|secret panel]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;&#039;&#039;&#039;3)&#039;&#039;&#039; In that panel, select Display &amp;gt; Shading &amp;gt; GLSL &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[File:3-12-2013 5-02-04 PM.pngâ€Žâ€Ž|display settings]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;&#039;&#039;&#039;4)&#039;&#039;&#039; Make sure you have a lamp in your scene while in this mode or your model will be dark.&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt; [[File:3-12-2013_5-11-14_PM.pngâ€Žâ€Ž|blend light source]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;&#039;&#039;&#039;5)&#039;&#039;&#039; Applying texture: &lt;br /&gt;
## In the UV/Image editor, click the image icon (Tooltip: Browse Image to be linked) to select your texture. If it&#039;s not there, click on Image &amp;gt; Open Image to browse for it.&lt;br /&gt;
## In the 3D View, select (right-click) your object and hit Tab to enter Mesh Mode.&lt;br /&gt;
## Hit A to select all your faces.&lt;br /&gt;
## In the 3D View, hit A to select all the faces there and select your image with the image icon. Assuming there&#039;s a UVMap, you should see your texture.&lt;br /&gt;
## If you don&#039;t see any faces you&#039;ll need to add the UVMap to a new texture:&lt;br /&gt;
### In the Properties view click on Textures (checkerboard icon).&lt;br /&gt;
### Click on Add New Texture (plus icon).&lt;br /&gt;
### Select Type = Image or Movie.&lt;br /&gt;
### Under Image, click on the image icon and choose your image file.&lt;br /&gt;
### Under Mapping, select Coordinates = UV.&lt;br /&gt;
### Under Influence &amp;gt; Diffuse, check Color and make sure it&#039;s 1.00.&lt;br /&gt;
## To add a normalmap:&lt;br /&gt;
### Repeat steps 5.1 to 5.5.&lt;br /&gt;
### Under Image Sampling, check Normal Map.&lt;br /&gt;
### Under Influence &amp;gt; Geometry, check Normal. Make sure it.s 1.00.&lt;br /&gt;
## You&#039;ll need to do this for each piece.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;&#039;&#039;&#039;7)&#039;&#039;&#039; Piece hierarchy:&lt;br /&gt;
## Select piece A, hold shift and select piece B. Hit Ctrl+P and it will make piece A a child of piece B.&lt;br /&gt;
## Make sure all the pieces are descending from one single piece.&lt;br /&gt;
# Setting piece origins:&lt;br /&gt;
## Select a piece.&lt;br /&gt;
## Place the 3D cursor where you want the origin to be (left-click).&lt;br /&gt;
## Click on Object &amp;gt; Transform &amp;gt; Origin to 3D Cursor.&lt;br /&gt;
## You can now rotate your pieces:&lt;br /&gt;
### Click on the dropdown &amp;quot;Pivot Center for Rotation/Scaling&amp;quot; and select Individual Origins.&lt;br /&gt;
### Rotate.&lt;br /&gt;
## Repeat this for all your pieces.&lt;br /&gt;
# Save your model.&lt;br /&gt;
# Select all the pieces of your model, ignore the lamp.&lt;br /&gt;
# Click on File &amp;gt; Export &amp;gt; Collada.&lt;br /&gt;
# Check &amp;quot;Export Only Selected&amp;quot; and export.&lt;br /&gt;
# The dae file will be used as your object.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:3D Models]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Modinfo.lua&amp;diff=14378</id>
		<title>Modinfo.lua</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Modinfo.lua&amp;diff=14378"/>
		<updated>2011-11-15T12:14:06Z</updated>

		<summary type="html">&lt;p&gt;Spliff: Removed version from name in examples and clarify format of dependencies&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Location==&lt;br /&gt;
&amp;lt;code&amp;gt;modinfo.lua&amp;lt;/code&amp;gt; is a file in the root directory of a Spring Game.&lt;br /&gt;
&lt;br /&gt;
==Purpose==&lt;br /&gt;
The purpose of this file is to define a Spring content package as a game or game content archive. It is read both by the multiplayer lobbies and the engine itself.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The engine source code which parses the data from this file is viewable here: {{sourcelink|file=rts/System/FileSystem/ArchiveScanner.cpp}}&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
The following tags are read, all are strings unless otherwise specified:&lt;br /&gt;
* &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; - The name displayed in the lobby or via Spring.exe, &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt; is automatically appended. [http://springrts.com/phpbb/viewtopic.php?f=14&amp;amp;t=25927 Don&#039;t put the version into the name!]&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;shortName&amp;lt;/code&amp;gt; - A short representation of the package name, usually an acronym of the above.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt; - The version of this package. Can be any text you like but preferably not blank. It&#039;s also best if the version increments numerically so players know which version is newer.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;mutator&amp;lt;/code&amp;gt; - String. Is the package an official release or a mutator?&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;game&amp;lt;/code&amp;gt; - What game is this package based on? This is subtly different from the &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; attribute. Consider that a main game archive and a mutator would have the same game, but different name values.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;shortGame&amp;lt;/code&amp;gt; - Again an acronym representing the above.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;description&amp;lt;/code&amp;gt; - A description of this content package.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;modtype&amp;lt;/code&amp;gt; - What kind of content package is this? 1 for a game or mutator, 0 for a hidden base content file. Maps use 3 in [[mapinfo.lua]].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;depend&amp;lt;/code&amp;gt; - A table of other content packages, referenced by &amp;lt;code&amp;gt;name + version&amp;lt;/code&amp;gt;, not their filename, which this package depends on. Spring will load them if they are present, or throw an error if they are missing. This is used by mutators to depend on main game file and by all games to depend on base content files. New games may particularly want to depend on &amp;lt;code&amp;gt;&#039;Spring Cursors&#039;&amp;lt;/code&amp;gt; (provided as &amp;lt;code&amp;gt;cursors.sdz&amp;lt;/code&amp;gt; in the Spring &amp;lt;code&amp;gt;base&amp;lt;/code&amp;gt; directory) if they do not yet have their own [[MouseCursors|custom cursors]].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;replace&amp;lt;/code&amp;gt; - A table of content packages, again referenced by &amp;lt;code&amp;gt;name + version&amp;lt;/code&amp;gt;, that this package is meant to replace. For example if you have a base content package with your game music, you may wish to replace it with an updated version later on without having to modify the &amp;lt;code&amp;gt;modinfo.lua&amp;lt;/code&amp;gt; of all packages which &amp;lt;code&amp;gt;depend&amp;lt;/code&amp;gt; on it. This is not usually used to update main game archives, however, as players may wish to continue playing a previous version.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===Main Game file===&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local modinfo = {&lt;br /&gt;
  name = &amp;quot;My Awesome Spring Game&amp;quot;,&lt;br /&gt;
  shortName = &amp;quot;MASG&amp;quot;,&lt;br /&gt;
  game = &amp;quot;My Awesome Spring Game&amp;quot;,&lt;br /&gt;
  shortGame = &amp;quot;MASG&amp;quot;,&lt;br /&gt;
  mutator = &amp;quot;Official&amp;quot;,&lt;br /&gt;
  version = &amp;quot;v1.0&amp;quot;,&lt;br /&gt;
  description =	&amp;quot;An awesome game I made with units&amp;quot;,&lt;br /&gt;
  url =	&amp;quot;http://www.linktomyawesomegame.com/&amp;quot;,&lt;br /&gt;
  modtype = 1,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
return modinfo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mutator===&lt;br /&gt;
A mutator depends on the main game file, but does not replace it, it will usually have a different &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;shortName&amp;lt;/code&amp;gt; but the same &amp;lt;code&amp;gt;game&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;shortGame&amp;lt;/code&amp;gt; values as the main game file. It should still have a &amp;lt;code&amp;gt;modtype&amp;lt;/code&amp;gt; of 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local modinfo = {&lt;br /&gt;
  name = &amp;quot;My Awesome Spring Game Mutator&amp;quot;,&lt;br /&gt;
  shortName = &amp;quot;MASGM&amp;quot;,&lt;br /&gt;
  game = &amp;quot;My Awesome Spring Game&amp;quot;,&lt;br /&gt;
  shortGame = &amp;quot;MASG&amp;quot;,&lt;br /&gt;
  mutator = &amp;quot;Double Speed Mutator&amp;quot;,&lt;br /&gt;
  version = &amp;quot;v1.0&amp;quot;,&lt;br /&gt;
  description =	&amp;quot;An awesome mutator I made for MASG&amp;quot;,&lt;br /&gt;
  url =	&amp;quot;http://www.linktomyawesomegame.com/&amp;quot;,&lt;br /&gt;
  modtype = 1,&lt;br /&gt;
  depend = {&lt;br /&gt;
    &amp;quot;My Awesome Spring Game v1.0&amp;quot;,&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
return modinfo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Base Content===&lt;br /&gt;
Base content is a hidden, unplayable content package which is depended on by your game. For example you might include music in a hidden content package so that it was not updated with the main game files. It must have a &amp;lt;code&amp;gt;modtype&amp;lt;/code&amp;gt; of 0. The following example is from &amp;lt;code&amp;gt;springcontent.sdz&amp;lt;/code&amp;gt;, which is automatically loaded by Spring for all games.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local modinfo = {&lt;br /&gt;
  name = &amp;quot;Spring content&amp;quot;,&lt;br /&gt;
  version = &amp;quot;v1&amp;quot;,&lt;br /&gt;
  description = &amp;quot;Mods can depend on this archive to get all the spring content&amp;quot;,&lt;br /&gt;
  modtype = 0,&lt;br /&gt;
  depend = {&lt;br /&gt;
    &amp;quot;Spring Bitmaps v1&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
return modinfo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Game development]]&lt;br /&gt;
[[Category:gamedata]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Further reading===&lt;br /&gt;
Forum thread: &#039;&#039;Please fix:games contain version in &amp;quot;name&amp;quot; tag (modinfo.lua)&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
http://springrts.com/phpbb/viewtopic.php?f=14&amp;amp;t=25927&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3364</id>
		<title>Building Spring on Linux</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3364"/>
		<updated>2011-02-21T04:38:59Z</updated>

		<summary type="html">&lt;p&gt;Spliff: /* Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Building_spring|Building Spring]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
= Build From Source on Linux =&lt;br /&gt;
If you prefer to use your distributions package system (release versions only), refer to the Linux [[SetupGuide]].&lt;br /&gt;
&lt;br /&gt;
If there is no package tailored for your distribution, you have to install from sources manually. Doing this for distributions where packages are available is not recommended.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=warning&amp;gt;&#039;&#039;&#039;Warning:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Be careful when building from source.&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
You might encounter sync errors in online play if:&lt;br /&gt;
* you are using an untested compiler (&#039;&#039;gcc&#039;&#039; from the 4.x serie should be safe)&lt;br /&gt;
* you use non-standard compiler settings (be careful about &#039;&#039;-march&#039;&#039;)!&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Obtaining the Source ==&lt;br /&gt;
{{Obtaining_The_Source_Code}}&lt;br /&gt;
&lt;br /&gt;
= Get Dependencies =&lt;br /&gt;
&lt;br /&gt;
To compile, you will have to install some development packages Spring depends on. These vary from distro to distro and may also depend on your specific configuration.&lt;br /&gt;
&lt;br /&gt;
If your distributions is not listed below, you should be able to figure out the correct package names from this.&lt;br /&gt;
&lt;br /&gt;
== Full list ==&lt;br /&gt;
* Programs necessary to build&lt;br /&gt;
** &#039;&#039;cmake&#039;&#039;&lt;br /&gt;
** &#039;&#039;7zip&#039;&#039; (aka &#039;&#039;p7zip&#039;&#039; or &#039;&#039;7z&#039;&#039;)&lt;br /&gt;
** The usual build toolchain&lt;br /&gt;
*** &#039;&#039;gcc&#039;&#039;&lt;br /&gt;
*** &#039;&#039;make&#039;&#039;&lt;br /&gt;
* Libraries&lt;br /&gt;
** SDL&lt;br /&gt;
** &#039;&#039;boost&#039;&#039; (version 1.35 or later)&lt;br /&gt;
*** &#039;&#039;threads&#039;&#039;&lt;br /&gt;
*** &#039;&#039;regex&#039;&#039;&lt;br /&gt;
*** &#039;&#039;signals&#039;&#039;&lt;br /&gt;
*** &#039;&#039;system&#039;&#039;&lt;br /&gt;
*** &#039;&#039;program-options&#039;&#039;&lt;br /&gt;
** &#039;&#039;libdeviL&#039;&#039; (IL)&lt;br /&gt;
** OpenAL (openal-soft, older openal-0.0.8 does not work)&lt;br /&gt;
** OpenGL headers (mesa, GLEW, etc.)&lt;br /&gt;
** &#039;&#039;zlib&#039;&#039;&lt;br /&gt;
** &#039;&#039;freetype&#039;&#039; (2)&lt;br /&gt;
** &#039;&#039;ogg&#039;&#039;, &#039;&#039;vorbis&#039;&#039; and &#039;&#039;vorbisfile&#039;&#039;&lt;br /&gt;
* Optional (for AI Interfaces and Skirmish AIs)&lt;br /&gt;
** &#039;&#039;python&#039;&#039; (2.5+)&lt;br /&gt;
** &#039;&#039;jdk&#039;&#039; (1.5+)&lt;br /&gt;
&lt;br /&gt;
== Debian ==&lt;br /&gt;
&lt;br /&gt;
For Etch (debian 4.0 stable) and Sid (debian unstable), I&#039;ve confirmed the&lt;br /&gt;
following to be the minimal set that is necessary to get. This works with Ubuntu 8.10, too.&lt;br /&gt;
As of ~ July 2009, spring depends on boost 1.35+ (if your distro is behind, you can try [https://launchpad.net/~pgquiles/+archive/ppa some unofficial backports]). &lt;br /&gt;
&lt;br /&gt;
Also, on 64-bit, be sure to build against DevIL 1.6.8-rc2+, as 1.6.7 has a bug in the PNG loading code that causes issues.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo aptitude install build-essential zlib1g-dev libfreetype6-dev&lt;br /&gt;
sudo aptitude install libsdl1.2-dev libopenal-dev libglew-dev zip&lt;br /&gt;
sudo aptitude install libvorbis-dev libxcursor-dev libdevil-dev&lt;br /&gt;
sudo aptitude install libboost-system1.37-dev libboost-system1.37-thread-dev&lt;br /&gt;
sudo aptitude install libboost-system1.37-regex-dev &lt;br /&gt;
sudo aptitude install libboost-system1.37-serialization-dev&lt;br /&gt;
sudo aptitude install libboost-system1.37-program-options-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and either scons and python2.5-dev or cmake, depending on what you use for building (I advise to use cmake). On debian 5.0 (lenny), libglew1.5-dev is required as well.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu  ===&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# compiler and build tools&lt;br /&gt;
sudo apt-get install build-essential cmake cmake-gui git &lt;br /&gt;
&lt;br /&gt;
# spring dependencies&lt;br /&gt;
sudo apt-get install libglew-dev libsdl-dev libdevil-dev libopenal-dev \&lt;br /&gt;
libogg-dev libvorbis-dev libfreetype6-dev p7zip-full libxcursor-dev \&lt;br /&gt;
libboost-thread1.40-dev libboost-regex1.40-dev libboost-system1.40-dev \&lt;br /&gt;
libboost-program-options1.40-dev libboost-signals1.40-dev&lt;br /&gt;
&lt;br /&gt;
# alternatively, you can try ...&lt;br /&gt;
sudo apt-get build-dep spring&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
... and that should install all the required dependencies (&#039;&#039;it should but it appears to be broken - SpliFF 2011-02-21&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
NOTE: On Ubuntu the CMake scripts currently don&#039;t detect FREETYPE_INCLUDE_DIR. You will need to set this by hand (using -DFREETYPE_INCLUDE_DIR=&amp;quot;/usr/include/freetype2/freetype&amp;quot; or by adding an &#039;advanced&#039; entry in cmake-gui).&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
This has been tested to work with a clean install of gentoo 2008.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
emerge cmake \&amp;gt;=media-libs/freetype-2.0.0 \&amp;gt;=media-libs/libsdl-1.2.0&lt;br /&gt;
emerge media-libs/openal media-libs/glew dev-libs/boost&lt;br /&gt;
emerge app-arch/zip media-libs/libogg&lt;br /&gt;
USE=&amp;quot;png jpg tiff opengl&amp;quot; emerge media-libs/devil &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
On Fedora 8:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cmake boost-devel openal-devel SDL-devel \&lt;br /&gt;
DevIL-devel glew-devel libvorbis-devel &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Fedora 12:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install gcc-c++ cmake boost-devel DevIL-devel freetype-devel \&lt;br /&gt;
glew-devel libvorbis-devel libXcursor-devel openal-devel SDL-devel p7zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Slackware ==&lt;br /&gt;
&lt;br /&gt;
On Slackware 13, cmake, ogg &amp;amp; vorbis, boost, glew and SDL already come with the full regular install, both libs and headers. You can find helper scripts to easily compile and package DevIL, OpenAL and spring itself [http://slackbuilds.org/ here].&lt;br /&gt;
&lt;br /&gt;
= Build And Install =&lt;br /&gt;
&lt;br /&gt;
== Using CMake (2.6 or newer) ==&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake .&lt;br /&gt;
make spring&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make install-spring&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default install paths are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/usr/local/bin/spring&amp;lt;/code&amp;gt; Spring executable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/usr/local/share/games/spring&amp;lt;/code&amp;gt; read-only data&lt;br /&gt;
&lt;br /&gt;
If you want &amp;lt;code&amp;gt;/usr&amp;lt;/code&amp;gt; prefix instead of &amp;lt;code&amp;gt;/usr/local&amp;lt;/code&amp;gt;, configure like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX=/usr .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
For further ways of customizing your build, have a look at the variables shown with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -LH .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ububtu 9.10 - if it cannot locate freetype include dir, then use:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DFREETYPE_INCLUDE_DIR=/usr .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you experience performance problems on multi-core systems, you may additionally build the MT version of spring:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make spring-multithreaded&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And install with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make install-spring-multithreaded&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other targets are: &amp;lt;code&amp;gt;spring-headless&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;spring-dedicated&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Using Scons ==&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons configure&lt;br /&gt;
scons&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{{Finalizing_linux_install}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{{Troubleshooting_linux}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiling]]&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3363</id>
		<title>Building Spring on Linux</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3363"/>
		<updated>2011-02-21T04:36:07Z</updated>

		<summary type="html">&lt;p&gt;Spliff: /* Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Building_spring|Building Spring]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
= Build From Source on Linux =&lt;br /&gt;
If you prefer to use your distributions package system (release versions only), refer to the Linux [[SetupGuide]].&lt;br /&gt;
&lt;br /&gt;
If there is no package tailored for your distribution, you have to install from sources manually. Doing this for distributions where packages are available is not recommended.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=warning&amp;gt;&#039;&#039;&#039;Warning:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Be careful when building from source.&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
You might encounter sync errors in online play if:&lt;br /&gt;
* you are using an untested compiler (&#039;&#039;gcc&#039;&#039; from the 4.x serie should be safe)&lt;br /&gt;
* you use non-standard compiler settings (be careful about &#039;&#039;-march&#039;&#039;)!&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Obtaining the Source ==&lt;br /&gt;
{{Obtaining_The_Source_Code}}&lt;br /&gt;
&lt;br /&gt;
= Get Dependencies =&lt;br /&gt;
&lt;br /&gt;
To compile, you will have to install some development packages Spring depends on. These vary from distro to distro and may also depend on your specific configuration.&lt;br /&gt;
&lt;br /&gt;
If your distributions is not listed below, you should be able to figure out the correct package names from this.&lt;br /&gt;
&lt;br /&gt;
== Full list ==&lt;br /&gt;
* Programs necessary to build&lt;br /&gt;
** &#039;&#039;cmake&#039;&#039;&lt;br /&gt;
** &#039;&#039;7zip&#039;&#039; (aka &#039;&#039;p7zip&#039;&#039; or &#039;&#039;7z&#039;&#039;)&lt;br /&gt;
** The usual build toolchain&lt;br /&gt;
*** &#039;&#039;gcc&#039;&#039;&lt;br /&gt;
*** &#039;&#039;make&#039;&#039;&lt;br /&gt;
* Libraries&lt;br /&gt;
** SDL&lt;br /&gt;
** &#039;&#039;boost&#039;&#039; (version 1.35 or later)&lt;br /&gt;
*** &#039;&#039;threads&#039;&#039;&lt;br /&gt;
*** &#039;&#039;regex&#039;&#039;&lt;br /&gt;
*** &#039;&#039;signals&#039;&#039;&lt;br /&gt;
*** &#039;&#039;system&#039;&#039;&lt;br /&gt;
*** &#039;&#039;program-options&#039;&#039;&lt;br /&gt;
** &#039;&#039;libdeviL&#039;&#039; (IL)&lt;br /&gt;
** OpenAL (openal-soft, older openal-0.0.8 does not work)&lt;br /&gt;
** OpenGL headers (mesa, GLEW, etc.)&lt;br /&gt;
** &#039;&#039;zlib&#039;&#039;&lt;br /&gt;
** &#039;&#039;freetype&#039;&#039; (2)&lt;br /&gt;
** &#039;&#039;ogg&#039;&#039;, &#039;&#039;vorbis&#039;&#039; and &#039;&#039;vorbisfile&#039;&#039;&lt;br /&gt;
* Optional (for AI Interfaces and Skirmish AIs)&lt;br /&gt;
** &#039;&#039;python&#039;&#039; (2.5+)&lt;br /&gt;
** &#039;&#039;jdk&#039;&#039; (1.5+)&lt;br /&gt;
&lt;br /&gt;
== Debian ==&lt;br /&gt;
&lt;br /&gt;
For Etch (debian 4.0 stable) and Sid (debian unstable), I&#039;ve confirmed the&lt;br /&gt;
following to be the minimal set that is necessary to get. This works with Ubuntu 8.10, too.&lt;br /&gt;
As of ~ July 2009, spring depends on boost 1.35+ (if your distro is behind, you can try [https://launchpad.net/~pgquiles/+archive/ppa some unofficial backports]). &lt;br /&gt;
&lt;br /&gt;
Also, on 64-bit, be sure to build against DevIL 1.6.8-rc2+, as 1.6.7 has a bug in the PNG loading code that causes issues.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo aptitude install build-essential zlib1g-dev libfreetype6-dev&lt;br /&gt;
sudo aptitude install libsdl1.2-dev libopenal-dev libglew-dev zip&lt;br /&gt;
sudo aptitude install libvorbis-dev libxcursor-dev libdevil-dev&lt;br /&gt;
sudo aptitude install libboost-system1.37-dev libboost-system1.37-thread-dev&lt;br /&gt;
sudo aptitude install libboost-system1.37-regex-dev &lt;br /&gt;
sudo aptitude install libboost-system1.37-serialization-dev&lt;br /&gt;
sudo aptitude install libboost-system1.37-program-options-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and either scons and python2.5-dev or cmake, depending on what you use for building (I advise to use cmake). On debian 5.0 (lenny), libglew1.5-dev is required as well.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# compiler and build tools&lt;br /&gt;
sudo apt-get install build-essential cmake cmake-gui git &lt;br /&gt;
&lt;br /&gt;
# spring dependencies&lt;br /&gt;
sudo apt-get install libglew-dev libsdl-dev libdevil-dev libopenal-dev \&lt;br /&gt;
libogg-dev libvorbis-dev libfreetype6-dev p7zip-full libxcursor-dev \&lt;br /&gt;
libboost-thread1.40-dev libboost-regex1.40-dev libboost-system1.40-dev \&lt;br /&gt;
libboost-program-options1.40-dev libboost-signals1.40-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can try&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get build-dep spring&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and that should install all the required dependencies (&#039;&#039;it should but it appears to be broken - SpliFF 2011-02-21&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
NOTE: On Ubuntu the CMake scripts currently don&#039;t detect FREETYPE_INCLUDE_DIR. You will need to set this by hand (using -DFREETYPE_INCLUDE_DIR=&amp;quot;/usr/include/freetype2/freetype&amp;quot; or by adding an &#039;advanced&#039; entry in cmake-gui).&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
This has been tested to work with a clean install of gentoo 2008.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
emerge cmake \&amp;gt;=media-libs/freetype-2.0.0 \&amp;gt;=media-libs/libsdl-1.2.0&lt;br /&gt;
emerge media-libs/openal media-libs/glew dev-libs/boost&lt;br /&gt;
emerge app-arch/zip media-libs/libogg&lt;br /&gt;
USE=&amp;quot;png jpg tiff opengl&amp;quot; emerge media-libs/devil &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
On Fedora 8:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cmake boost-devel openal-devel SDL-devel \&lt;br /&gt;
DevIL-devel glew-devel libvorbis-devel &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Fedora 12:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install gcc-c++ cmake boost-devel DevIL-devel freetype-devel \&lt;br /&gt;
glew-devel libvorbis-devel libXcursor-devel openal-devel SDL-devel p7zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Slackware ==&lt;br /&gt;
&lt;br /&gt;
On Slackware 13, cmake, ogg &amp;amp; vorbis, boost, glew and SDL already come with the full regular install, both libs and headers. You can find helper scripts to easily compile and package DevIL, OpenAL and spring itself [http://slackbuilds.org/ here].&lt;br /&gt;
&lt;br /&gt;
= Build And Install =&lt;br /&gt;
&lt;br /&gt;
== Using CMake (2.6 or newer) ==&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake .&lt;br /&gt;
make spring&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make install-spring&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default install paths are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/usr/local/bin/spring&amp;lt;/code&amp;gt; Spring executable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/usr/local/share/games/spring&amp;lt;/code&amp;gt; read-only data&lt;br /&gt;
&lt;br /&gt;
If you want &amp;lt;code&amp;gt;/usr&amp;lt;/code&amp;gt; prefix instead of &amp;lt;code&amp;gt;/usr/local&amp;lt;/code&amp;gt;, configure like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX=/usr .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
For further ways of customizing your build, have a look at the variables shown with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -LH .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ububtu 9.10 - if it cannot locate freetype include dir, then use:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DFREETYPE_INCLUDE_DIR=/usr .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you experience performance problems on multi-core systems, you may additionally build the MT version of spring:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make spring-multithreaded&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And install with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make install-spring-multithreaded&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other targets are: &amp;lt;code&amp;gt;spring-headless&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;spring-dedicated&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Using Scons ==&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons configure&lt;br /&gt;
scons&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{{Finalizing_linux_install}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{{Troubleshooting_linux}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiling]]&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3362</id>
		<title>Building Spring on Linux</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3362"/>
		<updated>2011-02-21T04:18:28Z</updated>

		<summary type="html">&lt;p&gt;Spliff: /* Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Building_spring|Building Spring]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
= Build From Source on Linux =&lt;br /&gt;
If you prefer to use your distributions package system (release versions only), refer to the Linux [[SetupGuide]].&lt;br /&gt;
&lt;br /&gt;
If there is no package tailored for your distribution, you have to install from sources manually. Doing this for distributions where packages are available is not recommended.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=warning&amp;gt;&#039;&#039;&#039;Warning:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Be careful when building from source.&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
You might encounter sync errors in online play if:&lt;br /&gt;
* you are using an untested compiler (&#039;&#039;gcc&#039;&#039; from the 4.x serie should be safe)&lt;br /&gt;
* you use non-standard compiler settings (be careful about &#039;&#039;-march&#039;&#039;)!&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Obtaining the Source ==&lt;br /&gt;
{{Obtaining_The_Source_Code}}&lt;br /&gt;
&lt;br /&gt;
= Get Dependencies =&lt;br /&gt;
&lt;br /&gt;
To compile, you will have to install some development packages Spring depends on. These vary from distro to distro and may also depend on your specific configuration.&lt;br /&gt;
&lt;br /&gt;
If your distributions is not listed below, you should be able to figure out the correct package names from this.&lt;br /&gt;
&lt;br /&gt;
== Full list ==&lt;br /&gt;
* Programs necessary to build&lt;br /&gt;
** &#039;&#039;cmake&#039;&#039;&lt;br /&gt;
** &#039;&#039;7zip&#039;&#039; (aka &#039;&#039;p7zip&#039;&#039; or &#039;&#039;7z&#039;&#039;)&lt;br /&gt;
** The usual build toolchain&lt;br /&gt;
*** &#039;&#039;gcc&#039;&#039;&lt;br /&gt;
*** &#039;&#039;make&#039;&#039;&lt;br /&gt;
* Libraries&lt;br /&gt;
** SDL&lt;br /&gt;
** &#039;&#039;boost&#039;&#039; (version 1.35 or later)&lt;br /&gt;
*** &#039;&#039;threads&#039;&#039;&lt;br /&gt;
*** &#039;&#039;regex&#039;&#039;&lt;br /&gt;
*** &#039;&#039;signals&#039;&#039;&lt;br /&gt;
*** &#039;&#039;system&#039;&#039;&lt;br /&gt;
*** &#039;&#039;program-options&#039;&#039;&lt;br /&gt;
** &#039;&#039;libdeviL&#039;&#039; (IL)&lt;br /&gt;
** OpenAL (openal-soft, older openal-0.0.8 does not work)&lt;br /&gt;
** OpenGL headers (mesa, GLEW, etc.)&lt;br /&gt;
** &#039;&#039;zlib&#039;&#039;&lt;br /&gt;
** &#039;&#039;freetype&#039;&#039; (2)&lt;br /&gt;
** &#039;&#039;ogg&#039;&#039;, &#039;&#039;vorbis&#039;&#039; and &#039;&#039;vorbisfile&#039;&#039;&lt;br /&gt;
* Optional (for AI Interfaces and Skirmish AIs)&lt;br /&gt;
** &#039;&#039;python&#039;&#039; (2.5+)&lt;br /&gt;
** &#039;&#039;jdk&#039;&#039; (1.5+)&lt;br /&gt;
&lt;br /&gt;
== Debian ==&lt;br /&gt;
&lt;br /&gt;
For Etch (debian 4.0 stable) and Sid (debian unstable), I&#039;ve confirmed the&lt;br /&gt;
following to be the minimal set that is necessary to get. This works with Ubuntu 8.10, too.&lt;br /&gt;
As of ~ July 2009, spring depends on boost 1.35+ (if your distro is behind, you can try [https://launchpad.net/~pgquiles/+archive/ppa some unofficial backports]). &lt;br /&gt;
&lt;br /&gt;
Also, on 64-bit, be sure to build against DevIL 1.6.8-rc2+, as 1.6.7 has a bug in the PNG loading code that causes issues.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo aptitude install build-essential zlib1g-dev libfreetype6-dev&lt;br /&gt;
sudo aptitude install libsdl1.2-dev libopenal-dev libglew-dev zip&lt;br /&gt;
sudo aptitude install libvorbis-dev libxcursor-dev libdevil-dev&lt;br /&gt;
sudo aptitude install libboost-system1.37-dev libboost-system1.37-thread-dev&lt;br /&gt;
sudo aptitude install libboost-system1.37-regex-dev &lt;br /&gt;
sudo aptitude install libboost-system1.37-serialization-dev&lt;br /&gt;
sudo aptitude install libboost-system1.37-program-options-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and either scons and python2.5-dev or cmake, depending on what you use for building (I advise to use cmake). On debian 5.0 (lenny), libglew1.5-dev is required as well.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
apt-get install build-essential cmake cmake-gui git libglew-dev libsdl-dev \&lt;br /&gt;
libdevil-dev libopenal-dev libogg-dev libvorbis-dev libfreetype6-dev \&lt;br /&gt;
p7zip-full libxcursor-dev libboost-thread1.40-dev libboost-regex1.40-dev \&lt;br /&gt;
libboost-program-options1.40-dev libboost-signals1.40-dev \&lt;br /&gt;
libboost-system1.40-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can try&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get build-dep spring&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and that should install all the required dependencies (&#039;&#039;it should but it appears to be broken - SpliFF 2011-02-21&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
NOTE: On Ubuntu the CMake scripts currently don&#039;t detect FREETYPE_INCLUDE_DIR. You will need to set this by hand (using -DFREETYPE_INCLUDE_DIR=&amp;quot;/usr/include/freetype2/freetype&amp;quot; or by adding an &#039;advanced&#039; entry in cmake-gui).&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
This has been tested to work with a clean install of gentoo 2008.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
emerge cmake \&amp;gt;=media-libs/freetype-2.0.0 \&amp;gt;=media-libs/libsdl-1.2.0&lt;br /&gt;
emerge media-libs/openal media-libs/glew dev-libs/boost&lt;br /&gt;
emerge app-arch/zip media-libs/libogg&lt;br /&gt;
USE=&amp;quot;png jpg tiff opengl&amp;quot; emerge media-libs/devil &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
On Fedora 8:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cmake boost-devel openal-devel SDL-devel \&lt;br /&gt;
DevIL-devel glew-devel libvorbis-devel &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Fedora 12:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install gcc-c++ cmake boost-devel DevIL-devel freetype-devel \&lt;br /&gt;
glew-devel libvorbis-devel libXcursor-devel openal-devel SDL-devel p7zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Slackware ==&lt;br /&gt;
&lt;br /&gt;
On Slackware 13, cmake, ogg &amp;amp; vorbis, boost, glew and SDL already come with the full regular install, both libs and headers. You can find helper scripts to easily compile and package DevIL, OpenAL and spring itself [http://slackbuilds.org/ here].&lt;br /&gt;
&lt;br /&gt;
= Build And Install =&lt;br /&gt;
&lt;br /&gt;
== Using CMake (2.6 or newer) ==&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake .&lt;br /&gt;
make spring&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make install-spring&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default install paths are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/usr/local/bin/spring&amp;lt;/code&amp;gt; Spring executable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/usr/local/share/games/spring&amp;lt;/code&amp;gt; read-only data&lt;br /&gt;
&lt;br /&gt;
If you want &amp;lt;code&amp;gt;/usr&amp;lt;/code&amp;gt; prefix instead of &amp;lt;code&amp;gt;/usr/local&amp;lt;/code&amp;gt;, configure like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX=/usr .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
For further ways of customizing your build, have a look at the variables shown with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -LH .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ububtu 9.10 - if it cannot locate freetype include dir, then use:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DFREETYPE_INCLUDE_DIR=/usr .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you experience performance problems on multi-core systems, you may additionally build the MT version of spring:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make spring-multithreaded&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And install with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make install-spring-multithreaded&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other targets are: &amp;lt;code&amp;gt;spring-headless&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;spring-dedicated&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Using Scons ==&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons configure&lt;br /&gt;
scons&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{{Finalizing_linux_install}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{{Troubleshooting_linux}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiling]]&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3361</id>
		<title>Building Spring on Linux</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3361"/>
		<updated>2011-02-21T04:17:28Z</updated>

		<summary type="html">&lt;p&gt;Spliff: /* Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Building_spring|Building Spring]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
= Build From Source on Linux =&lt;br /&gt;
If you prefer to use your distributions package system (release versions only), refer to the Linux [[SetupGuide]].&lt;br /&gt;
&lt;br /&gt;
If there is no package tailored for your distribution, you have to install from sources manually. Doing this for distributions where packages are available is not recommended.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=warning&amp;gt;&#039;&#039;&#039;Warning:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Be careful when building from source.&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
You might encounter sync errors in online play if:&lt;br /&gt;
* you are using an untested compiler (&#039;&#039;gcc&#039;&#039; from the 4.x serie should be safe)&lt;br /&gt;
* you use non-standard compiler settings (be careful about &#039;&#039;-march&#039;&#039;)!&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Obtaining the Source ==&lt;br /&gt;
{{Obtaining_The_Source_Code}}&lt;br /&gt;
&lt;br /&gt;
= Get Dependencies =&lt;br /&gt;
&lt;br /&gt;
To compile, you will have to install some development packages Spring depends on. These vary from distro to distro and may also depend on your specific configuration.&lt;br /&gt;
&lt;br /&gt;
If your distributions is not listed below, you should be able to figure out the correct package names from this.&lt;br /&gt;
&lt;br /&gt;
== Full list ==&lt;br /&gt;
* Programs necessary to build&lt;br /&gt;
** &#039;&#039;cmake&#039;&#039;&lt;br /&gt;
** &#039;&#039;7zip&#039;&#039; (aka &#039;&#039;p7zip&#039;&#039; or &#039;&#039;7z&#039;&#039;)&lt;br /&gt;
** The usual build toolchain&lt;br /&gt;
*** &#039;&#039;gcc&#039;&#039;&lt;br /&gt;
*** &#039;&#039;make&#039;&#039;&lt;br /&gt;
* Libraries&lt;br /&gt;
** SDL&lt;br /&gt;
** &#039;&#039;boost&#039;&#039; (version 1.35 or later)&lt;br /&gt;
*** &#039;&#039;threads&#039;&#039;&lt;br /&gt;
*** &#039;&#039;regex&#039;&#039;&lt;br /&gt;
*** &#039;&#039;signals&#039;&#039;&lt;br /&gt;
*** &#039;&#039;system&#039;&#039;&lt;br /&gt;
*** &#039;&#039;program-options&#039;&#039;&lt;br /&gt;
** &#039;&#039;libdeviL&#039;&#039; (IL)&lt;br /&gt;
** OpenAL (openal-soft, older openal-0.0.8 does not work)&lt;br /&gt;
** OpenGL headers (mesa, GLEW, etc.)&lt;br /&gt;
** &#039;&#039;zlib&#039;&#039;&lt;br /&gt;
** &#039;&#039;freetype&#039;&#039; (2)&lt;br /&gt;
** &#039;&#039;ogg&#039;&#039;, &#039;&#039;vorbis&#039;&#039; and &#039;&#039;vorbisfile&#039;&#039;&lt;br /&gt;
* Optional (for AI Interfaces and Skirmish AIs)&lt;br /&gt;
** &#039;&#039;python&#039;&#039; (2.5+)&lt;br /&gt;
** &#039;&#039;jdk&#039;&#039; (1.5+)&lt;br /&gt;
&lt;br /&gt;
== Debian ==&lt;br /&gt;
&lt;br /&gt;
For Etch (debian 4.0 stable) and Sid (debian unstable), I&#039;ve confirmed the&lt;br /&gt;
following to be the minimal set that is necessary to get. This works with Ubuntu 8.10, too.&lt;br /&gt;
As of ~ July 2009, spring depends on boost 1.35+ (if your distro is behind, you can try [https://launchpad.net/~pgquiles/+archive/ppa some unofficial backports]). &lt;br /&gt;
&lt;br /&gt;
Also, on 64-bit, be sure to build against DevIL 1.6.8-rc2+, as 1.6.7 has a bug in the PNG loading code that causes issues.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo aptitude install build-essential zlib1g-dev libfreetype6-dev&lt;br /&gt;
sudo aptitude install libsdl1.2-dev libopenal-dev libglew-dev zip&lt;br /&gt;
sudo aptitude install libvorbis-dev libxcursor-dev libdevil-dev&lt;br /&gt;
sudo aptitude install libboost-system1.37-dev libboost-system1.37-thread-dev&lt;br /&gt;
sudo aptitude install libboost-system1.37-regex-dev &lt;br /&gt;
sudo aptitude install libboost-system1.37-serialization-dev&lt;br /&gt;
sudo aptitude install libboost-system1.37-program-options-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and either scons and python2.5-dev or cmake, depending on what you use for building (I advise to use cmake). On debian 5.0 (lenny), libglew1.5-dev is required as well.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
apt-get install build-essential cmake cmake-gui git libglew-dev libsdl-dev \&lt;br /&gt;
libdevil-dev libopenal-dev libogg-dev libvorbis-dev libfreetype6-dev \&lt;br /&gt;
p7zip-full libboost-thread1.40-dev libboost-regex1.40-dev \&lt;br /&gt;
libboost-program-options1.40-dev libboost-signals1.40-dev \&lt;br /&gt;
libboost-system1.40-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can try&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get build-dep spring&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and that should install all the required dependencies (&#039;&#039;it should but it appears to be broken - SpliFF 2011-02-21&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
NOTE: On Ubuntu the CMake scripts currently don&#039;t detect FREETYPE_INCLUDE_DIR. You will need to set this by hand (using -DFREETYPE_INCLUDE_DIR=&amp;quot;/usr/include/freetype2/freetype&amp;quot; or by adding an &#039;advanced&#039; entry in cmake-gui).&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
This has been tested to work with a clean install of gentoo 2008.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
emerge cmake \&amp;gt;=media-libs/freetype-2.0.0 \&amp;gt;=media-libs/libsdl-1.2.0&lt;br /&gt;
emerge media-libs/openal media-libs/glew dev-libs/boost&lt;br /&gt;
emerge app-arch/zip media-libs/libogg&lt;br /&gt;
USE=&amp;quot;png jpg tiff opengl&amp;quot; emerge media-libs/devil &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
On Fedora 8:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cmake boost-devel openal-devel SDL-devel \&lt;br /&gt;
DevIL-devel glew-devel libvorbis-devel &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Fedora 12:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install gcc-c++ cmake boost-devel DevIL-devel freetype-devel \&lt;br /&gt;
glew-devel libvorbis-devel libXcursor-devel openal-devel SDL-devel p7zip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Slackware ==&lt;br /&gt;
&lt;br /&gt;
On Slackware 13, cmake, ogg &amp;amp; vorbis, boost, glew and SDL already come with the full regular install, both libs and headers. You can find helper scripts to easily compile and package DevIL, OpenAL and spring itself [http://slackbuilds.org/ here].&lt;br /&gt;
&lt;br /&gt;
= Build And Install =&lt;br /&gt;
&lt;br /&gt;
== Using CMake (2.6 or newer) ==&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake .&lt;br /&gt;
make spring&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make install-spring&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default install paths are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/usr/local/bin/spring&amp;lt;/code&amp;gt; Spring executable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/usr/local/share/games/spring&amp;lt;/code&amp;gt; read-only data&lt;br /&gt;
&lt;br /&gt;
If you want &amp;lt;code&amp;gt;/usr&amp;lt;/code&amp;gt; prefix instead of &amp;lt;code&amp;gt;/usr/local&amp;lt;/code&amp;gt;, configure like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX=/usr .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
For further ways of customizing your build, have a look at the variables shown with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -LH .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ububtu 9.10 - if it cannot locate freetype include dir, then use:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DFREETYPE_INCLUDE_DIR=/usr .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you experience performance problems on multi-core systems, you may additionally build the MT version of spring:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make spring-multithreaded&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And install with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make install-spring-multithreaded&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other targets are: &amp;lt;code&amp;gt;spring-headless&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;spring-dedicated&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Using Scons ==&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons configure&lt;br /&gt;
scons&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{{Finalizing_linux_install}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{{Troubleshooting_linux}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiling]]&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=FAQ:trouble&amp;diff=7269</id>
		<title>FAQ:trouble</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=FAQ:trouble&amp;diff=7269"/>
		<updated>2010-10-07T11:23:04Z</updated>

		<summary type="html">&lt;p&gt;Spliff: Updated driconf details&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:FAQ]]&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Network: My buddy can not connect to a game I&#039;ve opened. What can we do?==&lt;br /&gt;
The engine uses UDP port 8452 by default, which can be changed in the lobby. If you are behind a router, and are having problems hosting, try forwarding the correct port and also make sure the firewall is not blocking it. If you do not know what a port or a firewall is, use a relay host instead: when hosting a game, tick the check-box labeled &amp;quot;Use relayhost&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that Spring engine will not connect to already running game, even if lobby client allows it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Graphics: I am having really bad framerates (fps) on my dual core! What am I doing wrong?==&lt;br /&gt;
This error is sometimes reported by people having multicore-CPUs. To solve this, you could try to restrict it to run on one core. Download the file from http://www.robpol86.com/pages/imagecfg.php follow the instructions, and force the spring exe file (spring.exe) to run on one core.&lt;br /&gt;
&lt;br /&gt;
Installing the latest processor drivers and Windows hotfixes for your system may also help.&lt;br /&gt;
&lt;br /&gt;
Also you may try multithreaded version of Spring, which can be downloaded from [[OtherDownloads|here]].&lt;br /&gt;
&lt;br /&gt;
==Graphics: I am having really bad framerates (fps) on my brand new nVidia graphics card! What am I doing wrong?==&lt;br /&gt;
Turn off &#039;threaded optimizations&#039; for Spring in the nVidia control panel.&lt;br /&gt;
&lt;br /&gt;
==Graphics: I use an ATI or Intel graphic card on Linux with Open-Source drivers, and the map is all white! Is there a solution?==&lt;br /&gt;
Due to patents S3TC texture support is disabled by default. To enable it you need the tool driconf (note, you no longer require libdxtn):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
$ sudo apt-get install libgl1-mesa-dev driconf&amp;lt;br&amp;gt;&lt;br /&gt;
$ driconf&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the &amp;quot;Image Quality&amp;quot; tab activate &amp;quot;Enable S3TC texture compression even if software support is not available&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?f=20&amp;amp;t=20809 Related forum thread].&lt;br /&gt;
&lt;br /&gt;
==Graphics: I&#039;ve got the most recent drivers and the game crashes in atioglxx.dll...?==&lt;br /&gt;
As of Spring 0.80.5, use only basic or dynamic water. Bump water with disabled shore waves should also work. Reflective or refractive water will make the game crash after 15-20 minutes due to a memory leak.&lt;br /&gt;
&lt;br /&gt;
Spring 0.81.2 and/or Catalyst 10.2 drivers should fix this problem.&lt;br /&gt;
&lt;br /&gt;
==Graphics: I&#039;ve got a notebook and official AMD ATI drivers refuse to install, what to do?==&lt;br /&gt;
Use [http://www.driverheaven.net/modtool.php ATI Mobility Modder] or unofficial drivers - DNA or Omega. Use [http://google.com Google] or get them from [http://downloads.guru3d.com/Videocards----ATI-Catalyst-(Modified)_c24.html guru3d].&lt;br /&gt;
&lt;br /&gt;
==Graphics: UI disapears after 5-10 mins of play on old ATI videocards==&lt;br /&gt;
In cmdcolors.txt, simply comment out or remove the following lines:&lt;br /&gt;
 stipplePattern 0xffcc&lt;br /&gt;
 stippleFactor 1&lt;br /&gt;
 stippleSpeed 1.0&lt;br /&gt;
The problem detected on:&lt;br /&gt;
* ATI Radeon X3200 with latest drivers ([http://springrts.com/phpbb/viewtopic.php?f=11&amp;amp;t=20817 ref])&lt;br /&gt;
* ATI Radeon 9500 with Omega drivers 3.8.442 ([http://springrts.com/phpbb/viewtopic.php?f=11&amp;amp;t=23526 ref])&lt;br /&gt;
&lt;br /&gt;
==Graphics: How to Alt-Tab out of full-screen on Linux?==&lt;br /&gt;
Play windowed with &#039;&#039;/grabinput&#039;&#039;, or [http://springrts.com/phpbb/viewtopic.php?p=449972#p449972 use devilspie].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Sound: I am having sound problems under Linux! What can i do?==&lt;br /&gt;
In more then 90% of the cases, this is caused by pulseaudio. You can safely remove pulseaudio from your system. To do this, open your favorite package manager (eg. Synaptic under Ubuntu), and search for packages with &amp;quot;pulse&amp;quot; in their name. From these, keep only the ones whichs name starts with &amp;quot;lib&amp;quot;, and remove all others.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Misc: I have a problem that is not described here! What can i do?==&lt;br /&gt;
There is a number of things you can do, among these are:&lt;br /&gt;
* Search in the [http://springrts.com/phpbb/viewforum.php?f=11 Help &amp;amp; Bugs Forum], and ask if you can not find a suiting topic.&lt;br /&gt;
* Look at the [[Gentoo_install#Linux_specific_Troubleshooting|Linux only FAQ]].&lt;br /&gt;
* Ask for help in the lobby in a suiting channel, eg: #springlobby, #de, #fr, #ai, #main&lt;br /&gt;
* Ask the FAQ-Bot in the lobby in channel #springlobby. To get a list of topics, write &#039;&#039;!faqlist&#039;&#039; and then use &#039;&#039;!faq &amp;lt;topic-name&amp;gt;&#039;&#039; to get the help text. For example, try &#039;&#039;!faq rename&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3566</id>
		<title>Building Spring on Windows</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3566"/>
		<updated>2010-09-15T10:18:13Z</updated>

		<summary type="html">&lt;p&gt;Spliff: Added details on tools and libraries file mirror&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Building_spring|Building Spring]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
{{#css:&lt;br /&gt;
  code * {margin:inherit;}&lt;br /&gt;
}}&lt;br /&gt;
= Get the Source Code =&lt;br /&gt;
{{Obtaining_The_Source_Code}}&lt;br /&gt;
&lt;br /&gt;
= Essential Tools and Libraries =&lt;br /&gt;
If you are new to programming for open-source projects on Windows you&#039;ll quickly discover it can often be difficult to find the right software and dependencies. To aid you in your journey you will find stable versions of most of the tools and libraries listed below on [http://www.warriorhut.org/spring this mirror]. Use them if you have trouble finding what you need below.&lt;br /&gt;
&lt;br /&gt;
If you have trouble opening any of the archives please install the application 7zip as it supports all of the archive formats in common use (it&#039;s in the tools/archiving subdirectory).&lt;br /&gt;
&lt;br /&gt;
= Compiling on Windows =&lt;br /&gt;
For other platforms see [[Building spring]].&lt;br /&gt;
&lt;br /&gt;
==Install 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;
===Getting MinGW===&lt;br /&gt;
Compiling Spring in MinGW requires GCC 4.x&lt;br /&gt;
There are 2 different packages the official one and the TDM (experimental) builds.&lt;br /&gt;
====Official 4.4.0 (recommended)====&lt;br /&gt;
&amp;lt;span class=warning&amp;gt;(Note: you can&#039;t override an existing old TDM enviroment with these, you first have to uninstall TDM, else you will get some &amp;quot;undefined ... SJLJ_xyz&amp;quot; linking errors!)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get it here: [http://sourceforge.net/projects/mingw/files/ official MinGW]&lt;br /&gt;
&lt;br /&gt;
You have to get MinGW as a bunch of separate packages, as the downloader does not support installing gcc 4.4.0 yet, which is needed to compile spring successfully.&lt;br /&gt;
&lt;br /&gt;
minimum packages:&lt;br /&gt;
* MinGW Runtime - &#039;&#039;mingwrt (dev &amp;amp; dll. - &amp;lt;span class=warning&amp;gt;version 3.17 recommended, 3.18+ will cause a &amp;quot;multiple definition of _tls_used&amp;quot; linker error&amp;lt;/span&amp;gt;)&#039;&#039;&lt;br /&gt;
* MinGW API for MS-Windows - &#039;&#039;w32api (dev)&#039;&#039;&lt;br /&gt;
* GNU Binutils - &#039;&#039;binutils (bin)&#039;&#039;&lt;br /&gt;
* GCC 4 - &#039;&#039;gcc-core (bin &amp;amp; dll)&#039;&#039;&lt;br /&gt;
* GCC 4 - &#039;&#039;gcc-c++ (bin &amp;amp; dll)&#039;&#039;&lt;br /&gt;
* GCC 4 - &#039;&#039;pthreads (dll)&#039;&#039;&lt;br /&gt;
* GCC 4 - &#039;&#039;mpfr (dll)&#039;&#039;&lt;br /&gt;
* GCC 4 - &#039;&#039;gmp (dll)&#039;&#039;&lt;br /&gt;
instead of the five above mentioned GCC packages (17MB), you could also get it in a single archive instead (60MB):&lt;br /&gt;
* GCC 4 - &#039;&#039;full (bin)&#039;&#039;&lt;br /&gt;
if you do not have an other make system in place, get this in addition:&lt;br /&gt;
* GNU Make - &#039;&#039;mingw32-make&#039;&#039;&lt;br /&gt;
if you want to debug, you will want this as well:&lt;br /&gt;
* GNU Source-Level Debugger - &#039;&#039;gdb (version 6.8-3 or later)&#039;&#039;&lt;br /&gt;
Extract all the packages to a common dir, eg. &#039;&#039;C:/MinGW/&#039;&#039;, and then the environment vars:&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;MINGDIR=C:/MinGW&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;PATH=%PATH%;%MINGDIR%\bin&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need some Spring dependencies, prepackaged in the &#039;&#039;&#039;mingwlibs&#039;&#039;&#039; archive.&lt;br /&gt;
&lt;br /&gt;
You can get it here (&#039;&#039;&#039;Download Source&#039;&#039;&#039; button, or use &#039;&#039;git&#039;&#039;):&lt;br /&gt;
* [http://github.com/spring/mingwlibs/tree/boost_1.42.0_mingw_4.4.2 &#039;&#039;&#039;mingwlibs&#039;&#039;&#039; for MinGW GCC 4.4 or newer]&lt;br /&gt;
* [http://github.com/spring/mingwlibs &#039;&#039;&#039;mingwlibs&#039;&#039;&#039; for MinGW GCC 4.3 or older]&lt;br /&gt;
(Note: TDM builds need a different package!)&lt;br /&gt;
&lt;br /&gt;
====TDM Builds (alternative)====&lt;br /&gt;
Get it here: [http://www.tdragon.net/recentgcc/ TDM&#039;s experimental 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;
* binutils&lt;br /&gt;
* win32api&lt;br /&gt;
In the case you use the old SJLJ exception handling you need this: [http://jobjol.nl/1102 v19 of the MinGW library package].&lt;br /&gt;
If you use the new Dwarf2 handling use the mingwlibs package for the official GCC from above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
... or get aegis &amp;quot;portable&amp;quot; TDM mingw 4.4.1 from [http://aegis.eat-peet.net/MinGW.7z here]. Just extract it to &#039;&#039;C:/&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===MinGW Setup===&lt;br /&gt;
There are two ways to setup the MinGL libraries:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;1.&#039;&#039; Make sure you install the 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;
&#039;&#039;2.&#039;&#039; Install the package somewhere else (preferably outside of the source tree), and pass its location with the &#039;&#039;MINGDIR&#039;&#039; option to CMake in the configure step (see further down, in the quick instructions).&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;
*[http://www.cmake.org/files/v2.6/cmake-2.6.2-win32-x86.exe CMake 2.6 installer]&lt;br /&gt;
&lt;br /&gt;
= Compiling with cmake =&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;
* run the &amp;lt;code&amp;gt;&#039;&#039;cmake-gui&#039;&#039;&amp;lt;/code&amp;gt; and select a source and a build directory&lt;br /&gt;
* configure and follow the instructions, and adjust variables to your needs (defaults are OK)&lt;br /&gt;
* press &#039;&#039;&#039;Generate&#039;&#039;&#039;&lt;br /&gt;
* open a console (&#039;&#039;cmd.exe&#039;&#039;), &#039;&#039;cd&#039;&#039; into your build directory, and run: &amp;lt;code&amp;gt;&#039;&#039;mingw32-make install-spring&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Compiling with scons=&lt;br /&gt;
Install the following programs (you don&#039;T need cmake in this case):&lt;br /&gt;
*[http://www.python.org/ftp/python/2.5.2/python-2.5.2.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-212.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-1.1.0.win32.exe Scons 1.1.0 installer]&lt;br /&gt;
&lt;br /&gt;
==Quick instructions==&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 = Environment...&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;
=Visual Studio 8 (2005)=&lt;br /&gt;
(possibly the free Express Edition) &lt;br /&gt;
&lt;br /&gt;
* Install the [http://cloud.github.com/downloads/spring/spring/spring-vc8libs-v5.7z 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;
** Note that the most recent version of Platform SDK is called [http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&amp;amp;displaylang=en Windows SDK].&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;
== Errors ==&lt;br /&gt;
* &amp;lt;span class=warning&amp;gt;...\Windows\v6.0A\include\shlwapi.h(196) : error C2061: syntax error : identifier &#039;PCUITEMID_CHILD&#039;&amp;lt;/span&amp;gt; - wrong version of Platform SDK is used; go to Tools &amp;gt;&amp;gt; Options &amp;gt;&amp;gt; &amp;gt;&amp;gt; Projects and Solutions &amp;gt;&amp;gt; VC++ Directories and move the one that&#039;s causing this problem all the way down.&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;
or update your Visual Studio using your Windows Update.&lt;br /&gt;
&lt;br /&gt;
For the rest the Visual Studio 8 instructions should apply, mostly. You probably won&#039;t need to add Windows SDK path references as they should be present by default.&lt;br /&gt;
&lt;br /&gt;
You need the [http://cloud.github.com/downloads/spring/spring/spring-vc9libs-v4.7z vclibs for VS2008], and not the ones for Visual Studio 2005. The installation procedure is the same though.&lt;br /&gt;
&lt;br /&gt;
Be aware that the project file isn&#039;t updated nearly as frequently as it should, so it&#039;s best to use the .vcproj file from VS8 build and VS2008 will automatically update it.&lt;br /&gt;
&lt;br /&gt;
=General Visual Studio Notes=&lt;br /&gt;
So far the following aspects of Spring don&#039;t function properly or don&#039;t function at all when compiled with Visual Studio:&lt;br /&gt;
*Your VS build won&#039;t sync with GCC builds in multiplayer mode (currently being worked on)&lt;br /&gt;
*Any external AI crashes immediatley at start, LUA AI works though&lt;br /&gt;
[[Category:Compiling]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_UnsyncedCtrl&amp;diff=12224</id>
		<title>Lua UnsyncedCtrl</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_UnsyncedCtrl&amp;diff=12224"/>
		<updated>2009-10-07T09:44:38Z</updated>

		<summary type="html">&lt;p&gt;Spliff: explained (needs ModUICtrl)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Lua_Scripting|Lua Scripting]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
NOTE: Entries below marked &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt; require the setting ModUICtrl to be enabled in the users springsettings.cfg. It is enabled by default so you generally don&#039;t need to care.&lt;br /&gt;
&lt;br /&gt;
= UI =&lt;br /&gt;
&#039;&#039;&#039;Spring.SetLastMessagePosition&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
= Ingame Console =&lt;br /&gt;
&#039;&#039;&#039;Spring.Echo&#039;&#039;&#039;&lt;br /&gt;
  ( arg1 [, arg2 [, ... ] ] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;Useful for debugging.&amp;lt;br&amp;gt; Prints values in the spring chat console.&amp;lt;br&amp;gt; Hint: the default print() writes to STDOUT.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SendCommands&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( string command1 [, string command2 [ ... ] ] ) -&amp;gt; nil&lt;br /&gt;
  ( {string command1, string command2, ...} ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GUI ==&lt;br /&gt;
&#039;&#039;&#039;Spring.SetActiveCommand&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( string action [, string actionExtra ] ) -&amp;gt; nil | boolean&lt;br /&gt;
  ( number cmdIndex [, number button = 1&lt;br /&gt;
    [, boolean leftClick, boolean rightClick,&lt;br /&gt;
     boolean alt, boolean ctrl, boolean meta, boolean shift]] ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.ForceLayoutUpdate&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.SetDrawSelectionInfo&#039;&#039;&#039; &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;disables the &amp;quot;Selected Units x&amp;quot; box in the GUI&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( boolean enable ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== Mouse ==&lt;br /&gt;
&#039;&#039;&#039;Spring.SetMouseCursor&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( string cursorName [, number scale ] ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.WarpMouse&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number x, number y ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== LOS Colors ==&lt;br /&gt;
&#039;&#039;&#039;Spring.SetLosViewColors&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( table reds = { number always, number LOS, number radar, number jam }, &lt;br /&gt;
    table greens = { number always, number LOS, number radar, number jam },&lt;br /&gt;
    table blues = { number always, number LOS, number radar, number jam } ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== SendMessage ==&lt;br /&gt;
&#039;&#039;&#039;Spring.SendMessage&#039;&#039;&#039;&lt;br /&gt;
  ( string &amp;quot;message&amp;quot; ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.SendMessageToPlayer&#039;&#039;&#039;&lt;br /&gt;
  ( number playerID, string &amp;quot;message&amp;quot; ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.SendMessageToTeam&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, string &amp;quot;message&amp;quot; ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.SendMessageToAllyTeam&#039;&#039;&#039;&lt;br /&gt;
  ( number allyID, string &amp;quot;message&amp;quot; ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.SendMessageToSpectators&#039;&#039;&#039;&lt;br /&gt;
  ( string &amp;quot;message&amp;quot; ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== Markers ==&lt;br /&gt;
&#039;&#039;&#039;Spring.MarkerAddPoint&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number x, number y, number z [, string text = &amp;quot;&amp;quot;] ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.MarkerAddLine&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number x1, number y1, number z1, number x2, number y2, number z2 ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.MarkerErasePosition&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number x, number y, number z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
= Sounds =&lt;br /&gt;
&#039;&#039;&#039;Spring.PlaySoundFile&#039;&#039;&#039;&lt;br /&gt;
  ( string &amp;quot;soundfile&amp;quot; [, number volume&lt;br /&gt;
    [, number x, number y, number z ] ] ) -&amp;gt; nil | boolean&lt;br /&gt;
  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;Plays WAV or OGG sounds. &amp;lt;i&amp;gt;By default&amp;lt;/i&amp;gt;, the soundfile is expected to be in the &amp;quot;Sounds&amp;quot; folder.&amp;lt;/font&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.PlaySoundStream&#039;&#039;&#039;&lt;br /&gt;
  ( string &amp;quot;oggfile&amp;quot; [, number volume = 1.0&lt;br /&gt;
    [, number x, number y, number z ]] ) -&amp;gt; nil | boolean true&lt;br /&gt;
  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;Allow you to play an Ogg Vorbis (.OGG) compressed sound file.&amp;lt;br&amp;gt; &amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; you may only play _ONE_ stream at a time. If another stream is playing and&amp;lt;br&amp;gt; you try to start a second one the call will fail, and silence will result.&amp;lt;br&amp;gt; &amp;lt;/font&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.StopSoundStream&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; nil&lt;br /&gt;
  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;Terminates any SoundStream is running.&amp;lt;br&amp;gt; Since only one may play at any time (see above), this can be used as an interrupt.&amp;lt;/font&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.PauseSoundStream&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.SetSoundStreamVolume&#039;&#039;&#039;&lt;br /&gt;
  ( number volume ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
= SendLuaMessage =&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;Very important! (allows synced inter-lua-enviroment communications)&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SendLuaUIMsg&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( string message, string mode ) -&amp;gt; nil&lt;br /&gt;
  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;possible modes are:&amp;lt;br&amp;gt;&amp;quot;s&amp;quot;/&amp;quot;specs&amp;quot; &amp;amp; &amp;quot;a&amp;quot;/&amp;quot;allies&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.SendLuaGaiaMsg&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( string message ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.SendLuaRulesMsg&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( string message ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
= Units =&lt;br /&gt;
== Unit Selection ==&lt;br /&gt;
&#039;&#039;&#039;Spring.SelectUnitMap&#039;&#039;&#039;&lt;br /&gt;
  ( { [unitID] = anything, ...} [,boolean append] ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.SelectUnitArray&#039;&#039;&#039;&lt;br /&gt;
  ( { [1] = unitID1 , [2] = unitID2 , ...} [,boolean append] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetDrawSelectionInfo&#039;&#039;&#039;&lt;br /&gt;
  ( boolean drawSelectionInfo ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== Unit Group ==&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitGroup&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID, number groupID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== Give Order ==&lt;br /&gt;
&#039;&#039;&#039;Spring.GiveOrder&#039;&#039;&#039; &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;gives order to all selected units&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number cmdID,&lt;br /&gt;
    params = {number, etc...},&lt;br /&gt;
    options = {&amp;quot;alt&amp;quot;, &amp;quot;ctrl&amp;quot;, &amp;quot;shift&amp;quot;, &amp;quot;right&amp;quot;} ) -&amp;gt; nil | boolean true&lt;br /&gt;
&#039;&#039;&#039;Spring.GiveOrderToUnit&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number cmdID,&lt;br /&gt;
    params = {number, etc...},&lt;br /&gt;
    options = {&amp;quot;alt&amp;quot;, &amp;quot;ctrl&amp;quot;, &amp;quot;shift&amp;quot;, &amp;quot;right&amp;quot;} ) -&amp;gt; nil | boolean true&lt;br /&gt;
&#039;&#039;&#039;Spring.GiveOrderToUnitMap&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( unitMap = { [unitID] = dontCare, etc... },&lt;br /&gt;
    number cmdID,&lt;br /&gt;
    params = {number, etc...},&lt;br /&gt;
    options = {&amp;quot;alt&amp;quot;, &amp;quot;ctrl&amp;quot;, &amp;quot;shift&amp;quot;, &amp;quot;right&amp;quot;} ) -&amp;gt; nil | boolean true&lt;br /&gt;
&#039;&#039;&#039;Spring.GiveOrderToUnitArray&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( unitArray = { [1] = unitID, etc... },&lt;br /&gt;
    number cmdID,&lt;br /&gt;
    params = {number, etc...},&lt;br /&gt;
    options = {&amp;quot;alt&amp;quot;, &amp;quot;ctrl&amp;quot;, &amp;quot;shift&amp;quot;, &amp;quot;right&amp;quot;} ) -&amp;gt; nil | boolean true&lt;br /&gt;
&#039;&#039;&#039;Spring.GiveOrderArrayToUnitMap&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( unitMap = { [number unitID] = dontCare, etc... },&lt;br /&gt;
    orderArray = {&lt;br /&gt;
      { number cmdID,&lt;br /&gt;
        params = {number, etc...},&lt;br /&gt;
        options = {&amp;quot;alt&amp;quot;, &amp;quot;ctrl&amp;quot;, &amp;quot;shift&amp;quot;, &amp;quot;right&amp;quot;}&lt;br /&gt;
      }, ..&lt;br /&gt;
    }&lt;br /&gt;
  ) -&amp;gt; nil | boolean true&lt;br /&gt;
&#039;&#039;&#039;Spring.GiveOrderArrayToUnitArray&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( unitArray = { [1] = number unitID, etc... },&lt;br /&gt;
    orderArray = {&lt;br /&gt;
      { number cmdID,&lt;br /&gt;
        params = {number, etc...},&lt;br /&gt;
        options = {&amp;quot;alt&amp;quot;, &amp;quot;ctrl&amp;quot;, &amp;quot;shift&amp;quot;, &amp;quot;right&amp;quot;}&lt;br /&gt;
      }, ..&lt;br /&gt;
    }&lt;br /&gt;
  ) -&amp;gt; nil | boolean true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetBuildFacing&#039;&#039;&#039;&lt;br /&gt;
  ( int Facing ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetBuildSpacing&#039;&#039;&#039;&lt;br /&gt;
  ( int Spacing ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== Unit NoDraw,NoSelect,NoMinimap ==&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitNoDraw&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;LuaGadgets only!&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID, boolean noDraw ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitNoSelect&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;LuaGadgets only!&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID, boolean noSelect ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitNoMinimap&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;LuaGadgets only!&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID, boolean noMinimap ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
= GUI =&lt;br /&gt;
&#039;&#039;&#039;Spring.SetDrawSky&#039;&#039;&#039;&lt;br /&gt;
  ( boolean drawSky ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.SetDrawWater&#039;&#039;&#039;&lt;br /&gt;
  ( boolean drawWater ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.SetDrawGround&#039;&#039;&#039;&lt;br /&gt;
  ( boolean drawGround ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.DrawUnitCommands&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil&lt;br /&gt;
  ( { [1] = unitID, ... } [, false ] ) -&amp;gt; nil&lt;br /&gt;
  ( { [unitID] = anything, ... }, true  ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetTeamColor&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, number r, number g, number b ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.AssignMouseCursor&#039;&#039;&#039; &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;default hotspot is center!&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( string &amp;quot;cmdName&amp;quot;, string &amp;quot;iconFileName&amp;quot;&lt;br /&gt;
    [, boolean overwrite [, boolean hotSpotTopLeft] ] ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.ReplaceMouseCursor&#039;&#039;&#039; &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;default hotspot is center!&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( string &amp;quot;oldFileName&amp;quot;, string &amp;quot;newFileName&amp;quot; [, boolean hotSpotTopLeft] ) -&amp;gt; nil | boolean&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetCustomCommandDrawData&#039;&#039;&#039; &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;register your custom cmd so it gets visible in the unit&#039;s cmd queue&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number cmdID,&lt;br /&gt;
    number cmdIconID | string iconname | nil,&lt;br /&gt;
    { number r, number g, number b, number a } [, boolean showArea ] ) -&amp;gt; nil | true&lt;br /&gt;
&lt;br /&gt;
= Sharing =&lt;br /&gt;
&#039;&#039;&#039;Spring.SetShareLevel&#039;&#039;&#039; &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;note: shareLevel is 0&amp;lt;= x &amp;lt;= 1&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( string &amp;quot;metal&amp;quot; | &amp;quot;energy&amp;quot;, number shareLevel ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.ShareResources&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number teamID, string &amp;quot;units&amp;quot; ) -&amp;gt; nil&lt;br /&gt;
  ( number teamID, string &amp;quot;metal&amp;quot; | &amp;quot;energy&amp;quot;, number amount ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
= UnitDef RadarIcons &amp;amp; BuildPics =&lt;br /&gt;
&#039;&#039;&#039;Spring.AddUnitIcon&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( string iconName, string texFile [, number size [, number dist [, boolean radAdjust ]]] ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.FreeUnitIcon&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( string iconName ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitDefIcon&#039;&#039;&#039;  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;(RadarIcon)&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitDefID, string iconName ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.SetUnitDefImage&#039;&#039;&#039;   &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;(BuildPic)&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitDefID, luaTexture | string texFile ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
= Camera =&lt;br /&gt;
&#039;&#039;&#039;Spring.SetCameraState&#039;&#039;&#039;&lt;br /&gt;
  ( table camState, number camTime) -&amp;gt; nil | boolean&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;camState has the same format as the output of Spring.GetCameraState(). See [[Lua_camState]] for details about camState.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetCameraTarget&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z, number y [,number transTime] ) -&amp;gt; nil&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;For Spring Engine XZ represents horizontal, from north west corner of map and Y vertical, from water level and rising.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.SetCameraOffset&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( [number px = 0 [, number py = 0 [, number pz = 0&lt;br /&gt;
     [, number tx = 0 [, number ty = 0 [, number tz = 0]]]]]] ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
= (Virtual-)FileSystem =&lt;br /&gt;
&#039;&#039;&#039;Spring.ExtractModArchiveFile&#039;&#039;&#039;&lt;br /&gt;
  ( string modfile ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.CreateDir&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number path ) -&amp;gt; nil | boolean&lt;br /&gt;
&lt;br /&gt;
= Engine Config =&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;The following functions read the engine configs saved in .springrc, springsettings.cfg or what ever your os prefers.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetConfigInt&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( string name [, number default] ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.SetConfigInt&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( string name, number value ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.GetConfigString&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( string name [, string default] ) -&amp;gt; nil | string&lt;br /&gt;
&#039;&#039;&#039;Spring.SetConfigString&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( string name, string value ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
= Make Font =&lt;br /&gt;
&#039;&#039;&#039;Spring.MakeFont&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(needs ModUICtrl)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( [string inputFile], table options ) -&amp;gt; nil | boolean&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;options = {&lt;br /&gt;
  outName = string,&lt;br /&gt;
  inData = string,&lt;br /&gt;
  height = number,&lt;br /&gt;
  texWidth = number,&lt;br /&gt;
  minChar = number,&lt;br /&gt;
  maxChar = number,&lt;br /&gt;
  outlineMode = number,&lt;br /&gt;
  outlineRadius = number,&lt;br /&gt;
  outlineWeight = number,&lt;br /&gt;
  padding = number,&lt;br /&gt;
  stuffing = number,&lt;br /&gt;
  debug = number,&lt;br /&gt;
}&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= World Primitives =&lt;br /&gt;
&amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;outdated! use opengl api instead!&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.AddWorldIcon&#039;&#039;&#039;&lt;br /&gt;
  ( number cmdID, number x, number y, number z ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.AddWorldText&#039;&#039;&#039;&lt;br /&gt;
  ( string &amp;quot;text&amp;quot;, number x, number y, number z ) -&amp;gt; nil&lt;br /&gt;
&#039;&#039;&#039;Spring.AddWorldUnit&#039;&#039;&#039;&lt;br /&gt;
  ( number unitDefID,&lt;br /&gt;
    number x, number y, number z,&lt;br /&gt;
    number team, number facing) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
= Misc =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.Restart&#039;&#039;&#039; (0.79+)&lt;br /&gt;
  ( string commandline_args, string startscript ) -&amp;gt; if this call returns, something went wrong&lt;br /&gt;
commandline_args are commandline arguments passed to spring executable&lt;br /&gt;
&lt;br /&gt;
startscript is the CONTENT of the script.txt spring should use to start (if empty, no startscript is added, you can still point spring to your custom script.txt when you add the filepath to commandline_args&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_SyncedRead&amp;diff=11886</id>
		<title>Lua SyncedRead</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_SyncedRead&amp;diff=11886"/>
		<updated>2009-09-19T17:09:39Z</updated>

		<summary type="html">&lt;p&gt;Spliff: /* Ground Informations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Lua_Scripting|Lua Scripting]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
== Game ==&lt;br /&gt;
=== Special TeamID Variables ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(those special TeamIDs are not supported by all functions)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.ALL_UNITS&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.MY_UNITS&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.ALLY_UNITS&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.ENEMY_UNITS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGaiaTeamID&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; number teamID&lt;br /&gt;
&lt;br /&gt;
=== GameStates ===&lt;br /&gt;
&#039;&#039;&#039;Spring.IsGodModeEnabled&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.IsCheatingEnabled&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.IsDevLuaEnabled&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.IsEditDefsEnabled&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.AreHelperAIsEnabled&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.FixedAllies&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; nil | boolean&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.IsGameOver&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
=== Rules ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;Those functions allow to save data per Game,Team and Unit.&amp;lt;br&amp;gt;The advantage of it is that it can be read from anywhere (even from LuaUI and AIs!)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.GetRulesInfoMap&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; { [key1] = string value1, [key2] = string value2, ... }&lt;br /&gt;
  ( string &amp;quot;key&amp;quot; ) -&amp;gt; string&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGameRulesParam&#039;&#039;&#039;&lt;br /&gt;
  ( number index | string ruleName ) -&amp;gt; number value&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGameRulesParams&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; { [rule1] = number value1, [rule2] = number value2, ... }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamRulesParam&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, number index | string ruleName ) -&amp;gt; nil | number value&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamRulesParams&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil | { [rule1] = number value1, [rule2] = number value2, ... }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitRulesParam&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number index | string ruleName ) -&amp;gt; nil | number value&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitRulesParams&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | { [rule1] = number value1, [rule2] = number value2, ... }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mod-/Map-Options ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetModOptions&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; {} | { &amp;quot;keyName1&amp;quot; = string &amp;quot;value&amp;quot;, &amp;quot;keyName2&amp;quot; = string &amp;quot;value&amp;quot;, ... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetMapOptions&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; {} | { &amp;quot;keyName1&amp;quot; = string &amp;quot;value&amp;quot;, &amp;quot;keyName2&amp;quot; = string &amp;quot;value&amp;quot;, ... }&lt;br /&gt;
&lt;br /&gt;
=== Speed/Time ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGameSpeed&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; number userSpeedFactor, number speedFactor, boolean paused&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGameFrame&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; number frameNum%dayFrames, number frameNum/dayFrames&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGameSeconds&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; number seconds&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Vectors ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetWind&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; number dirX, number dirY, number dirZ, &lt;br /&gt;
         number strength,  number normDirX, number normDirY, number normDirZ&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetHeadingFromVector&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; number heading&lt;br /&gt;
&#039;&#039;&#039;Spring.GetVectorFromHeading&#039;&#039;&#039;&lt;br /&gt;
  ( number heading ) -&amp;gt; number x, number z&lt;br /&gt;
&lt;br /&gt;
== Sides/Factions ==&lt;br /&gt;
&#039;&#039;&#039;Spring.GetSideData&#039;&#039;&#039;&lt;br /&gt;
  ( string sideName ) -&amp;gt; nil | string startUnit, string caseSensitiveSideName&lt;br /&gt;
  ( number sideID ) -&amp;gt; nil | string sideName, string startUnit, string caseSensitiveSideName&lt;br /&gt;
  ( ) -&amp;gt; { [1] = { sideName=string,caseName=string,startUnit=string}, [2] = .., .. }&lt;br /&gt;
&lt;br /&gt;
== Teams ==&lt;br /&gt;
=== StartBoxes/StartPositions ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllyTeamStartBox&#039;&#039;&#039;&lt;br /&gt;
  ( number allyID ) -&amp;gt; nil | number xmin, number zmin, number xmax, number zmax&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamStartPosition&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
&lt;br /&gt;
=== Player,Team,Ally Lists/Info ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetPlayerList&#039;&#039;&#039;&lt;br /&gt;
  ( [number teamID = -1 | boolean onlyActive = false] [, number teamID | boolean onlyActive])&lt;br /&gt;
  -&amp;gt; nil | { [1] = number playerID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamList&#039;&#039;&#039;&lt;br /&gt;
  ( [number allyTeamID = -1] ) -&amp;gt; nil | { [1] = number teamID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllyTeamList&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; { [1] = number allyTeamID, etc... }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetPlayerInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number playerID ) -&amp;gt; &lt;br /&gt;
    nil | string  &amp;quot;name&amp;quot;,  &amp;lt;font color=#55ee99&amp;gt;(in synced code this is &amp;quot;SYNCED_NONAME&amp;quot;!)&amp;lt;/font&amp;gt;&lt;br /&gt;
          boolean active,&lt;br /&gt;
          boolean spectator,&lt;br /&gt;
          number  teamID,&lt;br /&gt;
          number  allyTeamID,&lt;br /&gt;
          number  pingTime,&lt;br /&gt;
          number  cpuUsage,&lt;br /&gt;
          string  country,&lt;br /&gt;
          number  rank&lt;br /&gt;
          table   customPlayerKeys&lt;br /&gt;
&#039;&#039;&#039;Spring.GetPlayerControlledUnit&#039;&#039;&#039;&lt;br /&gt;
  ( number playerID ) -&amp;gt; nil | number unitID&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllyTeamInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number allyteamID ) -&amp;gt; nil | table   customTeamKeys&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt;&lt;br /&gt;
    nil | number  teamNum,&lt;br /&gt;
          number  leader,&lt;br /&gt;
          boolean isDead,&lt;br /&gt;
          boolean isAiTeam,&lt;br /&gt;
          string  &amp;quot;side&amp;quot;,&lt;br /&gt;
          number  allyTeam&lt;br /&gt;
          table   customTeamKeys&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamResources&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, string &amp;quot;metal&amp;quot; | &amp;quot;energy&amp;quot; ) -&amp;gt;&lt;br /&gt;
    nil | number currentLevel,&lt;br /&gt;
          number storage,&lt;br /&gt;
          number pull,&lt;br /&gt;
          number income,&lt;br /&gt;
          number expense,&lt;br /&gt;
          number share,&lt;br /&gt;
          number sent,&lt;br /&gt;
          number received&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitStats&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt;&lt;br /&gt;
    nil | number killed,&lt;br /&gt;
          number died,&lt;br /&gt;
          number capturedBy,&lt;br /&gt;
          number capturedFrom,&lt;br /&gt;
          number received,&lt;br /&gt;
          number sent&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamStatsHistory&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, number startTime, number endTime ) -&amp;gt;&lt;br /&gt;
    {&lt;br /&gt;
      [1] = {&lt;br /&gt;
        &amp;quot;time&amp;quot;             = number,&lt;br /&gt;
        &amp;quot;frame&amp;quot;            = number,&lt;br /&gt;
        &amp;quot;metalUsed&amp;quot;        = number,&lt;br /&gt;
        &amp;quot;metalProduced&amp;quot;    = number,&lt;br /&gt;
        &amp;quot;metalExcess&amp;quot;      = number,&lt;br /&gt;
        &amp;quot;metalReceived&amp;quot;    = number,&lt;br /&gt;
        &amp;quot;metalSent&amp;quot;        = number,&lt;br /&gt;
        &amp;quot;energyUsed&amp;quot;       = number,&lt;br /&gt;
        &amp;quot;energyProduced&amp;quot;   = number,&lt;br /&gt;
        &amp;quot;energyExcess&amp;quot;     = number,&lt;br /&gt;
        &amp;quot;energyReceived&amp;quot;   = number,&lt;br /&gt;
        &amp;quot;energySent&amp;quot;       = number,&lt;br /&gt;
        &amp;quot;damageDealt&amp;quot;      = number,&lt;br /&gt;
        &amp;quot;damageReceived&amp;quot;   = number,&lt;br /&gt;
        &amp;quot;unitsProduced&amp;quot;    = number,&lt;br /&gt;
        &amp;quot;unitsDied&amp;quot;        = number,&lt;br /&gt;
        &amp;quot;unitsReceived&amp;quot;    = number,&lt;br /&gt;
        &amp;quot;unitsSent&amp;quot;        = number,&lt;br /&gt;
        &amp;quot;unitsCaptured&amp;quot;    = number,&lt;br /&gt;
        &amp;quot;unitsOutCaptured&amp;quot; = number,&lt;br /&gt;
        &amp;quot;unitsKilled&amp;quot;      = number&lt;br /&gt;
      }, ...&lt;br /&gt;
   }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamLuaAI&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; string &amp;quot;luaAI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Teams/PlayersAllied ===&lt;br /&gt;
&#039;&#039;&#039;Spring.AreTeamsAllied&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID1, number teamID2 ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.ArePlayersAllied&#039;&#039;&#039;&lt;br /&gt;
  ( number playerID1, number playerID2 ) -&amp;gt; nil | boolean&lt;br /&gt;
&lt;br /&gt;
== Units ==&lt;br /&gt;
=== GetUnits ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllUnits&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; nil | unitTable = { [1] = number unitID, ... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnits&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitsSorted&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil |&lt;br /&gt;
    unitDefTable = {&lt;br /&gt;
      [number unitDefID] = { [1] = [number unitID], etc... },&lt;br /&gt;
      etc...&lt;br /&gt;
    }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitsCounts&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil | countTable = { [number unitDefID] = count, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitsByDefs&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, number unitDefID | { number unitDefID1, ... } )&lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitDefCount&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, number unitDefID ) -&amp;gt; nil | number count&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitCount&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil | number count&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitsInRectangle&#039;&#039;&#039;&lt;br /&gt;
  ( number xmin, number zmin, number xmax, number zmax [,number teamID] ) &lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitsInBox&#039;&#039;&#039;&lt;br /&gt;
  ( number xmin, number ymin, number zmin,&lt;br /&gt;
    number xmax, number ymax, number zmax [,number teamID] )&lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitsInSphere&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z, number radius [,number teamID] )&lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitsInCylinder&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z, number radius [,number teamID] )&lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitsInPlanes&#039;&#039;&#039;&lt;br /&gt;
  ( planes = { [1] = { number nx, number ny, number nz, number d }, etc... } )&lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;&lt;br /&gt;
  plane normals point towards accepted space,&lt;br /&gt;
  so the acceptance criteria for each plane is:&lt;br /&gt;
    radius     = unit radius&lt;br /&gt;
    px, py, pz = unit position&lt;br /&gt;
    [(nx * px) + (ny * py) + (nz * pz) + (d - radius)]  &amp;lt;=  0&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitNearestAlly&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number range ] ) -&amp;gt; nil | number unitID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitNearestEnemy&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number range [, bool useLOS]] ) -&amp;gt; nil | number unitID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Unit Informations ===&lt;br /&gt;
&#039;&#039;&#039;Spring.ValidUnitID&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsDead&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitTooltip&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | string tooltip&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitDefID&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number unitDefID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitTeam&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number teamID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitAllyTeam&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number allyID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitLineage&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number lineage | number lineage, boolean lineageIsRoot&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitNeutral&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean neutral&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitHealth&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number health, number maxHealth, number paralyzeDamage,&lt;br /&gt;
                             number captureProgress, number buildProgress&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitArmored&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsStunned&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean stunned_or_inbuild, boolean stunned, boolean inbuild&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitResources&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number metalMake, number metalUse,&lt;br /&gt;
                             number energyMake, number energyUse&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitExperience&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number experience&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitStates&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | {&lt;br /&gt;
    &amp;quot;firestate&amp;quot; = number,&lt;br /&gt;
    &amp;quot;movestate&amp;quot; = number,&lt;br /&gt;
    &amp;quot;repeat&amp;quot; = boolean,&lt;br /&gt;
    &amp;quot;cloak&amp;quot; = boolean,&lt;br /&gt;
    &amp;quot;active&amp;quot; = boolean,&lt;br /&gt;
    &amp;quot;trajectory&amp;quot; = boolean,&lt;br /&gt;
    [&amp;quot;autoland&amp;quot; = boolean,]&lt;br /&gt;
    [&amp;quot;autorepairlevel&amp;quot; = number,]&lt;br /&gt;
    [&amp;quot;loopbackattack&amp;quot; = boolean]&lt;br /&gt;
  } &lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsActive&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsCloaked&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitSelfDTime&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitStockpile&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number numStockpiled, number numStockpileQued,&lt;br /&gt;
                             number buildPercent&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitHeight&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitRadius&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPosition&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;returns the center position of the unit (midpos).&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitBasePosition&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;returns the bottom of the unit.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitDirection&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number dx, number dy, number dz&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitHeading&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number heading&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitVelocity&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number velx, number vely, number velz&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitBuildFacing&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsBuilding&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number unitID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitTransporter&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number unitID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsTransporting&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitShieldState&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number isEnabled, number curPower&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitTravel&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number travel, number travelPeriod&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitFuel&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitFlanking&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, string &amp;quot;dir&amp;quot; ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
  ( number unitID, string &amp;quot;mode&amp;quot; | &amp;quot;moveFactor&amp;quot; | &amp;quot;minDamage&amp;quot; | &amp;quot;maxDamage&amp;quot; ) -&amp;gt; nil | number&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number mode, number modilityAdd,&lt;br /&gt;
    number minDamage, number maxDamage, number dirX, number dirY, number dirZ&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitSensorRadius&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, string type ) -&amp;gt; nil | number radius&lt;br /&gt;
  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;possible types are:&amp;lt;br&amp;gt;airLos, radar, sonar, seismic, radarJammer &amp;amp; sonarJammer&amp;lt;/font&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitLosState&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;raw is only available in gadgets&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID [, number allyTeamID [, boolean raw] ] ) -&amp;gt; nil |&lt;br /&gt;
  { [&amp;quot;los&amp;quot; = true] [, &amp;quot;radar&amp;quot; = true] [, &amp;quot;typed&amp;quot; = true] }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitSeparation&#039;&#039;&#039; &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;(returns the distance of 2 units)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID1, number unitID2 [, boolean 2D ] ) -&amp;gt; nil | number distance&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitDefDimensions&#039;&#039;&#039;&lt;br /&gt;
  ( number unitDefID ) -&amp;gt; nil |&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;height&amp;quot; = number,&lt;br /&gt;
      &amp;quot;radius&amp;quot; = number,&lt;br /&gt;
      &amp;quot;midx&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;minx&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;maxx&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;midy&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;miny&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;maxy&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;midz&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;minz&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;maxz&amp;quot;   = number&lt;br /&gt;
    }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitWeaponVectors&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number weaponNum ) -&amp;gt; nil | number posX, number posY, number posZ,&lt;br /&gt;
    number dirX, number dirZ, number dirY&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitWeaponState&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number weaponNum ) -&amp;gt; nil |&lt;br /&gt;
    boolean angleGood, boolean loaded, number reloadFrame,&lt;br /&gt;
    number salvoLeft, number numStockpiled&lt;br /&gt;
  ( number unitID, number weaponNum, string tag ) -&amp;gt; nil | number&lt;br /&gt;
  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;tag can be:&lt;br /&gt;
  &amp;quot;reloadState&amp;quot; | &amp;quot;reloadTime&amp;quot; | &amp;quot;accuracy&amp;quot; | &amp;quot;sprayAngle&amp;quot; | &lt;br /&gt;
  &amp;quot;range&amp;quot; | &amp;quot;projectileSpeed&amp;quot; | &amp;quot;burst&amp;quot; | &amp;quot;burstRate&amp;quot; | &amp;quot;projectiles&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitLastAttacker&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number unitID&lt;br /&gt;
&lt;br /&gt;
=== Unit Pieces ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitVectors&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | {frontX,frontY,frontZ}, {upX,upY,upZ}, {rightX,rightY,rightZ}&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPiecePosition&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number piece ) -&amp;gt; number posx, number posy, number posz&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;Returns piece position in unit space&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceDirection&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number piece ) -&amp;gt; number dirx, number diry, number dirz&lt;br /&gt;
&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Broken (returns reverse direction in piece space for pieces with &amp;gt;= 2 vertices, and returns (1,1,1) for pieces with &amp;lt; 2 vertices)&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceMatrix&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number piece ) -&amp;gt; { [1] = number, ... , [16] = number }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceList&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; { [1] = string &amp;quot;piecename&amp;quot;, ... , [pieceNumN] = string &amp;quot;piecename&amp;quot; }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceMap&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; { &amp;quot;piecename1&amp;quot; = pieceNum1, ... , &amp;quot;piecenameN&amp;quot; = pieceNumN }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number piece ) -&amp;gt; {&lt;br /&gt;
    &amp;quot;name&amp;quot;     = string &amp;quot;piecename&amp;quot;,&lt;br /&gt;
    &amp;quot;isEmpty&amp;quot;  = boolean,&lt;br /&gt;
    &amp;quot;children&amp;quot; = { [1] = string &amp;quot;piecename&amp;quot;, ... },&lt;br /&gt;
    &amp;quot;min&amp;quot;      = { [1] = number x, [2] = number y, [3] = number z },&lt;br /&gt;
    &amp;quot;max&amp;quot;      = { [1] = number x, [2] = number y, [3] = number z },&lt;br /&gt;
    &amp;quot;offset&amp;quot;   = { [1] = number x, [2] = number y, [3] = number z },    &lt;br /&gt;
  }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitScriptPiece&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number scriptPiece ] )&lt;br /&gt;
   -&amp;gt; nil | { scriptPieceNum = number modelPieceNum } | number modelPieceNum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;This functions translate the COB ScriptPiece numbers into the ModelPiece numbers (the set of ScriptPieces is a subset of the ModelPieces, means #ScriptPieces &amp;lt;= #ModelPieces), which is used in all other functions (the &amp;quot;number piece&amp;quot; means always the modelpiece). So if you get via Cob2Lua a pieceID you have to translate it with this function. Btw the COB ScriptPiece number is equal with the piece position in the &amp;lt;i&amp;gt;piece&amp;lt;/i&amp;gt; definition in your cob/bos.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitScriptNames&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID )&lt;br /&gt;
   -&amp;gt; { &amp;quot;cobpiecename1&amp;quot; = ScriptPieceNum1, ... , &amp;quot;cobpiecenameN&amp;quot; = ScriptPieceNumN }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPiecePosDir&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number pieceNum ) -&amp;gt; nil | number posX, number posY, number posZ,&lt;br /&gt;
    number dirX, number dirZ, number dirY&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;Returns piece position and direction in world space. The direction (dirX, dirY, dirZ) is not necessarily normalized.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CommandQueues ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitCommands&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number count] ) -&amp;gt; nil | commandQueueTable = {&lt;br /&gt;
     [1] = {&lt;br /&gt;
       &amp;quot;id&amp;quot;      = number,&lt;br /&gt;
       &amp;quot;params&amp;quot;  = { [1] = number, ...},&lt;br /&gt;
       &amp;quot;options&amp;quot; = {&lt;br /&gt;
         &amp;quot;coded&amp;quot;    = number,&lt;br /&gt;
         &amp;quot;alt&amp;quot;      = boolean,&lt;br /&gt;
         &amp;quot;ctrl&amp;quot;     = boolean,&lt;br /&gt;
         &amp;quot;shift&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;right&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;internal&amp;quot; = boolean&lt;br /&gt;
       }&lt;br /&gt;
     }, ...&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCommandQueue&#039;&#039;&#039;   &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;(same as Spring.GetUnitCommands)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID [, number count] ) -&amp;gt; nil | commandQueueTable = {&lt;br /&gt;
     [1] = {&lt;br /&gt;
       &amp;quot;id&amp;quot;      = number,&lt;br /&gt;
       &amp;quot;params&amp;quot;  = { [1] = number, ...},&lt;br /&gt;
       &amp;quot;options&amp;quot; = {&lt;br /&gt;
         &amp;quot;coded&amp;quot;    = number,&lt;br /&gt;
         &amp;quot;alt&amp;quot;      = boolean,&lt;br /&gt;
         &amp;quot;ctrl&amp;quot;     = boolean,&lt;br /&gt;
         &amp;quot;shift&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;right&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;internal&amp;quot; = boolean&lt;br /&gt;
       }&lt;br /&gt;
     }, ...&lt;br /&gt;
   }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFullBuildQueue&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt;&lt;br /&gt;
  nil | buildOrders = {&lt;br /&gt;
          [1] = { [number unitDefID] = number count },  etc...&lt;br /&gt;
        }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetRealBuildQueue&#039;&#039;&#039; &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;(cleans the buildqueue of things the unit can&#039;t build itself)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID ) -&amp;gt;&lt;br /&gt;
  nil | buildOrders = {&lt;br /&gt;
          [1] = { [number unitDefID] = number count },  etc...&lt;br /&gt;
        }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFactoryCommands&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number count] ) -&amp;gt; nil | commandQueueTable = {&lt;br /&gt;
     [1] = {&lt;br /&gt;
       &amp;quot;id&amp;quot;      = number,&lt;br /&gt;
       &amp;quot;params&amp;quot;  = { [1] = number, ...},&lt;br /&gt;
       &amp;quot;options&amp;quot; = {&lt;br /&gt;
         &amp;quot;coded&amp;quot;    = number,&lt;br /&gt;
         &amp;quot;alt&amp;quot;      = boolean,&lt;br /&gt;
         &amp;quot;ctrl&amp;quot;     = boolean,&lt;br /&gt;
         &amp;quot;shift&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;right&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;internal&amp;quot; = boolean&lt;br /&gt;
       }&lt;br /&gt;
     }, ...&lt;br /&gt;
   }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFactoryCounts&#039;&#039;&#039; (used to get the buildqueue of a factory, seems screwed o_O)&lt;br /&gt;
  ( number unitID [, number count [, boolean addCMDs ] ] ) -&amp;gt; nil | commandQueueTable = {&lt;br /&gt;
     [2] = { [number unitDefID | number -cmdID] = number count }, ...&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
=== Command Descriptions/Buttons ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitCmdDescs&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number startIndex [, number endIndex ] ] ) -&amp;gt; nil | {&lt;br /&gt;
      [1] = {&lt;br /&gt;
        &amp;quot;id&amp;quot;          = number,&lt;br /&gt;
        &amp;quot;type&amp;quot;        = number,&lt;br /&gt;
        &amp;quot;name&amp;quot;        = string,&lt;br /&gt;
        &amp;quot;action&amp;quot;      = string,&lt;br /&gt;
        &amp;quot;tooltip&amp;quot;     = string,&lt;br /&gt;
        &amp;quot;texture&amp;quot;     = string,&lt;br /&gt;
        &amp;quot;cursor&amp;quot;      = string,&lt;br /&gt;
        &amp;quot;hidden&amp;quot;      = boolean,&lt;br /&gt;
        &amp;quot;disabled&amp;quot;    = boolean,&lt;br /&gt;
        &amp;quot;showUnique&amp;quot;  = boolean,&lt;br /&gt;
        &amp;quot;onlyTexture&amp;quot; = boolean,&lt;br /&gt;
&lt;br /&gt;
        &amp;quot;params&amp;quot;      = { [1] = string, ... }&lt;br /&gt;
     }, ...&lt;br /&gt;
   }&lt;br /&gt;
&#039;&#039;&#039;Spring.FindUnitCmdDesc&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number cmdID ) -&amp;gt; nil | number index&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
=== GetFeatures ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeaturesInRectangle&#039;&#039;&#039;&lt;br /&gt;
  ( number xmin, number zmin, number xmax, number zmax [,number teamID] )&lt;br /&gt;
    -&amp;gt; nil | featureTable = { [1] = number featureID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllFeatures&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; nil | { [1] = number featureID, ... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureList&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt; NOTE: this is not really required, now all FeatureDefs are pre-loaded&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Feature Informations ===&lt;br /&gt;
&#039;&#039;&#039;Spring.ValidFeatureID&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureDefID&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number featureDefID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureTeam&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number teamID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureAllyTeam&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number allyID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureHealth&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number health, number maxHealth, number resurrectProgress&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureHeight&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureRadius&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeaturePosition&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureDirection&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number dirx, number diry, number dirz&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureHeading&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number heading&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureResources&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number RemainingMetal, number maxMetal,&lt;br /&gt;
                                number RemainingEnergy, number maxEnergy, number reclaimLeft&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureNoSelect&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | boolean noSelect&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureResurrect&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | string UnitDefName, number buildFacing&lt;br /&gt;
&lt;br /&gt;
== COB ==&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCOBUnitVar&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, integer varID [, boolean unpack = false ] )&lt;br /&gt;
   -&amp;gt; nil | number value | number unpackedX, number unpackedY&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCOBTeamVar&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, integer varID [, boolean unpack = false ] )&lt;br /&gt;
   -&amp;gt; nil | number value | number unpackedX, number unpackedY&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCOBAllyTeamVar&#039;&#039;&#039;&lt;br /&gt;
  ( number allyID, integer varID [, boolean unpack = false ] )&lt;br /&gt;
   -&amp;gt; nil | number value | number unpackedX, number unpackedY&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCOBGlobalVar&#039;&#039;&#039;&lt;br /&gt;
  ( integer varID [, boolean unpack = false ] )&lt;br /&gt;
   -&amp;gt; nil | number value | number unpackedX, number unpackedY&lt;br /&gt;
&lt;br /&gt;
== Ground ==&lt;br /&gt;
=== Ground Informations ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;Elevation is y. Water level is always at y=0. Ground height can be changed during play (terraform or deformation).&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundHeight&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; number y&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundOrigHeight&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; number y&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundNormal&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; number x, number y, number z&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; string &amp;quot;Type&amp;quot;, number metal, number hardness,&lt;br /&gt;
                            number tankSpeed, number kbotSpeed, number hoverSpeed,&lt;br /&gt;
                            number shipSpeed, boolean receiveTracks&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundBlocked&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z |&lt;br /&gt;
    number x1, number z1, number x2, number z2 )&lt;br /&gt;
    -&amp;gt; nil |  string &amp;quot;feature&amp;quot;, number featureID  |  string &amp;quot;unit&amp;quot;, number unitID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundExtremes&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; nil | number minHeight, number maxHeight&lt;br /&gt;
&lt;br /&gt;
=== Test Building ===&lt;br /&gt;
&#039;&#039;&#039;Spring.TestBuildOrder&#039;&#039;&#039;&lt;br /&gt;
  ( number unitDefID, number x, number y, number z, number facing)&lt;br /&gt;
    -&amp;gt; number blocking [,number featureID]&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;blocking can be:&lt;br /&gt;
    0 - blocked&lt;br /&gt;
    1 - mobile unit in the way&lt;br /&gt;
    2 - free  (or if featureID is != 0 then with a blocking feature that can be reclaimed)&lt;br /&gt;
  facing can be:&lt;br /&gt;
    0, &amp;quot;s&amp;quot;, &amp;quot;south&amp;quot;&lt;br /&gt;
    1, &amp;quot;e&amp;quot;, &amp;quot;east&amp;quot;&lt;br /&gt;
    2, &amp;quot;n&amp;quot;, &amp;quot;north&amp;quot;&lt;br /&gt;
    3, &amp;quot;w&amp;quot;, &amp;quot;west&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.Pos2BuildPos&#039;&#039;&#039;&lt;br /&gt;
  ( number unitDefID, number x, number y, number z ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
&lt;br /&gt;
=== PathFinding ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitEstimatedPath&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | {&lt;br /&gt;
     [1] = { x,y,z }, ...&lt;br /&gt;
   },{&lt;br /&gt;
     [1] = startIdxOfDetailedPath,&lt;br /&gt;
     [2] = startIdxOfDetailedEstimatedPath1,&lt;br /&gt;
     [3] = startIdxOfDetailedEstimatedPath2,&lt;br /&gt;
   }&lt;br /&gt;
  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;GetUnitEstimatedPath() returns 2 tables:&lt;br /&gt;
    1 table the waypoints and 1 table with indices (in the waypoint table)&lt;br /&gt;
    when a new (more lazy) pathfinding algorithm  begins.&lt;br /&gt;
    So the waypoint table contains 3 different levels of details.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== LOS ===&lt;br /&gt;
&#039;&#039;&#039;Spring.IsPosInLos&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z, number allyID ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.IsPosInRadar&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z, number allyID ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.IsPosInAirLos&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z, number allyID ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetPositionLosState&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z [, number allyID] )&lt;br /&gt;
    -&amp;gt; boolean LosOrRadar, boolean inLos, boolean inRadar&lt;br /&gt;
&#039;&#039;&#039;Spring.GetClosestValidPosition&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;//NOT FINISHED YET&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitDefID, number x, number z, number r ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== Projectiles ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectilePosition&#039;&#039;&#039;&lt;br /&gt;
  ( number projectileID ) --&amp;gt; px, py, pz&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileVelocity&#039;&#039;&#039;&lt;br /&gt;
  ( number projectileID ) --&amp;gt; vx, vy, vz&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_SyncedRead&amp;diff=11885</id>
		<title>Lua SyncedRead</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_SyncedRead&amp;diff=11885"/>
		<updated>2009-09-19T17:08:43Z</updated>

		<summary type="html">&lt;p&gt;Spliff: /* Ground Informations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Lua_Scripting|Lua Scripting]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
== Game ==&lt;br /&gt;
=== Special TeamID Variables ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(those special TeamIDs are not supported by all functions)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.ALL_UNITS&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.MY_UNITS&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.ALLY_UNITS&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.ENEMY_UNITS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGaiaTeamID&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; number teamID&lt;br /&gt;
&lt;br /&gt;
=== GameStates ===&lt;br /&gt;
&#039;&#039;&#039;Spring.IsGodModeEnabled&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.IsCheatingEnabled&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.IsDevLuaEnabled&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.IsEditDefsEnabled&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.AreHelperAIsEnabled&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.FixedAllies&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; nil | boolean&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.IsGameOver&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
=== Rules ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;Those functions allow to save data per Game,Team and Unit.&amp;lt;br&amp;gt;The advantage of it is that it can be read from anywhere (even from LuaUI and AIs!)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.GetRulesInfoMap&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; { [key1] = string value1, [key2] = string value2, ... }&lt;br /&gt;
  ( string &amp;quot;key&amp;quot; ) -&amp;gt; string&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGameRulesParam&#039;&#039;&#039;&lt;br /&gt;
  ( number index | string ruleName ) -&amp;gt; number value&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGameRulesParams&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; { [rule1] = number value1, [rule2] = number value2, ... }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamRulesParam&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, number index | string ruleName ) -&amp;gt; nil | number value&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamRulesParams&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil | { [rule1] = number value1, [rule2] = number value2, ... }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitRulesParam&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number index | string ruleName ) -&amp;gt; nil | number value&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitRulesParams&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | { [rule1] = number value1, [rule2] = number value2, ... }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mod-/Map-Options ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetModOptions&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; {} | { &amp;quot;keyName1&amp;quot; = string &amp;quot;value&amp;quot;, &amp;quot;keyName2&amp;quot; = string &amp;quot;value&amp;quot;, ... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetMapOptions&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; {} | { &amp;quot;keyName1&amp;quot; = string &amp;quot;value&amp;quot;, &amp;quot;keyName2&amp;quot; = string &amp;quot;value&amp;quot;, ... }&lt;br /&gt;
&lt;br /&gt;
=== Speed/Time ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGameSpeed&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; number userSpeedFactor, number speedFactor, boolean paused&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGameFrame&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; number frameNum%dayFrames, number frameNum/dayFrames&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGameSeconds&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; number seconds&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Vectors ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetWind&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; number dirX, number dirY, number dirZ, &lt;br /&gt;
         number strength,  number normDirX, number normDirY, number normDirZ&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetHeadingFromVector&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; number heading&lt;br /&gt;
&#039;&#039;&#039;Spring.GetVectorFromHeading&#039;&#039;&#039;&lt;br /&gt;
  ( number heading ) -&amp;gt; number x, number z&lt;br /&gt;
&lt;br /&gt;
== Sides/Factions ==&lt;br /&gt;
&#039;&#039;&#039;Spring.GetSideData&#039;&#039;&#039;&lt;br /&gt;
  ( string sideName ) -&amp;gt; nil | string startUnit, string caseSensitiveSideName&lt;br /&gt;
  ( number sideID ) -&amp;gt; nil | string sideName, string startUnit, string caseSensitiveSideName&lt;br /&gt;
  ( ) -&amp;gt; { [1] = { sideName=string,caseName=string,startUnit=string}, [2] = .., .. }&lt;br /&gt;
&lt;br /&gt;
== Teams ==&lt;br /&gt;
=== StartBoxes/StartPositions ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllyTeamStartBox&#039;&#039;&#039;&lt;br /&gt;
  ( number allyID ) -&amp;gt; nil | number xmin, number zmin, number xmax, number zmax&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamStartPosition&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
&lt;br /&gt;
=== Player,Team,Ally Lists/Info ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetPlayerList&#039;&#039;&#039;&lt;br /&gt;
  ( [number teamID = -1 | boolean onlyActive = false] [, number teamID | boolean onlyActive])&lt;br /&gt;
  -&amp;gt; nil | { [1] = number playerID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamList&#039;&#039;&#039;&lt;br /&gt;
  ( [number allyTeamID = -1] ) -&amp;gt; nil | { [1] = number teamID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllyTeamList&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; { [1] = number allyTeamID, etc... }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetPlayerInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number playerID ) -&amp;gt; &lt;br /&gt;
    nil | string  &amp;quot;name&amp;quot;,  &amp;lt;font color=#55ee99&amp;gt;(in synced code this is &amp;quot;SYNCED_NONAME&amp;quot;!)&amp;lt;/font&amp;gt;&lt;br /&gt;
          boolean active,&lt;br /&gt;
          boolean spectator,&lt;br /&gt;
          number  teamID,&lt;br /&gt;
          number  allyTeamID,&lt;br /&gt;
          number  pingTime,&lt;br /&gt;
          number  cpuUsage,&lt;br /&gt;
          string  country,&lt;br /&gt;
          number  rank&lt;br /&gt;
          table   customPlayerKeys&lt;br /&gt;
&#039;&#039;&#039;Spring.GetPlayerControlledUnit&#039;&#039;&#039;&lt;br /&gt;
  ( number playerID ) -&amp;gt; nil | number unitID&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllyTeamInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number allyteamID ) -&amp;gt; nil | table   customTeamKeys&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt;&lt;br /&gt;
    nil | number  teamNum,&lt;br /&gt;
          number  leader,&lt;br /&gt;
          boolean isDead,&lt;br /&gt;
          boolean isAiTeam,&lt;br /&gt;
          string  &amp;quot;side&amp;quot;,&lt;br /&gt;
          number  allyTeam&lt;br /&gt;
          table   customTeamKeys&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamResources&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, string &amp;quot;metal&amp;quot; | &amp;quot;energy&amp;quot; ) -&amp;gt;&lt;br /&gt;
    nil | number currentLevel,&lt;br /&gt;
          number storage,&lt;br /&gt;
          number pull,&lt;br /&gt;
          number income,&lt;br /&gt;
          number expense,&lt;br /&gt;
          number share,&lt;br /&gt;
          number sent,&lt;br /&gt;
          number received&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitStats&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt;&lt;br /&gt;
    nil | number killed,&lt;br /&gt;
          number died,&lt;br /&gt;
          number capturedBy,&lt;br /&gt;
          number capturedFrom,&lt;br /&gt;
          number received,&lt;br /&gt;
          number sent&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamStatsHistory&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, number startTime, number endTime ) -&amp;gt;&lt;br /&gt;
    {&lt;br /&gt;
      [1] = {&lt;br /&gt;
        &amp;quot;time&amp;quot;             = number,&lt;br /&gt;
        &amp;quot;frame&amp;quot;            = number,&lt;br /&gt;
        &amp;quot;metalUsed&amp;quot;        = number,&lt;br /&gt;
        &amp;quot;metalProduced&amp;quot;    = number,&lt;br /&gt;
        &amp;quot;metalExcess&amp;quot;      = number,&lt;br /&gt;
        &amp;quot;metalReceived&amp;quot;    = number,&lt;br /&gt;
        &amp;quot;metalSent&amp;quot;        = number,&lt;br /&gt;
        &amp;quot;energyUsed&amp;quot;       = number,&lt;br /&gt;
        &amp;quot;energyProduced&amp;quot;   = number,&lt;br /&gt;
        &amp;quot;energyExcess&amp;quot;     = number,&lt;br /&gt;
        &amp;quot;energyReceived&amp;quot;   = number,&lt;br /&gt;
        &amp;quot;energySent&amp;quot;       = number,&lt;br /&gt;
        &amp;quot;damageDealt&amp;quot;      = number,&lt;br /&gt;
        &amp;quot;damageReceived&amp;quot;   = number,&lt;br /&gt;
        &amp;quot;unitsProduced&amp;quot;    = number,&lt;br /&gt;
        &amp;quot;unitsDied&amp;quot;        = number,&lt;br /&gt;
        &amp;quot;unitsReceived&amp;quot;    = number,&lt;br /&gt;
        &amp;quot;unitsSent&amp;quot;        = number,&lt;br /&gt;
        &amp;quot;unitsCaptured&amp;quot;    = number,&lt;br /&gt;
        &amp;quot;unitsOutCaptured&amp;quot; = number,&lt;br /&gt;
        &amp;quot;unitsKilled&amp;quot;      = number&lt;br /&gt;
      }, ...&lt;br /&gt;
   }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamLuaAI&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; string &amp;quot;luaAI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Teams/PlayersAllied ===&lt;br /&gt;
&#039;&#039;&#039;Spring.AreTeamsAllied&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID1, number teamID2 ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.ArePlayersAllied&#039;&#039;&#039;&lt;br /&gt;
  ( number playerID1, number playerID2 ) -&amp;gt; nil | boolean&lt;br /&gt;
&lt;br /&gt;
== Units ==&lt;br /&gt;
=== GetUnits ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllUnits&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; nil | unitTable = { [1] = number unitID, ... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnits&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitsSorted&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil |&lt;br /&gt;
    unitDefTable = {&lt;br /&gt;
      [number unitDefID] = { [1] = [number unitID], etc... },&lt;br /&gt;
      etc...&lt;br /&gt;
    }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitsCounts&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil | countTable = { [number unitDefID] = count, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitsByDefs&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, number unitDefID | { number unitDefID1, ... } )&lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitDefCount&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, number unitDefID ) -&amp;gt; nil | number count&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitCount&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil | number count&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitsInRectangle&#039;&#039;&#039;&lt;br /&gt;
  ( number xmin, number zmin, number xmax, number zmax [,number teamID] ) &lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitsInBox&#039;&#039;&#039;&lt;br /&gt;
  ( number xmin, number ymin, number zmin,&lt;br /&gt;
    number xmax, number ymax, number zmax [,number teamID] )&lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitsInSphere&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z, number radius [,number teamID] )&lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitsInCylinder&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z, number radius [,number teamID] )&lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitsInPlanes&#039;&#039;&#039;&lt;br /&gt;
  ( planes = { [1] = { number nx, number ny, number nz, number d }, etc... } )&lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;&lt;br /&gt;
  plane normals point towards accepted space,&lt;br /&gt;
  so the acceptance criteria for each plane is:&lt;br /&gt;
    radius     = unit radius&lt;br /&gt;
    px, py, pz = unit position&lt;br /&gt;
    [(nx * px) + (ny * py) + (nz * pz) + (d - radius)]  &amp;lt;=  0&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitNearestAlly&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number range ] ) -&amp;gt; nil | number unitID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitNearestEnemy&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number range [, bool useLOS]] ) -&amp;gt; nil | number unitID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Unit Informations ===&lt;br /&gt;
&#039;&#039;&#039;Spring.ValidUnitID&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsDead&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitTooltip&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | string tooltip&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitDefID&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number unitDefID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitTeam&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number teamID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitAllyTeam&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number allyID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitLineage&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number lineage | number lineage, boolean lineageIsRoot&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitNeutral&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean neutral&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitHealth&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number health, number maxHealth, number paralyzeDamage,&lt;br /&gt;
                             number captureProgress, number buildProgress&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitArmored&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsStunned&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean stunned_or_inbuild, boolean stunned, boolean inbuild&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitResources&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number metalMake, number metalUse,&lt;br /&gt;
                             number energyMake, number energyUse&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitExperience&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number experience&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitStates&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | {&lt;br /&gt;
    &amp;quot;firestate&amp;quot; = number,&lt;br /&gt;
    &amp;quot;movestate&amp;quot; = number,&lt;br /&gt;
    &amp;quot;repeat&amp;quot; = boolean,&lt;br /&gt;
    &amp;quot;cloak&amp;quot; = boolean,&lt;br /&gt;
    &amp;quot;active&amp;quot; = boolean,&lt;br /&gt;
    &amp;quot;trajectory&amp;quot; = boolean,&lt;br /&gt;
    [&amp;quot;autoland&amp;quot; = boolean,]&lt;br /&gt;
    [&amp;quot;autorepairlevel&amp;quot; = number,]&lt;br /&gt;
    [&amp;quot;loopbackattack&amp;quot; = boolean]&lt;br /&gt;
  } &lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsActive&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsCloaked&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitSelfDTime&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitStockpile&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number numStockpiled, number numStockpileQued,&lt;br /&gt;
                             number buildPercent&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitHeight&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitRadius&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPosition&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;returns the center position of the unit (midpos).&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitBasePosition&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;returns the bottom of the unit.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitDirection&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number dx, number dy, number dz&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitHeading&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number heading&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitVelocity&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number velx, number vely, number velz&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitBuildFacing&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsBuilding&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number unitID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitTransporter&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number unitID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsTransporting&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitShieldState&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number isEnabled, number curPower&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitTravel&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number travel, number travelPeriod&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitFuel&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitFlanking&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, string &amp;quot;dir&amp;quot; ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
  ( number unitID, string &amp;quot;mode&amp;quot; | &amp;quot;moveFactor&amp;quot; | &amp;quot;minDamage&amp;quot; | &amp;quot;maxDamage&amp;quot; ) -&amp;gt; nil | number&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number mode, number modilityAdd,&lt;br /&gt;
    number minDamage, number maxDamage, number dirX, number dirY, number dirZ&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitSensorRadius&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, string type ) -&amp;gt; nil | number radius&lt;br /&gt;
  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;possible types are:&amp;lt;br&amp;gt;airLos, radar, sonar, seismic, radarJammer &amp;amp; sonarJammer&amp;lt;/font&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitLosState&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;raw is only available in gadgets&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID [, number allyTeamID [, boolean raw] ] ) -&amp;gt; nil |&lt;br /&gt;
  { [&amp;quot;los&amp;quot; = true] [, &amp;quot;radar&amp;quot; = true] [, &amp;quot;typed&amp;quot; = true] }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitSeparation&#039;&#039;&#039; &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;(returns the distance of 2 units)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID1, number unitID2 [, boolean 2D ] ) -&amp;gt; nil | number distance&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitDefDimensions&#039;&#039;&#039;&lt;br /&gt;
  ( number unitDefID ) -&amp;gt; nil |&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;height&amp;quot; = number,&lt;br /&gt;
      &amp;quot;radius&amp;quot; = number,&lt;br /&gt;
      &amp;quot;midx&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;minx&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;maxx&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;midy&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;miny&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;maxy&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;midz&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;minz&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;maxz&amp;quot;   = number&lt;br /&gt;
    }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitWeaponVectors&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number weaponNum ) -&amp;gt; nil | number posX, number posY, number posZ,&lt;br /&gt;
    number dirX, number dirZ, number dirY&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitWeaponState&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number weaponNum ) -&amp;gt; nil |&lt;br /&gt;
    boolean angleGood, boolean loaded, number reloadFrame,&lt;br /&gt;
    number salvoLeft, number numStockpiled&lt;br /&gt;
  ( number unitID, number weaponNum, string tag ) -&amp;gt; nil | number&lt;br /&gt;
  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;tag can be:&lt;br /&gt;
  &amp;quot;reloadState&amp;quot; | &amp;quot;reloadTime&amp;quot; | &amp;quot;accuracy&amp;quot; | &amp;quot;sprayAngle&amp;quot; | &lt;br /&gt;
  &amp;quot;range&amp;quot; | &amp;quot;projectileSpeed&amp;quot; | &amp;quot;burst&amp;quot; | &amp;quot;burstRate&amp;quot; | &amp;quot;projectiles&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitLastAttacker&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number unitID&lt;br /&gt;
&lt;br /&gt;
=== Unit Pieces ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitVectors&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | {frontX,frontY,frontZ}, {upX,upY,upZ}, {rightX,rightY,rightZ}&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPiecePosition&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number piece ) -&amp;gt; number posx, number posy, number posz&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;Returns piece position in unit space&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceDirection&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number piece ) -&amp;gt; number dirx, number diry, number dirz&lt;br /&gt;
&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Broken (returns reverse direction in piece space for pieces with &amp;gt;= 2 vertices, and returns (1,1,1) for pieces with &amp;lt; 2 vertices)&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceMatrix&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number piece ) -&amp;gt; { [1] = number, ... , [16] = number }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceList&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; { [1] = string &amp;quot;piecename&amp;quot;, ... , [pieceNumN] = string &amp;quot;piecename&amp;quot; }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceMap&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; { &amp;quot;piecename1&amp;quot; = pieceNum1, ... , &amp;quot;piecenameN&amp;quot; = pieceNumN }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number piece ) -&amp;gt; {&lt;br /&gt;
    &amp;quot;name&amp;quot;     = string &amp;quot;piecename&amp;quot;,&lt;br /&gt;
    &amp;quot;isEmpty&amp;quot;  = boolean,&lt;br /&gt;
    &amp;quot;children&amp;quot; = { [1] = string &amp;quot;piecename&amp;quot;, ... },&lt;br /&gt;
    &amp;quot;min&amp;quot;      = { [1] = number x, [2] = number y, [3] = number z },&lt;br /&gt;
    &amp;quot;max&amp;quot;      = { [1] = number x, [2] = number y, [3] = number z },&lt;br /&gt;
    &amp;quot;offset&amp;quot;   = { [1] = number x, [2] = number y, [3] = number z },    &lt;br /&gt;
  }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitScriptPiece&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number scriptPiece ] )&lt;br /&gt;
   -&amp;gt; nil | { scriptPieceNum = number modelPieceNum } | number modelPieceNum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;This functions translate the COB ScriptPiece numbers into the ModelPiece numbers (the set of ScriptPieces is a subset of the ModelPieces, means #ScriptPieces &amp;lt;= #ModelPieces), which is used in all other functions (the &amp;quot;number piece&amp;quot; means always the modelpiece). So if you get via Cob2Lua a pieceID you have to translate it with this function. Btw the COB ScriptPiece number is equal with the piece position in the &amp;lt;i&amp;gt;piece&amp;lt;/i&amp;gt; definition in your cob/bos.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitScriptNames&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID )&lt;br /&gt;
   -&amp;gt; { &amp;quot;cobpiecename1&amp;quot; = ScriptPieceNum1, ... , &amp;quot;cobpiecenameN&amp;quot; = ScriptPieceNumN }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPiecePosDir&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number pieceNum ) -&amp;gt; nil | number posX, number posY, number posZ,&lt;br /&gt;
    number dirX, number dirZ, number dirY&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;Returns piece position and direction in world space. The direction (dirX, dirY, dirZ) is not necessarily normalized.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CommandQueues ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitCommands&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number count] ) -&amp;gt; nil | commandQueueTable = {&lt;br /&gt;
     [1] = {&lt;br /&gt;
       &amp;quot;id&amp;quot;      = number,&lt;br /&gt;
       &amp;quot;params&amp;quot;  = { [1] = number, ...},&lt;br /&gt;
       &amp;quot;options&amp;quot; = {&lt;br /&gt;
         &amp;quot;coded&amp;quot;    = number,&lt;br /&gt;
         &amp;quot;alt&amp;quot;      = boolean,&lt;br /&gt;
         &amp;quot;ctrl&amp;quot;     = boolean,&lt;br /&gt;
         &amp;quot;shift&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;right&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;internal&amp;quot; = boolean&lt;br /&gt;
       }&lt;br /&gt;
     }, ...&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCommandQueue&#039;&#039;&#039;   &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;(same as Spring.GetUnitCommands)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID [, number count] ) -&amp;gt; nil | commandQueueTable = {&lt;br /&gt;
     [1] = {&lt;br /&gt;
       &amp;quot;id&amp;quot;      = number,&lt;br /&gt;
       &amp;quot;params&amp;quot;  = { [1] = number, ...},&lt;br /&gt;
       &amp;quot;options&amp;quot; = {&lt;br /&gt;
         &amp;quot;coded&amp;quot;    = number,&lt;br /&gt;
         &amp;quot;alt&amp;quot;      = boolean,&lt;br /&gt;
         &amp;quot;ctrl&amp;quot;     = boolean,&lt;br /&gt;
         &amp;quot;shift&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;right&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;internal&amp;quot; = boolean&lt;br /&gt;
       }&lt;br /&gt;
     }, ...&lt;br /&gt;
   }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFullBuildQueue&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt;&lt;br /&gt;
  nil | buildOrders = {&lt;br /&gt;
          [1] = { [number unitDefID] = number count },  etc...&lt;br /&gt;
        }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetRealBuildQueue&#039;&#039;&#039; &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;(cleans the buildqueue of things the unit can&#039;t build itself)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID ) -&amp;gt;&lt;br /&gt;
  nil | buildOrders = {&lt;br /&gt;
          [1] = { [number unitDefID] = number count },  etc...&lt;br /&gt;
        }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFactoryCommands&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number count] ) -&amp;gt; nil | commandQueueTable = {&lt;br /&gt;
     [1] = {&lt;br /&gt;
       &amp;quot;id&amp;quot;      = number,&lt;br /&gt;
       &amp;quot;params&amp;quot;  = { [1] = number, ...},&lt;br /&gt;
       &amp;quot;options&amp;quot; = {&lt;br /&gt;
         &amp;quot;coded&amp;quot;    = number,&lt;br /&gt;
         &amp;quot;alt&amp;quot;      = boolean,&lt;br /&gt;
         &amp;quot;ctrl&amp;quot;     = boolean,&lt;br /&gt;
         &amp;quot;shift&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;right&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;internal&amp;quot; = boolean&lt;br /&gt;
       }&lt;br /&gt;
     }, ...&lt;br /&gt;
   }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFactoryCounts&#039;&#039;&#039; (used to get the buildqueue of a factory, seems screwed o_O)&lt;br /&gt;
  ( number unitID [, number count [, boolean addCMDs ] ] ) -&amp;gt; nil | commandQueueTable = {&lt;br /&gt;
     [2] = { [number unitDefID | number -cmdID] = number count }, ...&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
=== Command Descriptions/Buttons ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitCmdDescs&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number startIndex [, number endIndex ] ] ) -&amp;gt; nil | {&lt;br /&gt;
      [1] = {&lt;br /&gt;
        &amp;quot;id&amp;quot;          = number,&lt;br /&gt;
        &amp;quot;type&amp;quot;        = number,&lt;br /&gt;
        &amp;quot;name&amp;quot;        = string,&lt;br /&gt;
        &amp;quot;action&amp;quot;      = string,&lt;br /&gt;
        &amp;quot;tooltip&amp;quot;     = string,&lt;br /&gt;
        &amp;quot;texture&amp;quot;     = string,&lt;br /&gt;
        &amp;quot;cursor&amp;quot;      = string,&lt;br /&gt;
        &amp;quot;hidden&amp;quot;      = boolean,&lt;br /&gt;
        &amp;quot;disabled&amp;quot;    = boolean,&lt;br /&gt;
        &amp;quot;showUnique&amp;quot;  = boolean,&lt;br /&gt;
        &amp;quot;onlyTexture&amp;quot; = boolean,&lt;br /&gt;
&lt;br /&gt;
        &amp;quot;params&amp;quot;      = { [1] = string, ... }&lt;br /&gt;
     }, ...&lt;br /&gt;
   }&lt;br /&gt;
&#039;&#039;&#039;Spring.FindUnitCmdDesc&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number cmdID ) -&amp;gt; nil | number index&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
=== GetFeatures ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeaturesInRectangle&#039;&#039;&#039;&lt;br /&gt;
  ( number xmin, number zmin, number xmax, number zmax [,number teamID] )&lt;br /&gt;
    -&amp;gt; nil | featureTable = { [1] = number featureID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllFeatures&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; nil | { [1] = number featureID, ... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureList&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt; NOTE: this is not really required, now all FeatureDefs are pre-loaded&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Feature Informations ===&lt;br /&gt;
&#039;&#039;&#039;Spring.ValidFeatureID&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureDefID&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number featureDefID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureTeam&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number teamID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureAllyTeam&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number allyID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureHealth&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number health, number maxHealth, number resurrectProgress&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureHeight&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureRadius&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeaturePosition&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureDirection&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number dirx, number diry, number dirz&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureHeading&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number heading&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureResources&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number RemainingMetal, number maxMetal,&lt;br /&gt;
                                number RemainingEnergy, number maxEnergy, number reclaimLeft&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureNoSelect&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | boolean noSelect&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureResurrect&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | string UnitDefName, number buildFacing&lt;br /&gt;
&lt;br /&gt;
== COB ==&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCOBUnitVar&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, integer varID [, boolean unpack = false ] )&lt;br /&gt;
   -&amp;gt; nil | number value | number unpackedX, number unpackedY&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCOBTeamVar&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, integer varID [, boolean unpack = false ] )&lt;br /&gt;
   -&amp;gt; nil | number value | number unpackedX, number unpackedY&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCOBAllyTeamVar&#039;&#039;&#039;&lt;br /&gt;
  ( number allyID, integer varID [, boolean unpack = false ] )&lt;br /&gt;
   -&amp;gt; nil | number value | number unpackedX, number unpackedY&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCOBGlobalVar&#039;&#039;&#039;&lt;br /&gt;
  ( integer varID [, boolean unpack = false ] )&lt;br /&gt;
   -&amp;gt; nil | number value | number unpackedX, number unpackedY&lt;br /&gt;
&lt;br /&gt;
== Ground ==&lt;br /&gt;
=== Ground Informations ===&lt;br /&gt;
Elevation is y. Water level is always at y=0. Ground height can be changed during play (terraform or deformation).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundHeight&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; number y&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundOrigHeight&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; number y&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundNormal&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; number x, number y, number z&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; string &amp;quot;Type&amp;quot;, number metal, number hardness,&lt;br /&gt;
                            number tankSpeed, number kbotSpeed, number hoverSpeed,&lt;br /&gt;
                            number shipSpeed, boolean receiveTracks&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundBlocked&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z |&lt;br /&gt;
    number x1, number z1, number x2, number z2 )&lt;br /&gt;
    -&amp;gt; nil |  string &amp;quot;feature&amp;quot;, number featureID  |  string &amp;quot;unit&amp;quot;, number unitID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundExtremes&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; nil | number minHeight, number maxHeight&lt;br /&gt;
&lt;br /&gt;
=== Test Building ===&lt;br /&gt;
&#039;&#039;&#039;Spring.TestBuildOrder&#039;&#039;&#039;&lt;br /&gt;
  ( number unitDefID, number x, number y, number z, number facing)&lt;br /&gt;
    -&amp;gt; number blocking [,number featureID]&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;blocking can be:&lt;br /&gt;
    0 - blocked&lt;br /&gt;
    1 - mobile unit in the way&lt;br /&gt;
    2 - free  (or if featureID is != 0 then with a blocking feature that can be reclaimed)&lt;br /&gt;
  facing can be:&lt;br /&gt;
    0, &amp;quot;s&amp;quot;, &amp;quot;south&amp;quot;&lt;br /&gt;
    1, &amp;quot;e&amp;quot;, &amp;quot;east&amp;quot;&lt;br /&gt;
    2, &amp;quot;n&amp;quot;, &amp;quot;north&amp;quot;&lt;br /&gt;
    3, &amp;quot;w&amp;quot;, &amp;quot;west&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.Pos2BuildPos&#039;&#039;&#039;&lt;br /&gt;
  ( number unitDefID, number x, number y, number z ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
&lt;br /&gt;
=== PathFinding ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitEstimatedPath&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | {&lt;br /&gt;
     [1] = { x,y,z }, ...&lt;br /&gt;
   },{&lt;br /&gt;
     [1] = startIdxOfDetailedPath,&lt;br /&gt;
     [2] = startIdxOfDetailedEstimatedPath1,&lt;br /&gt;
     [3] = startIdxOfDetailedEstimatedPath2,&lt;br /&gt;
   }&lt;br /&gt;
  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;GetUnitEstimatedPath() returns 2 tables:&lt;br /&gt;
    1 table the waypoints and 1 table with indices (in the waypoint table)&lt;br /&gt;
    when a new (more lazy) pathfinding algorithm  begins.&lt;br /&gt;
    So the waypoint table contains 3 different levels of details.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== LOS ===&lt;br /&gt;
&#039;&#039;&#039;Spring.IsPosInLos&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z, number allyID ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.IsPosInRadar&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z, number allyID ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.IsPosInAirLos&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z, number allyID ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetPositionLosState&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z [, number allyID] )&lt;br /&gt;
    -&amp;gt; boolean LosOrRadar, boolean inLos, boolean inRadar&lt;br /&gt;
&#039;&#039;&#039;Spring.GetClosestValidPosition&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;//NOT FINISHED YET&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitDefID, number x, number z, number r ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== Projectiles ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectilePosition&#039;&#039;&#039;&lt;br /&gt;
  ( number projectileID ) --&amp;gt; px, py, pz&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileVelocity&#039;&#039;&#039;&lt;br /&gt;
  ( number projectileID ) --&amp;gt; vx, vy, vz&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Troubleshooting_linux&amp;diff=18399</id>
		<title>Troubleshooting linux</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Troubleshooting_linux&amp;diff=18399"/>
		<updated>2009-02-14T02:19:24Z</updated>

		<summary type="html">&lt;p&gt;Spliff: added advice to run cmake twice&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
== Ingame ==&lt;br /&gt;
&lt;br /&gt;
=== LuaUI Crash Ingame ===&lt;br /&gt;
&lt;br /&gt;
This issue is caused by a memory corruption bug in spring. It will be fixed in version after 0.76b1. Ubuntu packages include the fix. &#039;&#039;&#039;Workaround: disable ground decals.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
LuaUI can crash during game, because some lua script you use has a bug. 0.75 should be resistant to this problem, but 0.74b3 is not. After crash, you won&#039;t see the bottom left tooltip box and top right resource bar anymore. Fear not, help is near:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
/resbar 1&lt;br /&gt;
/tooltip 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These might not be necessary in 0.75 anymore at all.&lt;br /&gt;
&lt;br /&gt;
Also, you won&#039;t be able to change the build menu page with mouse anymore, but keys , and . do the trick.&lt;br /&gt;
&lt;br /&gt;
LuaUI can also be restarted after it crashed. Often this does the trick and it works fine the rest of the game:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
/luaui reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mouse is slow in fullscreen mode ===&lt;br /&gt;
&lt;br /&gt;
Run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &#039;# Slow fullscreen cursor fix for Spring&#039; &amp;gt;&amp;gt; ~/.xsessionrc&lt;br /&gt;
echo &#039;SDL_MOUSE_RELATIVE=0&#039; &amp;gt;&amp;gt; ~/.xsessionrc&lt;br /&gt;
echo &#039;export SDL_MOUSE_RELATIVE&#039; &amp;gt;&amp;gt; ~/.xsessionrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
And log out and log in again.&lt;br /&gt;
&lt;br /&gt;
The mouse should now be as fast as in windowed mode.&lt;br /&gt;
&lt;br /&gt;
=== Rotating Buildings Ingame ===&lt;br /&gt;
&lt;br /&gt;
You can rotate a building before you give the build order, but the keys that do this don&#039;t work in linux by default for some users. Issue the following commands in the beginning of the game:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
/bind keycodex buildfacing inc&lt;br /&gt;
/bind keycodey buildfacing dec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keycodex and keycodey above are just placeholders. What you want to write depends on which key you want to use. To see what keycodes any keys have, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
/keydebug yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then hit the keys you want to use, and spring prints the keycodes in the message buffer.&lt;br /&gt;
&lt;br /&gt;
TODO: add information on how to save the settings so that they work the next time you start spring.&lt;br /&gt;
&lt;br /&gt;
=== Map is White ===&lt;br /&gt;
&lt;br /&gt;
If the whole map is only shades of white and grey, there is a problem with your display driver. Maybe your gpu is very old and does not support some needed opengl feature. For example I had this problem with matrox g550 but not with some very old geforce.&lt;br /&gt;
&lt;br /&gt;
=== Sound is Choppy ===&lt;br /&gt;
&lt;br /&gt;
If the engine sound is very broken or choppy sounding, and you hear some noise or crackling, you need to update OpenAL. Spring needs at least OpenAL Soft with version 1.6 to sound good, by this time all major distribution have it in their repository, so installing it should be easy (if it isn&#039;t installed by default).&lt;br /&gt;
&lt;br /&gt;
== Startup ==&lt;br /&gt;
&lt;br /&gt;
=== Missing Default Cursor ===&lt;br /&gt;
&lt;br /&gt;
This or any similar error of not being able to find a specific file are usually because the mod you are using needs ota content, download &amp;amp; install as explained [[SetupGuide#OTA_Content|earlier in this document]].&lt;br /&gt;
&lt;br /&gt;
=== sounds/button9.wav &amp;quot;cant find wav file&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Same problem as above.&lt;br /&gt;
&lt;br /&gt;
=== could not open file: gamedata/defs.lua ===&lt;br /&gt;
&lt;br /&gt;
Make sure your ~/spring does not contain an outdated version of base/springcontent.sdz because a new version of this file is distributed with spring.&lt;br /&gt;
If you do, just remove it.&lt;br /&gt;
&lt;br /&gt;
=== Couldnt find matching GLX visual ===&lt;br /&gt;
&lt;br /&gt;
Reduce anti aliasing.&lt;br /&gt;
&lt;br /&gt;
=== GL_ARB_texture_compression not found ===&lt;br /&gt;
&lt;br /&gt;
This can be an issue with your gpu drivers. The drivers you are using do not support a feature that is required to run spring. You might have better luck with the closed source official drivers of nvidia or amd cards. If your gpu itself is really old, this might not help.&lt;br /&gt;
&lt;br /&gt;
Try to update your gfx drivers, either with the one from your distributions package-manager, of with the original one from your gfx vendor. Also be sure hardware acceleration is enabled, tutorials on how to do this can be found in most of the distributions forums / wikis / etc.&lt;br /&gt;
&lt;br /&gt;
=== OpenAL Segfault ===&lt;br /&gt;
&lt;br /&gt;
See -&amp;gt; Sound is Choppy.&lt;br /&gt;
&lt;br /&gt;
=== Desync in game ===&lt;br /&gt;
&lt;br /&gt;
If you start a network game with other players, and you get sync error messages in game, your lobby version may be too old. It does not support the new protocol so it does not set the options on spring correctly, and desyncs at game start.&lt;br /&gt;
&lt;br /&gt;
== Compiletime ==&lt;br /&gt;
&lt;br /&gt;
=== hpiutil2 error with cmake ===&lt;br /&gt;
make[1]: *** [rts/lib/CMakeFiles/hpiutil2.dir/all] Error 2&lt;br /&gt;
make: *** [all] Error 2&lt;br /&gt;
&lt;br /&gt;
Run cmake TWICE. It doesn&#039;t always work properly on the first run.&lt;br /&gt;
&lt;br /&gt;
=== invalid use of ILvoid / ALCvoid  ===&lt;br /&gt;
&lt;br /&gt;
During compiling, if you get a lot of the following errors:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/include/IL/il.h:497: error: &#039;&amp;lt;anonymous&amp;gt;&#039; has incomplete type &lt;br /&gt;
/usr/include/IL/il.h:497: error: invalid use of &#039;ILvoid&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This happens because the version of libdevil-dev you have installed is not compatible with gcc version 4.2 and newer.&lt;br /&gt;
&lt;br /&gt;
You should upgrade your libdevil-dev to fix this issue. However, in some distributions (at least gentoo), the fixed package has the SAME version number as the older unfixed package, so you might actually need to remove your current libdevil-dev package completely and reinstall it.&lt;br /&gt;
&lt;br /&gt;
this is an issue that can be better hacked [http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9278 there]. while the packages aren&#039;t fixed for their maintainers, you will need to do nasty things, like that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
//typedef void ALCvoid;&lt;br /&gt;
#define ALCvoid void&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Network Setup ==&lt;br /&gt;
&lt;br /&gt;
Usually you don&#039;t need to do any network setup whatsoever, because the lobbies take care of nat traversal with firewall hole punching, but if you need to know the topology, it goes like this:&lt;br /&gt;
&lt;br /&gt;
Host needs to enable incoming udp to port 8452, and outgoing replies to those.&lt;br /&gt;
Non-host players need to enable outgoing udp, and incoming replies to those.&lt;br /&gt;
So basically only non-host players initiate &amp;quot;connections&amp;quot;, and only the server listens on a well-known port.&lt;br /&gt;
&lt;br /&gt;
== If You Still Have Problems ==&lt;br /&gt;
&lt;br /&gt;
Join either IRC chat in #taspring on Freenode or #sy on QuakeNet, or ask for help in the lobby channels #sy or #springlobby.&lt;br /&gt;
&lt;br /&gt;
However, generic linux problems not really related to installing this should be asked elsewhere.&lt;br /&gt;
&lt;br /&gt;
Prepare to list your distribution, which installation method you used, and what exactly is the error. Don&#039;t ask if people are around or not, just go straight to business and tell all details, for maximizing your chances of getting help.&lt;br /&gt;
&lt;br /&gt;
== IRC ==&lt;br /&gt;
&lt;br /&gt;
# #taspring @ FreeNode&lt;br /&gt;
# #sy @ QuakeNet&lt;br /&gt;
&lt;br /&gt;
== Asking For Help ==&lt;br /&gt;
&lt;br /&gt;
Ok so you need human help. This is how &#039;&#039;&#039;NOT&#039;&#039;&#039; to do it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
15:54 -!- **** [n=****@*] has joined #taspring&lt;br /&gt;
15:54 &amp;lt; ****&amp;gt; Hi, i have a problem with compiling spring on debian&lt;br /&gt;
15:54 &amp;lt; ****&amp;gt; can anyone help me?&lt;br /&gt;
15:57 -!- **** [n=****@*] has quit [Client Quit]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Don&#039;t ask to ask, instead go straight to business by stating the exact problem you have, and giving all necessary information. What you were trying to achieve, how did you try to do it, what happened and what did you expect to happen.&lt;br /&gt;
&lt;br /&gt;
Then WAIT for someone to notice you.&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_Cross_Compiled&amp;diff=3236</id>
		<title>Building Spring Cross Compiled</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_Cross_Compiled&amp;diff=3236"/>
		<updated>2009-02-14T02:06:15Z</updated>

		<summary type="html">&lt;p&gt;Spliff: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cross-compiling allows you to build for other platforms than the machine you are building on. You can, for example, compile Windows 32-bit binaries on a Linux 64-bit machine.&lt;br /&gt;
&lt;br /&gt;
= Obtaining the Source =&lt;br /&gt;
&lt;br /&gt;
{{Obtaining_The_Source_Code}}&lt;br /&gt;
&lt;br /&gt;
= CMake cross compiling =&lt;br /&gt;
&lt;br /&gt;
== Setting up the cross compiler ==&lt;br /&gt;
&lt;br /&gt;
I have only done this on Gentoo (instructions [http://en.gentoo-wiki.com/wiki/Crossdev here] or [http://psas.pdx.edu/GentooCrossCompilerHowto/ here]).&lt;br /&gt;
&lt;br /&gt;
There is also a general cross-compiler for linux [http://www.profv.de/mingw_cross_env/ here]&lt;br /&gt;
&lt;br /&gt;
== Getting Spring&#039;s libraries ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If Win32 (mingw32) is your target:&#039;&#039;&#039;&lt;br /&gt;
Auswaschbar has helpfully uploaded all win32 dependencies [http://spring.jobjol.nl/show_file.php?id=1102 here]. Unpack with 7zip to a directory of your choice (or use the one I recommend below).&lt;br /&gt;
&lt;br /&gt;
== Setting up your directories ==&lt;br /&gt;
Here is my recommended layout&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/spring-xcompile/   (or wherever you want to put it all)&lt;br /&gt;
___ spring/   (the spring source)&lt;br /&gt;
___ win32/    (your target platform)&lt;br /&gt;
_______ build/ (the build files for your target will go here)&lt;br /&gt;
_______ final/ (the compiled binaries and libs will be installed here)&lt;br /&gt;
_______ libs/  (the target libraries you just downloaded, ie: mingw32libs_v13)&lt;br /&gt;
_______ win32.cmake (see below)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Create your cmake toolchain ==&lt;br /&gt;
&lt;br /&gt;
* Create the toolchain file:&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; pico &amp;quot;~/spring-xcompile/win32/win32.cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Example toolchain file ===&lt;br /&gt;
An example should be self-explanatory:&lt;br /&gt;
&amp;lt;pre&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;
# the spring mingw32 dependencies&lt;br /&gt;
SET(MINGWLIBS ~/spring-xcompile/win32/libs)&lt;br /&gt;
&lt;br /&gt;
# the path that make install will use to put the final binaries&lt;br /&gt;
SET(CMAKE_INSTALL_PREFIX ~/spring-xcompile/win32/final)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pass this with &amp;quot;-DCMAKE_TOOLCHAIN_FILE=~/spring-xcompile/win32/win32.cmake&amp;quot; to cmake or select it in the gui to make a cross-compilation (see below).&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 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;
=== 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;
== Run CMake ==&lt;br /&gt;
&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;
&lt;br /&gt;
* cd to build directory&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; cd ~user/spring-xcompile/win32/build&lt;br /&gt;
&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;
&lt;br /&gt;
* IMPORTANT: depending on your settings you may need to run this command twice. It can&#039;t hurt so I recommend doing it anyway.&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; cmake &amp;quot;~user/spring-xcompile/spring&amp;quot; &amp;quot;-DCMAKE_TOOLCHAIN_FILE=~user/spring-xcompile/win32/win32.cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* run &amp;quot;make&amp;quot; and &amp;quot;make install&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; make &amp;amp;&amp;amp; make install DESTDIR=~user/spring-xcompile/win32/final&lt;br /&gt;
&lt;br /&gt;
== Package Maintainers Note: ==&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;
&lt;br /&gt;
= SCons cross compiling =&lt;br /&gt;
&lt;br /&gt;
configure:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MINGDIR=/usr/i586-mingw32msvc \&lt;br /&gt;
MINGWLIBS=${MINGWLIBS_DIR} \&lt;br /&gt;
CC=i586-mingw32msvc-gcc \&lt;br /&gt;
CXX=i586-mingw32msvc-g++ \&lt;br /&gt;
scons configure platform=windows debug=DEBUG2 \&lt;br /&gt;
	mingwlibsdir=${MINGWLIBS_DIR} \&lt;br /&gt;
	builddir=&amp;quot;${BUILD_DIR}&amp;quot; \&lt;br /&gt;
	prefix=&amp;quot;${INSTALL_DIR}&amp;quot; \&lt;br /&gt;
	datadir=&amp;quot;.&amp;quot; \&lt;br /&gt;
	bindir=&amp;quot;.&amp;quot; \&lt;br /&gt;
	libdir=&amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
make install:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MINGDIR=/usr/i586-mingw32msvc \&lt;br /&gt;
CC=i586-mingw32msvc-gcc \&lt;br /&gt;
CXX=i586-mingw32msvc-g++ \&lt;br /&gt;
scons install \&lt;br /&gt;
	builddir=&amp;quot;${BUILD_DIR}&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3318</id>
		<title>Building Spring on Linux</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3318"/>
		<updated>2009-02-14T02:03:38Z</updated>

		<summary type="html">&lt;p&gt;Spliff: now using get source template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Build From Source on Linux ==&lt;br /&gt;
For other platforms see [[Building spring|Building Spring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If prefer to use your distributions package system, refer to the Linux [[SetupGuide]].&lt;br /&gt;
&lt;br /&gt;
If there is no package tailored for your distribution, you have to install from sources manually. Doing this for distributions where packages are available is not recommended.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning: You might encounter sync errors in online play if you are not using the exact same version of the compiler and same compiler settings as used for prebuilt packages! (Applies to GCC &amp;lt;4.0)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For 0.77b5 these are: TODO add them here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Obtaining the Source ==&lt;br /&gt;
{{Obtaining_The_Source_Code}}&lt;br /&gt;
&lt;br /&gt;
== Get Dependencies ==&lt;br /&gt;
&lt;br /&gt;
You will need to install some development packages Spring depends on. These vary from distro to distro and may also depend on your specific configuration.&lt;br /&gt;
&lt;br /&gt;
If your distributions is not listed below, you should be able to figure out the correct package names from this. The scons configure will whine if you forget something, but it does not check if you remembered to install zip, even though you still need it.&lt;br /&gt;
&lt;br /&gt;
==== Debian ====&lt;br /&gt;
&lt;br /&gt;
For Etch (debian 4.0 stable) and Sid (debian unstable), I&#039;ve confirmed the&lt;br /&gt;
following to be the minimal set that is necessary to get. This works with Ubuntu 8.10, too.&lt;br /&gt;
that Spring 0.77b5 depends on the boost libraries version 1.34.* and won&#039;t&lt;br /&gt;
work on lower versions. (updated libboost-serialization-dev, and libvorbis-dev dependencies for 0.76b1)&lt;br /&gt;
&lt;br /&gt;
Also, on 64-bit be sure to build against devIl 1.6.8-rc2 or higher, 1.6.7 has a bug in the PNG loading code that causes issues.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo aptitude install scons build-essential zlib1g-dev libfreetype6-dev&lt;br /&gt;
sudo aptitude install libsdl1.2-dev libopenal-dev libglew-dev libboost-dev&lt;br /&gt;
sudo aptitude install libboost-thread-dev libboost-regex-dev libdevil-dev&lt;br /&gt;
sudo aptitude install libboost-serialization-dev python2.5-dev zip&lt;br /&gt;
sudo aptitude install libvorbis-dev libxcursor-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
This has been tested to work with a clean install of gentoo 2007.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
emerge dev-util/scons \&amp;gt;=media-libs/freetype-2.0.0 \&amp;gt;=media-libs/libsdl-1.2.0&lt;br /&gt;
emerge media-libs/openal =dev-lang/python-2.4\* media-libs/glew dev-libs/boost&lt;br /&gt;
emerge media-libs/devil app-arch/zip media-libs/libogg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
On Fedora 8, these dependencies should be sufficient:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install scons boost-devel openal-devel SDL-devel \&lt;br /&gt;
DevIL-devel glew-devel java-1.7.0-icedtea-devel libvorbis-devel &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fedora 9 has issues with 0.76b1, because it uses GCC 4.3 which changed a few compilation warnings into errors. However, the [http://spring.clan-sy.com/phpbb/viewtopic.php?f=20&amp;amp;t=12802 inofficial Linux installer] may work for you (it installs a precompiled binary).&lt;br /&gt;
&lt;br /&gt;
== Build And Install ==&lt;br /&gt;
&lt;br /&gt;
The build will spew out warnings like the following, which you can safely ignore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
warning: division by zero&lt;br /&gt;
warning: &#039;q&#039; may be used uninitialized in this function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
==== Using Scons ====&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons configure&lt;br /&gt;
scons&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using CMake (2.6 or newer) ===&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake .&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your paths are: Spring executable in &amp;lt;code&amp;gt;/usr/local/games/spring&amp;lt;/code&amp;gt; and&lt;br /&gt;
read-only data in &amp;lt;code&amp;gt;/usr/local/share/games/spring&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Finalizing_linux_install}}&lt;br /&gt;
&lt;br /&gt;
{{Linux_tips}}&lt;br /&gt;
&lt;br /&gt;
{{Troubleshooting_linux}}&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_spring&amp;diff=3741</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=3741"/>
		<updated>2009-02-14T02:00:02Z</updated>

		<summary type="html">&lt;p&gt;Spliff: getting source info changed to a template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Building Spring=&lt;br /&gt;
&lt;br /&gt;
== Obtaining the Source ==&lt;br /&gt;
{{Obtaining_The_Source_Code}}&lt;br /&gt;
&lt;br /&gt;
== Compiling ==&lt;br /&gt;
* [[Building Spring on Windows|Windows]]&lt;br /&gt;
* [[Building Spring on Linux|Linux]]&lt;br /&gt;
* [[Building Spring on MacOSX|MacOSX]]&lt;br /&gt;
* [[Building Spring Cross Compiled|Cross-compiler]]&lt;br /&gt;
* [[Building Spring on Buildbot|Buildbot]].&lt;br /&gt;
&lt;br /&gt;
If you are using Linux and prefer to use your distributions package system, refer to the Linux [[SetupGuide]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiling]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3518</id>
		<title>Building Spring on Windows</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3518"/>
		<updated>2009-02-14T01:57:22Z</updated>

		<summary type="html">&lt;p&gt;Spliff: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Get the Source Code ==&lt;br /&gt;
{{Obtaining_The_Source_Code}}&lt;br /&gt;
&lt;br /&gt;
== Compiling on Windows ==&lt;br /&gt;
For other platforms see [[Building spring]].&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;
====Getting MinGW====&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://jobjol.nl/1102 v13 of the MinGW library package] if you have MinGW .&lt;br /&gt;
&lt;br /&gt;
====MinGW Setup====&lt;br /&gt;
There are two ways to setup the MinGL libraries:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;1.&#039;&#039; Make sure you install the 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;
&#039;&#039;2.&#039;&#039; Install the package somewhere else (preferably outside of the source tree), and pass its location with the &#039;&#039;mingwlibsdir&#039;&#039; option to SCons in the configure step (see further down, in the quick instructions).&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.2/python-2.5.2.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-212.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-1.1.0.win32.exe Scons 1.1.0 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;
====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 = Environment...&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;
=== 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;
&lt;br /&gt;
TODO: The cmake instructions were for linux. Add instructions for windows users.&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;
[[Category:Compiling]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3517</id>
		<title>Building Spring on Windows</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3517"/>
		<updated>2009-02-14T01:56:46Z</updated>

		<summary type="html">&lt;p&gt;Spliff: added getting source template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Get the Source Code ==&lt;br /&gt;
{{Obtaining_The_Source_Code}}&lt;br /&gt;
&lt;br /&gt;
== Compiling on Windows ==&lt;br /&gt;
For other platforms and obtaining the source code see [[Building spring]].&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;
====Getting MinGW====&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://jobjol.nl/1102 v13 of the MinGW library package] if you have MinGW .&lt;br /&gt;
&lt;br /&gt;
====MinGW Setup====&lt;br /&gt;
There are two ways to setup the MinGL libraries:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;1.&#039;&#039; Make sure you install the 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;
&#039;&#039;2.&#039;&#039; Install the package somewhere else (preferably outside of the source tree), and pass its location with the &#039;&#039;mingwlibsdir&#039;&#039; option to SCons in the configure step (see further down, in the quick instructions).&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.2/python-2.5.2.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-212.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-1.1.0.win32.exe Scons 1.1.0 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;
====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 = Environment...&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;
=== 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;
&lt;br /&gt;
TODO: The cmake instructions were for linux. Add instructions for windows users.&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;
[[Category:Compiling]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Template:Obtaining_The_Source_Code&amp;diff=22999</id>
		<title>Template:Obtaining The Source Code</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Template:Obtaining_The_Source_Code&amp;diff=22999"/>
		<updated>2009-02-14T01:55:11Z</updated>

		<summary type="html">&lt;p&gt;Spliff: Obtaining The Source Code moved to Template:Obtaining The Source Code: made into a template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039; Latest Release (For playing Spring online) &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://spring.clan-sy.com/download.php Download]&lt;br /&gt;
&lt;br /&gt;
This code is the same as that used to build the last public release. It is required you use this version of the code to play against others online, or de-syncs will occur.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Development Sources from Git (Bleeding-edge, unstable code for Development and Testing) &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Our GIT repository can be cloned from git://github.com/spring/spring.git.&lt;br /&gt;
&lt;br /&gt;
For serious developers. 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 repository access.&lt;br /&gt;
&lt;br /&gt;
Assuming the GIT-commandline client is installed, you can clone the repository with&lt;br /&gt;
&amp;lt;code&amp;gt;git clone git://github.com/spring/spring.git&amp;lt;/code&amp;gt;&lt;br /&gt;
and  update it with&lt;br /&gt;
&amp;lt;code&amp;gt;git pull&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Obtaining_The_Source_Code&amp;diff=15182</id>
		<title>Obtaining The Source Code</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Obtaining_The_Source_Code&amp;diff=15182"/>
		<updated>2009-02-14T01:55:11Z</updated>

		<summary type="html">&lt;p&gt;Spliff: Obtaining The Source Code moved to Template:Obtaining The Source Code: made into a template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Template:Obtaining The Source Code]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Template:Obtaining_The_Source_Code&amp;diff=22998</id>
		<title>Template:Obtaining The Source Code</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Template:Obtaining_The_Source_Code&amp;diff=22998"/>
		<updated>2009-02-14T01:52:14Z</updated>

		<summary type="html">&lt;p&gt;Spliff: Template page for obtaining Spring source&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039; Latest Release (For playing Spring online) &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://spring.clan-sy.com/download.php Download]&lt;br /&gt;
&lt;br /&gt;
This code is the same as that used to build the last public release. It is required you use this version of the code to play against others online, or de-syncs will occur.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Development Sources from Git (Bleeding-edge, unstable code for Development and Testing) &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Our GIT repository can be cloned from git://github.com/spring/spring.git.&lt;br /&gt;
&lt;br /&gt;
For serious developers. 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 repository access.&lt;br /&gt;
&lt;br /&gt;
Assuming the GIT-commandline client is installed, you can clone the repository with&lt;br /&gt;
&amp;lt;code&amp;gt;git clone git://github.com/spring/spring.git&amp;lt;/code&amp;gt;&lt;br /&gt;
and  update it with&lt;br /&gt;
&amp;lt;code&amp;gt;git pull&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Linux_Page&amp;diff=10502</id>
		<title>Linux Page</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Linux_Page&amp;diff=10502"/>
		<updated>2009-02-11T10:35:45Z</updated>

		<summary type="html">&lt;p&gt;Spliff: White text on very light blue backgrounds ??!! Good one idiot!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;10&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|width=&amp;quot;100%&amp;quot; valign=&amp;quot;top&amp;quot; style=&amp;quot;border: 1px #aaa solid;&amp;quot;|&lt;br /&gt;
This is for all using Linux, NetBSD, MacOSX, or any other variant of Unix)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;10&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|width=&amp;quot;33%&amp;quot; valign=&amp;quot;top&amp;quot; style=&amp;quot;border: 1px #aaa solid;&amp;quot;|&lt;br /&gt;
===Installation===&lt;br /&gt;
&#039;&#039;&#039;[[SetupGuide]]&#039;&#039;&#039; - Guide for getting Spring to run on Linux.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Linux multiplayer games]]&#039;&#039;&#039; - Basic information starting a multiplayer game with several Linux clients.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;33%&amp;quot; valign=&amp;quot;top&amp;quot; style=&amp;quot;border: 1px #aaa solid;&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
===Linux Lobbies===&lt;br /&gt;
&#039;&#039;&#039;Active&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[http://spring.clan-sy.com/phpbb/viewtopic.php?t=10371 Spring Lobby]&#039;&#039;&#039; Multiplatform C++/wxWidgets lobby by tc- and semi&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[AFLobby]]&#039;&#039;&#039; A java lobby written by AF&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[TASClient_with_Wine]]&#039;&#039;&#039; The Windows delphi lobby by Betalord running via wine/cedega&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;InActive&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Unity Lobby]]&#039;&#039;&#039; A python GTK lobby by Hollowsoul&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Omni]]&#039;&#039;&#039; The original python lobby by Ace&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Orakios Client]]&#039;&#039;&#039; A java client written by Orakio&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;33%&amp;quot; valign=&amp;quot;top&amp;quot; style=&amp;quot;border: 1px #aaa solid;&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
===Misc===&lt;br /&gt;
&#039;&#039;&#039;[[Spring guide!]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Spring on MacOSX]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Spring for RTS Players]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Mods, and their strategies/tactics]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; [[Main_Page|&amp;lt;- Back to Main page]]&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3315</id>
		<title>Building Spring on Linux</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3315"/>
		<updated>2009-02-04T22:18:35Z</updated>

		<summary type="html">&lt;p&gt;Spliff: some links, tidy up&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Build From Source on Linux ==&lt;br /&gt;
For other platforms see [[Building spring|Building Spring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If prefer to use your distributions package system, refer to the Linux [[SetupGuide]].&lt;br /&gt;
&lt;br /&gt;
If there is no package tailored for your distribution, you have to install from sources manually. Doing this for distributions where packages are available is not recommended.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning: You might encounter sync errors in online play if you are not using the exact same version of the compiler and same compiler settings as used for prebuilt packages! (Applies to GCC &amp;lt;4.0)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For 0.77b5 these are: TODO add them here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get Source ==&lt;br /&gt;
&lt;br /&gt;
You can either download the source as a tarball (recommended; v. 0.77b5) or get it from the subversion repository. Either way, the result is the same.&lt;br /&gt;
&lt;br /&gt;
=== Tarball ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /usr/local/src # or /var/tmp, or whatever&lt;br /&gt;
wget http://planetspring.free.fr/spring/src/spring_0.77b5-spring_0.77b5_src.tar.bz2&lt;br /&gt;
tar xjf spring_0.77b2-spring_0.77b5_src.tar.bz2&lt;br /&gt;
cd spring_0.77b5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: The .zip release is for windows only. Linux users have to get .bz2 like shown above.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Subversion ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
aptitude install subversion # if you are not on debian, figure it out&lt;br /&gt;
svn co https://spring.clan-sy.com/svn/spring/tags/spring_0.77b5 \&lt;br /&gt;
	/usr/local/src/spring_0.77b5&lt;br /&gt;
cd /usr/local/src/spring_0.77b5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the above subversion host happens to be down (which is unlikely since you&#039;re reading this wiki page now), you can try the following hourly updated mirror (replace the svn co line above with the following line):&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co svn://caspring.org:3691/tags/spring_0.77b5 \&lt;br /&gt;
	/usr/local/src/spring_0.77b5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Dependencies ===&lt;br /&gt;
&lt;br /&gt;
You will need to install some development packages Spring depends on. These vary from distro to distro and may also depend on your specific configuration.&lt;br /&gt;
&lt;br /&gt;
If your distributions is not listed below, you should be able to figure out the correct package names from this. The scons configure will whine if you forget something, but it does not check if you remembered to install zip, even though you still need it.&lt;br /&gt;
&lt;br /&gt;
==== Debian ====&lt;br /&gt;
&lt;br /&gt;
For Etch (debian 4.0 stable) and Sid (debian unstable), I&#039;ve confirmed the&lt;br /&gt;
following to be the minimal set that is necessary to get. This works with Ubuntu 8.10, too.&lt;br /&gt;
that Spring 0.77b5 depends on the boost libraries version 1.34.* and won&#039;t&lt;br /&gt;
work on lower versions. (updated libboost-serialization-dev, and libvorbis-dev dependencies for 0.76b1)&lt;br /&gt;
&lt;br /&gt;
Also, on 64-bit be sure to build against devIl 1.6.8-rc2 or higher, 1.6.7 has a bug in the PNG loading code that causes issues.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo aptitude install scons build-essential zlib1g-dev libfreetype6-dev&lt;br /&gt;
sudo aptitude install libsdl1.2-dev libopenal-dev libglew-dev libboost-dev&lt;br /&gt;
sudo aptitude install libboost-thread-dev libboost-regex-dev libdevil-dev&lt;br /&gt;
sudo aptitude install libboost-serialization-dev python2.5-dev zip&lt;br /&gt;
sudo aptitude install libvorbis-dev libxcursor-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
This has been tested to work with a clean install of gentoo 2007.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
emerge dev-util/scons \&amp;gt;=media-libs/freetype-2.0.0 \&amp;gt;=media-libs/libsdl-1.2.0&lt;br /&gt;
emerge media-libs/openal =dev-lang/python-2.4\* media-libs/glew dev-libs/boost&lt;br /&gt;
emerge media-libs/devil app-arch/zip media-libs/libogg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
On Fedora 8, these dependencies should be sufficient:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install scons boost-devel openal-devel SDL-devel \&lt;br /&gt;
DevIL-devel glew-devel java-1.7.0-icedtea-devel libvorbis-devel &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fedora 9 has issues with 0.76b1, because it uses GCC 4.3 which changed a few compilation warnings into errors. However, the [http://spring.clan-sy.com/phpbb/viewtopic.php?f=20&amp;amp;t=12802 inofficial Linux installer] may work for you (it installs a precompiled binary).&lt;br /&gt;
&lt;br /&gt;
== Build And Install ==&lt;br /&gt;
&lt;br /&gt;
The build will spew out warnings like the following, which you can safely ignore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
warning: division by zero&lt;br /&gt;
warning: &#039;q&#039; may be used uninitialized in this function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
==== Using Scons ====&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons configure&lt;br /&gt;
scons&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using CMake (2.6 or newer) ===&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake .&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your paths are: Spring executable in &amp;lt;code&amp;gt;/usr/local/games/spring&amp;lt;/code&amp;gt; and&lt;br /&gt;
read-only data in &amp;lt;code&amp;gt;/usr/local/share/games/spring&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Finalizing_linux_install}}&lt;br /&gt;
&lt;br /&gt;
{{Linux_tips}}&lt;br /&gt;
&lt;br /&gt;
{{Troubleshooting_linux}}&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_Cross_Compiled&amp;diff=3234</id>
		<title>Building Spring Cross Compiled</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_Cross_Compiled&amp;diff=3234"/>
		<updated>2009-02-04T22:08:14Z</updated>

		<summary type="html">&lt;p&gt;Spliff: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Building Spring on a Cross-Compiler =&lt;br /&gt;
&lt;br /&gt;
Cross-compiling allows you to build for other platforms than the machine you are building on. You can, for example, compile Windows 32-bit binaries on a Linux 64-bit machine.&lt;br /&gt;
&lt;br /&gt;
== Setting up the cross compiler ==&lt;br /&gt;
&lt;br /&gt;
I have only done this on Gentoo (instructions [http://en.gentoo-wiki.com/wiki/Crossdev here] or [http://psas.pdx.edu/GentooCrossCompilerHowto/ here]).&lt;br /&gt;
&lt;br /&gt;
There is also a general cross-compiler for linux [http://www.profv.de/mingw_cross_env/ here]&lt;br /&gt;
&lt;br /&gt;
== Getting Spring&#039;s libraries ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If Win32 (mingw32) is your target:&#039;&#039;&#039;&lt;br /&gt;
Auswaschbar has helpfully uploaded all win32 dependencies [http://spring.jobjol.nl/show_file.php?id=1102 here]. Unpack with 7zip to a directory of your choice (or use the one I recommend below).&lt;br /&gt;
&lt;br /&gt;
== Setting up your directories ==&lt;br /&gt;
Here is my recommended layout&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/spring-xcompile/   (or wherever you want to put it all)&lt;br /&gt;
___ spring/   (the spring source)&lt;br /&gt;
___ win32/    (your target platform)&lt;br /&gt;
_______ build/ (the build files for your target will go here)&lt;br /&gt;
_______ final/ (the compiled binaries and libs will be installed here)&lt;br /&gt;
_______ libs/  (the target libraries you just downloaded, ie: mingw32libs_v13)&lt;br /&gt;
_______ win32.cmake (see below)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Create your cmake toolchain ==&lt;br /&gt;
&lt;br /&gt;
* Create the toolchain file:&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; pico &amp;quot;~/spring-xcompile/win32/win32.cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Example toolchain file ===&lt;br /&gt;
An example should be self-explanatory:&lt;br /&gt;
&amp;lt;pre&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;
# the spring mingw32 dependencies&lt;br /&gt;
SET(MINGWLIBS ~/spring-xcompile/win32/libs)&lt;br /&gt;
&lt;br /&gt;
# the path that make install will use to put the final binaries&lt;br /&gt;
SET(CMAKE_INSTALL_PREFIX ~/spring-xcompile/win32/final)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pass this with &amp;quot;-DCMAKE_TOOLCHAIN_FILE=~/spring-xcompile/win32/win32.cmake&amp;quot; to cmake or select it in the gui to make a cross-compilation (see below).&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 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;
=== 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;
== Run CMake ==&lt;br /&gt;
&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;
&lt;br /&gt;
* cd to build directory&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; cd ~user/spring-xcompile/win32/build&lt;br /&gt;
&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;
&lt;br /&gt;
* IMPORTANT: depending on your settings you may need to run this command twice. It can&#039;t hurt so I recommend doing it anyway.&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; cmake &amp;quot;~user/spring-xcompile/spring&amp;quot; &amp;quot;-DCMAKE_TOOLCHAIN_FILE=~user/spring-xcompile/win32/win32.cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* run &amp;quot;make&amp;quot; and &amp;quot;make install&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; make &amp;amp;&amp;amp; make install DESTDIR=~user/spring-xcompile/win32/final&lt;br /&gt;
&lt;br /&gt;
== Package Maintainers Note: ==&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;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_Cross_Compiled&amp;diff=3233</id>
		<title>Building Spring Cross Compiled</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_Cross_Compiled&amp;diff=3233"/>
		<updated>2009-02-04T22:07:13Z</updated>

		<summary type="html">&lt;p&gt;Spliff: Cross-compiling instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Building Spring on a Cross-Compiler =&lt;br /&gt;
&lt;br /&gt;
Cross-compiling allows you to build for other platforms than the machine you are building on. You can, for example, compile Windows 32-bit binaries on a Linux 64-bit machine.&lt;br /&gt;
&lt;br /&gt;
== Setting up the cross compiler ==&lt;br /&gt;
&lt;br /&gt;
I have only done this on Gentoo (instructions [http://en.gentoo-wiki.com/wiki/Crossdev here] or [http://psas.pdx.edu/GentooCrossCompilerHowto/ here]).&lt;br /&gt;
&lt;br /&gt;
There is also a general cross-compiler for linux [http://www.profv.de/mingw_cross_env/ here]&lt;br /&gt;
&lt;br /&gt;
== Getting Spring&#039;s libraries ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If Win32 (mingw32) is your target:&#039;&#039;&#039;&lt;br /&gt;
Auswaschbar has helpfully uploaded all win32 dependencies [http://spring.jobjol.nl/show_file.php?id=1102 here]. Unpack with 7zip to a directory of your choice (or use the one I recommend below).&lt;br /&gt;
&lt;br /&gt;
== Setting up your directories ==&lt;br /&gt;
Here is my recommended layout&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/spring-xcompile/   (or wherever you want to put it all)&lt;br /&gt;
___ spring/   (the spring source)&lt;br /&gt;
___ win32/    (your target platform)&lt;br /&gt;
_______ build/ (the build files for your target will go here)&lt;br /&gt;
_______ final/ (the compiled binaries and libs will be installed here)&lt;br /&gt;
_______ libs/  (the target libraries you just downloaded, ie: mingw32libs_v13)&lt;br /&gt;
_______ win32.cmake (see below)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Create your cmake toolchain ==&lt;br /&gt;
&lt;br /&gt;
* Create the toolchain file:&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; pico &amp;quot;~/spring-xcompile/win32/win32.cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Example toolchain file ===&lt;br /&gt;
An example should be self-explanatory:&lt;br /&gt;
&amp;lt;pre&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;
# the spring mingw32 dependencies&lt;br /&gt;
SET(MINGWLIBS ~/spring-xcompile/win32/libs)&lt;br /&gt;
&lt;br /&gt;
# the path that make install will use to put the final binaries&lt;br /&gt;
SET(CMAKE_INSTALL_PREFIX ~/spring-xcompile/win32/final)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pass this with &amp;quot;-DCMAKE_TOOLCHAIN_FILE=~/spring-xcompile/win32/win32.cmake&amp;quot; to cmake or select it in the gui to make a cross-compilation (see below).&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 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;
=== 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;
== Run CMake ==&lt;br /&gt;
&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;
&lt;br /&gt;
* cd to build directory&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; cd ~user/spring-xcompile/win32/build&lt;br /&gt;
&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;
&lt;br /&gt;
* IMPORTANT: depending on your settings you may need to run this command twice. It can&#039;t hurt so I recommend doing it anyway.&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; cmake &amp;quot;~user/spring-xcompile/spring&amp;quot; &amp;quot;-DCMAKE_TOOLCHAIN_FILE=~user/spring-xcompile/win32/win32.cmake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* run &amp;quot;make&amp;quot; and &amp;quot;make install&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; make &amp;amp;&amp;amp; make install DESTDIR=~user/spring-xcompile/win32/final&lt;br /&gt;
&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;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3516</id>
		<title>Building Spring on Windows</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3516"/>
		<updated>2009-02-04T21:36:14Z</updated>

		<summary type="html">&lt;p&gt;Spliff: more cmake cleanup&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Compiling on Windows ==&lt;br /&gt;
For other platforms and obtaining the source code see [[Building spring]].&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;
====Getting MinGW====&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://jobjol.nl/1102 v13 of the MinGW library package] if you have MinGW .&lt;br /&gt;
&lt;br /&gt;
====MinGW Setup====&lt;br /&gt;
There are two ways to setup the MinGL libraries:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;1.&#039;&#039; Make sure you install the 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;
&#039;&#039;2.&#039;&#039; Install the package somewhere else (preferably outside of the source tree), and pass its location with the &#039;&#039;mingwlibsdir&#039;&#039; option to SCons in the configure step (see further down, in the quick instructions).&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.2/python-2.5.2.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-212.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-1.1.0.win32.exe Scons 1.1.0 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;
====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 = Environment...&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;
=== 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;
&lt;br /&gt;
TODO: The cmake instructions were for linux. Add instructions for windows users.&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;
[[Category:Compiling]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3515</id>
		<title>Building Spring on Windows</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3515"/>
		<updated>2009-02-04T21:32:53Z</updated>

		<summary type="html">&lt;p&gt;Spliff: removed cmake command-line method since it is linux only&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Compiling on Windows ==&lt;br /&gt;
For other platforms and obtaining the source code see [[Building spring]].&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;
====Getting MinGW====&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://jobjol.nl/1102 v13 of the MinGW library package] if you have MinGW .&lt;br /&gt;
&lt;br /&gt;
====MinGW Setup====&lt;br /&gt;
There are two ways to setup the MinGL libraries:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;1.&#039;&#039; Make sure you install the 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;
&#039;&#039;2.&#039;&#039; Install the package somewhere else (preferably outside of the source tree), and pass its location with the &#039;&#039;mingwlibsdir&#039;&#039; option to SCons in the configure step (see further down, in the quick instructions).&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.2/python-2.5.2.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-212.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-1.1.0.win32.exe Scons 1.1.0 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;
====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 = Environment...&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;
=== 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;
&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;
===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;
[[Category:Compiling]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3314</id>
		<title>Building Spring on Linux</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3314"/>
		<updated>2009-02-04T21:04:40Z</updated>

		<summary type="html">&lt;p&gt;Spliff: Build from source moved to Building Spring on Linux: To make clear these are linux instructions as each platform now has it&amp;#039;s own build page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Build From Source ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You might encounter sync errors in online play if you are not using the exact same version of the compiler and same compiler settings as used for prebuilt packages! (Applies to GCC &amp;lt;4.0)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For 0.77b5 these are: TODO add them here.&lt;br /&gt;
&lt;br /&gt;
If there is no package tailored for your distribution, you have to install from sources manually. Doing this for distributions where packages are available is not recommended.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get Source ===&lt;br /&gt;
&lt;br /&gt;
You can either download the source as a tarball (recommended; v. 0.77b5) or get it from the subversion repository. Either way, the result is the same.&lt;br /&gt;
&lt;br /&gt;
==== Tarball ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /usr/local/src # or /var/tmp, or whatever&lt;br /&gt;
wget http://planetspring.free.fr/spring/src/spring_0.77b5-spring_0.77b5_src.tar.bz2&lt;br /&gt;
tar xjf spring_0.77b2-spring_0.77b5_src.tar.bz2&lt;br /&gt;
cd spring_0.77b5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: The .zip release is for windows only. Linux users have to get .bz2 like shown above.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Subversion ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
aptitude install subversion # if you are not on debian, figure it out&lt;br /&gt;
svn co https://spring.clan-sy.com/svn/spring/tags/spring_0.77b5 \&lt;br /&gt;
	/usr/local/src/spring_0.77b5&lt;br /&gt;
cd /usr/local/src/spring_0.77b5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the above subversion host happens to be down (which is unlikely since you&#039;re reading this wiki page now), you can try the following hourly updated mirror (replace the svn co line above with the following line):&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co svn://caspring.org:3691/tags/spring_0.77b5 \&lt;br /&gt;
	/usr/local/src/spring_0.77b5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Dependencies ===&lt;br /&gt;
&lt;br /&gt;
You will need to install some development packages Spring depends on. These vary from distro to distro and may also depend on your specific configuration.&lt;br /&gt;
&lt;br /&gt;
If your distributions is not listed below, you should be able to figure out the correct package names from this. The scons configure will whine if you forget something, but it does not check if you remembered to install zip, even though you still need it.&lt;br /&gt;
&lt;br /&gt;
==== Debian ====&lt;br /&gt;
&lt;br /&gt;
For Etch (debian 4.0 stable) and Sid (debian unstable), I&#039;ve confirmed the&lt;br /&gt;
following to be the minimal set that is necessary to get. This works with Ubuntu 8.10, too.&lt;br /&gt;
that Spring 0.77b5 depends on the boost libraries version 1.34.* and won&#039;t&lt;br /&gt;
work on lower versions. (updated libboost-serialization-dev, and libvorbis-dev dependencies for 0.76b1)&lt;br /&gt;
&lt;br /&gt;
Also, on 64-bit be sure to build against devIl 1.6.8-rc2 or higher, 1.6.7 has a bug in the PNG loading code that causes issues.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo aptitude install scons build-essential zlib1g-dev libfreetype6-dev&lt;br /&gt;
sudo aptitude install libsdl1.2-dev libopenal-dev libglew-dev libboost-dev&lt;br /&gt;
sudo aptitude install libboost-thread-dev libboost-regex-dev libdevil-dev&lt;br /&gt;
sudo aptitude install libboost-serialization-dev python2.5-dev zip&lt;br /&gt;
sudo aptitude install libvorbis-dev libxcursor-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
This has been tested to work with a clean install of gentoo 2007.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
emerge dev-util/scons \&amp;gt;=media-libs/freetype-2.0.0 \&amp;gt;=media-libs/libsdl-1.2.0&lt;br /&gt;
emerge media-libs/openal =dev-lang/python-2.4\* media-libs/glew dev-libs/boost&lt;br /&gt;
emerge media-libs/devil app-arch/zip media-libs/libogg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
On Fedora 8, these dependencies should be sufficient:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install scons boost-devel openal-devel SDL-devel \&lt;br /&gt;
DevIL-devel glew-devel java-1.7.0-icedtea-devel libvorbis-devel &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fedora 9 has issues with 0.76b1, because it uses GCC 4.3 which changed a few compilation warnings into errors. However, the [http://spring.clan-sy.com/phpbb/viewtopic.php?f=20&amp;amp;t=12802 inofficial Linux installer] may work for you (it installs a precompiled binary).&lt;br /&gt;
&lt;br /&gt;
=== Build And Install ===&lt;br /&gt;
&lt;br /&gt;
The build will spew out warnings like the following, which you can safely ignore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
warning: division by zero&lt;br /&gt;
warning: &#039;q&#039; may be used uninitialized in this function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
==== Using Scons ====&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons configure&lt;br /&gt;
scons&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using CMake (2.6 or newer) ====&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake .&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your paths are: Spring executable in &amp;lt;code&amp;gt;/usr/local/games/spring&amp;lt;/code&amp;gt; and&lt;br /&gt;
read-only data in &amp;lt;code&amp;gt;/usr/local/share/games/spring&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Finalizing_linux_install}}&lt;br /&gt;
&lt;br /&gt;
{{Linux_tips}}&lt;br /&gt;
&lt;br /&gt;
{{Troubleshooting_linux}}&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Build_from_source&amp;diff=3030</id>
		<title>Build from source</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Build_from_source&amp;diff=3030"/>
		<updated>2009-02-04T21:04:40Z</updated>

		<summary type="html">&lt;p&gt;Spliff: Build from source moved to Building Spring on Linux: To make clear these are linux instructions as each platform now has it&amp;#039;s own build page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Building Spring on Linux]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3514</id>
		<title>Building Spring on Windows</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3514"/>
		<updated>2009-02-04T20:56:51Z</updated>

		<summary type="html">&lt;p&gt;Spliff: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Compiling on Windows ==&lt;br /&gt;
For other platforms and obtaining the source code see [[Building spring]].&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;
====Getting MinGW====&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://jobjol.nl/1102 v13 of the MinGW library package] if you have MinGW .&lt;br /&gt;
&lt;br /&gt;
====MinGW Setup====&lt;br /&gt;
There are two ways to setup the MinGL libraries:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;1.&#039;&#039; Make sure you install the 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;
&#039;&#039;2.&#039;&#039; Install the package somewhere else (preferably outside of the source tree), and pass its location with the &#039;&#039;mingwlibsdir&#039;&#039; option to SCons in the configure step (see further down, in the quick instructions).&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.2/python-2.5.2.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-212.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-1.1.0.win32.exe Scons 1.1.0 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;
====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 = Environment...&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;
=== 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;
&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://jobjol.nl/1626 v12 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_v12)&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;
===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;
[[Category:Compiling]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3513</id>
		<title>Building Spring on Windows</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3513"/>
		<updated>2009-02-04T20:55:47Z</updated>

		<summary type="html">&lt;p&gt;Spliff: added link to other platforms and obtaining source code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Compiling on Windows ==&lt;br /&gt;
For other platforms and obtaining the source code see [[Building Spring]].&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;
====Getting MinGW====&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://jobjol.nl/1102 v13 of the MinGW library package] if you have MinGW .&lt;br /&gt;
&lt;br /&gt;
====MinGW Setup====&lt;br /&gt;
There are two ways to setup the MinGL libraries:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;1.&#039;&#039; Make sure you install the 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;
&#039;&#039;2.&#039;&#039; Install the package somewhere else (preferably outside of the source tree), and pass its location with the &#039;&#039;mingwlibsdir&#039;&#039; option to SCons in the configure step (see further down, in the quick instructions).&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.2/python-2.5.2.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-212.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-1.1.0.win32.exe Scons 1.1.0 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;
====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 = Environment...&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;
=== 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;
&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://jobjol.nl/1626 v12 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_v12)&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;
===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;
[[Category:Compiling]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3512</id>
		<title>Building Spring on Windows</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Windows&amp;diff=3512"/>
		<updated>2009-02-04T20:53:16Z</updated>

		<summary type="html">&lt;p&gt;Spliff: moved from Building_spring&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Compiling on Windows ==&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;
====Getting MinGW====&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://jobjol.nl/1102 v13 of the MinGW library package] if you have MinGW .&lt;br /&gt;
&lt;br /&gt;
====MinGW Setup====&lt;br /&gt;
There are two ways to setup the MinGL libraries:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;1.&#039;&#039; Make sure you install the 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;
&#039;&#039;2.&#039;&#039; Install the package somewhere else (preferably outside of the source tree), and pass its location with the &#039;&#039;mingwlibsdir&#039;&#039; option to SCons in the configure step (see further down, in the quick instructions).&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.2/python-2.5.2.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-212.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-1.1.0.win32.exe Scons 1.1.0 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;
====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 = Environment...&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;
=== 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;
&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://jobjol.nl/1626 v12 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_v12)&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;
===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;
[[Category:Compiling]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_spring&amp;diff=3740</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=3740"/>
		<updated>2009-02-04T20:52:20Z</updated>

		<summary type="html">&lt;p&gt;Spliff: moved windows build instructions to Building_Spring_on_Windows&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Building Spring=&lt;br /&gt;
&lt;br /&gt;
== Obtaining the Source ==&lt;br /&gt;
Our GIT repository can be cloned from git://github.com/spring/spring.git.&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 GIT 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 repository access.&lt;br /&gt;
&lt;br /&gt;
Assuming the GIT-commandline client is installed, you can clone the repository with&lt;br /&gt;
&amp;lt;code&amp;gt;git clone git://github.com/spring/spring.git&amp;lt;/code&amp;gt;&lt;br /&gt;
and  update it with&lt;br /&gt;
&amp;lt;code&amp;gt;git pull&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compiling ==&lt;br /&gt;
* [[Building Spring on Windows|Windows]]&lt;br /&gt;
* [[Building Spring on Linux|Linux]]&lt;br /&gt;
* [[Building Spring on MacOSX|MacOSX]]&lt;br /&gt;
* [[Building Spring Cross Compiled|Cross-compiler]]&lt;br /&gt;
* [[Building Spring on Buildbot|Buildbot]].&lt;br /&gt;
&lt;br /&gt;
If you are using Linux and prefer to use your distributions package system, refer to the Linux [[SetupGuide]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiling]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Main&amp;diff=5665</id>
		<title>Development:Main</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Main&amp;diff=5665"/>
		<updated>2009-02-04T20:46:35Z</updated>

		<summary type="html">&lt;p&gt;Spliff: differenciated compiling and development pages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;10&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|width=&amp;quot;500px&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Building spring|Building/Compiling the Spring Engine]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How to build Spring from source.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Building Spring on Windows|Windows]], [[Building Spring on Linux|Linux]], [[Building Spring on MacOSX|MacOSX]], [[Building Spring Cross Compiled|Cross-compiler]] or [[Building Spring on Buildbot|Buildbot]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Getting_Started_Development|Spring Engine Development]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Information regarding contributing to the source code of Spring.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Mod_and_Unit_development#Mod_development|Game Development And Unit Creation]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lots of links to valuable Articles and forum threads regarding Mod/Unit Development.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Map_development|Map Development]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Tutorials and other useful information for creating maps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Lua Scripting]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Information regarding the use of the supplementary Lua scripting language for Widgets and beyond...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Map, Mod, And Unit Development Programs|Content Development Programs]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Links to all kind of useful programs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Mission development]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Help on writing campaigns, demos and missions using Lua.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[AI|AI Development]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lots of information about developing Skirmish, Unit and Group AIs for Spring.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Linux_Page |Linux and Mac OS]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Mac OSX / NetBSD / Solaris / Linux / Cross-platform information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Monthly Topic Rotation]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Generally related to development of the engine or particular mods. Read before posting on the forums.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[General Resources]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Usable textures, sounds and code snippets by the community, for the community.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Associated Development Groups]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Teams, Forums and Groups associated with Spring content and code development.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;250px&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: #41545c; padding:5px; border: 1px #aaa solid;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;[http://spring.clan-sy.com/phpbb/viewforum.php?f=12 Development forums]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Look at the development forums for ongoing progress and discussion&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: #41545c; padding:5px; border: 1px #aaa solid;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;[http://spring.clan-sy.com/mantis/ Report Bugs/Submit a Patch]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Submit patches and bug reports here&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: #41545c; padding:5px; border: 1px #aaa solid;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Commit Mailing List&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
View svn commits in your email as they happen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Main&amp;diff=5664</id>
		<title>Development:Main</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Main&amp;diff=5664"/>
		<updated>2009-02-04T20:41:17Z</updated>

		<summary type="html">&lt;p&gt;Spliff: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;10&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|width=&amp;quot;500px&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;[[Building spring|Building/Compiling the Spring Engine]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Information regarding the source code of Spring.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Building spring|Building/Compiling the Spring Engine]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
How to build Spring from source.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Building Spring on Windows|Windows]], [[Building Spring on Linux|Linux]], [[Building Spring on MacOSX|MacOSX]], [[Building Spring Cross Compiled|Cross-compiler]] or [[Building Spring on Buildbot|Buildbot]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Mod_and_Unit_development#Mod_development|Game Development And Unit Creation]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lots of links to valuable Articles and forum threads regarding Mod/Unit Development.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Map_development|Map Development]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Tutorials and other useful information for creating maps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Lua Scripting]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Information regarding the use of the supplementary Lua scripting language for Widgets and beyond...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Map, Mod, And Unit Development Programs|Content Development Programs]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Links to all kind of useful programs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Mission development]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Help on writing campaigns, demos and missions using Lua.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[AI|AI Development]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Lots of information about developing Skirmish, Unit and Group AIs for Spring.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Linux_Page |Linux and Mac OS]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Mac OSX / NetBSD / Solaris / Linux / Cross-platform information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Monthly Topic Rotation]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Generally related to development of the engine or particular mods. Read before posting on the forums.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[General Resources]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Usable textures, sounds and code snippets by the community, for the community.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Associated Development Groups]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Teams, Forums and Groups associated with Spring content and code development.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;250px&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: #41545c; padding:5px; border: 1px #aaa solid;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;[http://spring.clan-sy.com/phpbb/viewforum.php?f=12 Development forums]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Look at the development forums for ongoing progress and discussion&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: #41545c; padding:5px; border: 1px #aaa solid;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;[http://spring.clan-sy.com/mantis/ Report Bugs/Submit a Patch]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Submit patches and bug reports here&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: #41545c; padding:5px; border: 1px #aaa solid;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Commit Mailing List&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
View svn commits in your email as they happen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Getting_Started&amp;diff=5463</id>
		<title>Development:Getting Started</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Getting_Started&amp;diff=5463"/>
		<updated>2009-02-04T20:31:26Z</updated>

		<summary type="html">&lt;p&gt;Spliff: Moved from Building_Spring&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Starting Spring Development=&lt;br /&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;
==Overview==&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 (see instructions above)&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;
==Keep track what others do==&lt;br /&gt;
If you develop with others, you need to know what they do. You can browse the source [http://github.com/spring/spring/tree/master at our github-page], and there is a [http://github.com/feeds/spring/commits/spring/master commit newsfeed].&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;
==Development Guidelines==&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/ Old Subversion repository]&lt;br /&gt;
* [http://spring.clan-sy.com/dl/docs/unitsync/group__unitsync__api.html Unitsync API docs]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_spring&amp;diff=3739</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=3739"/>
		<updated>2009-02-04T20:23:57Z</updated>

		<summary type="html">&lt;p&gt;Spliff: moved development section to own page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Building Spring=&lt;br /&gt;
&lt;br /&gt;
==Obtaining the Source==&lt;br /&gt;
Our GIT repository can be cloned from git://github.com/spring/spring.git.&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 GIT 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 repository access.&lt;br /&gt;
&lt;br /&gt;
Assuming the GIT-commandline client is installed, you can clone the repository with&lt;br /&gt;
&amp;lt;code&amp;gt;git clone git://github.com/spring/spring.git&amp;lt;/code&amp;gt;&lt;br /&gt;
and  update it with&lt;br /&gt;
&amp;lt;code&amp;gt;git pull&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compiling on Linux ==&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;
== Compiling on Windows ==&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;
====Getting MinGW====&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://jobjol.nl/1102 v13 of the MinGW library package] if you have MinGW .&lt;br /&gt;
&lt;br /&gt;
====MinGW Setup====&lt;br /&gt;
There are two ways to setup the MinGL libraries:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;1.&#039;&#039; Make sure you install the 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;
&#039;&#039;2.&#039;&#039; Install the package somewhere else (preferably outside of the source tree), and pass its location with the &#039;&#039;mingwlibsdir&#039;&#039; option to SCons in the configure step (see further down, in the quick instructions).&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.2/python-2.5.2.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-212.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-1.1.0.win32.exe Scons 1.1.0 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;
====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 = Environment...&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;
=== 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;
&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://jobjol.nl/1626 v12 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_v12)&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;
===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;
[[Category:Compiling]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_spring&amp;diff=3738</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=3738"/>
		<updated>2009-02-03T09:36:11Z</updated>

		<summary type="html">&lt;p&gt;Spliff: Major cleanup. This page was a freakin mess!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Building Spring=&lt;br /&gt;
&lt;br /&gt;
==Obtaining the Source==&lt;br /&gt;
Our GIT repository can be cloned from git://github.com/spring/spring.git.&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 GIT 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 repository access.&lt;br /&gt;
&lt;br /&gt;
Assuming the GIT-commandline client is installed, you can clone the repository with&lt;br /&gt;
&amp;lt;code&amp;gt;git clone git://github.com/spring/spring.git&amp;lt;/code&amp;gt;&lt;br /&gt;
and  update it with&lt;br /&gt;
&amp;lt;code&amp;gt;git pull&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compiling on Linux ==&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;
== Compiling on Windows ==&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;
====Getting MinGW====&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://jobjol.nl/1102 v13 of the MinGW library package] if you have MinGW .&lt;br /&gt;
&lt;br /&gt;
====MinGW Setup====&lt;br /&gt;
There are two ways to setup the MinGL libraries:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;1.&#039;&#039; Make sure you install the 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;
&#039;&#039;2.&#039;&#039; Install the package somewhere else (preferably outside of the source tree), and pass its location with the &#039;&#039;mingwlibsdir&#039;&#039; option to SCons in the configure step (see further down, in the quick instructions).&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.2/python-2.5.2.msi Python 2.5 installer]&lt;br /&gt;
*[http://downloads.sourceforge.net/pywin32/pywin32-212.win32-py2.5.exe Python 2.5 win32 extensions installer] &lt;br /&gt;
*[http://prdownloads.sourceforge.net/scons/scons-1.1.0.win32.exe Scons 1.1.0 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;
====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 = Environment...&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;
=== 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;
&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://jobjol.nl/1626 v12 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_v12)&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;
===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;
&lt;br /&gt;
=Developing Spring=&lt;br /&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;
==Starting Spring 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 (see instructions above)&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;
===Keep track what others do===&lt;br /&gt;
If you develop with others, you need to know what they do. You can browse the source [http://github.com/spring/spring/tree/master at our github-page], and there is a [http://github.com/feeds/spring/commits/spring/master commit newsfeed].&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;
===Development Guidelines===&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/ Old Subversion repository]&lt;br /&gt;
* [http://spring.clan-sy.com/dl/docs/unitsync/group__unitsync__api.html Unitsync API docs]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]] [[Category:Source development]]&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gentoo_install&amp;diff=9316</id>
		<title>Gentoo install</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gentoo_install&amp;diff=9316"/>
		<updated>2009-01-26T17:39:50Z</updated>

		<summary type="html">&lt;p&gt;Spliff: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation ==&lt;br /&gt;
&lt;br /&gt;
This is for version 0.77b5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An overlay to use with layman is provided. If gentoo overlays and/or layman are new to you, [http://overlays.gentoo.org/ read about them], as they are an essential part of gentoo.&lt;br /&gt;
&lt;br /&gt;
This example assumes you never used layman before. If it&#039;s not your first time, you hopefully know what to do.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
### install layman (with git support)&lt;br /&gt;
echo &amp;quot;app-portage/layman git&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
emerge layman&lt;br /&gt;
echo &amp;quot;source /usr/local/portage/layman/make.conf&amp;quot; &amp;gt;&amp;gt; /etc/make.conf&lt;br /&gt;
&lt;br /&gt;
### add spring overlay to layman&lt;br /&gt;
layman -f -a Spring -o \&lt;br /&gt;
&#039;http://www.springlobby.info/overlay/?p=springlobby.git;a=blob_plain;f=overlays.xml;hb=HEAD&#039;&lt;br /&gt;
&lt;br /&gt;
### allow installation of unstable versions&lt;br /&gt;
echo &amp;quot;games-strategy/spring ~x86&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.keywords&lt;br /&gt;
echo &amp;quot;games-util/springlobby ~x86&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.keywords&lt;br /&gt;
&lt;br /&gt;
### install game and lobby&lt;br /&gt;
emerge spring springlobby&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Upgrading ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
### update the repository and check for new versions&lt;br /&gt;
layman -S&lt;br /&gt;
&lt;br /&gt;
### upgrade existing installations&lt;br /&gt;
emerge -u spring springlobby&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your paths are: Spring executable in &amp;lt;code&amp;gt;/usr/games/bin/spring&amp;lt;/code&amp;gt; and&lt;br /&gt;
read-only data in &amp;lt;code&amp;gt;/usr/share/games/spring&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Finalizing installation =&lt;br /&gt;
&lt;br /&gt;
Now you have Spring installed along with SpringLobby. You are now ready to start springlobby for the first time.&lt;br /&gt;
&lt;br /&gt;
=== Maps &amp;amp; Mods ===&lt;br /&gt;
&lt;br /&gt;
Since Spring is only an engine, you need to download games/mods for it, and the maps that go with those games. &lt;br /&gt;
&lt;br /&gt;
Springlobby will automatically do this for you using bittorrent when you attempt to join a game with a map or mod that you don&#039;t currently have.&lt;br /&gt;
&lt;br /&gt;
If you want to download it manually or browse existing maps, there are several easy to use websites - here are some:&lt;br /&gt;
*[http://spring.jobjol.nl/subcategory.php?id=1 SpringFiles]&lt;br /&gt;
*[http://spring-portal.com/ Spring-Portal]&lt;br /&gt;
*[http://www.darkstars.co.uk/downloads/index.php?dir=spring Darkstars]&lt;br /&gt;
&lt;br /&gt;
Pick any of those sites, download a map or mod, and then double click it.  This will move it to your Spring folder using the spring map/mod installer program.  If you wish to move maps/mods by hand, they are located under ~/.spring/maps/ or ~/.spring/mods/ (if the folder doesn&#039;t exist - create it). Don&#039;t unpack the file in any way though, just download and save it. Reload your maps/mods in Springlobby, (Tools -&amp;gt; Reload maps/mods) and they will be ready to use.&lt;br /&gt;
&lt;br /&gt;
These sites also may provide other neat things like lua widgets, epic replays, AI bots (for playing offline or to team up on with a freind).  Generally the installation requires you to download the file and place it in the appropriate folder in your ~/.spring directory. (you may have to create the folder)&lt;br /&gt;
&lt;br /&gt;
Hint: If you know the map name you want, there is a Search function provided in those websites. Just write a part of the name, like one word, and you&#039;ll easily find the map you were looking for - this is helpful later on.&lt;br /&gt;
&lt;br /&gt;
==== BA (Balanced Annihilation) ====&lt;br /&gt;
&lt;br /&gt;
A popular mod to get started with is Balanced Annihilation (BA) 6.21. Please note that before you can run it though, you&#039;ll need to download the OTA content - read the section below on how to get that.&lt;br /&gt;
&lt;br /&gt;
==== CA (Complete Annihilation) ====&lt;br /&gt;
&lt;br /&gt;
A new mod with better models, graphical effects, and a different take on gameplay is the CA mod - get it [http://trac.caspring.org/wiki/CAInstaller here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== OTA Content ====&lt;br /&gt;
&lt;br /&gt;
If you want to play mods based on Total Annihilation, for example XTA, AA, BA, or CA then you have to do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
emerge games-strategy/spring-ota-content&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that you need to own a copy of Total Annihilation, to download this file legally.&lt;br /&gt;
Mods that do not require this file are at least NanoBlobs, Kernel Panic and Expand &amp;amp; Exterminate&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Linux_tips}}&lt;br /&gt;
&lt;br /&gt;
{{Troubleshooting_linux}}&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3313</id>
		<title>Building Spring on Linux</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Building_Spring_on_Linux&amp;diff=3313"/>
		<updated>2009-01-26T15:22:45Z</updated>

		<summary type="html">&lt;p&gt;Spliff: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Build From Source ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You might encounter sync errors in online play if you are not using the exact same version of the compiler and same compiler settings as used for prebuilt packages! (Applies to GCC &amp;lt;4.0)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For 0.77b5 these are: TODO add them here.&lt;br /&gt;
&lt;br /&gt;
If there is no package tailored for your distribution, you have to install from sources manually. Doing this for distributions where packages are available is not recommended.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get Source ===&lt;br /&gt;
&lt;br /&gt;
You can either download the source as a tarball (recommended; v. 0.77b5) or get it from the subversion repository. Either way, the result is the same.&lt;br /&gt;
&lt;br /&gt;
==== Tarball ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /usr/local/src # or /var/tmp, or whatever&lt;br /&gt;
wget http://planetspring.free.fr/spring/src/spring_0.77b5-spring_0.77b5_src.tar.bz2&lt;br /&gt;
tar xjf spring_0.77b2-spring_0.77b5_src.tar.bz2&lt;br /&gt;
cd spring_0.77b5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: The .zip release is for windows only. Linux users have to get .bz2 like shown above.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Subversion ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
aptitude install subversion # if you are not on debian, figure it out&lt;br /&gt;
svn co https://spring.clan-sy.com/svn/spring/tags/spring_0.77b5 \&lt;br /&gt;
	/usr/local/src/spring_0.77b5&lt;br /&gt;
cd /usr/local/src/spring_0.77b5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the above subversion host happens to be down (which is unlikely since you&#039;re reading this wiki page now), you can try the following hourly updated mirror (replace the svn co line above with the following line):&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co svn://caspring.org:3691/tags/spring_0.77b5 \&lt;br /&gt;
	/usr/local/src/spring_0.77b5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Dependencies ===&lt;br /&gt;
&lt;br /&gt;
You will need to install some development packages Spring depends on. These vary from distro to distro and may also depend on your specific configuration.&lt;br /&gt;
&lt;br /&gt;
If your distributions is not listed below, you should be able to figure out the correct package names from this. The scons configure will whine if you forget something, but it does not check if you remembered to install zip, even though you still need it.&lt;br /&gt;
&lt;br /&gt;
==== Debian ====&lt;br /&gt;
&lt;br /&gt;
For Etch (debian 4.0 stable) and Sid (debian unstable), I&#039;ve confirmed the&lt;br /&gt;
following to be the minimal set that is necessary to get. This works with Ubuntu 8.10, too.&lt;br /&gt;
that Spring 0.77b5 depends on the boost libraries version 1.34.* and won&#039;t&lt;br /&gt;
work on lower versions. (updated libboost-serialization-dev, and libvorbis-dev dependencies for 0.76b1)&lt;br /&gt;
&lt;br /&gt;
Also, on 64-bit be sure to build against devIl 1.6.8-rc2 or higher, 1.6.7 has a bug in the PNG loading code that causes issues.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo aptitude install scons build-essential zlib1g-dev libfreetype6-dev&lt;br /&gt;
sudo aptitude install libsdl1.2-dev libopenal-dev libglew-dev libboost-dev&lt;br /&gt;
sudo aptitude install libboost-thread-dev libboost-regex-dev libdevil-dev&lt;br /&gt;
sudo aptitude install libboost-serialization-dev python2.5-dev zip&lt;br /&gt;
sudo aptitude install libvorbis-dev libxcursor-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
This has been tested to work with a clean install of gentoo 2007.0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
emerge dev-util/scons \&amp;gt;=media-libs/freetype-2.0.0 \&amp;gt;=media-libs/libsdl-1.2.0&lt;br /&gt;
emerge media-libs/openal =dev-lang/python-2.4\* media-libs/glew dev-libs/boost&lt;br /&gt;
emerge media-libs/devil app-arch/zip media-libs/libogg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
On Fedora 8, these dependencies should be sufficient:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install scons boost-devel openal-devel SDL-devel \&lt;br /&gt;
DevIL-devel glew-devel java-1.7.0-icedtea-devel libvorbis-devel &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fedora 9 has issues with 0.76b1, because it uses GCC 4.3 which changed a few compilation warnings into errors. However, the [http://spring.clan-sy.com/phpbb/viewtopic.php?f=20&amp;amp;t=12802 inofficial Linux installer] may work for you (it installs a precompiled binary).&lt;br /&gt;
&lt;br /&gt;
=== Build And Install ===&lt;br /&gt;
&lt;br /&gt;
The build will spew out warnings like the following, which you can safely ignore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
warning: division by zero&lt;br /&gt;
warning: &#039;q&#039; may be used uninitialized in this function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
==== Using Scons ====&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons configure&lt;br /&gt;
scons&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
scons install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using CMake (2.6 or newer) ====&lt;br /&gt;
Configure and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake .&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your paths are: Spring executable in &amp;lt;code&amp;gt;/usr/local/games/spring&amp;lt;/code&amp;gt; and&lt;br /&gt;
read-only data in &amp;lt;code&amp;gt;/usr/local/share/games/spring&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Finalizing_linux_install}}&lt;br /&gt;
&lt;br /&gt;
{{Linux_tips}}&lt;br /&gt;
&lt;br /&gt;
{{Troubleshooting_linux}}&lt;/div&gt;</summary>
		<author><name>Spliff</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Main&amp;diff=5657</id>
		<title>Development:Main</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Development:Main&amp;diff=5657"/>
		<updated>2008-09-08T17:28:52Z</updated>

		<summary type="html">&lt;p&gt;Spliff: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&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 Development]] page.&#039;&#039;&#039;&lt;br /&gt;
&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://xta.wolfgame.org/SimBase/vclibs.7z vclibs library package]. You need to install this in the /spring directory from the SVN checkout 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;
You can compile spring either with MinGW version 3 or 4. MinGW 4.2.1 is used for spring release builds (cross compiled on Linux). Therefore, version 4 is recommended.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;MinGW 3&#039;&#039;&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, which still compiles spring correctly (June 2008). Use [http://spring.clan-sy.com/dl/spring-mingwlibs-v10.exe v10 of the MinGW library package] if you have MinGW 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;MinGW 4 (recommended)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t yet have it, go to [http://sf.net/project/showfiles.php?group_id=2435 the MinGW download page], and get at least the following packages (MinGW 4.3.0):&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 the list of [[example projects]]. 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)]&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/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>Spliff</name></author>
	</entry>
</feed>