UFO:Alien Invasion

Technical support => Linux => Topic started by: TC on July 14, 2010, 07:20:39 am

Title: New to Linux -- Not Clear On How to Install UFO AI
Post by: TC on July 14, 2010, 07:20:39 am
I'm new to Linux, and I have a dumb newbie question: I'd like to install UFO AI. I found these instructions: http://ufoai.ninex.info/wiki/index.php/Debian . They seem very complicated. Do I really have to follow those instructions, or is there a simpler procedure that I overlooked?

-TC
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: Alienator on July 14, 2010, 09:38:44 am
C'mon this is not so difficult - just copy and paste... it worked for me and I am an idiot.

If you have a 64bit Ubuntu/Debian version you can simply use the pre-compiled deb packages... I think.

For the 32bit, you have to compile yourself. I just did that 2 days ago (used 2.2.1 before). Notice that 2.3.0 did not work for me, but the current version (the SVN version as explained in the link you posted) works with only few bugs.
Some tips:
To get started, after you download the source from SVN (follow the link you posted), open a terminal and go to the directory where you downloaded the code to, where you will find a file named: "configure". Start following the "compile" section of the guide from there (skip compiling the maps! see below).

To save yourself A LOT of time, do not compile the maps - go to contrib/scripts/ directory when you downloaded the source and there you will find "map-get.py". Run that ("./map-get.py") and it will download pre-compiled maps.

If you use Ubuntu/Debian, do not "make install". Instead, skip to the "Building Debian packages " section and do the "make deb". After it finishes you will find several *.deb files one directory above your current. To install all of them:
sudo dpkg -i *.deb

"
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: TC on July 14, 2010, 07:51:44 pm
Okay, I'll try it. I just wanted to double-check before I started. To a newbie, it seems very suspicious that I would need to work through a 12-step procedure just to install a program. After all, if it were really just cut-and-paste, wouldn't someone have made a script to automate it?

-TC
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: queue on July 14, 2010, 08:32:42 pm
It's not a simple installation, you have to build the game from the bottom yourself.

If you have a 64bit environment, better download some files to doubleclick:

http://sourceforge.net/projects/ufoai/files/UFO_AI%202.x/2.3/ufoai-data_2.3_all.deb/download
http://sourceforge.net/projects/ufoai/files/UFO_AI%202.x/2.3/ufoai-common_2.3_amd64.deb/download
http://sourceforge.net/projects/ufoai/files/UFO_AI%202.x/2.3/ufoai_2.3_amd64.deb/download
http://sourceforge.net/projects/ufoai/files/UFO_AI%202.x/2.3/ufoai-music_2.3_all.deb/download

The Files have to be installed in the right order, hope I got it right. Perhaps you need to install other dependencies (let ubuntu do it for you), they should be all in the software repository with one exception. The newest sdl-mixer has to be used, or you will face this error: http://ufoai.ninex.info/forum/index.php?topic=5052.0

You can extend your repository with a PPA, containing the newer sdl-mixer:
Code: [Select]
sudo add-apt-repository ppa:dnjl/games
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: TC on July 15, 2010, 08:07:52 am
I tried the installation process described at http://ufoai.ninex.info/wiki/index.php/Debian , but I didn't get very far. When I ran this line

  svn co https://ufoai.svn.sourceforge.net/svnroot/ufoai/ufoai/trunk

some file names scrolled by, but then the command window just hung. I let it sit for about 8 hours just to be sure it wasn't working, then I closed it. Now, when I try to re-run that line, I get this message:

  svn: Working copy 'trunk' locked
  svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)

When I run "svn cleanup trunk", I get this message:

  svn: In directory 'trunk/base/textures'
  svn: Error processing command 'modify-wcprop' in 'trunk/base/textures'
  svn: 'trunk/base/textures/license.txt' is not under version control

So, I'm stuck until I either learn more about svn or get some advice from an expert. Can anyone point me in the right direction to get my install back on track?


Disregard that question. I worked it out by moving folders and starting over. This time, I got all the way through the install process. My thanks to Alienator for the tip about downloading maps.

Unfortunately, the install doesn't seem to have worked. When I run the program, I get a splash screen that just hangs. I can't even close it. My system monitor tells me the process "ufo" is using 175 MiB of memory and sleeping, waiting on channel "futex_wait_queue_me".

