README.linux 3.7 KB

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