Development:Main: Difference between revisions

From Spring
Jump to navigationJump to search
Abma (talk | contribs)
No edit summary
 
(144 intermediate revisions by 35 users not shown)
Line 1: Line 1:
Outlined below is information on assisting with the development of the Spring source itself.
{|width="100%" style="border: 0px; border-spacing:0px"
|width="500px" valign="top" style="padding-left:10px; padding-right:10px"|


::<small>NOTE: For information about developing a mod (units, maps, etc.) see the [[Mod Development]] page.</small>
'''[https://github.com/spring/spring GitHub and Source Code]'''


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 & Mac) please look at the bottem of this page under "Multiplatform development"
Engine source code<br>


==Starting Development==
'''[[Links|Important Links]]'''
To start development, you will need
#The latest version of the source
#A good code manipulation program
#Compiling your modified source


===Source Code Documentation===
Important Community and Development links to git repos & subprojects.<br>
A good place to start is the source code documentation, which can be found here: [http://taspring.clan-sy.com/doxygen/ doxygen]


An explanation on how the code is executed in game can be found in the [[Spring Engine Code]]
page.


===Obtaining the Source===
'''[[Building spring|Compiling Engine]]'''


If you just want to look at the code, you can use [http://svn.berlios.de/viewcvs/taspring-linux/trunk/ HTTP based viewing of the repository].
How to build the Spring engine from source.<br>


Another option is to manually 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.


More information about downloading from the svn repository is available at the
'''[[Development:Getting_Started|Engine Development]]'''
[http://developer.berlios.de/projects/taspring-linux BerliOS Project page]
Two good windows SVN clients are SmartSVN and TortoiseSVN.


Is this still any good: [[CVS tutorial]] ? --[[User:SeanHeron|SeanHeron]] 00:07, 17 Apr 2006 (W. Europe Daylight Time)
Information regarding contributing to the source code of the Spring engine.


===Learning C++===
You will need to know C++ to modify or understand Spring's source code. If you are interested in learning C++, see [[Learning_CPP]]


However please note that badly designed code (code created by a C++ novice for example), will even if working 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.
'''[[Lobby_Development|Lobby Development (Clients and Servers)]]'''


===Modifying and Compiling the Source===
Information regarding contributing to the source code of the different lobby clients and servers available for Spring.
See [[Development_IDEs]]. You have either to use the SCons build system that is multi platform, or use the vcproj for building spring in Visual Studio 2003.
Currently the build is actively updated for Linux and for Visual Studio 2003
You will needs these libraries:


*[http://www.boost.org Boost C++ library]
*[http://www.openal.org OpenAL Audio library]
*[http://glew.sf.net GLEW (OpenGL extension loading)]
*[http://www.winimage.com/zLibDll/ zlib + minizip]
*[http://www.libsdl.org SDL]
*[http://openil.sf.net DevIL (Image loading)]
*[http://www.freetype.org Freetype font rendering]


*[http://msdn.microsoft.com/directx/sdk/ DirectX SDK] (Windows, Visual Studio C++ only)
'''[[Gamedev:Main|Game Development]]'''
*PlatformSDK (Windows, Visual Studio C++ Only)


Lots of links to valuable Articles and forum threads regarding Game, Mod & Unit Development.


If you are using Windows, you can find most of the dependences pre-built at [http://taspring.clan-sy.com/phpbb/viewtopic.php?p=49257#49257 here].
A pre-built copy of boost for VS8 can be found [http://taspring.clan-sy.com/phpbb/viewtopic.php?p=56846#56846 here].


==Starting Development==
'''[[Mapdev:Main|Map Development]]'''
To start development, you will need
#The latest version of the source
#A good code manipulation program
#Compiling your modified source


===Source Code Documentation===
Tutorials and other useful information for creating maps.
A good place to start is the source code documentation, which can be found here: [http://taspring.clan-sy.com/doxygen/ doxygen]


An explanation on how the code is executed in game can be found in the [[Spring Engine Code]]
page.


===Obtaining the Source===
'''[[Lua_Scripting|Lua Development]]'''


If you just want to look at the code, you can use [http://svn.berlios.de/viewcvs/taspring-linux/trunk/ HTTP based viewing of the repository]
Information regarding the use of the supplementary Lua scripting language for Widgets and beyond.


Another option is to manually 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.


More information about downloading from the svn repository is available at the
'''[[AI:Development|AI Development]]'''
[http://developer.berlios.de/projects/taspring-linux BerliOS Project page]
Two good windows SVN clients are SmartSVN and TortoiseSVN.


===Learning C++===
All you ever wanted to know about Skirmish AI Development for Spring, and more. This includes Skirmish and Lua AIs.
You will need to know C++ to modify or understand Spring's source code. If you are interested in learning C++, see [[Learning_CPP]]


However please note that badly designed code (code created by a C++ novice for example), will even if working 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.


===Modifying and Compiling the Source===
'''[[Infrastructure:Development|Infrastructure Development]]'''
See [[Development_IDEs]]. You have either to use the SCons build system that is multi platform, or use the vcproj for building spring in Visual Studio 2003.
Currently the build is actively updated for Linux and for Visual Studio 2003
You will needs these libraries:


*[http://www.boost.org Boost C++ library]
Information about springs infrastructure
*[http://www.openal.org OpenAL Audio library]
*[http://glew.sf.net GLEW (OpenGL extension loading)]
*[http://www.winimage.com/zLibDll/ zlib + minizip]
*[http://www.libsdl.org SDL]
*[http://openil.sf.net DevIL (Image loading)]
*[http://www.freetype.org Freetype font rendering]


*[http://msdn.microsoft.com/directx/sdk/ DirectX SDK] (Windows, Visual Studio C++ only)
|valign="top" style="padding:0px"|
*PlatformSDK (Windows, Visual Studio C++ Only)


== Quick Links ==


If you are using Windows, you can find most of the dependences pre-built at [http://taspring.clan-sy.com/phpbb/viewtopic.php?p=49257#49257 here].
{|width="100%" class=""
A pre-built copy of boost for VS8 can be found [http://taspring.clan-sy.com/phpbb/viewtopic.php?p=56846#56846 here].
! '''[http://spring.clan-sy.com/phpbb/viewforum.php?f=12 Development forums]'''
|-
| Look at the development forums for ongoing progress and discussion
|}




{|width="100%" class=""
! '''[http://springrts.com/mantis/ Report Bugs]'''
|-
| Submit patches and bug reports here
|}


*[http://prdownloads.sourceforge.net/dev-cpp/devcpp-4.9.9.2_setup.exe Dev-Cpp installer] / [MinGW] Though I would not advise mingw because you have two set it up your self.


*[http://www.python.org/ftp/python/2.4.2/python-2.4.2.msi Python 2.4 installer]
{|width="100%" class=""
! '''[https://github.com/spring/spring/ Source Code]'''
|-
| View and fork the project on GitHub.
|}


*[http://prdownloads.sourceforge.net/pywin32/pywin32-208.win32-py2.4.exe?download Python win32 extensions installer]


*[http://prdownloads.sourceforge.net/scons/scons-0.96.1.win32.exe Scons installer]


Grab and install the above programs.
{|width="100%" class=""
! '''[https://github.com/spring/spring/commits/develop.atom Commit Newsfeed]'''
|-
|View git commits as they happen.
|}


'''Set-Up'''


Make sure C:\Python2.4 and C:\Dev-Cpp\bin are in your PATH environment variable. Make sure a MINGDIR environment variable with value C:\Dev-Cpp exists. (Change paths where appropriate.) Set environment variables by: Start -> Settings -> Control Panel -> System -> Advanced -> Environment variables (for Windows XP), Checkout the TA Spring SVN repository. You will also need the [http://spring.clan-sy.com/dl/spring-mingwlibs.exe Mingw / DevCPP libs] extract to /taspring.


'''Compiling'''
|}


Open a console (Start -> Run -> cmd.exe -> Run), cd /where you checked it out in the previous step, if you use checked it out on a different drive make sure to change drives with DriveLetter:<enter> first then type scons configure<enter>, followed by scons<enter>. Refer to scons --help for options that can be passed to scons configure. Wait, this will take a while. Copy over data files and stuff from official spring to the game dir (where spring.exe is created). Copy missing DLLs from mingwlibs/dll, Start developing.
[[Category: Development]]
 
 
If you are using Linux, refer to the [[SetupGuide]] to build Spring and get it running.
 
==Development Suggestions==
 
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.
 
===How to get your code included===
If you create something that you think should be included in the official source tree, you can send an email to the development mailing list shown at [[Linux]] page. Sending your code in the form of a patch (also known as a .diff file), will make the chances of including it in the main code.
It's also considered standard practice to post one's modifications in the [http://taspring.clan-sy.com/phpbb/viewforum.php?f=12 development forum] and get feedback.
 
==Multiplatform development==
Current development is done on the portable code only, located at [http://developer.berlios.de/projects/taspring-linux Berlios]
All current and future releases will be based on this code.
The current spring code is being developed on Windows and linux. A mac port is being worked on, as well as other unixes.
Use the mailing list listed on the [[Linux]] page to reach all developers (windows and linux). However if you have a feature request or bug report, the mantis bugtracker is probably a better way.
Development information about the portable code can be found here: [[MultiplatformSpring]]
 
==Spring Engine TODO list==
There is a TODO list for developers who want to contribute to the engine itself:
[[SpringEngineTODO]]
 
See [[Glossary]]
 
[[Category:Development]] [[Category:Source development]]

Latest revision as of 07:52, 21 August 2015

GitHub and Source Code

Engine source code

Important Links

Important Community and Development links to git repos & subprojects.


Compiling Engine

How to build the Spring engine from source.


Engine Development

Information regarding contributing to the source code of the Spring engine.


Lobby Development (Clients and Servers)

Information regarding contributing to the source code of the different lobby clients and servers available for Spring.


Game Development

Lots of links to valuable Articles and forum threads regarding Game, Mod & Unit Development.


Map Development

Tutorials and other useful information for creating maps.


Lua Development

Information regarding the use of the supplementary Lua scripting language for Widgets and beyond.


AI Development

All you ever wanted to know about Skirmish AI Development for Spring, and more. This includes Skirmish and Lua AIs.


Infrastructure Development

Information about springs infrastructure

Quick Links

Development forums
Look at the development forums for ongoing progress and discussion


Report Bugs
Submit patches and bug reports here


Source Code
View and fork the project on GitHub.


Commit Newsfeed
View git commits as they happen.