[Crossfire-wiki] [Crossfire Wiki] page changed: client:client_compiling
no-reply_wiki at cross-fire.org
no-reply_wiki at cross-fire.org
Sat Jan 2 16:06:11 CST 2016
A page in your DokuWiki was added or changed. Here are the details:
Date : 2016/01/02 16:06
User : partmedia
Edit Summary: Update dependencies and build instructions
@@ -1,43 +1,28 @@
- ====== Compiling the Crossfire GTK2 Client ======
+ ====== Building the Crossfire Client ======
+ This page provides information on building the GTKv2 client from source. Instructions for [[server:server_compiling|compiling the server]] are on a separate page.
- This document describes how to build and install the Crossfire GTK2 client from source. Instructions for [[server:server_compiling|compiling the server]] are on a separate page.
===== Dependencies =====
+ * C compiler supporting C99
+ * CMake
+ * libgtk2.0-0 - The GTK+ graphical user interface library
+ * libgtk2.0-dev - Development files for the GTK+ library
+ * libpng
+ * Perl
- The following is a (work-in-progress) list of dependencies used by the Crossfire GTKv2 client. If something is missing, carefully look over the results of the `configure` script.
-
- ==== Required Dependencies ====
-
- If you are planning to compile something, a compiler would be useful. Both GCC and Clang are known to work well. A `make` utility is also required. Both GNU and BSD `make` are known to work.
-
- If you are building from the latest development sources, you will need Subversion and GNU Autotools:
-
- * subversion - advanced version control system (aka. svn)
-
- * autoconf - automatic configure script builder
- * Normally autoconf is not required for building, but the current SVN client trunk does require it.
- * automake - A tool for generating GNU Standards-compliant Makefiles.
- * libtool - Generic library support script
- * flex - A fast lexical analyzer generator
-
- The following are needed for metaserver support:
-
+ The following (optional) dependencies are used for metaserver support:
* libcurl3 - Multi-protocol file transfer library (OpenSSL)
* libcurl4-openssl-dev - Development files and documentation for libcurl (OpenSSL)
- The following are needed for the GUI:
-
- * libgd-tools - GD command line tools and example code
- * libgd2-xpm-dev - GD Graphics Library version 2 (development version)
-
+ The following (optional) dependencies are used for additional rendering modes:
* libsdl1.2-dev - Simple DirectMedia Layer development files
* libsdl-image1.2-dev - development files for SDL 1.2 image loading library
+ * OpenGL
- * libgtk2.0-0 - The GTK+ graphical user interface library
- * libgtk2.0-dev - Development files for the GTK+ library
- * libglade2-0 - library to load .glade files at runtime
- * libglade2-dev - development files for libglade
+ Other (optional) dependencies:
+ * lua5.1 - Simple, extensible, embeddable programming language
+ * SDL_mixer
As a quick reference for Debian and Ubuntu related distributions:
sudo apt-get install autoconf automake flex gcc libgd-tools libgd2-xpm-dev libtool make subversion libsdl1.2-dev libsdl-image1.2-dev libcurl3 libcurl4-openssl-dev
@@ -49,30 +34,10 @@
yast -i autoconf automake flex gcc libcurl4 libcurl-devel libSDL-devel libgda-tools libSDL_image-1_2-0 libSDL_image-devel libgtk-2_0-0 libglade-2_0-0 libglade2-devel libSDL2-2_0-0 libSDL2-devel libSDL_mixer-1_2-0 libSDL_mixer-devel libtool make subversion
Note: For x86_64 systems, do not mix 64-bit and 32-bit libraries unless it cannot be helped. For example, libsvn0 is a 32-bit library, but lib64svn0 is the 64-bit equivalent. The build process may fail in the linkage stage if a 32-bit library is linked during a 64-bit build.
- ==== Optional Dependencies ====
-
- Recommended packages provide additional add-ons or functionality to the client, or allow more than one client to be built. It is quite possible to get a perfectly acceptable client functional without having all of the recommended packages.
-
- * lua5.1 - Simple, extensible, embeddable programming language
-
- As a quick reference:
-
- sudo apt-get install lua5.1
-
- ==== Useful Packages ====
-
- These useful packages are not normally required for end-user builds, but they come in handy in cases where developers may have forgotten to check in changes to build scripts, etc.
-
- * cproto - supports `make proto` to automatically update prototype files.
- * sudo - Provide limited super user privileges to specific users
- * Not required, but `sudo make install` is useful for installing to system directories.
- * sudo is also useful for installing packages that are missing.
- * Do not run `make` as the root user for security reasons.
===== Download Source =====
-
* [[Trunk]] contains the newest features and development for the game
* [[Branch]] contains the most recent "stable" version of the game
* Tags is an official & stable release of the game
@@ -80,62 +45,28 @@
The follow steps may be used to download the client source files to your computer.
=== Trunk ===
-
$ svn co http://svn.code.sf.net/p/crossfire/code/client/trunk client.svn
=== Branch ===
-
These steps have you download branches/1.12
$ svn co http://svn.code.sf.net/p/crossfire/code/client/branches/1.12 client.svn
=== Tag ===
-
Here's how to download Tag using the 1.71.0 release as an example
$ svn co http://svn.code.sf.net/p/crossfire/code/client/tags/1.71.0 client.svn
- ===== Setup Environment =====
-
- Confirm that you are still in your home directory
-
- $ cd ~
- $ pwd
- /home/<username>
-
- Now change the working directory to the directory where the client sources were downloaded.
-
- $ cd client.svn
-
- Confirm that you are in the client source directory
-
- $ pwd
- /home/<username>/client.svn
-
- Choose from one of the following:
-
- 1.) A "fool-proof" build preparation that should always work. By "fool" we're talking about a forgetful developer, not the builder, though nobody can really fool-proof software against bugs, so your mileage may vary.
-
- $ export CFLAGS="-ggdb -g -O0"; ./autogen.sh --prefix=${HOME}
-
- The export statement enables debugging and disables optimization to facilitate debugging. These settings are useful when running software that has not been released, and is the recommended practice so that if a bug is encountered, it will be possible to collect more data about the bug.
-
- 2.) Run the autogen script as is:
-
- $ sh autogen.sh
-
- The autogen.sh script re-creates the configure (./configure) script. It accepts the same options as would normally be pass to ./configure. This command requires both autoconf and automake to be installed.
-
- This process attempts to locate required resources, and also discover whether or not required resources are installed. It is okay to proceed directly to compilation, but almost certainly the output of the ./configure process needs to be review, and packages may need to be installed based upon what features or functionality is desired. The ./configure output generally indicates whether it will or will not build particular clients.
-
- ===== Compile and Install =====
-
- Now, begin the compile process; choose one of the following:
+ ===== Using CMake =====
+ Briefly, change to the source directory and execute the following commands:
- $ make && make install
+ $ mkdir build; cd build
+ $ cmake ..
+ $ make
+ $ sudo make install
- Some setups may require you to use sudo, like so:
+ If you would like to change the compile-time default options, run **ccmake** instead of **cmake**.
- $ make && sudo make install
+ To compile with debugging symbols, add ''-g -O0'' to //CMAKE_CFLAGS//.
IP-Address : 99.13.115.50
Hostname : 99-13-115-50.lightspeed.stlsmo.sbcglobal.net
Old Revision: http://wiki.cross-fire.org/dokuwiki/doku.php/client:client_compiling?rev=1412233731
New Revision: http://wiki.cross-fire.org/dokuwiki/doku.php/client:client_compiling
--
This mail was generated by DokuWiki at
http://wiki.cross-fire.org/dokuwiki/
More information about the crossfire-wiki
mailing list