Difference between revisions of "Fs2 open on Linux/Quickstart"

From FreeSpace Wiki
Jump to: navigation, search
(update obsolete info)
 
Line 1: Line 1:
{{note|
+
This is a quick startup guide to using Freespace2 Open on Linux. You should at least be familiar with basic file management like moving and renaming files. I also assume that you have an administrator account. Make sure your video card drivers are working properly; other sources can assist you with this.
An even easier option as of now may be to use the installer:
 
# Go to www.fsoinstaller.com and download the .jar file
 
# Install Java (OpenJDK 7 is recommended)
 
# Run '''java -jar FreeSpaceOpenInstaller.jar'''
 
# If you're running 64 bit linux, install the 32bit libs - see the note below
 
}}
 
  
 +
This guide was written using Ubuntu Linux 9.04, 12.04 and 14.04. Note that EVERYTHING in Linux is case sensitive, so if your folder is named <code>Games</code> and you enter <code>games</code> it won't work. Also pay close attention to SPACES and DOTS. <code>.fs2_open</code> is not the same as <code>fs2_open</code> or <code>fs2 open</code>!
  
Hi, [[User:Galemp|Galemp]] here. If, like me, you're new to Linux and have no idea how to compile code, I have a quick startup guide here. You should at least be familiar with basic file management like moving and renaming files. I also assume that you have an administrator account. Make sure your video card drivers are working properly; other sources can assist you with this.
+
'''Part 1 (installer). Getting the game running.'''
 +
This assumes that you have a copy of the GoG Freespace2 .exe installer, or you have a directory that already contains the retail VPs.
  
This guide was written using Ubuntu Linux 9.04. Note that EVERYTHING in Linux is case sensitive, so if your folder is named <code>Games</code> and you enter <code>games</code> it won't work. Also pay close attention to SPACES and DOTS. <code>.fs2_open</code> is not the same as <code>fs2_open</code> or <code>fs2 open</code>!
+
# Go to www.fsoinstaller.com using your browser and download the .jar file
 +
# Install Java. Open a terminal and type <code> sudo apt-get install openjdk-7-jre </code> (enter your password when prompted)
 +
# From the same terminal run '''java -jar ~/Downloads/FreeSpaceOpenInstaller.jar'''.  (this assumes that the jar was downloaded to the default location.  If you downloaded it to a different location, change the location in the command to point to the correct location)
 +
# Select a location to install Freespace2 Open to. If you select an empty directory you'll be prompted to install Freespace 2 from the GoG installer. Select the location of the GoG Installer.  Then select the Basic install and wait. The download will be several gigabytes in size so it may take some time to complete depending on the speed of your internet.
 +
# '''NOTE:''' If you are using a 64bit version of Linux, you will need the 32bit libraries installed. Instructions for doing this in Ubuntu are available here: [[http://www.hard-light.net/forums/index.php?topic=87563.msg1749218#msg1749218]]
  
'''Part 1. Getting the game running.'''
+
 
 +
'''Part 1 (alternate).'''
 
This assumes that you have access to a Windows installation of retail or GOG FS2, or otherwise have access to the original VPs. I copied mine from a mounted secondary hard drive that I boot Windows from.
 
This assumes that you have access to a Windows installation of retail or GOG FS2, or otherwise have access to the original VPs. I copied mine from a mounted secondary hard drive that I boot Windows from.
  
Line 22: Line 23:
  
 
'''Part 2. Getting mods to work.'''
 
