Difference between revisions of "Compile"

From FreeOrionWiki
Jump to: navigation, search
m (FreeOrion v0.4.4)
(Getting the source)
Line 32: Line 32:
 
==Getting the source==
 
==Getting the source==
  
===Subversion===
+
===Git===
  
The source code can be obtained from the sourceforge Subversion server, using this command from the Linux command prompt (assuming you have previously installed subversion):
+
The source code can be obtained from [https://github.com/freeorion/freeorion freeorion/freeorion/master] repository on GitHub.
  
svn co https://svn.code.sf.net/p/freeorion/code/trunk freeorion
+
====SourceForge Subversion====
  
which will install the code to the directory "./FreeOrion/freeorion"  To avoid that extra layer of directory structure the code can be installed directly to "./freeorion" with the command:
+
Prior to March 2015, FreeOrion source code was stored and managed on [http://sourceforge.net/p/freeorion/code/HEAD/tree/trunk/ SourceForge Subversion] (SVN). This repository is now retired, and future development with occur on GitHub.
  
svn co https://svn.code.sf.net/p/freeorion/code/trunk/FreeOrion freeorion
+
===FreeOrion SDK===
  
 +
There are Software Development Kits (SDKs) availaboe for Windows and MacOSX which contain precompiled dependencies needed for building FreeOrion from source. You may download and build all of these open-source dependencies yourself if you prefer. Using the SDK is likely faster and easier, however.
  
For Windows, a graphical shell-extension SVN client, such as [http://tortoisesvn.tigris.org/ TortoiseSVN] is recommended, with which the source can be obtained from ''https://freeorion.svn.sourceforge.net/svnroot/freeorion/trunk'' or by just updating the FreeOrion code directory present in the SDK.  If you have the SDK and TortoiseSVN installed, right click on the FreeOrion directory in the SDK directory, and pick "Update" in the submenu (at the top). If you don't have "Update" but just have "SVN Upgrade Working Copy", do that first, and then update.
+
The SDKs do not contain the FreeOrion source code, which must be retrieved using git.
  
===FreeOrion SDK===
 
Alternatively, you can download the [http://sourceforge.net/projects/freeorion/files/FreeOrion%20SDK/ FreeOrion SDK] (Windows and MacOSX) and update that directory tree with SVN.
 
  
 
===Tarballs===
 
===Tarballs===
  
The SourceForge Subversion web-client allows one to download numbered versions of the source code as a tarball.
+
The SourceForge Subversion web-client allows one to download pre-March-2015 numbered versions of the source code as a tarball.
  
 
The latest version can be obtained from the '''Download Snapshot''' link at the top of this page: ''http://sourceforge.net/p/freeorion/code/HEAD/tree/trunk/''
 
The latest version can be obtained from the '''Download Snapshot''' link at the top of this page: ''http://sourceforge.net/p/freeorion/code/HEAD/tree/trunk/''

Revision as of 12:27, 29 March 2015

Currently, FreeOrion will compile in most recent Windows, Linux, and MacOSX. The *BSD genus of operating systems might also work; follow the Linux instructions in this case.

Overview

First of all, you will need to obtain the source. This can be grabbed from our project page or from Subversion (SVN). The versions available on the project page are official releases or point releases, and may be somewhat or very out of date. To help with programming FreeOrion, you will need to grab the SVN copy. Then you need to set up the required software, compile the game, download the missing artwork, and run it.


Hardware requirements

The FreeOrion code makes heavy use of templates, and requires much memory to compile; 4 GB or more RAM is recommended.

On Linux, shutting down your X server and compiling from console may help on systems with little RAM. (If this doesn't mean anything to you, simply ignore this advice.)

You will also need a fast processor. To build GG and FreeOrion, expect up to 45 minutes of a Core i5 system, or over an hour on a Core2 Duo system; on a Core i7 system it can be under 10 minutes.

Note that, while not required to compile FreeOrion, running the FreeOrion client requires a graphics card and drivers that support OpenGL 2.0.

Software requirements

Note: On Windows and OSX, most dependencies are available pre-compiled in the FreeOrion SDK.

  • GiGi - Including GiGiOgre and the GiGiOgre OIS plugin. The code for these is included in the FreeOrion SVN repository, but they must be built as separate libraries.
  • Boost - version 1.50 or later.
  • Ogre 3D - Various versions after 1.6.1 may work. 1.7.3 and 1.8 work.
  • Bullet - version 2.73 or later. 2.77 works.
  • FreeType2 - a GiGi dependency. version 2.4.3 is known to work.
  • Python - version 2.7 or later (version 2.x only; 3.x will not work)
  • OpenAL
  • libogg - version 1.1.3 or later 1.2.1 is known to work.
  • libvorbis - version 1.1.2 or later 1.3.2 is known to work.
  • GLEW - (Windows only) version 1.5.7 is known to work.
  • zlib - version 1.2.5 is known to work with libpng 1.4.4
  • libpng - versions 1.2 and 1.4 work

Getting the source

Git

The source code can be obtained from freeorion/freeorion/master repository on GitHub.

SourceForge Subversion

Prior to March 2015, FreeOrion source code was stored and managed on SourceForge Subversion (SVN). This repository is now retired, and future development with occur on GitHub.

FreeOrion SDK

There are Software Development Kits (SDKs) availaboe for Windows and MacOSX which contain precompiled dependencies needed for building FreeOrion from source. You may download and build all of these open-source dependencies yourself if you prefer. Using the SDK is likely faster and easier, however.

The SDKs do not contain the FreeOrion source code, which must be retrieved using git.


Tarballs

The SourceForge Subversion web-client allows one to download pre-March-2015 numbered versions of the source code as a tarball.

The latest version can be obtained from the Download Snapshot link at the top of this page: http://sourceforge.net/p/freeorion/code/HEAD/tree/trunk/

You can also download source versions corresponding to previous releases:

FreeOrion v0.4.4

FreeOrion v0.4.3

FreeOrion v0.4.2

FreeOrion v0.4.1

FreeOrion v0.4

FreeOrion v0.3.17

FreeOrion v0.3.16

FreeOrion v0.3.15

FreeOrion v0.3.14

FreeOrion v0.3.13

FreeOrion v0.3.12.1 for Linux

FreeOrion v0.3.12 for Windows

FreeOrion v0.3.11

FreeOrion v0.3.10

Compilation

Compilation instructions and troubleshooting tips are available for the following operating systems: