VCMI on Linux

UPDATE: If you are planning to build VCMI under Linux based on the information in this thread, check the README in the link below first. Some of the instructions in the original post here are outdated.

vcmi.svn.sourceforge.net/svnroo … ADME.linux

=========================================================

[size=75]Original post:[/size]

I. Building

If you want build VCMI on Linux you will need:

  • subversion (for download the latest version of source)
  • autotools (libtool, automake, aclocal etc - to create configure and makefiles)
  • libraries headers (packages with -dev :P):
  • boost system 1.37.0
  • boost filesystem 1.37.0
  • boost thread 1.37.0
  • sdl 1.2.13
  • sdl mixer 1.2.7
  • sdl image 1.2.5
  • sdl ttf 2.0.8
  • zlib 1.2.3
    and gcc, g++

If you have everything, we can go to first step :slight_smile:

  1. Update source
svn co https://vcmi.svn.sourceforge.net/svnroot/vcmi/trunk vcmi
  1. Remove old configure.ac and Makefile.am
cd vcmi
rm configure.ac Makefile.am
  1. Download my files to vcmi directory
    dl.getdropbox.com/u/138321/vcmi/bootstrap.sh
    dl.getdropbox.com/u/138321/vcmi/configure.ac
    dl.getdropbox.com/u/138321/vcmi/Makefile.am
  2. Run bootstrap.sh to create configure file
sh bootstrap.sh
  1. Run configure to create Makefile
./configure
  1. And run make
make

Now you will wait for some time ;). After compiling is finished we have 2 files: vcmiclient and vcmiserver. Library is set to static so wee don’t need libvcmi.

II. AI
I just don’t know, how to make nice makefile.am for AI so you have to build it manualy :stuck_out_tongue_winking_eye: Maybe someone else?

cd AI/GeniusAI
g++ -g -o GeniusAI.so DLLMain.cpp CGeniusAI.cpp -L../../lib -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt -lvcmi -shared

I didn’t tested AI because I’m without CD for now… so i don’t know it’s that even works :stuck_out_tongue:
Because of that pleas check this for me ;D

(like i mentioned before, for now i can go further because of my CD. Thats why the how-to stops here :wink: I just can’t check more ;P)

III. To do

  • Output files are to big. Fault of static lib or debuging flags
  • makefile.am for AI :wink:
  • packages for distributions (for this, vcmi MUST save config and other file in home dir, like ~/.vcmi)
  • I remember slowdowns of mouse… (fixed?)
  • I think, that for now my file can bu uploaded to svn

For Devs:
Pls change …/Maps.h to …/maps.h in hch/CObjectHandler.cpp (uppercase/lowercase problem :P)

And to all:
Sorry for my bad english :smiley:

why not maintain instructions how to build and install/configure on all platforms in the wiki:
assembla.com/wiki/show/vcmi

i wonder why it is not used at all

skoruppa, thank you very much for the description!

I prefer collecting all instructions in one place (forum) rather then shattering them among several apps. Especially when we have only one instruction.

One more thing - we moved from assembla to sourceforge.net
New address to the trunk: vcmi.svn.sourceforge.net/svnroot/vcmi/trunk

Repositories on you machines have to be relocated.

i totally agree - this is why i proposed a wiki as a central place, as it is easier to handle such instructions collaboratively with inputs by many users.
with a forum approach everybody has to either post their experiences in a lengthy forum thread on page XY or has to tell skoruppa about them so that he edits his post with new info.
it is harder to get specific information, there are a lot of topics about similar issues and one has to crawl through lot of pages in the worst case.
i find it much easier to have a set of wiki pages that contain up to date information in one ordered and clearly structured way.
you mention only having one instruction but there will be many instructions when people start building on different operating systems with different building environments. only having a forum lets every user who has a problem open a thread about a possibly already solved issue and other users will have to point them at some other thread at page Z where they find part of their solution but not all. then they will append posts to this thread and things get even messier…
i think a wiki can solve this issues - what do you think?

thanks for the info - i was totally wondering why the commits at assembla stopped at 728 :slight_smile:

