HowTo:Checkout SVN (Ubuntu Linux)

From VsWiki

Jump to: navigation, search
main.php?g2_view=core.DownloadItem&g2_itemId=6604&g2_serialNumber=1&ext=.png Checkout SVN main.php?g2_view=core.DownloadItem&g2_itemId=6608&g2_serialNumber=1&ext=.png HowTos Compiling with VCPP main.php?g2_view=core.DownloadItem&g2_itemId=6606&g2_serialNumber=1&ext=.png

This is a newb friendly guide to help people who do not want to learn deep specifics and terms. Most of this guide will show you copy-paste lines to paste in Terminal, omitting most technical issues. However, you might want to take a look at what SVN is to have a general understanding of this version. If you follow steps correctly, VS should be able to run. If you have problems compiling in Ubuntu, post a new thread in the Forums. Someone will be able to help you. Note: This process was done in Ubuntu 8.10 (Intrepid), though it might work in Debian as well. Should be able to work in the Ubuntu derivatives, too.

Contents

Tutorial to Download, Compile, Setup and Run Vega Strike

Downloading Vega Strike

Installing SVN

The first step is to install SubVersioN. In Ubuntu (and Debian, I guess) it is easy to install Subversion just by using the Synaptic Package Manager (Adept for Kubuntu). Goto System>Administration>Synaptic Package Manager. In the quick search box, type "subversion" without quotation marks. Select the first option and mark for installation. A window will appear that will show "Mark additional required changes?". Click on "Mark". After that, click on "Apply". Every step involving the command "svn", will be using subversion.

Preparing Vega Strike

First of all, you must understand some basic knowledge. The first thing to do is to download the most important modules, which are the basic structure of VS. Basically, this is the game. You must download these in order to play VS. The modules are the data and vegastrike modules.

  • First create a directory where you would like your copy of the Vega Strike development version to live in. For tutorial purposes, we will create a directory called VegaStrike in our user's home-directory.
User@UserMachine:~$ mkdir VegaStrike
  • Change into this newly created directory. In our case:
User@UserMachine:~$ cd VegaStrike

Note for newbs: The directory is case sensitive. If you type: cd vegastrike or Vegastrike, it won't find the directory. Also, do not copy and paste "User@UserMachine:~$", or "User@UserMachine:~/VegaStrike/vegastrike$", or "User@UserMachine:~/VegaStrike/data$", or anything between "User@UserMachine:~" and the "$" letter. You know what I mean.

Downloading Vega Strike

Now we can start downloading the packages from the SVN repository. If you download them directly into your Vega Strike directory they will be just in the right place.

  • Download (check-out) the source code package vegastrike, and the content package data package.
User@UserMachine:~/VegaStrike$ svn co https://vegastrike.svn.sourceforge.net/svnroot/vegastrike/trunk/vegastrike
  • After the first one finishes downloading (User@UserMachine:~/VegaStrike$ will reappear), insert the next. Be warned, you need a descent download speed to download the next package with this method.
User@UserMachine:~/VegaStrike$ svn co https://vegastrike.svn.sourceforge.net/svnroot/vegastrike/trunk/data

This leaves you with two new directories inside your Vega Strike directory called as the packages are.

Boost Revisions

I must confess not even I understand this, but it must be done.

  • Just paste this code to update to revision 1.35.
svn update vegastrike/boost/1_35

Configuring this boost revision is easy, but it will be explained in the configure section, so don't worry for now.

Building/Compiling

You might not understand what compiling is, but it is not that important. What is important is that you do it. Its really not that complicated, so here it goes.

  • First of all, we have to make sure we have certain minimum requirements. I could list you a dozen 1337 terms, but you don't certainly need to know them. We'll just make sure to have them all by inserting this into Terminal (copy and paste entire code into Terminal).
sudo apt-get install libpng12-0 libpng12-dev python2.6-dev libexpat1-dev     \
        libjpeg62-dev freeglut3-dev libopenal-dev libgtk2.0-dev libogg-dev libvorbis-dev \
        build-essential libgl1-mesa-dev automake autoconf libsdl1.2-dev

Note that you may need python2.6-dev instead of python2.5-dev on recent distributions

Compiling

The compile procedure should look like the following listing. Remember, the configure part depends on above requirements. However, autoconf may not work. If so, just skip it.

  • Change directory.
cd ./vegastrike
  • Pre-Compile.
./bootstrap-sh
  • Some configuration to be made.
./configure --enable-release