'''Part 2. Getting mods to work.'''
If you want to run mods, things get trickier. First, there are currently some issues with current builds not supporting mods; second, you'll want to install a launcher to switch between them. The Linux launcher, YAL, is non-portable, so we'll have to configure SVN (a tool for updating code databases) to download the latest code, configure it to work on your system, compile the code into a working executable, then move that to your Freespace directory. This is the most frustrating part of the whole process, but bear with me and we'll get through it. The Source Code Project team is working on an installer/launcher overhaul, so go bug them in the meantime.
 
  
# '''Install the fixed binary.''' For now, download and unpack [[http://www.joskus.jossain.com/fso_5395.zip this build]] into your Freespace directory. Or, try a build of your choosing.
+
Installing & running mods is much easier than it used to be. For now it still requires compiling a launcher (wxLauncher in this case).
# '''Install dependencies.''' Compiling the launcher requires a few external libraries to get going. We're going to install them as a super user (sudo) by using the get application command (apt-get.) Open Terminal under Applications > Accessories and enter this command: <code>sudo apt-get install build-essential automake1.9 autoconf libreadline5-dev subversion</code> You will need to enter your password when prompted.
+
 
# '''Download the launcher code.''' From Terminal, enter <code>cd $HOME</code> to navigate to your home folder, and enter <code>mkdir yal</code> to create a new folder named yal. This is where we'll put the code. Enter <code>cd yal</code> to navigate to that directory, then enter  <code>svn checkout svn://vega.livecd.pl/yal/trunk</code> to download the latest launcher code.
+
# '''Install dependencies.''' Compiling the launcher requires a few external libraries to get going. We're going to install them as a super user (sudo) by using the get application command (apt-get.) Open Terminal under Applications > Accessories and enter this command: <code>sudo apt-get install build-essential libopenal-dev libwxgtk2.8-dev libwxgtk2.8-dbg python-markdown mercurial cmake</code> You will need to enter your password when prompted.
# '''Compile the launcher code.''' Enter <code>./autogen.sh</code> then <code>make</code> and in a moment it should compile a new binary. Move this to your Freespace directory by entering <code>mv fs2_launcher $HOME/Games/freespace2</code>.
+
# '''Download the launcher code.''' From Terminal, enter <code>cd $HOME</code> to navigate to your home folder. Then enter <code>hg clone https://code.google.com/p/wxlauncher/</code> to download the latest launcher code to the directory called "wxlauncher". Enter <code>cd wxlauncher</code> to navigate to that directory.
# '''Test the launcher.''' Now you can try running the FS2 Launcher app in your Freespace 2 directory, choosing the fixed binary above and the mod of your choice. In all respects this should work like the Windows launcher, except that only a few tabs will be working.
+
# '''Compile the launcher code.''' Create a new dir to build wxlauncher <code> mkdir build </code> then change to that directory <code> cd build </code>. Enter <code>cmake -DUSE_OPENAL=1 -DCMAKE_INSTALL_PREFIX=/usr/local ../</code> then <code>make</code> and in a moment it should compile a new binary. Install this in the system defaut location (/usr/local/) by entering <code>sudo make install</code>. Enter your password if & when prompted.
 +
# '''Test the launcher.''' Now you can try running wxlauncher (from the command line or using ALT-F2), choosing the fixed binary above and the mediavps selected by the installer "Basic Install". If you wish to try additional mods, rerun the installer and either select Complete or Custom.
  
Well, that worked for me. The_E and I are working on a script to automate some of this, so stay tuned.
+
Note: thanks to [[User:Galemp|Galemp]] for the original version of this guide.
  
 
[[Category:FreeSpace Open on Linux]]
 
[[Category:FreeSpace Open on Linux]]

Latest revision as of 01:40, 15 October 2014

This is a quick startup guide to using Freespace2 Open on Linux. You should at least be familiar with basic file management like moving and renaming files. I also assume that you have an administrator account. Make sure your video card drivers are working properly; other sources can assist you with this.

This guide was written using Ubuntu Linux 9.04, 12.04 and 14.04. Note that EVERYTHING in Linux is case sensitive, so if your folder is named Games and you enter games it won't work. Also pay close attention to SPACES and DOTS. .fs2_open is not the same as fs2_open or fs2 open!

