View as source file or XML.

Preparing to Build Zorba

The following outlines the common steps for building Zorba once the required and optional tools and libraries (as described in Prerequisites for Building Zorba) have been installed.

Getting the Zorba Source Code

You may get the Zorba source code in one of two ways: downloading a released source distribution, or getting the code from our Launchpad code repository. The directory that the Zorba source code is placed into will be referred to as {ZORBASRC} in later instructions.

Getting a Source Code Release

You may download the latest Zorba release source code as either a .zip or .tar.gz file from Launchpad: https://launchpad.net/zorba/+download .

Getting the Latest Code from Launchpad

If you want the very latest and greatest Zorba source, you can check out our source code trunk from our Launchpad repository. This is actually a pretty "safe" option, compared to many projects, as Zorba attempts to enforce a "trunk is always releasable" policy through extensive regression testing on every trunk checkin.Launchpad uses the Bazaar distributed version control system from Canonical, the producers of Ubuntu Linux and Launchpad. So you will need to install Bazaar in order to check out our code repositories. Installers are available from Canonical's website, http://bazaar.canonical.com/ . Bazaar packages are also available for all Linux distributions (the package name may be "bazaar" or "bzr"), and in Macports for MacOS X.Once you have Bazaar installed, check out the Zorba trunk:
bzr checkout --lightweight lp:zorba

Downloading source code for non-core modules

Zorba offers a number of optional ("non-core") modules which provide additional functionality; see Non-core Modules for a list. When you build Zorba, you may also build any non-core modules at the same time, and these modules will then be available in your Zorba installation.Currently, the Zorba team does not provide source downloads for the non-core modules. However, there is a simple CMake script inside Zorba which will allow you to check out these modules from source control easily. Note that this requires having the Bazaar utility available on your system; see Getting the Latest Code from Launchpad for more information.From your {ZORBASRC} directory, type
  cmake -Doutdir=../zorba_modules -Dmodname=NAME -P modules/DownloadModules.cmake
to download the particular module package NAME (see Non-core Modules for a complete list of module packages and their contents), or
  cmake -Doutdir=../zorba_modules -Dallmodules=1 -P modules/DownloadModules.cmake
to download all the modules. (On Windows, you will need to use backslashes instead of forward slashes in the above paths.)This will place the downloaded module source code in the directory ../zorba_modules, which is where the Zorba build will look for them by default. If you wish to download them to some other location, you may do so; in that case, when you configure the Zorba build with CMake, provide the -DZORBA_MODULES_DIR=/full/path/to/modules argument.
Please note that some of these modules depend on other modules. Most notably, the EXPath http-client module (in the http-client module package) depends on the html module, which is in the data-converters module package. So, if you download the http-client package, you must also download the data-converters package (and ensure that libtidy is installed; see Non-core Module Requirements). Please see our module-interdependency graph for details.

Creating a Build Directory

Zorba requires an out-of-source build, which means you need to create a separate (empty) build directory. A common convention is to create a directory named "build" in the Zorba source directory, but you may name it and place it anywhere you like. We refer to this directory as {ZORBABUILD} in the following steps.

What's next?

Now, go on to Configuring a Zorba Build Using CMake.