Difference between revisions of "Guide to FS Open on Linux"

From FreeSpace Wiki
Jump to: navigation, search
m (some little formatting...)
m (Reflect source code hosting via Git)
 
(345 intermediate revisions by 23 users not shown)
Line 1: Line 1:
This HOWTO was written by bottomfan to help Freespace fans get the latest bleeding-edge version of fs2_open from CVS.
+
{{Warning|This guide assumes some fundamental command line knowledge. As a rule of thumb, <b>do not copy & paste commands without fully understanding them</b>, especially as root. With great power comes great responsibility.}}
 +
<p></p>
 +
*[[Fs2_open_on_Linux/Introduction|Introduction]]
 +
*[[Fs2_open_on_Linux/Quickstart|Quickstart]]
 +
*[[Fs2_open_on_Linux/Preparation|Preparation]]
 +
**[[Fs2_open_on_Linux/Installing Git|Installing Git]]
 +
**[[Fs2_open_on_Linux/Installing the Development Libraries|Installing the Development Libraries]]
 +
*[[Fs2_open_on_Linux/Acquiring the Code|Acquiring the Code]]
 +
*[[Fs2_open_on_Linux/Pre-Compile Configuration|Pre-Compile Configuration]]
 +
**[[Fs2_open_on_Linux/Optimization|Optimization]]
 +
*[[Fs2_open_on_Linux/Compiling|Compiling]]
 +
**[[Fs2_open_on_Linux/Compile Script|Compile Script]]
 +
*[[Fs2_open_on_Linux/Acquiring the Game Data|Acquiring the Game Data]]
 +
**[[Fs2_open_on_Linux/Extracting data from CD|Extracting data from CD]]
 +
***[[Fs2_open_on_Linux/Installing unshield|Installing unshield]]
 +
****[[Fs2_open_on_Linux/Data Installation script|Data Installation script]]
 +
*[[Fs2_open_on_Linux/Post-Compile Configuration|Post-Compile Configuration]]
 +
**[[Fs2_open_on_Linux/Graphics Settings|Graphics Settings]]
 +
**[[Fs2_open_on_Linux/StartUp Script|StartUp Script]]
 +
*[[Fs2_open_on_Linux/Troubleshooting|Troubleshooting]]
 +
**[[Fs2_open_on_Linux/Common Compile-time Errors|Common Compile-time Errors]]
 +
***[[Fs2_open_on_Linux/Novell SuSE and the Dependencies|Novell SuSE and the Dependencies]]
 +
***[[Fs2_open_on_Linux/SDL: undefined reference to ...|SDL: undefined reference to ...]]
 +
***[[Fs2_open_on_Linux/Missing -lGLU compile error|Missing -lGLU compile error]]
 +
**[[Fs2_open_on_Linux/Common Runtime Errors|Common Runtime Errors]]
 +
***[[Fs2_open_on_Linux/ERROR: "Web cursor bitmap not found."|ERROR: "Web cursor bitmap not found."]]
 +
***[[Fs2_open_on_Linux/I18n and Key mapping problems|I18n and Key mapping problems]]
 +
***[[Fs2_open_on_Linux/Dedicated X Display|Dedicated X Display]]
 +
***[[Fs2_open_on_Linux/Joystick Errors|Joystick Errors]]
 +
***[[Mouse jumping to bottom right corner]]
 +
***[[Fullscreen issue with multiple monitors]]
  
'''''WARNING! Compling from CVS will let you play with the most recent features and BUGS! Yes, BUGS, compile errors, strange game behavior and/or angry monkeys attacking you. Murphy's Law is very much in effect!'''''
 
  
== Installing CVS ==
+
----
CVS stands for Concurrent Versions System and is a version control system used to record the changes in documents, such as a source files. Developers use CVS so they can easily share their code changes among other developers. You will need this tool to download ("checkout" in CVS termology) fs2_open from the CVS server.
 
<br><br>
 
Use your package tool supplied by your distribution to download and install CVS.
 
  
'''Debian''' users want to:
 
apt-get install cvs
 
'''Gentoo''' users want to:
 
emerge cvs
 
  
== Installing Dev Libs ==
+
*[[Fs2_open_on_Linux/Compiling_PCS2|Compiling PCS2]]
You will also need OpenAL, libvorbis, OpenGL (most likely provided with your videocard driver), and LUA development packages (you dont need LUA if you dont need LUA scripting enabled, it wont go b0rk the compile if it cant find it). And ofcourse the GCC compiler and required make tools.
 
<br><br>
 
'''Debian''' want to:
 
apt-get install libopenal-dev libvorbis-dev build-essential
 
'''Gentoo''' want to:
 
emerge openal libvorbis
 
Before you begin, make sure you are situated in a a directory where you have write permissons. Your /home/user/ directory is pretty much a sure bet. I recommend that you create a permanent home/user/dev directory from which you run the CVS command, this way CVS will only update the files changed the next time you download the source.
 
  
== Using the source ==
+
[[Category:FreeSpace Open on Linux]]
 
 
=== Downloading ===
 
 
 
Now get the source. Run from a terminal:
 
cvs -d:pserver:anonymous:[email protected]:/home/fs2source/cvsroot login
 
and then
 
cvs -z3 -d:pserver:[email protected]:/home/fs2source/cvsroot co fs2_open
 
The first cvs command tells the CVS tool to first use a password file for authentication (pserver), that you are user "anonymous" with the password "anonymous" who wants to access warpcore.org's CVS repository "/home/fs2source/cvsroot" and login. The second command tells the CVS server on which we are now connected to that we want to checkout (co) the fs2_open module.
 
<br><br>
 
Because 99,999% of all computer errors can be traced back to human-to-keyboard mishaps (linguistically proven by yours truly), I've written a quick bash script that will get the source for you. Save this and name it something appropriate like "get-fs2_open", and make it executable (<tt>chmod +x get-fs2_open</tt>).
 
#!/bin/bash
 
# CVS Checkout Script for fs2_open
 
CVS_ATTEMPT=0
 
until [  $CVS_ATTEMPT = 1 ]; do
 
cvs -d:pserver:anonymous:[email protected]:/home/fs2source/cvsroot  login && \
 
cvs -z3 -d:pserver:anonymous:[email protected]:/home/fs2source/cvsroot co fs2_open && \
 
let CVS_ATTEMPT=1
 
done
 
NOTE: This script will run until it successfully downloaded fs2_open, abort it with CTRL+C (originally designed to hammer SourceForge's CVS server). Run the script from a terminal (<tt>./get-fs2_open</tt>) and wait for it to download the source files.
 
 
 
=== Building ===
 
 
 
In the directory you ran the CVS command from, a new directory will appear, namely fs2_open.
 
From that fs2_open directory run in a terminal:
 
./autogen.sh
 
autogen.sh is a script that will generate the required makefiles. You will see alot of "checking for this" and "checking for that", this is actually the "configure" script (which can be run with <tt>./configure</tt> if you need to change the options) examining and configuring fs2_open for your system.
 
 
 
Now run:
 
make
 
Sit back and enjoy gcc work its magic.
 
 
 
=== Using the Binaries ===
 
 
 
When the compile is done and if all went well, a binary executable will reside in the code directory ''fs2_open_r'' or ''fs2_open_d'' if you configured for a debug build. Move the binary to where you got your mediaVP's and your all set to go.
 

Latest revision as of 04:34, 3 May 2015