If you have trouble registering or do not receive a verification e-mail, please ask for help in chat.

Compiling Unvanquished under Ubuntu 11.10

Talk about anything related to Unvanquished.
User avatar
danmal
Posts: 193
Joined: Thu Mar 08, 2012 1:44 am UTC

Compiling Unvanquished under Ubuntu 11.10

Postby danmal » Thu Mar 15, 2012 9:22 am UTC

There's a wiki page which has instructions for compiling under Ubuntu as well as a whole heap of other Distros/OS's. I suggest that you go there instead. I won't be updating this post any further.

Quite a few people have been trying to compile/install Unvanquished under Ubuntu. Hopefully this guide will help them. Any corrections are more then welcome.

====Downloading Source====

Get the latest source from https://github.com/TremZ/Unvanquished/. To do so you'll need to install git

sudo apt-get install git

Then open Terminal and download the source code (I'm downloading it to my home folder but it can go anywhere)

git clone git://github.com/TremZ/Unvanquished.git

Now just navigate into the directory with

cd Unvanquished


====Compiling====

First we need to install the necessary packages to run

sudo apt-get install cmake libfreetype6-dev libpng12-dev libjpeg8-dev libsdl1.2-dev libopenal-dev libgmp-dev libglew1.6-dev cmake-curses-gui build-essential libcurl4-openssl-dev libogg-dev libvorbis-dev

Now we'll make the directory where we'll build Unvanquished and navigate into it

mkdir build && cd build

Next we'll create the necessary makefiles. I've disabled XVID, WEBP and theora but if you have the relevant dev packages feel free to enable them.

cmake -D USE_CIN_XVID:BOOL=OFF -D USE_WEBP:BOOL=OFF -D USE_CIN_THEORA:BOOL=OFF ..

Now just run "make" in the terminal. Wait a few minutes for the build to complete.


====Adding The Assets====

All we need now is the pak0.pk3, pak1.pk3 and the map pack. So download them from
http://tremz.com/downloads/main/pak0.pk3 (pak0.pk3)
http://sourceforge.net/projects/unvanquished/files/Assets/pak1.pk3/download (pak1.pk3)
http://sourceforge.net/projects/unvanquished/files/Map%20Pack/maps.7z/download (map pack)
Place pak0.pk3 into build/main and unzip the map pack and place them in build/main as well.

Everything should work now so just ./daemon.i386 and enjoy Unvanquished.

====LIBRARIES THAT CAN BE DISABLED====

If for whatever reason you don't want to install any more libraries then absolutely necessary (or maybe a particular library is playing up) then here's a list of which libraries are not necessary and what features you'll lose if you disable them

*curses -- You won't be able to use ccmake (not to be confused with cmake) but this library doesn't affect gameplay. Disable with -D USE_CURSES:BOOL=OFF

* Ogg/Vorbis -- You won't get the background music for the menu anymore and maybe some sound effects for certain maps. Disable with -D USE_CODEC_VORBIS:BOOL=OFF

* OpenAl -- If this isn't found then sdl sound is used instead. Should have no major impact on gameplay. Disable with -D USE_OPENAL:BOOL=OFF

====IMPORTANT NOTE====

Some Ubuntu users have reported crashing whenever they die. The work around is to build a debug release.
User avatar
JOURNEYMAN
Dragoon
Posts: 335
Joined: Thu Mar 08, 2012 9:42 pm UTC

Re: Compiling Unvanquished under Ubuntu 11.10

Postby JOURNEYMAN » Thu Mar 15, 2012 9:51 am UTC

For troubleshooting purposes, I think it would be helpful to know which library packages can be disabled safely. For example, I had trouble running the game even after successful compilation. According to Ishq, the curses is unnecessary and can be disabled, and after disabling it, I was able to run the game with no problems.
Grab reality by the balls and squeeeeze!

Image
User avatar
danmal
Posts: 193
Joined: Thu Mar 08, 2012 1:44 am UTC

Re: Compiling Unvanquished under Ubuntu 11.10

Postby danmal » Thu Mar 15, 2012 8:16 pm UTC

That's a good point. I've tried to keeping the needed libraries to a minimum (no msql, xvid, etc) but stuff like curses + ogg can probably be removed as well. I'll add a section about which libraries can be disabled.
User avatar
Ishq
Project Head
Posts: 1138
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: Compiling Unvanquished under Ubuntu 11.10

Postby Ishq » Thu Mar 15, 2012 9:32 pm UTC

You probably shouldn't disable ogg. Our menu theme uses ogg and we plan to move all of our sounds to ogg.
User avatar
danmal
Posts: 193
Joined: Thu Mar 08, 2012 1:44 am UTC

Re: Compiling Unvanquished under Ubuntu 11.10

Postby danmal » Fri Mar 16, 2012 9:10 am UTC

Yes, that's a good point. I've mentioned it in my post.
User avatar
velociostrich
Dragoon
Posts: 318
Joined: Thu Mar 08, 2012 6:24 pm UTC

Re: Compiling Unvanquished under Ubuntu 11.10

Postby velociostrich » Fri Mar 16, 2012 11:21 am UTC

I really appreciate the work you put into writing this guide, but we now have a wiki and there would be a better place to write this sort of information.

I have already begun on writing compilation instructions here, and I'd appreciate it if you'd edit that page to include any information that is missing.

EDIT: Danmal, I have gone through your post and added anything I saw missing from the wiki article to it, which was only some libraries that could be skipped and two more to install. I think it'd be a good idea if you edited your post and instead directed people to the wiki article.
User avatar
Anomalous
Programmer
Posts: 318
Joined: Wed Mar 07, 2012 3:51 pm UTC

Re: Compiling Unvanquished under Ubuntu 11.10

Postby Anomalous » Fri Mar 16, 2012 5:38 pm UTC

I'd like some feedback on whether my .debs work on Ubuntu. I don't see too much reason why they shouldn't…
User avatar
danmal
Posts: 193
Joined: Thu Mar 08, 2012 1:44 am UTC

Re: Compiling Unvanquished under Ubuntu 11.10

Postby danmal » Sun Mar 18, 2012 2:26 am UTC

velociostrich wrote:I really appreciate the work you put into writing this guide, but we now have a wiki and there would be a better place to write this sort of information.

I have already begun on writing compilation instructions here, and I'd appreciate it if you'd edit that page to include any information that is missing.

EDIT: Danmal, I have gone through your post and added anything I saw missing from the wiki article to it, which was only some libraries that could be skipped and two more to install. I think it'd be a good idea if you edited your post and instead directed people to the wiki article.


Sure, when I first wrote this guide I wasn't aware of the Unvanquished Wiki. Although I don't think in source builds are a good idea.

EDIT: Made a few minor changes to the wiki page. Everything looks good.
User avatar
danmal
Posts: 193
Joined: Thu Mar 08, 2012 1:44 am UTC

Re: Compiling Unvanquished under Ubuntu 11.10

Postby danmal » Sun Mar 18, 2012 7:38 am UTC

Anomalous wrote:I'd like some feedback on whether my .debs work on Ubuntu. I don't see too much reason why they shouldn't…


The script for downloading the .pk's relies on curl but curl isn't a dependency (not sure if that's intentional).
For some reason daemon/renderer/renderergl is x86_64 instead of i386. Not sure if you've compiled for 64 bit machines or what.

EDIT: I've checked and I've downloaded the i386 package for squeeze.
User avatar
Anomalous
Programmer
Posts: 318
Joined: Wed Mar 07, 2012 3:51 pm UTC

Re: Compiling Unvanquished under Ubuntu 11.10

Postby Anomalous » Mon Mar 19, 2012 3:38 pm UTC

New .debs are available – should all be fixed now.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests