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. - iostreams
  21. - system
  22. - thread
  23. On Debian-based systems (e.g. Ubuntu) run:
  24. 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-iostreams-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev
  25. On RPM-based distributions (e.g. Fedora) run:
  26. sudo yum install gcc-c++ SDL-devel SDL_image-devel SDL_ttf-devel SDL_mixer-devel boost boost-devel boost-filesystem boost-iostreams boost-system boost-thread boost-program-options zlib-devel ffmpeg-devel ffmpeg-libs
  27. Optionaly, if you want to regenerate the build system, you will need the following tools:
  28. * libtool
  29. * automake
  30. * autoconf
  31. And then regenerate the build system with
  32. autoreconf -i
  33. II. Getting the sources
  34. VCMI is still in development. We recommend the following initial directory structure:
  35. trunk
  36. trunk/src -> contains sources and is under SVN control
  37. trunk/build -> contains build output, makefiles, object files,...
  38. You can get latest sources with subversion:
  39. cd trunk
  40. svn co https://vcmi.svn.sourceforge.net/svnroot/vcmi/trunk src
  41. III. Compilation
  42. On linux distributions like Fedora Mp3 support isn't given for the time being.
  43. There is a mantis call here: http://bugs.vcmi.eu/view.php?id=933.
  44. (Fedora-only?)
  45. Create a directory that will contain the shared libraries. (default is usually /usr/local/lib64/vcmi)
  46. Run configure:
  47. cd trunk/build
  48. ../src/configure
  49. Alternatively it is possible to install VCMI to non-default directory (e.g. /opt/games or /home/user/vcmi).
  50. To do this run:
  51. ../src/configure --datadir=/DATA_PATH/ --bindir=/BIN_PATH/vcmi --libdir=/LIB_PATH/
  52. An example would be:
  53. ../src/configure --datadir=/usr/local/share --bindir=/usr/local --libdir=/usr/local/lib64
  54. Notice:
  55. The ../src/ is not a typo, it will place makefile scripts into the build dir
  56. as the build dir is your working dir when calling the configure script.
  57. Then build vcmi:
  58. make
  59. That will generate vcmiclient, vcmiserver as well as 3 .so libraries.
  60. III. Installing binaries
  61. Since VCMI is still in development, there's no install procedure, although this will work:
  62. make install
  63. You also need to update configuration files:
  64. cp /PATH_TO_SOURCE/config /DATA_PATH/vcmi
  65. In this case you'll have to manually update these files after any changes.
  66. For more permament solution you should use links as described below.
  67. For development puposes, it's better to use links. Go
  68. to /BIN_PATH/, and type:
  69. ln -s /PATH_TO_SOURCE/client/.libs/vcmiclient
  70. ln -s /PATH_TO_SOURCE/server/.libs/vcmiserver
  71. Go to /LIB_PATH/vcmi, and type:
  72. ln -s /PATH_TO_SOURCE/lib/.libs/libvcmi.so libvcmi.so.0
  73. Go to /LIB_PATH/vcmi/AI, and type:
  74. ln -s /PATH_TO_SOURCE/AI/VCAI/.libs/VCAI.so
  75. ln -s /PATH_TO_SOURCE/AI/StupidAI/.libs/StupidAI.so
  76. Go to /DATA_PATH/vcmi, and type:
  77. ln -s /PATH_TO_SOURCE/config