"--enable-release" enables optimizations, you can add the opposite, "--enable-debug", if you feel like debugging (or getting stacktraces to aid debugging for developers - ie: to prepare a bug report). If you have the boost libraries installed in your system, you will likely want to use "--with-boost=system" too, to make VS use that one.

  • Compile.
make
  • Install.
sudo make install # [AS ROOT]

Note: you may not need to install, VS will run fine where it's built, provided its data is in ../data (relative to the source). Ie: the way it normally checks out of SVN.

Configuring Installation

We need to make sure the data directory is *recognized*. For tutorial purposes, we will use the directory where we downloaded first in this tutorial.

  • Open text editor (Applications>Accessories>Text Editor), copy and paste the following code in text editor, change the USER in caps to the name of your user, and then paste in Terminal.
./configure --with-data-dir=/home/USER/VegaStrike
  • We need to configure Boost revision. Simply copy and paste code. This time, we will configure version 1.35.
./configure --with-boost=1.35

Make

The final step compiling is the command make.

  • For example, to compile the mesher.
make mesher
  • You probably want to compile everything, so simply paste:
make all
  • To use less memory usage while compiling use the following command. It is the same as the above command, except it will run only one instance instead of two in order to use less memory.
make all-am
  • The next step is optional, but recommended.
sudo make install

You might receive errors while doing any of the previous steps (make). If so, give privileges (sudo) before any of the commands.

Setup

The next step is to setup the game. This is quite easy to do, so you are almost done.

vegastrike and vssetup

To run Vega Strike, the built executables need all the configuration and data files to be in the right place relative to them. Currently, the executables (vegastrike and vssetup) reside in the source code directory. But they can be run out of the data directory. Therefore, we will create a link.

  • Change in to the data directory. (We are still in the source code directory vegastrike.)
User@UserMachine:~/VegaStrike/vegastrike$ cd ../data
  • Create symbolic links to the executables in the source code directory.
User@UserMachine:~/VegaStrike/data$ ln -s ../vegastrike/vegastrike vegastrike
User@UserMachine:~/VegaStrike/data$ ln -s ../vegastrike/vssetup vssetup
  • After that, you must run "./vssetup" inside the data folder, or any folder which has the correct setup.config and vegastrike.config.

If we had made copies or moved the files instead of symbolic linking, we would have to do the procedure of copying or moving every time we build the executables from source.

  • Optionally, you can right-click the vegastrike link and make yet another link. This link can be moved over to the desktop or menu.

Optional High Quality Texture Files

  • You can optionally install high quality texture files. You would place this folder next to the data folder (not inside). So if data is in /home/USER/VegaStrike You would:
sudo svn co https://vegastrike.svn.sourceforge.net/svnroot/vegastrike/trunk/hqtextures /home/USER/VegaStrike/hqtextures

As always, replace USER with your user name. (Open text editor, paste above code, change USER for your user name, copy that code and paste in Terminal).

  • After downloading these high quality texture files, go to your home folder (using GUI, not terminal), then to VegaStrike, then to data, and open vegastrike.config. Then, using the find button, type "hq" (without quotations). Text editor will automatically find the string containing the configuration to enable HQ Textures. Just replace the following string
<!-- var name="hqtextures" value="hqtextures" -->

for this one

<var name="hqtextures" value="hqtextures"/>
  • After this, close Terminal.

Staying updated with the Development Version

As development progresses the repository changes. In order to update your working copy you need to do the following.

  • Open Terminal and change into the package's directory you want to update. In our tutorial example, all the packages were stored in a directory called VegaStrike. Let's assume we want to update the data package.
User@UserMachine:~$ cd VegaStrike/data
  • After changing into the package's directory, update the SVN repository.
User@UserMachine:~/VegaStrike/data$ svn update
  • To update the vegastrike package, simply return to the VegaStrike directory, then change to the vegastrike directory and update.
User@UserMachine:~/VegaStrike/data$ cd ..

then

User@UserMachine:~/VegaStrike$ cd vegastrike

finally

User@UserMachine:~/VegaStrike/vegastrike$ svn update
  • Do this for every package you want to update.
  • If something changed in the data package, you don't need to recompile.
  • If something changed in the source code package vegastrike, you only need to repeat the building part of this tutorial. You should not need to type "make clean", however if you experience errors like "unresolved external symbol" it may remedy that error.

Running Vega Strike

Very simple. Just goto the directory data and type ./vegastrike or simply double click the symbolic link. Same for ./vssetup.

Extra Info

If you have trouble with compiz, try this application to temporarily disable compiz. Then, launch the game normally. The game will be much faster with compiz disabled, too.

Personal tools