Part 1 (installer). Getting the game running. This assumes that you have a copy of the GoG Freespace2 .exe installer, or you have a directory that already contains the retail VPs.

  1. Go to www.fsoinstaller.com using your browser and download the .jar file
  2. Install Java. Open a terminal and type sudo apt-get install openjdk-7-jre (enter your password when prompted)
  3. From the same terminal run java -jar ~/Downloads/FreeSpaceOpenInstaller.jar. (this assumes that the jar was downloaded to the default location. If you downloaded it to a different location, change the location in the command to point to the correct location)
  4. Select a location to install Freespace2 Open to. If you select an empty directory you'll be prompted to install Freespace 2 from the GoG installer. Select the location of the GoG Installer. Then select the Basic install and wait. The download will be several gigabytes in size so it may take some time to complete depending on the speed of your internet.
  5. NOTE: If you are using a 64bit version of Linux, you will need the 32bit libraries installed. Instructions for doing this in Ubuntu are available here: [[1]]


Part 1 (alternate). This assumes that you have access to a Windows installation of retail or GOG FS2, or otherwise have access to the original VPs. I copied mine from a mounted secondary hard drive that I boot Windows from.

  1. Copy the game data. If you're a Freespace modder, you install mods, or just like downloading new missions, it makes sense to put it in your Home folder. Create a new folder in your home directory, called Games, and a new folder in that called freespace2, and copy all .VP files in your original install folder there. If you have any mods installed, such as MediaVPs or FSPort, move those folders as well.
  2. Initial configuration. We're going to create a file that sets essential options for starting up Freespace. Browse to your home folder and press CTRL-H to unhide system files. Create a new folder called .fs2_open and inside that, create a plaintext file called fs2_open.ini. On the first line, put [Default] and on the second line put VideocardFs2open=OGL -(1024x768)x32 bit. You can change the first two parameters to your native screen resolution. Save and close it. Do not change from 32 bit unless told otherwise by a Support Ninja.
  3. Download the Linux binaries. This is the actual game executable. The latest stable version as of this writing (21 May 2014) is 3.7.0. If you'd like a newer build, please see the Nightly Builds forum and pick the most recent Linux build. Unpack the executables to the same folder where you put the Freespace VPs.
  4. NOTE: If you are using a 64bit version of Linux, you will need the 32bit libraries installed. Instructions for ubuntu are available here: [[2]]
  5. Run a test. Now let's see if Freespace will run. In your game directory, run the binary you've just downloaded. If you've done everything correctly, you should have Freespace 2 up and running on Linux! Congratulations! From here you should be able to experience the game just as it was when it was released, and play online using FS2Net.

Part 2. Getting mods to work.

Installing & running mods is much easier than it used to be. For now it still requires compiling a launcher (wxLauncher in this case).

  1. Install dependencies. Compiling the launcher requires a few external libraries to get going. We're going to install them as a super user (sudo) by using the get application command (apt-get.) Open Terminal under Applications > Accessories and enter this command: sudo apt-get install build-essential libopenal-dev libwxgtk2.8-dev libwxgtk2.8-dbg python-markdown mercurial cmake You will need to enter your password when prompted.
  2. Download the launcher code. From Terminal, enter cd $HOME to navigate to your home folder. Then enter hg clone https://code.google.com/p/wxlauncher/ to download the latest launcher code to the directory called "wxlauncher". Enter cd wxlauncher to navigate to that directory.
  3. Compile the launcher code. Create a new dir to build wxlauncher mkdir build then change to that directory cd build . Enter cmake -DUSE_OPENAL=1 -DCMAKE_INSTALL_PREFIX=/usr/local ../ then make and in a moment it should compile a new binary. Install this in the system defaut location (/usr/local/) by entering sudo make install. Enter your password if & when prompted.
  4. Test the launcher. Now you can try running wxlauncher (from the command line or using ALT-F2), choosing the fixed binary above and the mediavps selected by the installer "Basic Install". If you wish to try additional mods, rerun the installer and either select Complete or Custom.

Note: thanks to Galemp for the original version of this guide.