I'm not sure what to do next -- probably a lot of research and trial-and-error tinkering. If anyone has any suggestions, I'd appreciate the advice.


-TC
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: Destructavator on July 15, 2010, 02:36:32 pm
Hi, Exactly what distro and version of Linux are you running (and where did you download/get it from)?
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: Vantskruv on July 15, 2010, 04:46:02 pm
I'm hijacking this thread a little. Self I'm using the Crunchbang Statler Alpha 2 AMD64 as OS, which is based on Debian Squeeze.

When installing the downloaded file ufoai_2.3_amd64.deb, it complains about missing the package nvidia-current. I can't find that package in my repositories. Where do I get that package? I've tried googling around but I cannot find it.
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: TC on July 15, 2010, 05:35:57 pm
Hi, Exactly what distro and version of Linux are you running (and where did you download/get it from)?

I'm using Ubuntu 10.04 LTS (Lucid). I installed an earlier version from files I downloaded from Ubuntu.com and later let Ubuntu upgrade itself to this version.

I should mention that I wasn't able to follow the instructions under "Building Debian Packages". Commands like "make deb" and "dpkg -i ufoai-tools[...].deb" fail, even though I followed all instructions up to that point.

-TC
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: tzzimy on July 15, 2010, 06:00:55 pm
TC, I am using Kubuntu 10.04  and I am trying to compile it as well (running on both a laptop with nvidia 9600M and a virtualbox).
I will share any findings or errors I have when I am confident I can give clear descriptions of any successes/errors I have that have not been dealt with already on wiki or forum or google search.
Keep in there buddy!  8)

Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: Alienator on July 16, 2010, 10:18:00 am
I'm using Ubuntu 10.04 LTS (Lucid). I installed an earlier version from files I downloaded from Ubuntu.com and later let Ubuntu upgrade itself to this version.

I should mention that I wasn't able to follow the instructions under "Building Debian Packages". Commands like "make deb" and "dpkg -i ufoai-tools[...].deb" fail, even though I followed all instructions up to that point.

-TC
"dpkg -i ufoai-tools[...].deb" - I assume you replaced the [...] with the actual file name that was produced?
Did you install "equivs" and "devscripts" ? You need those in order to build the deb packages:
sudo apt-get install devscripts
sudo apt-get install equivs
Only then the "mk-build-deps" step will actually produce the ufoai-tools[...].deb package (is it in your current directory?). In any case, this is a short-cut to install dependencies. If you went through all the steps above you do not really need this.

Did the compilation steps passed without failing? If something failed, post the text so people can help you.
Also, run the ./configure again (or look at the log file) and watch the output for "no" results. Some are not problematic but perhaps you are missing some dependency.

Other notes I just remembered:
In Ubuntu libxvidcore4-dev is actually called libxvidcore-dev, so install that.
sudo apt-get install libxvidcore-dev
And this is also only mentioned in the notes and not the code boxes:
sudo apt-get install libtheora-dev
These are checked in ./configure so it is good to look at the output.