SF provide some like this: tools.assembla.com/vcmi/timeline ?

Ok i see, apps.sourceforge.net/trac/vcmi/timeline :slight_smile:

Can someone give me a little bit more detailed guide on how to run VCMI on linux. I’ve compiled it successfully and copied vcmiserver and vcmiclient to heroes folder, where I had a windows version installed already. I had some smaller problems with folder names (linux case sensitivity), but when I fixed it, it ran correctly. However, it won’t start any map, so I can go as far as all the pregame menus. When I start it, it exits with a segfault.

You have to compile AI, copy it to AI folder, and change in config/settings.txt GeniusAI.dll to GeniusAI.so.

Silly me, forgot to change settings.txt. Now it works, thanks for help. Although when I try to exit to desktop from within a loaded game, the game exits in a segfault, but it’s not that big a problem.

One more thing: when loading, the game says: ‘missing file: config/heroes_sec_skills.txt’, but I checked the case and wether it exists and it shouldn’t happen.

Problems compilling AI:

g++: unrecognized option '-share’
In file included from DLLMain.cpp:6:
CGeniusAI.h:146: error: extra qualification ‘GeniusAI::CBattleLogic::’ on member ‘PrintBattleAction’
In file included from CGeniusAI.cpp:1:
CGeniusAI.h:146: error: extra qualification ‘GeniusAI::CBattleLogic::’ on member ‘PrintBattleAction’

Sorry for double-posting. Everything is ok now

Will it help some how if i’ll post linux bugs?
VCMI 748

When trying to open Village Hall(Capitol, etc.):

or

or

When opening Town’s Creature dwelling:

or

Can’t enter Battle(no battle cusor, hero moves through enemy).
When moved through them:

OPening Castle(Citadel etc.):

or

I’ll try all of this later, when I get TRuly English version

There are several people with admin/moderator privileges who can update instruction when new information or suggestions show up. Keeping the post up to date isn’t a problem.

But we have only one topic on that issue which counts 12 posts by now. I’m going to write a topic with building instructions for MSVC and link to both build threads on the main page.
It should be enough to easily find them. Forum is also much more convenient if one needs further help.

I see your point but I think it’s still too early for moving build instructions to the new web application, I fear it would cause more trouble than it’s worth. I’d rather wait until we really need it (and I have more time so I could try integrate that wiki with forum at least to avoid multiple account registration).

[Sorry for replying so late, I was sick.]

Check also for config/obstacles.txt, loading it has accidentally same error message if failed to open.

Well, it’s always good to know more :slight_smile:
But it’ll be best if you provide backtrace using gdb.

You can download package with English language files and extract them to /Data subfolder.
download.antypika.aplus.pl/dataEN.7z

z

Hmmm… I have this files, so problem is in something else… Maybe it’s too early to test it under linux. I can’t run it using Wine either

Thanks, all work well, but slowly

Yeah, here vcmi runs also really slow…

Not only slow, but also very buggy. I’ve managed to build it using code::blocks, and optimize it and minimize it to about 2MB (vcmi_client), but I still can’t manage the code (as I am a C++ beginner and it’s all a bit confusing to me). It segfaults all too often and it prints some nonsences (I tend to believe it is linux case-sensitivity related, although it doesn’t explain the slowness). It would be nice to have the linux version as stable as win one, although I wouldn’t set it to be a priority just yet (perhaps when it’s entirely playable).

Hi,

That files are exactly the same in svn v776.

Just to report, I’m stuck here:

The error says nothing, I guess there was supposed to be sth mentioned between ‘against’ and ‘!’. Maybe it’s sth with x86_64, did anybody manage to build it in 64bit linux system?

Any news? :slight_smile:

Pozdro.

P.S. I was not able to post this using opera.

It could be the problem. I haven’t heard that somebody built 64 bit version of VCMI, so probabyl all builds are 32 bit. Are you sure you have 64 bit versions of all libraries VCMI uses?

I use Opera and I can post :slight_smile: .

I think I do have them, not only 64-bit:

Maybe someone could post output of ldd command on build vcmi binaries?

Takes a look at the end of the generated config.log. You should see more information.