Difference between revisions of "Compile"

From FreeOrionWiki
Jump to: navigation, search
(Software requirements)
 
(71 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 
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.
 
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==
+
For the most up-to-date instructions we recommend you begin by consulting [https://github.com/freeorion/freeorion/blob/master/BUILD.md the build instructions in our repository].  The information below may possibly add some helpful details, but is also at greater risk of being out of date.
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.
+
  
 +
First of all, you will need to obtain the source code from [https://github.com/freeorion/freeorion GitHub repository]. To help with [[programming]] [[FreeOrion]], you will need to grab the Git master repository latest version. Then you need to set up the required software, compile the game.
  
 
==Hardware requirements==
 
==Hardware requirements==
The FreeOrion code makes heavy use of templates, and requires much memory to compile; at least 1 GB of 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.)
+
The FreeOrion code makes heavy use of templates, and requires much memory to compile; 4 GB or more RAM is recommended.
  
You will also need a fast processor.  Expect more than one hour for a first-time build on a 2 GHz processor (after building GG and any other necessary dependencies).
+
To build 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.
  
At least 2 GB of free disk space is also recommended.
+
==Software requirements==
  
Note that, while not required to compile FreeOrion, running the FreeOrion client requires a graphics card and drivers that support OpenGL 2.0.
+
'''Note: On Windows and OSX, most dependencies are available pre-compiled in the [[Compile#FreeOrion SDK|FreeOrion SDK]].'''
  
==Software requirements==
+
* [http://www.boost.org/ Boost] - '''version 1.58''' or later.
'''Note: On Windows, most dependencies are available pre-compiled in the FreeOrion SDK.'''
+
* [http://www.freetype.org FreeType2] -'''version 2.5.5 is known to work'''.
 
+
* [http://www.python.org/download/ Python] - '''version 3.5 or later'''
* [[GiGi]] - Latest version from [http://sourceforge.net/svn/?group_id=84040 SourceForge SVN], will automatically be included in the FreeOrion/GG directory when checking out the FreeOrion Subversion archive
+
* [https://www.openal.org/downloads/ OpenAL]
* [http://www.boost.org/ Boost] - '''version 1.42''' (Other versions may also work)
+
* [http://xiph.org/downloads/ libogg] - '''version 1.1.3 or later''' 1.2.1 is known to work.
* [http://www.ogre3d.org/ Ogre 3D] - '''version 1.6.1''' or later.  1.7 is known to work.
+
* [http://xiph.org/downloads/ libvorbis] - '''version 1.1.2 or later''' 1.3.2 is known to work.
* [http://www.bulletphysics.com/Bullet/wordpress/ Bullet]  - '''version 2.73'''
+
* [http://www.zlib.net/ zlib] - version 1.2.5 is known to work with libpng 1.4.4
* [http://www.freetype.org FreeType2] - a GiGi dependency
+
* [http://www.libpng.org/pub/png/libpng.html libpng] - '''version 1.6''' works.
* [http://www.python.org/download/ Python] - '''version 2.4 or later''' ('''version 2.5 if using the FreeOrion Windows SDK''') ('''version 2.x only; 3.x will not work''')
+
* [http://www.libsdl.org/download-2.0.php SDL2] - '''version 2.0.3''' works.
* [http://www.openal.org/downloads.html OpenAL and ALUT]
+
* [http://glew.sourceforge.net/ GLEW] - (Windows only) '''version 2.1.0''' is known to work.
* [http://xiph.org/downloads/ libogg] - '''version 1.1.3'''
+
* [http://xiph.org/downloads/ libvorbis] - '''version 1.1.2'''
+
* [http://www.graphviz.org/ GraphViz] - '''version 2.8''' ('''version < 2.22''' on Linux)
+
* [http://glew.sourceforge.net/ GLEW] - (Windows only)
+
* [http://www.zlib.net/ zlib]
+
* [http://www.libpng.org/pub/png/libpng.html libpng] - ''' version 1.2 works, or there is [http://www.freeorion.org/forum/viewtopic.php?p=44430#p44430 a patch] for 1.4'''
+
  
 
==Getting the source==
 
==Getting the source==
  
===Subversion===
+
The source code can be obtained from the [https://github.com/freeorion/freeorion freeorion/freeorion] repository hosted on GitHub via any Git client.  Release versions are tagged in that repository.  To download a release source tarball without cloning the complete freeorion/freeorion repository the GitHub [https://github.com/freeorion/freeorion/releases Release] page can be used.
  
The source code can be obtained from the sourceforge Subversion server, using this command from the Linux command prompt:
 
  
svn co https://freeorion.svn.sourceforge.net/svnroot/freeorion/trunk freeorion
+
===FreeOrion SDK===
  
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''.
+
There are Software Development Kits (SDKs) available for Windows and MacOSX which contain precompiled dependencies needed for building FreeOrion from source. The script to build and package the FreeOrion SDK can be obtained from [https://github.com/freeorion/freeorion-sdk freeorion/freeorion-sdk].  The FreeOrion SDK itself can be downloaded from [https://github.com/freeorion/freeorion-sdk/releases GitHub] (for FreeOrion later than v0.4.6) or [http://sourceforge.net/projects/freeorion/files/FreeOrion%20SDK SourceForge] (for FreeOrion v0.4.6 and earlier).
  
Alternatively, you can download the [http://sourceforge.net/project/showfiles.php?group_id=75752&package_id=236893 FreeOrion Windows SDK] and update that directory tree with SVN.
 
  
===Tarballs===
+
The SDKs do not contain the FreeOrion source code, which must be retrieved from GitHub.
  
The SourceForge Subversion web-client allows one to download numbered versions of the source code as a tarball.
 
  
The latest version can be obtained from the '''Download GNU tarball''' link on the bottom of this page: ''http://freeorion.svn.sourceforge.net/viewvc/freeorion/trunk/FreeOrion/''
+
==Compilation==
  
You can also download source versions corresponding to previous releases:
+
Compilation instructions and troubleshooting tips are available for the following operating systems:
 +
* [[Compile_In_Linux|Linux]]
 +
* [[Compile_In_Windows|Windows]]
 +
* [[Compile_In_Mac_OS_X|Mac OS X]]
 +
* For BSD, consult the Linux instructions.
  
==== FreeOrion v0.3.15 ====
 
  
* [https://sourceforge.net/projects/freeorion/files/FreeOrion/FreeOrion%20Version%200.3.15/ FreeOrion v0.3.15] is FreeOrion SVN revision 3727: '''http://freeorion.svn.sourceforge.net/viewvc/freeorion/trunk/?pathrev=3727''' with GiGi SVN revision 813: '''http://gigi.svn.sourceforge.net/viewvc/gigi/trunk/?pathrev=813'''
+
==Development Environment==
  
==== FreeOrion v0.3.14 ====
+
Create a [[Config.xml#Persistent Config|persistent_config.xml]] with settings that you want to preserve between builds. Otherwise, the first time that you run the game after re-building it all options in config.xml will be reset.
 
+
* [https://sourceforge.net/projects/freeorion/files/FreeOrion/FreeOrion%20Version%200.3.14/ FreeOrion v0.3.14] is FreeOrion SVN revision 3571: '''http://freeorion.svn.sourceforge.net/viewvc/freeorion/trunk/?pathrev=3571''' with GiGi SVN revision 812: '''http://gigi.svn.sourceforge.net/viewvc/gigi/trunk/?pathrev=812'''
+
 
+
==== FreeOrion v0.3.13 ====
+
 
+
* [https://sourceforge.net/project/showfiles.php?group_id=75752&package_id=111134&release_id=685272 FreeOrion v0.3.13]
+
** '''On Windows''' is FreeOrion SVN revision 3094: '''http://freeorion.svn.sourceforge.net/viewvc/freeorion/trunk/?pathrev=3094''' with GiGi SVN revision 756: '''http://gigi.svn.sourceforge.net/viewvc/gigi/trunk/?pathrev=756'''
+
** '''On Linux''' is FreeOrion SVN revision 3103: '''http://freeorion.svn.sourceforge.net/viewvc/freeorion/trunk/?pathrev=3103''' with GiGi SVN revision 757: '''http://gigi.svn.sourceforge.net/viewvc/gigi/trunk/?pathrev=757'''
+
** '''On Mac OSX''' is FreeOrion SVN revision 3094: '''http://freeorion.svn.sourceforge.net/viewvc/freeorion/trunk/?pathrev=3094''' with GiGi SVN revision 757: '''http://gigi.svn.sourceforge.net/viewvc/gigi/trunk/?pathrev=757'''
+
 
+
==== FreeOrion v0.3.12.1 '''for Linux''' ====
+
* [https://sourceforge.net/project/showfiles.php?group_id=75752&package_id=111134&release_id=660507 FreeOrion v0.3.12.1 '''for Linux'''] is SVN revision 2918: '''http://freeorion.svn.sourceforge.net/viewvc/freeorion/trunk/?pathrev=2918''' with GiGi revision 711: '''http://gigi.svn.sourceforge.net/viewvc/gigi/?pathrev=711'''
+
 
+
==== FreeOrion v0.3.12 '''for Windows''' ====
+
* [https://sourceforge.net/project/showfiles.php?group_id=75752&package_id=111134&release_id=660507 FreeOrion v0.3.12 '''for Windows'''] is SVN revision 2807: '''http://freeorion.svn.sourceforge.net/viewvc/freeorion/trunk/?pathrev=2807''' with GiGi revision 710: '''http://gigi.svn.sourceforge.net/viewvc/gigi/?pathrev=710'''
+
 
+
==== FreeOrion v0.3.11 ====
+
* [https://sourceforge.net/project/showfiles.php?group_id=75752&package_id=111134&release_id=652545 FreeOrion v0.3.11]
+
** '''On Windows''' is SVN revision 2729 '''http://freeorion.svn.sourceforge.net/viewvc/freeorion/trunk/FreeOrion/?pathrev=2729''' with GiGi revision 695: '''http://gigi.svn.sourceforge.net/viewvc/gigi/trunk/GG/?pathrev=695'''
+
** '''On Linux''' is SVN revision 2732 '''http://freeorion.svn.sourceforge.net/viewvc/freeorion/trunk/FreeOrion/?pathrev=2732''' with GiGi revision 695: '''http://gigi.svn.sourceforge.net/viewvc/gigi/trunk/GG/?pathrev=695'''
+
 
+
==== FreeOrion v0.3.10 ====
+
* [https://sourceforge.net/project/showfiles.php?group_id=75752&package_id=111134&release_id=609273 FreeOrion v0.3.10] is SVN revision 2607: '''http://freeorion.svn.sourceforge.net/viewvc/freeorion/trunk/FreeOrion/?pathrev=2607''' with GiGi revision 651: '''http://gigi.svn.sourceforge.net/viewvc/gigi/trunk/GG/?pathrev=651'''
+
 
+
==Compilation==
+
Compilation instructions and troubleshooting tips are available for the following operating systems:
+
* [[Compile_In_Linux|Linux]]
+
* [[Compile_In_Windows|Windows]]
+
* [[Compile_In_MacOsX|MacOS X]]
+

Latest revision as of 16:32, 12 March 2020

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.

For the most up-to-date instructions we recommend you begin by consulting the build instructions in our repository. The information below may possibly add some helpful details, but is also at greater risk of being out of date.

First of all, you will need to obtain the source code from GitHub repository. To help with programming FreeOrion, you will need to grab the Git master repository latest version. Then you need to set up the required software, compile the game.

Hardware requirements

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

To build 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.

Software requirements

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

  • Boost - version 1.58 or later.
  • FreeType2 -version 2.5.5 is known to work.
  • Python - version 3.5 or later
  • 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.
  • zlib - version 1.2.5 is known to work with libpng 1.4.4
  • libpng - version 1.6 works.
  • SDL2 - version 2.0.3 works.
  • GLEW - (Windows only) version 2.1.0 is known to work.

Getting the source

The source code can be obtained from the freeorion/freeorion repository hosted on GitHub via any Git client. Release versions are tagged in that repository. To download a release source tarball without cloning the complete freeorion/freeorion repository the GitHub Release page can be used.


FreeOrion SDK

There are Software Development Kits (SDKs) available for Windows and MacOSX which contain precompiled dependencies needed for building FreeOrion from source. The script to build and package the FreeOrion SDK can be obtained from freeorion/freeorion-sdk. The FreeOrion SDK itself can be downloaded from GitHub (for FreeOrion later than v0.4.6) or SourceForge (for FreeOrion v0.4.6 and earlier).


The SDKs do not contain the FreeOrion source code, which must be retrieved from GitHub.


Compilation

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


Development Environment

Create a persistent_config.xml with settings that you want to preserve between builds. Otherwise, the first time that you run the game after re-building it all options in config.xml will be reset.