Okay, I'll try it. I just wanted to double-check before I started. To a newbie, it seems very suspicious that I would need to work through a 12-step procedure just to install a program. After all, if it were really just cut-and-paste, wouldn't someone have made a script to automate it?
It is not fully automated because you install code libraries that are not specifically related to UFOAI. The proper "debian way" would have been simply releasing compiled deb binaries for 32bit, as the team did for 64bit. For some reason they didn't. I don't really blame them, but for major milestones releases I would have expected it. The up-side is that once you have the dependencies installed and you got tired of your current version, you can compile latest development versions to check all the new goodies.
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: tzzimy on July 16, 2010, 04:05:40 pm
AND ITS DONE! And yes it runs in Vbox!!! ;D Its slow on missions (maybe i need more resources) and no sound but that is something I will figure it out how to fix later.
(http://img197.imageshack.us/img197/6176/24compiledonkubuntvirtu.png)
(http://img801.imageshack.us/img801/6302/battle.png)
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: TC on July 21, 2010, 09:24:52 am
Thanks for the advice and encouragement.

Did the compilation steps passed without failing? If something failed, post the text so people can help you.

Yes. Everything compiled without failing.

Also, run the ./configure again (or look at the log file) and watch the output for "no" results. Some are not problematic but perhaps you are missing some dependency.

Here is everything with "no" results:

checking whether we are cross compiling... no
checking for library containing stricmp... no
checking for SDL_mixer... no
checking for library containing CU_initialize_registry... no

Other notes I just remembered:
In Ubuntu libxvidcore4-dev is actually called libxvidcore-dev, so install that.
sudo apt-get install libxvidcore-dev
And this is also only mentioned in the notes and not the code boxes:
sudo apt-get install libtheora-dev
These are checked in ./configure so it is good to look at the output.

I installed those two things and they did seem to make a difference to the configuration. I also installed a couple of other things I saw mentioned -- something like texlib-latex-extra and another one called D-something. In any case, none of these made the application work. It still hangs when I run it.

-TC
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: edsepulv on July 21, 2010, 12:19:31 pm
I think that the best solution right now for Ubuntu users that do not want/do not know how to compile the game is to install wine (is in the repositories) and then download and install the windows version. I have been playing this way with allmost any problems since V 2.3 was released. Sometimes it hangs when starting the game but yo just have to close the program and start it again. It also hangs for a couple of minutes after starting (you cant move the pointer) but just be patient, after a minute or two everything returns to normall and you can play. Nevertheless I suggest to save your game oftenly because it can crash ocasionally (for me just once since installing and playing every day). Cheers for the developers of this great game and also to the developers of Wine
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: TC on July 21, 2010, 06:50:09 pm
I've taken a big step forward. I can now run the game with only a few problems. I was fooling around with several steps in the install process, and I'm not sure what I did that finally made it work.

Here are the problems that remain: 1) In combat, all soldiers, aliens, and civilians appear as dark silhouettes. So does my dropship (but not the aliens'); and 2) There is no sound in the video that played the first time I ran the game, and it completely froze once, requiring that I kill the window.


-TC
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: tzzimy on July 22, 2010, 02:38:52 am
TC i might know why you have sound or graphic problems.

1) Pls check steps how to install Pulseaudio (a simple google search will bring it up). You will need more help after setting it up bcs it does not work by default and you have to configure some things that someone new to linux will not know how to handle unless he is a very careful researcher-reader on how-to 's

2) Install latest graphic drivers either Nvidia or ATI. Even ubuntu's repository default current nvidia binaries have issues and it took me 3 hours to realise that on my desktop build until i re-installed properly over the ubuntu's repository binaries (including dev files) the latest from nvidia.com. After that everything runs smooth now, including ufoai.

Although the guide in wiki is SPLENDID, FANTASTIC, AMAZING, it lacks some support on how to deal with common problems  for required packages. I will try to help on that as much as i can with a small guide for the common issues I faced and enrich it with other new-to-linux people experiences.

TC try to find me on irc.freenode.org-->#ufoai channel. I am always online there on tzzimy nickname so I can help you with your sound and graphic problems! :)

Cheers,
Tzzimy
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: TC on July 22, 2010, 07:37:13 pm
And now I've taken a big step backward.

I solved the "silhouette" problem yesterday by turning off GLSL shaders. With that fixed, I was able to start playing the game. However, a couple of turns into my first mission, I encountered a critical problem -- I couldn't finish the round. Clicking the Finish Round button and typing "e" did nothing. Searching this forum, I found only one mention of this bug: http://ufoai.ninex.info/forum/index.php?topic=4904.0

It occurred to me that if I'm going to be encountering bugs like that one, I should probably be using the latest stable version of the game instead of the development version. So, I did some research and learned how to get version 2.3. I compiled it and installed it. When I run the game, however, it crashes. The splash screen appears for about 4 seconds, then shuts down. This happens in Safe Mode as well. If anyone has any suggestions about how to debug this, please let me know.

TC i might know why you have sound or graphic problems.

1) Pls check steps how to install Pulseaudio (a simple google search will bring it up). You will need more help after setting it up bcs it does not work by default and you have to configure some things that someone new to linux will not know how to handle unless he is a very careful researcher-reader on how-to 's

2) Install latest graphic drivers either Nvidia or ATI. Even ubuntu's repository default current nvidia binaries have issues and it took me 3 hours to realise that on my desktop build until i re-installed properly over the ubuntu's repository binaries (including dev files) the latest from nvidia.com. After that everything runs smooth now, including ufoai.

