Free and Open Source real time strategy game with a new take on micro-management

Difference between revisions of "Compiling"

From Globulation2

Jump to: navigation, search
(New page: Image:source_download.png == Compile from Sources == {{Warning|Compiling on Windows|The instructions below will not work for Windows. To compile on that OS, please see the [[Mingw com...)
 
Line 2: Line 2:


== Compile from Sources ==
== Compile from Sources ==
{{Warning|Compiling on Windows|The instructions below will not work for Windows. To compile on that OS, please see the [[Mingw compilation]] guide, which explains how to compile globulation2 on windows using mingw.}}
{{Warning|Compiling on Windows|The instructions below will not work for Windows. To compile on that OS, please see the <u>[[Mingw compilation]]</u> guide, which explains how to compile globulation2 on windows using mingw.}}


=== Source Distribution ===
=== Source Distribution ===
* Get the [[#downloadlink_source|source distribution archive]] from the download section above.
* Get the [[Download and Install|source distribution archive]] from the download section.
* Extract the archive using a compression/extraction utility such as tar.
* Extract the archive using a compression/extraction utility such as tar.
* Go in the extracted archive. If you have a Unix system (Linux, Solaris, Mac OS X):
* Go in the extracted archive. If you have a Unix system (Linux, Solaris, Mac OS X):
Line 18: Line 18:
{{Warning|Warning|Mercurial is occasionally unstable and will break, it is meant for testing purposes.}}
{{Warning|Warning|Mercurial is occasionally unstable and will break, it is meant for testing purposes.}}
* Download the source code from the Mercurial by typing
* Download the source code from the Mercurial by typing
:hg clone http://hg.globulation2.org/glob2/
hg clone http://hg.globulation2.org/glob2/
:hg clone -r default glob2 glob2-work
hg clone -r default glob2 glob2-work
:* You can update the source code you have any time with a simple
:* You can update the source code you have any time with a simple
cd glob2
cd glob2
Line 28: Line 28:
* Read the README.hg and README files.
* Read the README.hg and README files.
* Continue by following the [[#Source_Distribution|''source distribution'']] instructions from the 3rd step onwards.
* Continue by following the [[#Source_Distribution|''source distribution'']] instructions from the 3rd step onwards.


[[Category:User Manual]]

Revision as of 04:58, 15 March 2008

Source download.png

Compile from Sources

Compiling on Windows: The instructions below will not work for Windows. To compile on that OS, please see the Mingw compilation guide, which explains how to compile globulation2 on windows using mingw.

Source Distribution

  • Get the source distribution archive from the download section.
  • Extract the archive using a compression/extraction utility such as tar.
  • Go in the extracted archive. If you have a Unix system (Linux, Solaris, Mac OS X):
    • Run the 'scons' script to compile the game (it will check dependencies, install any you have missing)
      • If you want to install the game in a special place, instead of 'scons', type:
scons BINDIR="/path/to/install/bin" INSTALLDIR="/path/to/install/share"
    • Install with a simple 'scons install' command (will install to the location you might have entered when compiling (BINDIR and INSTALLDIR)).
    • Run the game by typing 'glob2'. If it doesn't work, type '/path/to/install/bin/glob2' instead.
    • Note: in some Linux distributions (eg: Archlinux), scons complains about not finding -lboost_thread (with boost already installed). A solution is to modify the SConstruct file to look for boost_thread-mt instead of boost_thread, and the modify the LIBS variable with boost_thread-mt, to link against this library. If you have root access you can create a symlink libboost_thread.so instead.

Sources from Mercurial

Warning: Mercurial is occasionally unstable and will break, it is meant for testing purposes.
  • Download the source code from the Mercurial by typing
hg clone http://hg.globulation2.org/glob2/
hg clone -r default glob2 glob2-work
  • You can update the source code you have any time with a simple
cd glob2
hg pull
cd ../glob2-work
hg pull -r default ../glob2
hg update -C tip
  • Read the README.hg and README files.
  • Continue by following the source distribution instructions from the 3rd step onwards.
Misc