Difference between revisions of "Compiling for Linux (UFO2000)"

From UFOpaedia
Jump to navigation Jump to search
Line 3: Line 3:
 
UFO2000 is written in portable C, so of course it is also possible, to compile it on linux. The following instructions have been tested on an Ubuntu 14.04 x64 without any additional software or libraries installed by the user. The <code>apt-get</code>-commands should work on any Debian-related linux. If you run a different distribution, you may need the corresponding commands and library-names.
 
UFO2000 is written in portable C, so of course it is also possible, to compile it on linux. The following instructions have been tested on an Ubuntu 14.04 x64 without any additional software or libraries installed by the user. The <code>apt-get</code>-commands should work on any Debian-related linux. If you run a different distribution, you may need the corresponding commands and library-names.
  
==Requirements==
+
==Compiling the game==
 +
===Requirements===
 
In principle, you only need a few libraries like allegro or dumb:
 
In principle, you only need a few libraries like allegro or dumb:
  
Line 14: Line 15:
 
* <code>libpng12-dev</code> (usually already there, at least with an Ubuntu 14.04)
 
* <code>libpng12-dev</code> (usually already there, at least with an Ubuntu 14.04)
  
For the server you (only) need these:
+
As well, you will need Subversion for downloading the source-files, which can be installed like this:
 +
 
 +
sudo apt-get install subversion
 +
 
 +
To install them all at once, run:
 +
sudo apt-get install build-essential liballegro4.2-dev libexpat1-dev zlib1g-dev libfreetype6-dev libdumb1-dev libpng12-dev subversion
 +
 
 +
It is also recommended, to have X-COM and TFTD original files at hand for the game, but it is not necessary for playing.
 +
 
 +
So now we're ready to compile UFO2000. You will need the source-files as well:
 +
 
 +
svn checkout svn://svn.code.sf.net/p/ufo2000/code/trunk ufo2000-code
 +
cd ufo2000-code
 +
 
 +
=== Compiling the game ===
 +
You have two options for compiling UFO2000. Easy way with ogg-music-support:
 +
 
 +
make
 +
 
 +
Or if you prefer not to have ogg-support:
 +
 
 +
make no_dumbogg=1
 +
 
 +
=== Getting ready to play ===
 +
UFO2000 doesn't exactly rely on files from original X-COM, but if you have it, or TFTD for that matter, you might want to copy the files into the folders <code>XCOM</code> and <code>TFTD</code> after compilation. You will have a much better game experience. For further information, see [[Quick guide to UFO2000 online playing]]. One piece of warning: The game ''needs'' writing-permissions to the games own folder in order to save settings, squad-files and replays. So do not place it somewhere, useres don't have write permissions.
 +
 
 +
==Compiling the server==
 +
=== Requirements ===
 +
For the server you (only) need these libraries:
  
 +
* <code>build-essential</code>
 
* <code>libhawknl-dev</code>
 
* <code>libhawknl-dev</code>
 
* <code>libsqlite3-dev</code>
 
* <code>libsqlite3-dev</code>
  
 
To install them all at once, run:
 
To install them all at once, run:
  sudo apt-get install build-essential liballegro4.2-dev libexpat1-dev zlib1g-dev libfreetype6-dev libdumb1-dev libpng12-dev libhawknl-dev libsqlite3-dev
+
  sudo apt-get install build-essential libhawknl-dev libsqlite3-dev
  
 
As well, you will need Subversion for downloading the source-files, which can be installed like this:
 
As well, you will need Subversion for downloading the source-files, which can be installed like this:
Line 26: Line 56:
 
  sudo apt-get install subversion
 
  sudo apt-get install subversion
  
