Jump to content
Eternal Lands Official Forums
Aislinn

Linux Compiling Guide

Recommended Posts

LINUX COMPILING

(assumes current updated libs, and installation of glew, make, cmake, boost, glm, git, and gdb)

 

Current Official Client

 

[sb@precision330 ~]$ git clone git://github.com/raduprv/Eternal-Lands.git
[sb@precision330 ~]$ cd Eternal-Lands
[sb@precision330 Eternal-Lands]$ make -f Makefile.linux

 

End result in your terminal should look something like this:

 CXX  engine/hardwarebuffer.o
 LINK el.x86.linux.bin
[sb@precision330 Eternal-Lands]$ 

 

Pastebin file of everything as it spits out in my terminal:

http://pastebin.com/ZXumkk6z

 

 

Copy el.x86.linux.bin over into your el_linux directory.

If it is not executable already (which it should be), make it executable:

[sb@precision330 el_linux]$ chmod 755 el.x86.linux.bin

 

 

 

Opengl2 Testing Client

 

[sb@precision330 ~]$ git clone git://github.com/xaphier/Eternal-Lands.git
[sb@precision330 ~]$ cd Eternal-Lands
[sb@precision330 Eternal-Lands]$ cmake ./
[sb@precision330 Eternal-Lands]$ make

 

End result in your terminal should look something like this:

Linking CXX executable el_client
[100%] Built target el_client
[sb@precision330 Eternal-Lands]$

 

<No pastebin file currently as I can get the client to compile but it's not working right so I don't want to post something not working well.>

 

 

Copy el_client over into your el_linux directory.

If it is not executable already (which it should be), make it executable:

[sb@precision330 el_linux]$ chmod 755 el_client

Copy shaders directory to /path/to/el_linux/shaders (this only applies for the opengl2 test client)

 

 

Additional tricks:

 

If you need to run or are asked to run your client with dbg (debugging tool), here's how to:

[sb@precision330 ~]$ cd el_linux

[sb@precision330 el_linux]$ gdb el_client

<gdb info spits out at you here and when it finishes type run after it says (gdb)>

(gdb) run

<stuff spits out here too and when it finishes, type bt full after it says (gdb)>

(gdb) bt full

<more stuff spits out>

 

If you want to connect the client to the test server, you can do a

(gdb) run test

 

 

Important Notes:

1. Notice the two different github addresses you are pulling from (one raduprv and one xaphier) distinguishing which is current client and which is opengl2.

 

2. However, notice both get dumped into a directory called Eternal-Lands. This is the default but this is not good. If you are compiling BOTH versions, you need to keep them separated. To do this, you can set an extra parameter in your gitclone command to create better named directories like these:

[sb@precision330 ~]$ git clone git://github.com/raduprv/Eternal-Lands.git EL-official

and

 

[sb@precision330 ~]$ git clone git://github.com/xaphier/Eternal-Lands.git opengl2-client

 

That way, your files will go to the newly created EL-official and opengl2-client directories rather than an Eternal-Lands directory. (You can choose for yourself what you want to name these directories.) Then the next time you need to update, you just $cd into the directories you created and you can just compile or gitpull from there.

 

3. If you already have a version of the code from github, you can update it (versus deleting it and starting over as above) by running:

[sb@precision330 ~]$ cd EL-official
[sb@precision330 EL-official]$ git pull

(instead of the whole $ git clone git://github.com/.../Eternal-Lands.git)

 

As always, many thanks to Sir_Odie and bluap for their help and patience.

Share this post


Link to post
Share on other sites

For the Ubuntu distributions you need to install a few packages before fetching the code and building it. This procedure has been tested on a clean live-cd version of Ubuntu 11.10. First open the software-sources application and make sure the line "Community-maintained Open Source Software (Universe)" is ticked. Then install the required packages (several additional packages will get included as dependencies).

 

For the current official client.

[paul@hagrid ~]$ sudo apt-get update
[paul@hagrid ~]$ sudo apt-get install build-essential git libcal3d12-dev libsdl-image1.2-dev libsdl-net1.2-dev libxml2-dev libopenal-dev libvorbis-dev

For the Opengl2 testing client, in addition to those above.

[paul@hagrid ~]$ sudo apt-get install cmake libboost-dev libfreetype6-dev libglew1.6-dev libglm-dev

Edited by bluap
libfontconfig1-dev nolonger needed

Share this post


Link to post
Share on other sites

[paul@hagrid ~]$ sudo apt-get install cmake libboost-dev libfreetype6-dev libglew1.6-dev libglm-dev libfontconfig1-dev

 

The packages libglew1.6-dev and libglm-dev are not available in Natty (11.04).

Share this post


Link to post
Share on other sites

The packages libglew1.6-dev and libglm-dev are not available in Natty (11.04).

Nope, afraid not. I'm using Lucid so I appreciate the problem. You can download glew here and glm here. You need to build the glew from source, glm is just headers. At the cmake configuration stage of the build point at your local version of the libraries. I have a build directory, the el source and the local libraries all in the same directory so my cmake line is:

cmake -D GLM_INCLUDE_DIR=../glm-0.9.2.7 -D GLEW_INCLUDE_PATH=../glew-1.6.0/include -D GLEW_LIBRARY=../glew-1.6.0/lib/libGLEW.a ../elc

Edited by bluap
link to static glew library

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×