Thanks, Tzzimy, for the advice. I'm dreading the prospect of messing with my audio or graphic drivers, but I know I'll probably have to do so eventually. I'll look you up on IRC if I need help.

I think that the best solution right now for Ubuntu users that do not want/do not know how to compile the game is to install wine (is in the repositories) and then download and install the windows version.

That's a good suggestion, Edsepulv. I may try it. However, part of my goal is to become proficient with Linux, so I'm going to keep working on getting the Ubuntu version to work.


-TC
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: TC on July 23, 2010, 08:37:04 am
Now that I understand the install process better, I decided to start over and proceed very carefully. I compiled 3 versions of the game: 2.4-dev, 2.3, and 2.2.1.

2.4-dev
------------
Version 2.4-dev mostly works, but has a bug which makes it unplayable. Whenever one of my soldiers gets injured in combat mode, I immediately drop out of combat mode and return to the world map. It is as if I've been returned to the moment before combat started, except that I must re-instruct my dropship to enter the target site.

2.3
------------
Version 2.3 doesn't work at all. The splash screen appears for about four seconds, then closes. I found a file called ufoconsole.log which gets updated every time I try to run this version. It says: "2010/07/22 23:16:23 FS_RemoveFile: remove /home/tc/.ufoai/2.3/base/keys.cfg". Of course, I have no idea what that means. If anyone has a theory that can explain why 2.2.1 and 2.4-dev startup correctly, but 2.3 crashes after four seconds, I would love to hear it.

2.2.1
------------
Version 2.2.1 works perfectly. I've played several missions and I haven't found anything wrong with it. Am I missing anything important if I continue to play this version and give up on versions 2.3 & 2.4?


-TC
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: Alienator on July 23, 2010, 01:34:46 pm
TC, what you describe is pretty much what I get, also using Kubuntu 10.04, but much less sever for the dev version. I get the "can't end turn" bug (very rare), but when I 'retry' the mission it works fine. I had a few occasions in the middle of a mission of dropping out of combat into geoscape, just as if the mission has not started. Not necessarily associated with injury.

Very rough estimate I would say these things happen once for every 8-10 missions. Annoying, but still playable. I also could not get 2.3 to work.
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: TC on July 23, 2010, 07:31:48 pm
TC, what you describe is pretty much what I get, also using Kubuntu 10.04, but much less sever for the dev version. I get the "can't end turn" bug (very rare), but when I 'retry' the mission it works fine. I had a few occasions in the middle of a mission of dropping out of combat into geoscape, just as if the mission has not started. Not necessarily associated with injury.

Very rough estimate I would say these things happen once for every 8-10 missions. Annoying, but still playable. I also could not get 2.3 to work.

Alienator,

I may have had a run of bad luck yesterday -- the game works much better today. I experimented for about an hour, and I didn't encounter any bugs. I could not recreate the "Crash on Injury" bug which I reported yesterday. So, maybe version 2.4-dev is playable after all.

In any case, it's good to know I'm not the only one encountering these errors. It makes me feel like less of a dummy.


-TC
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: TC on July 26, 2010, 07:02:32 am
I finally got version 2.3 working.

I was playing version 2.4-dev, and it kept getting buggier. The "Dropping Out of Combat" bug was rare when I started the game, but now occurs on almost every mission. So, I made another effort to get 2.3 working, and I finally succeeded. I'm not sure what made it work. When I compiled it before, I always skipped the "make install" step because I was using "make deb" instead. This time, I did "make install" and now the game works. It doesn't make sense to me, but that's what happened.

So, we can stop the clock now. I see that my first post was on July 14. That means it only took 12 days for me to install UFO AI. Not bad. Thanks for the help from everyone.


-TC
Title: Re: New to Linux -- Not Clear On How to Install UFO AI
Post by: Alienator on July 26, 2010, 05:52:37 pm
When I compiled it before, I always skipped the "make install" step because I was using "make deb" instead. This time, I did "make install" and now the game works. It doesn't make sense to me, but that's what happened.
I guess something in the deb packaging was wrong. The only problem with "make install" is that it installs files without tracking them as part of a deb package. Makes removing/upgrading software a little messier, but not a big problem. I prefer to install as debs as much as possible, but nothing prevents doing it the old way of placing files in random directories... :)

Enjoy