README.linux 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. This readme covers VCMI compilation on Unix-like systems.
  2. For complete installation instructions see VCMI wiki:
  3. http://wiki.vcmi.eu/index.php?title=Installation_on_Linux
  4. I. Prerequisites
  5. To compile, at least the following packages (and their development counterparts) are needed to build:
  6. * libstdc++ devel
  7. * SDL and SDL-devel
  8. * SDL_mixer and SDL_mixer-devel
  9. * SDL_image and SDL_image-devel
  10. * SDL_ttf and SDL_ttf-devel
  11. * zlib and zlib-devel
  12. * the ffmpeg libraries (libavformat and libswscale). Their name could be libavformat-devel and libswscale-devel, or ffmpeg-libs-devel or similar names.
  13. * boost c++ libraries v1.44+ (www.boost.org):
  14. - program-options
  15. - filesystem
  16. - iostreams
  17. - system
  18. - thread
  19. On Debian-based systems (e.g. Ubuntu) run:
  20. sudo apt-get install g++ libsdl1.2debian-all libsdl-image1.2-dev libsdl-ttf2.0-dev libsdl-mixer1.2-dev zlib1g-dev libavformat-dev libswscale-dev libboost-dev libboost-filesystem-dev libboost-iostreams-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev
  21. On Fedora run(this may not be complete):
  22. sudo yum install gcc-c++ SDL-devel SDL_image-devel SDL_ttf-devel boost boost-devel boost-filesystem boost-iostreams boost-system boost-thread boost-program-options zlib-devel ffmpeg-devel ffmpeg-libs
  23. Optionaly, if you want to regenerate the build system, you will need the following tools:
  24. * libtool
  25. * automake
  26. * autoconf
  27. And then regenerate the build system with
  28. autoreconf -i
  29. II. Getting the sources
  30. VCMI is still in development. We recommend the following initial directory structure:
  31. trunk
  32. trunk/src -> contains sources and is under SVN control
  33. trunk/build -> contains build output, makefiles, object files,...
  34. You can get latest sources with subversion:
  35. cd trunk
  36. svn co https://vcmi.svn.sourceforge.net/svnroot/vcmi/trunk src
  37. III. Compilation
  38. On linux distributions like Fedora Mp3 support isn't given for the time being.
  39. There is a mantis call here: http://bugs.vcmi.eu/view.php?id=933.
  40. (Fedora-only?)
  41. Create a directory that will contain the shared libraries. (default is usually /usr/local/lib64/games/vcmi)
  42. Run configure:
  43. cd trunk/build
  44. ../src/configure
  45. Alternatively it is possible to install VCMI to non-default directory (e.g. /opt/games or /home/user/vcmi).
  46. To do this run:
  47. ../src/configure --datadir=/DATA_PATH/ --bindir=/BIN_PATH/vcmi --libdir=/LIB_PATH/
  48. An example would be:
  49. ../src/configure --datadir=/usr/local/share/games --bindir=/usr/local/games --libdir=/usr/local/lib64/games
  50. Notice:
  51. The ../src/ is not a typo, it will place makefile scripts into the build dir
  52. as the build dir is your working dir when calling the configure script.
  53. Then build vcmi:
  54. make
  55. That will generate vcmiclient, vcmiserver as well as 3 .so libraries.
  56. III. Installing binaries
  57. Since VCMI is still in development, there's no install procedure, although this will work:
  58. make install
  59. You also need to update configuration files:
  60. cp /PATH_TO_SOURCE/config /DATA_PATH/vcmi
  61. For development puposes, it's better to use links. Go
  62. to /BIN_PATH/, and type:
  63. ln -s /PATH_TO_SOURCE/client/vcmiclient
  64. ln -s /PATH_TO_SOURCE/server/vcmiserver
  65. Go to /LIB_PATH/vcmi, and type:
  66. ln -s /PATH_TO_SOURCE/lib/.libs/libvcmi.so libvcmi.so.0
  67. Go to /LIB_PATH/vcmi/AI, and type:
  68. ln -s /PATH_TO_SOURCE/AI/VCAI/.libs/VCAI.so
  69. ln -s /PATH_TO_SOURCE/AI/StupidAI/.libs/StupidAI.so
  70. Go to /DATA_PATH/vcmi, and type:
  71. ln -s /PATH_TO_SOURCE/config