Basic FAQ

From The Player Project

Jump to: navigation, search
(Player/stage)
(How do I build from an SVN working copy?)
Line 293: Line 293:
</pre>
</pre>
-
==How do I build from a CVS or SVN working copy?==
+
==How do I build from an SVN working copy?==
-
===Player/stage===
+
===Player===
-
 
+
-
====Player====
+
The development version of Player uses [http://www.cmake.org CMake] for its build system. This is an entirely new build system, replacing the old GNU Autotools-based system we used in the past. It's simpler, cleaner and much, much faster to configure, compile and install using this new system. To build Player from SVN, you will need to install CMake (at least version 2.4 is required).
The development version of Player uses [http://www.cmake.org CMake] for its build system. This is an entirely new build system, replacing the old GNU Autotools-based system we used in the past. It's simpler, cleaner and much, much faster to configure, compile and install using this new system. To build Player from SVN, you will need to install CMake (at least version 2.4 is required).
-
Once you have the Player source checked out and CMake installed, create a directory anywhere on your system where you have write privileges and change to that directory. Typically, a subdirectory of the source is used for convenience. For example:
+
The better way to compile Player is using an out-of-source build (in-source builds pollute the source tree and are harder to clean up). In this configuration you will have two directories: the source directory, containing the Player source, and the build directory, containing the generated build scripts and compiled objects. Once you have the Player source checked out and CMake installed, create a directory anywhere on your system where you have write privileges and change to that directory. Typically, a subdirectory of the source is used for convenience. For example:
  $ cd player/
  $ cd player/
Line 319: Line 317:
  $ make install
  $ make install
-
====Stage====
+
CMake will re-run itself automatically when a CMakeLists.txt file changes. You will typically not have to run it again unless you remove the contents of your build directory. The CMake equivalent of a make clean is to remove the build directory (assuming an out-of-source build).
 +
 
 +
===Stage===
Stage's CMake-based build system is still under development, so it still uses the GNU Autotools-based build system. Since we're using the GNU Autotools, it's a little different to build from a working copy instead of from a distribution. First, you need autoconf and automake installed. They are already installed on any reasonable UNIX-like machine, but you might need to upgrade them; you can download both packages from any GNU mirror. We're currently using:
Stage's CMake-based build system is still under development, so it still uses the GNU Autotools-based build system. Since we're using the GNU Autotools, it's a little different to build from a working copy instead of from a distribution. First, you need autoconf and automake installed. They are already installed on any reasonable UNIX-like machine, but you might need to upgrade them; you can download both packages from any GNU mirror. We're currently using:
Line 327: Line 327:
Newer versions will probably work, but older ones probably won't. If you do use newer versions, keep in mind that you should not use any macros that aren't available in the versions listed above, because that will likely break the build for other developers.
Newer versions will probably work, but older ones probably won't. If you do use newer versions, keep in mind that you should not use any macros that aren't available in the versions listed above, because that will likely break the build for other developers.
-
Building from CVS involve the same steps:
+
Building from SVN involve the same steps:
# autoreconf -i -s  OR  ./bootstrap
# autoreconf -i -s  OR  ./bootstrap
Line 336: Line 336:
The autoreconf tool runs the right Autotools in the right order to generate necessary files, including a configure script. You only need to supply the -i -s arguments the first time you use autoreconf on a checked out copy. If autoreconf doesn't work for you (older versions were pretty buggy), then you can run the bootstrap script instead, which does the same thing.
The autoreconf tool runs the right Autotools in the right order to generate necessary files, including a configure script. You only need to supply the -i -s arguments the first time you use autoreconf on a checked out copy. If autoreconf doesn't work for you (older versions were pretty buggy), then you can run the bootstrap script instead, which does the same thing.
-
You only usually need to run autoreconf when some part of the build system, such as configure.in or acinclude.m4, has changed; at other times, you can just run configure, or even just make. However, it's safest to run autoreconf whenever you udpate from CVS, in case something important changed. The exact dependencies among the various files and tools are of course deterministic but extremely complex and it's best not to think about them.
+
You only usually need to run autoreconf when some part of the build system, such as configure.in or acinclude.m4, has changed; at other times, you can just run configure, or even just make. However, it's safest to run autoreconf whenever you update from SVN, in case something important changed. The exact dependencies among the various files and tools are of course deterministic but extremely complex and it's best not to think about them.
One more thing: since we're using automake, we don't write Makefiles. Instead, we write Makefile.ams (automake files), which are like meta-Makefiles. Except in special cases, Makefiles (and Makefile.ins) are auto-generated and should not be checked in.
One more thing: since we're using automake, we don't write Makefiles. Instead, we write Makefile.ams (automake files), which are like meta-Makefiles. Except in special cases, Makefiles (and Makefile.ins) are auto-generated and should not be checked in.

Revision as of 02:34, 15 May 2008

Personal tools