home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Exec 1 / CD_Magazyn_EXEC_nr_1.iso / Gry / freeciv.lzx / Freeciv / INSTALL < prev    next >
Text File  |  2000-02-23  |  14KB  |  368 lines

  1. ===================
  2. Installing Freeciv:
  3. ===================
  4.  
  5. This file describes how to compile and install Freeciv.
  6.  
  7. There may be a localized version of this file in the ./doc directory,
  8. named INSTALL.<locale> (e.g., INSTALL.de).
  9.  
  10.  
  11. 0. Prerequisites:
  12. =================
  13.  
  14. Freeciv has a number of prerequisites.  Note, that apart from the first
  15. prerequisite, the Freeciv configuration process is smart enough to work
  16. out whether your system is suitable.  If in doubt, just try it.
  17.  
  18.  - Unix (or similar)
  19.  
  20.    The Unix operating system, a work-alike such as Linux or FreeBSD,
  21.    or some OS that provides a very Unix-like personality or mode, like
  22.    EMX under OS/2 or the Cygnus Cygwin toolkit under Windows.
  23.    (See http://sourceware.cygnus.com/cygwin/).  Support for
  24.    BSD-style TCP/IP sockets is essential, as is a Bourne-shell
  25.    compatible shell, such as GNU "bash".  (Most Unixes fit the bill...)
  26.  
  27.  - An ANSI C compiler.
  28.  
  29.    Freeciv is written in very portable (almost) ANSI C.  Both 32- and 64-
  30.    bit machines are supported.  You cannot use a "K&R C" compiler, or
  31.    a C++ compiler.
  32.  
  33.    Development of Freeciv is primarily done with "gcc", the GNU
  34.    project's excellent C compiler.  Releases can be compiled with gcc
  35.    or most other compilers (such as the unbundled Solaris C compiler).
  36.    Development releases and CVS snapshots will not work without gcc,
  37.    unless you give configure the "--disable-cvs-deps" option.  See
  38.    the section below for more information.
  39.  
  40.  - A "make" program.
  41.  
  42.    Freeciv developers generally use "gmake", the GNU make program.
  43.  
  44.    Officially released versions of Freeciv are designed to have
  45.    makefiles which work with most make programs.  Development releases
  46.    and CVS snapshots contain things (like dependencies) which use
  47.    gmake's enhanced features, so gmake is necessary for development,
  48.    unless you give configure the "--disable-cvs-deps" option.  See the
  49.    section below for more information.
  50.  
  51.    You can check if you have GNU make installed on your system by
  52.    typing:
  53.  
  54.     % make -v                   [and if this doesn't work, try "gmake -v"]
  55.  
  56.    The output should include "GNU Make" somewhere.
  57.  
  58.  
  59. 1. Prerequisites for the clients:
  60. =================================
  61.  
  62. The Freeciv client now comes in two different forms: one using
  63. the Athena widget library ("Xaw"), and one using the Gtk+ widget
  64. library.  The two forms have different prerequisites, explained
  65. separately below.  Your system will need to satisfy at least 
  66. one of the two sets of prerequisites.
  67.  
  68. Note that some systems have separate library packages for "runtime" 
  69. library support and for development support (for compiling programs 
  70. which use those libraries).  To compile Freeciv on such systems you 
  71. will need to have the appropriate "development" packages installed.
  72. (Attention Red Hat users: this means you! :-)
  73.  
  74.  
  75. 1a. Prerequisites for the Xaw client:
  76. =====================================
  77.  
  78.  - X-Windows.
  79.  
  80.    The Freeciv Xaw client is an X-Windows program, so you'll need 
  81.    some way of running X-Windows programs.  (Most Unixes can...)
  82.  
  83.    If the Freeciv configuration program can't find X Windows on
  84.    your system, you may need to use the --x-includes=DIR
  85.    and --x-libraries=DIR options.
  86.  
  87.  - The "Athena" widget library.
  88.  
  89.    This library (also known as "Xaw") is usually supplied standard
  90.    with the rest of X Windows, but some platforms (HP-UX 10 for
  91.    example) only provide it in a limited form.
  92.  
  93.    To compile the client using the "Xaw" library add "--enable-client=xaw"
  94.    to the Freeciv configure script.  See the section below for more 
  95.    information about the configure script.
  96.  
  97.    Many modern Unix systems (such as Linux) ship with a variant called
  98.    "Xaw3d", which has a more modern "3D" look.  If you'd like to try
  99.    compiling with Xaw3d, then add "--with-xaw3d" to the Freeciv
  100.    configure script.
  101.  
  102.    There are also other variants of Xaw, such as Nextaw.  Freeciv
  103.    does not work with these, although it should be possible to modify
  104.    it in the same fashion as for Xaw3d.  Another tool which may help
  105.    is called "xaw_wrappers", although how to use it is beyond the
  106.    scope of this file.
  107.  
  108.  - The "Xpm" library.
  109.  
  110.    This library is essential for icon and bitmap handling.  It is in
  111.    wide use, and is supplied standard on most modern Unix machines,
  112.    although it may be missing on traditional or older Unixes, eg,
  113.    Solaris.
  114.  
  115.    When you run the Freeciv configure script, it may be necessary for
  116.    you to use the "--with-xpm-prefix=DIR" command-line option, where
  117.    DIR is the name of the directory containing the "include" and "lib"
  118.    subdirectories where Xpm may be found.
  119.  
  120.    If the Freeciv configure process tells you that you don't have the
  121.    Xpm library installed, then it may be obtained from here:
  122.  
  123.      ftp://koala.inria.fr/pub/xpm/xpm-3.4k.tar.gz
  124.      ftp://ftp.x.org/contrib/libraries/xpm-3.4k.tar.gz
  125.  
  126.    Install it as you would any other package.  If you can't install
  127.    it in a standard system directory, then use the --with-xpm-prefix
  128.    option, as described above.
  129.  
  130.  
  131. 1b. Prerequisites for the Gtk+ client:
  132. ======================================
  133.  
  134.  - The "Glib" utility library.
  135.  
  136.    The "Glib" utility library provides non-graphical functions used by the
  137.    "Gdk" and "Gtk+" libraries, like hash tables, single linked lists, etc.
  138.  
  139.    Freeciv requires a version of "Glib" greater or equal to 1.2.1.
  140.  
  141.    If the Freeciv configure process tells you that you don't have the
  142.    Glib library installed, then it may be obtained from here:
  143.  
  144.      ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.6.tar.gz
  145.  
  146.  - The "Gtk+" widget library.
  147.  
  148.    The "Gtk+" widget library was designed for the GIMP graphics program.
  149.    Since then it has gained popularity as an easy to program, free toolkit.
  150.    The "Gtk+" library comes with a companion library "Gdk" which provides an
  151.    abstraction layer over X Windows to implement basic drawing functions,
  152.    windows, clipping, etc.
  153.  
  154.    Freeciv requires a version of "Gtk+" greater or equal to 1.2.1.
  155.  
  156.    If the Freeciv configure process tells you that you don't have the
  157.    Gtk+ library installed, then it may be obtained from here:
  158.  
  159.      ftp://ftp.gtk.org/pub/gtk/v1.2/gtk+-1.2.6.tar.gz
  160.  
  161.  - The "Imlib" library.
  162.  
  163.    This library is essential for bitmap handling.  It is also
  164.    used by the GNOME project.
  165.  
  166.    Freeciv requires a version of "Imlib" greater or equal to 1.9.2.
  167.  
  168.    If the Freeciv configure process tells you that you don't have the
  169.    Imlib library installed, then it may be obtained from here:
  170.  
  171.      ftp://ftp.gnome.org/pub/GNOME/stable/sources/imlib/imlib-1.9.7.tar.gz
  172.  
  173.    (Imlib documentation says that you require other libraries to use
  174.    certain features but none of those are needed by the Freeciv client).
  175.  
  176. If you are going to make these yourself, build and install them in the
  177. following order: Glib, Gtk+, Imlib.
  178.  
  179.  
  180. 2. Generating the Makefile:
  181. ===========================
  182.  
  183. Before you compile Freeciv, you must generate a Makefile.  This makefile
  184. is configured to suit the features available on your machine.
  185.  
  186. This configuration is done using the GNU "configure" script.
  187.  
  188. To use "configure", "cd" into the top directory containing the Freeciv
  189. files, and type:
  190.  
  191.  % ./configure
  192.  
  193. This script will then attempt to determine the relevant features (and
  194. misfeatures!!) of your system.  It should print a page or two of
  195. diagnostics about your machine, then stop gracefully.
  196.  
  197. If you'd like help on the various options supported by the configure
  198. script, try the --help option, like this:
  199.  
  200.  % ./configure --help
  201.  
  202. If you're compiling a development release or a CVS snapshot, and you
  203. don't have both GNU make AND gcc, then pass configure the
  204. "--disable-cvs-deps" option.  You'll especially need to do this if
  205. you're using the Solaris cc and make programs.
  206.  
  207. Note that if you do this, dependency checking is disabled.  If you
  208. change any Freeciv .h files after this for any reason, you should do
  209. a "make clean" before doing "make" to ensure everything is compiled
  210. correctly.
  211.  
  212. "--disable-cvs-deps" has no effect when run with a stable release.
  213.  
  214. By default the configure script will choose the Gtk+ client if the 
  215. required libraries are found, or else fall back to the Xaw client.
  216. If you prefer to override this default, you can give configure the
  217. "--enable-client=xaw" option.
  218.  
  219. If you want to change the compiler options, set the CFLAGS environment
  220. variable in your shell before running "configure".  For example:
  221.  
  222.  % CFLAGS="-O -g -pipe" ./configure   [for people using Bourne shell or bash]
  223.  
  224. or
  225.  
  226.  % setenv CFLAGS "-O -g -pipe"
  227.  % ./configure                        [for people using C shell or tcsh]
  228.  
  229. If you're tracking down a "core dump", we suggest that you use
  230. a value of "-g" for CFLAGS.
  231.  
  232. When you install Freeciv (later), the game components will be copied into
  233. subdirectories of /usr/local by default.  If you would like to use some
  234. other installation prefix besides /usr/local, you should specify it now:
  235.  
  236.  % ./configure --prefix=/opt/freeciv
  237.  
  238. If for some reason using "configure" gives you trouble, follow these steps:
  239.  
  240.   - Read the prerequisites section carefully, to determine if your
  241.     system meets all the requirements.
  242.  
  243.   - If you are compiling the Gtk+ version of the client: Ensure that
  244.     you have the Gtk+, Gdk, Glib & Imlib libraries installed on your
  245.     system.  Make sure that the configure script can find them,
  246.     either by installing them in the standard places on your system,
  247.     or by instructing the configure script with the appropriate
  248.     command-line options.  (See ./configure --help)
  249.  
  250.   - If you are compiling the Xaw version of the client: Ensure that
  251.     you have both the Xpm and Xaw libraries installed on your system.
  252.     Make sure that the configure script can find them, either by
  253.     installing them in the standard places on your system, or by
  254.     instructing the configure script with the appropriate command-line
  255.     options.  (See ./configure --help).
  256.  
  257.   - If the problem is with "gettext", please read the Native Language
  258.     Support section, below, for possible work-arounds.
  259.  
  260.   - Let us know, so that we can fix it for the next release!!
  261.  
  262.     Send mail to the freeciv-dev mailing list, telling us what you did,
  263.     and what the result is.  It would be helpful to include the output
  264.     of the configure script, and the contents of the "config.status",
  265.     "config.cache" and "config.log" files, which are generated by the
  266.     configure script.
  267.  
  268.     You can find out about the freeciv-dev mailing list on our web
  269.     site, at http://www.freeciv.org/
  270.  
  271. Please note that since Freeciv 1.7.2 we have stopped supporting 
  272. the use of Imake, and as of Freeciv 1.8.1 we no longer include 
  273. the Makefile.noimake fallback.
  274.  
  275.  
  276. 3. Compiling Freeciv:
  277. =====================
  278.  
  279. If all has gone well previous to this point, then compiling Freeciv
  280. should be as easy as typing "make" (or preferably, "gmake").
  281.  
  282. If you have problems, read the file BUGS, and follow the advice 
  283. carefully.  If the problem is with "gettext", please read the Native
  284. Language Support section, below, for possible work-arounds.
  285.  
  286. After compilation, the important results are:
  287.  
  288.   - The "client/civclient" and "server/civserver" binaries.
  289.   - The "data/" directory, which contains the graphics and scenarios.
  290.   - The "po/" directory, which contains the localization files.
  291.   - The "civ" and "ser" scripts.
  292.  
  293. It's perfectly feasible to play Freeciv in this directory, without
  294. installing it.  If you do this, the "civ" and "ser" scripts may be
  295. useful, although they are not as necessary as they used to be.
  296.  
  297. See the README file for more information.
  298.  
  299. (However you cannot use Internationalization when playing Freeciv from
  300. the source directory; you must install Freeciv for that.)
  301.  
  302.  
  303. 4. Installation:
  304. ================
  305.  
  306. Installing Freeciv involves installing the components mentioned in
  307. Section 3.  These need to be copied to a directory such as /usr/local
  308. (the default), /usr/games, /usr/games/freeciv, /usr/local/freeciv,
  309. or some other suitable directory.
  310.  
  311. Typing "make install" should install everything correctly on your machine.
  312. You may like to use the --prefix=DIR configure option (see Section 2) to
  313. ensure the files get placed where you want.
  314.  
  315. When the Freeciv client and Freeciv server are run they both need to 
  316. find some files from the "data" directory.  By default freeciv looks
  317. in the following directories, in order, for any data files: the current 
  318. directory; the "data" subdirectory of the current directory; the 
  319. subdirectory ".freeciv" in the user's home directory; and the directory
  320. where the files are placed by running "make install".  You can override
  321. this search patch by setting the FREECIV_PATH environment variable, to
  322. a single directory or a list of directories separated by colons.
  323.  
  324. For example:
  325.  
  326. setenv FREECIV_PATH "/usr/games/freeciv/data:./data"
  327.    (for users of csh, tcsh, etc)
  328.  
  329. FREECIV_PATH="/usr/games/freeciv/data:./data"; export FREECIV_PATH
  330.    (for users of sh, bash, ksh, zsh, etc)
  331.  
  332. Also, note that you generally must install Freeciv if you wish to use
  333. its Native Language Support.  See the README file for more information.
  334.  
  335. Finally, if you've chosen to use the Xaw client and you have permission
  336. to log in as the 'root' user, you should consider copying the resource
  337. file data/Freeciv into your app-defaults directory. (Usually this is
  338. /usr/lib/X11/app-defaults).
  339.  
  340.  
  341. 5. Native Language Support:
  342. ===========================
  343.  
  344. Freeciv uses the "gettext" system for Native Language Support.
  345.  
  346. If you experience problems with gettext in either configuring or compiling
  347. Freeciv, there are a few work-arounds you can try:
  348.  
  349. 1. If you don't need Native Language Support, disable it using the
  350.    "--disable-nls" ./configure option:
  351.  
  352.       % ./configure --disable-nls
  353.       % make
  354.  
  355. 2. If you want Native Language Support, try the version of gettext that
  356.    is included with Freeciv by specifying the "--with-included-gettext"
  357.    ./configure option:
  358.  
  359.       % ./configure --with-included-gettext
  360.       % make
  361.  
  362. 3. Finally, you can try to install the latest version of GNU gettext.
  363.    It may be obtained from here:
  364.  
  365.       ftp://prep.ai.mit.edu/gnu/gettext/gettext-0.10.35.tar.gz
  366.  
  367. ** END **
  368.