Diaspora for Linux build instructions

You do *not* need a copy of FreeSpace 2 to play Diaspora. All of the content you
need is included in this package.


After you've unpacked the archive, follow these steps:

(1) Move the Diaspora folder into place

Move the Diaspora folder, which contains this README.txt, to a folder of your
choice, then change to the newly moved Diaspora folder. For these instructions,
we're assuming that you've moved it to your home folder:

$ mv Diaspora ~

$ cd ~/Diaspora


(2) Build the game engine (fs2_open)

First, get the required development libraries from your distro's package
repositories. See the notes at the end to find which packages to get for your
distro.

Then run the following commands using the provided pre-patched source code. If
you want to check out a copy of the engine source directly and apply the patches
yourself, see the notes at the end.

Assuming that your current directory is the Diaspora folder:

$ cd fs2_open

$ ./autogen.sh
[which automatically runs configure]

$ make

$ mv code/fs2_open_3.6.13 ../fs2_open_diaspora

If you need to make a debug build, see the notes at the end.


(3) Build the launcher (wxlauncher)

The complete build directions are in the wxLauncher readme file in
Diaspora/wxlauncher/ReadMe.txt, but in short, you need CMake 2.8, the
development libraries and debugging symbols for wxGTK 2.8.10+ (but not 2.9),
Python 2.6+ (but not Python 3), and Markdown in Python (python-markdown). These
can typically be found in your distro's package repositories.

Once you have CMake and the libraries set up, run the following commands using
the provided launcher source. If you want to check out a copy of the launcher
source directly, see the notes at the end.

$ cd ../wxlauncher/build

$ cmake -D USE_OPENAL=1 \
  -D CMAKE_BUILD_TYPE=RelWithDebInfo \
  -D DEVELOPMENT_MODE=1 ../

$ make


(4) Set up the Diaspora launcher profile

First, go back to the Diaspora directory by typing

$ cd ../..

Create the file pro00099.ini by typing

$ cp pro00099.template.ini pro00099.ini

$ chmod 644 pro00099.ini

Now open the file pro00099.ini in a text editor. Look at the line starting with
"folder=" (at line 24) and change the text after the "=" to your install
location. You must specify the full path starting from '/', without a '/'
character at the end, such as "/home/<your_username>/Diaspora". Do not edit
any other line in the file.

After you've made this change, save the file and close the text editor.

Then run these commands to add the profile to the launcher:

$ ./wxlauncher/build/wxlauncher --add-profile --profile=Diaspora \
  --file=pro00099.ini

$ ./wxlauncher/build/wxlauncher --select-profile --profile=Diaspora


(5) Run the launcher

Starting from the Diaspora directory:

$ ./wxlauncher/build/wxlauncher

Then press "Play" in the lower-right corner of the window.

Enjoy the game!

--------------------------------------------------------------------------------

NOTES:

How to Obtain the Required Development Libraries for Building fs2_open

[from <http://www.hard-light.net/wiki/index.php/Fs2_open_on_Linux/
Installing_the_Development_Libraries>]

To build FS2 Open, you'll need the SDL, OpenAL, libvorbis, libtheora, readline,
liblua (version 5.1.3 or higher), and OpenGL (most likely provided with your
video card driver) development packages. And of course, you'll need the GNU
Compiler Collection and make.

At the risk of stating the obvious, you'll need to run the command below with
root privileges, either as root or with sudo.


Ubuntu and Linux Mint (except for Debian Edition) users should run:

$ apt-get install libopenal-dev libogg-dev libvorbis-dev build-essential \
automake1.10 autoconf libsdl1.2-dev libtheora-dev libreadline6-dev \
libpng12-dev libjpeg62-dev liblua5.1-0-dev

Note: The build-essential package is a metapackage that installs the essential
build tools.


Debian and Linux Mint Debian Edition users should run:

$ apt-get install libopenal-dev libvorbis-dev build-essential automake1.10 \
autoconf libsdl1.2-dev libtheora-dev libreadline6-dev libpng12-dev \
liblua5.1-0-dev

Note: The build-essential package is a metapackage that installs the essential
build tools.


Fedora users (and probably also Red Hat users) should run:

$ yum install openal-devel libvorbis-devel gcc gcc-c++ automake autoconf \
SDL-devel libtheora-devel readline-devel lua-devel libpng-devel libjpeg-devel


Gentoo users should run:

$ emerge -va openal libvorbis libsdl libtheora readline lua

Note: media-libs/openal needs the "alsa" USE-flag if you intend to use ALSA, and
media-libs/libsdl needs the "X","opengl" and "xv" USE-flags.


Mandriva users should run:

$ urpmi libsdl-devel libopenal-devel libvorbis-devel libtheora-devel gcc \
gcc-c++ automake autoconf liblua-devel

--------------------------------------------------------------------------------

Debug Builds

A debug build of fs2_open is used to generate a debug log that you can provide
when you need tech support. Only use a debug build if you need to make a debug
log. Otherwise, use a regular build, which is also called a release build.

The process for making a debug build is nearly the same as for a release build:

$ cd Diaspora/fs2_open

$ ./autogen.sh --enable-debug

$ make clean && make

$ mv code/fs2_open_3.6.13_DEBUG ../fs2_open_diaspora_debug

Now run the launcher, go to the Basic Settings tab, and under "FS2 Open
executable:" select the debug build you made. Then click "Play" on the
lower-right corner of the launcher window.

After you exit the game, you can find the debug log at
~/.fs2_open/data/fs2_open.log .


If you need to make a debug build of wxlauncher, follow these steps:

$ cd Diaspora/wxlauncher/build

$ cmake -D CMAKE_BUILD_TYPE=Debug -D USE_OPENAL=1 -D DEVELOPMENT_MODE=1 ../

$ make clean && make

Then to run the build, type

$ ./wxlauncher

You can find the wxLauncher log at ~/.wxlauncher/wxLauncher.log. Unlike
fs2_open, both release builds and debug builds of the launcher will produce a
log, but debug builds produce more detailed logs.

--------------------------------------------------------------------------------

How to Produce the Diaspora fs2_open/wxlauncher Source Code

For fs2_open, first get Subversion from your distro's package repository.

Then type:

$ svn checkout -r 9124 \
  svn://svn.icculus.org/fs2open/trunk/fs2_open fs2_open-diaspora

$ cd fs2_open-diaspora

$ patch -p0 < /path/to/your/Diaspora/patches/changes_from_trunk.patch

$ patch -p0 < /path/to/your/Diaspora/patches/colonial_hud.patch

Then follow the fs2_open build instructions from above.


For wxlauncher, first get Mercurial from your distro's repository.

Then type:

$ hg clone https://code.google.com/r/issmneur-diaspora/ wxlauncher-diaspora

$ cd wxlauncher-diaspora

$ mkdir build

$ cd build

Then follow the wxlauncher build instructions from above, starting with cmake.

--------------------------------------------------------------------------------

Special thanks to Iss Mneur for testing and reviewing the instructions.