It is also recommended, to have X-COM and TFTD original files at hand for the game, but it is not necessary for playing.
+
You also will need the source-files (if you don't already have them from compiling the game):
 
 
== Compiling UFO2000 ==
 
So now we're ready to compile UFO2000. For both, game and server, you will need the source-files:
 
  
 
  svn checkout svn://svn.code.sf.net/p/ufo2000/code/trunk ufo2000-code
 
  svn checkout svn://svn.code.sf.net/p/ufo2000/code/trunk ufo2000-code
Line 41: Line 68:
 
That's it. You can now start it on demand or start it with an init-script of some kind. There's also the option to run it in ''demonized'' mode, but there have been [[http://openxcom.org/forum/index.php/topic,1799.msg40898.html#msg40898 reports of problems with that]], so one might refrain from using it. See also [http://ufopaedia.org/index.php?title=Server_%28UFO2000%29#Setting_up_your_own_game_server Setting up your own game server]-page.
 
That's it. You can now start it on demand or start it with an init-script of some kind. There's also the option to run it in ''demonized'' mode, but there have been [[http://openxcom.org/forum/index.php/topic,1799.msg40898.html#msg40898 reports of problems with that]], so one might refrain from using it. See also [http://ufopaedia.org/index.php?title=Server_%28UFO2000%29#Setting_up_your_own_game_server Setting up your own game server]-page.
  
=== Compiling the game ===
+
For running the server, have a look at [[Setting up an UFO2000 server]].
You have two options for compiling UFO2000. Easy way with ogg-music-support:
 
 
 
make
 
 
 
Or if you prefer not to have ogg-support:
 
 
 
make no_dumbogg=1
 
 
 
=== Getting ready to play ===
 
UFO2000 doesn't exactly rely on files from original X-COM, but if you have it, or TFTD for that matter, you might want to copy the files into the folders <code>XCOM</code> and <code>TFTD</code> after compilation. You will have a much better game experience. For further information, see [[Quick guide to UFO2000 online playing]]. One piece of warning: The game ''needs'' writing-permissions to the games own folder in order to save settings, squad-files and replays. So do not place it somewhere, useres don't have write permissions.
 
  
 
[[Category:UFO2000]]
 
[[Category:UFO2000]]

Revision as of 08:36, 30 May 2015

Introduction

UFO2000 is written in portable C, so of course it is also possible, to compile it on linux. The following instructions have been tested on an Ubuntu 14.04 x64 without any additional software or libraries installed by the user. The apt-get-commands should work on any Debian-related linux. If you run a different distribution, you may need the corresponding commands and library-names.

Compiling the game

Requirements

In principle, you only need a few libraries like allegro or dumb:

  • build-essential
  • liballegro4.2-dev
  • libexpat1-dev
  • zlib1g-dev
  • libfreetype6-dev
  • libdumb1-dev (only necessary for ogg-music-files)
  • libpng12-dev (usually already there, at least with an Ubuntu 14.04)

As well, you will need Subversion for downloading the source-files, which can be installed like this:

sudo apt-get install subversion

To install them all at once, run:

sudo apt-get install build-essential liballegro4.2-dev libexpat1-dev zlib1g-dev libfreetype6-dev libdumb1-dev libpng12-dev subversion

It is also recommended, to have X-COM and TFTD original files at hand for the game, but it is not necessary for playing.

So now we're ready to compile UFO2000. You will need the source-files as well:

svn checkout svn://svn.code.sf.net/p/ufo2000/code/trunk ufo2000-code
cd ufo2000-code

Compiling the game

You have two options for compiling UFO2000. Easy way with ogg-music-support:

make

Or if you prefer not to have ogg-support:

make no_dumbogg=1

Getting ready to play

UFO2000 doesn't exactly rely on files from original X-COM, but if you have it, or TFTD for that matter, you might want to copy the files into the folders XCOM and TFTD after compilation. You will have a much better game experience. For further information, see Quick guide to UFO2000 online playing. One piece of warning: The game needs writing-permissions to the games own folder in order to save settings, squad-files and replays. So do not place it somewhere, useres don't have write permissions.

Compiling the server

Requirements

For the server you (only) need these libraries:

  • build-essential
  • libhawknl-dev
  • libsqlite3-dev

To install them all at once, run:

sudo apt-get install build-essential  libhawknl-dev libsqlite3-dev

As well, you will need Subversion for downloading the source-files, which can be installed like this:

sudo apt-get install subversion

You also will need the source-files (if you don't already have them from compiling the game):

svn checkout svn://svn.code.sf.net/p/ufo2000/code/trunk ufo2000-code
cd ufo2000-code

Compiling the server

For this there is only one command necessary:

make server

That's it. You can now start it on demand or start it with an init-script of some kind. There's also the option to run it in demonized mode, but there have been [reports of problems with that], so one might refrain from using it. See also Setting up your own game server-page.

For running the server, have a look at Setting up an UFO2000 server.