Build Yzis

From Yzis Wiki

Jump to: navigation, search

This page if for developers, if you just want to install Yzis, see the page Installing Yzis

Those are the general instructions to build Yzis. You can find distribution specific instructions on the following pages :

First follow the instructions on these pages, then keep on reading this page.

Contents

Prerequisites

To build yzis from source code You'll need to install the following packages:

  • cmake, for building
  • qt>4.1.0, for libyzis and QYzis
  • lua 5.1 for scripting
  • KDE-4 (or preview, as of now), for KYzis and kyzis kpart (embedding in other applications)
  • ncurses, for NYzis. Warning : you need wide character support.
  • doxygen, for the documentation
  • mercurial if you intend to follow the development in real time instead of using an official package.

Get the source

The source code of Yzis and its documentation are managed using mercurial.

On linux, you need to have mercurial installed and and then use:

 hg clone http://sources.freehackers.org/hg.cgi/Yzis/

If you are such a lucky developer with a ssh account, you should use instead

 hg clone ssh://login@freehackers.org//usr/olocal/hg/yzis

Building Yzis

Yzis uses CMake for managing the build.

We recommend to do an out-of-source build. All the compiled and built files will go into a special directory, separate from your sources. That way, you can keep your sources clean.

To get started, create a directory build, enter it and run cmake:

 mkdir build
 cd build
 cmake ..
 make

CMake will start to look for the dependencies. Depending on the packages it finds, it will enable or disable some modules. After that, it will generate Makefiles.

You can pass options and variables to CMAKE with the -D flag: cmake -DENABLE_NYZIS=off to disable for example the nyzis building.

This list of available options are:

  • ENABLE_NYZIS: build the ncurses based frontend. Default is ON when ncurses is found, and OFF on windows.
  • ENABLE_QYZIS: build the Qt frontend. Default is ON.
  • ENABLE_LIBYZISRUNNER: build the frontend used to test the library. Default is ON.
  • ENABLE_KPART_YZIS: build the yzis kpart library. Default is OFF
  • ENABLE_KYZIS: try to build kyzis. This does not work at the moment. Please use ENABLE_KPART_YZIS instead. Default is OFF
  • CMAKE_VERBOSE_MAKEFILE: default is OFF, allows to see the exact compilation lines. Very useful when something does not compile, to understand what cmake is actually doing. Even if you set this option to off, you can still get verbose output by typing VERBOSE=1 make when executing make.
  • ENABLE_DOCUMENTATION: allow to generate documentation (doxygen needed). Default is ON
  • GENERATE_DOC: when on, the documentation is generated during the build process. When off, you need to generate the documentation explicitely with "make docs". Default is OFF
  • ENABLE_TESTS: generate an executable to run the unit tests, default is ON.

You can choose between debug or release configuration with:

  • DCMAKE_BUILD_TYPE=Debug
  • DCMAKE_BUILD_TYPE=Release

For Qt, you need to have the QTDIR environment variable pointing to Qt, so that CMake finds it.

For KDE, you need to have the KDEDIR environment variable set.

For Lua, you need to have it installed in /usr/lib or /usr/local/lib, or to specify it with the following CMake variables:

  • LIBLUA51_INCLUDE_DIR: place to find lua.h
  • LIBLUA51_LIBRARIES: place to find liblua.so

You can specify the lua install prefix insteed with the CMake variable WITH_LUA_HOME

Installing

Note that some features (mostly syntax highlighting) wont work until all files are installed. To install yzis, you need to have root access, which is usually done through 'sudo' :

 sudo make install


Unit tests

The first thing to do once you managed to compile the source is to launch the unit tests to check everything is ok

 make test

Please report us any problem with those tests.

Building the documentation

If you have doxygen installed and the option ENABLE_DOCUMENTATION is set (which is ON by default), you can build the api documentation of Yzis. The documentation will automatically be built by the build process if you set the option GENERATE_DOC (which is OFF by default)

Else, to build the documentation explicitely, type:

 make docs
Personal tools