diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-08-17 19:31:37 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-08-17 19:31:37 -0300 |
commit | e0c29962e6f334452f0c9db2caaf6ed18065de85 (patch) | |
tree | cee27801c196fbcacf6130ad64216af133b555dd /doc/compiling |
The End Is the Beginning Is the End
Diffstat (limited to 'doc/compiling')
-rw-r--r-- | doc/compiling/cmake-primer.rst | 68 | ||||
-rw-r--r-- | doc/compiling/compiling.rst | 9 | ||||
-rw-r--r-- | doc/compiling/setup-apiextractor.rst | 56 | ||||
-rw-r--r-- | doc/compiling/setup-generator.rst | 54 |
4 files changed, 187 insertions, 0 deletions
diff --git a/doc/compiling/cmake-primer.rst b/doc/compiling/cmake-primer.rst new file mode 100644 index 000000000..884cf15c1 --- /dev/null +++ b/doc/compiling/cmake-primer.rst @@ -0,0 +1,68 @@ + +.. _cmake-primer: + +************ +CMake primer +************ + +This chapter will is a basic introduction to CMake, the build system +used by PyQtB and the binding generator. + +The practical steps will be focusing in using cmake in a unix-like +(GNU/Linux) environment. + + +Configuring +=========== + +Project file - CMakeLists.txt +----------------------------- + +CMake parses the file CMakeLists.txt for information about the project, +like project name, dependencies, what should be compiled, what should be +shipped. + + +CMake variables +--------------- + +CMake can have its default behavior modified by providing some + +* ``CMAKE_INSTALL_PREFIX=<some path here>`` sets the install prefix to + the specified path. +* ``CMAKE_MODULE_PATH=<some path here>`` sets the extra directories + where CMake will try to find its modules. +* ``CMAKE_TOOLCHAIN_FILE=<file path>`` sets the path to the file that + describes the toolchain used to compile this project. Is is very useful + when using CMake with icecc to speedup compilation. + +You can define a variable using the ``-D<VARIABLE>`` switch. + +Invoking CMake +-------------- + +After writing the CMakeLists.txt and deciding which flags will be used, +you can invoke CMake using:: + + cmake <CMake flags> <path to toplevel CMakeLists.txt file> + +For example, if you use the ``build/`` folder to build the project and +want it to be installed into ``/opt/sandbox/``, use the following lines:: + + cd build/ + cmake -DCMAKE_INSTALL_PREFIX=/opt/sandbox .. + +CMake will process the project file and write the output files in the +current directory + +Building +======== + +After the configuration process, the Makefiles are written and you can build +the project using :program:`make`. + +Installing +========== + +As in the building process, ``make install`` will install the files into +the target directory. diff --git a/doc/compiling/compiling.rst b/doc/compiling/compiling.rst new file mode 100644 index 000000000..638efa91a --- /dev/null +++ b/doc/compiling/compiling.rst @@ -0,0 +1,9 @@ +Compiling +********* + +.. toctree:: + :maxdepth: 3 + + cmake-primer + setup-apiextractor + setup-generator diff --git a/doc/compiling/setup-apiextractor.rst b/doc/compiling/setup-apiextractor.rst new file mode 100644 index 000000000..68c162f8b --- /dev/null +++ b/doc/compiling/setup-apiextractor.rst @@ -0,0 +1,56 @@ + +.. _api-extractor: + +************** +API Extractor +************** + +Overview +======== + +The **API Extractor** library is used by the binding generator to +parse the header and typesystem files to create an internal +representation of the API. It is based on the QtScriptGenerator +codebase. + +Getting the sources +=================== + +.. todo:: + Replace with the OSS project repo info + +* Git URL: https://dvcs.projects.maemo.org/git/python/apiextractor +* Web interface: https://dvcs.projects.maemo.org/git/?p=python/apiextractor + +To checkout the most updated version, use the following command:: + + $ git clone https://dvcs.projects.maemo.org/git/python/apiextractor/ + +Build requirements +================== + +* Qt4.5 development headers and libraries >= 4.5.0 +* libboost-graph >= 1.38.0 +* cmake >= 2.6.0 + +Building and installing +======================= + +To build and install just follow the generic cmake instructions in section +:ref:`cmake-primer`. + +Debian packaging +================ + +In order to compile this package in a debian environment, make sure the +following packages are installed: + +* debhelper (>= 5) +* cdbs +* cmake (>= 2.6.0) +* libboost-graph1.38-dev (>= 1.38.0) +* libqt4-dev (>= 4.5) + +And then you can build the package using:: + + $ dpkg-buildpackage -rfakeroot diff --git a/doc/compiling/setup-generator.rst b/doc/compiling/setup-generator.rst new file mode 100644 index 000000000..28fe2fbb3 --- /dev/null +++ b/doc/compiling/setup-generator.rst @@ -0,0 +1,54 @@ + +.. _python-bindings-generator: + +************************* +Python Bindings Generator +************************* + +Overview +========================================= + +The **Python Bindings Generator** (A.K.A. :program:`shiboken`) is +the program that creates the bindings source files from Qt headers and +auxiliary files (typesystems, ``global.h`` and glue files). It makes +heavy use of the :ref:`api-extractor` library. + + +Getting the sources +=================== + +* Git URL: https://dvcs.projects.maemo.org/git/python/shiboken +* Web interface: https://dvcs.projects.maemo.org/git/?p=python/shiboken + +To checkout the most updated version, use the following command:: + + $ git svn clone https://dvcs.projects.maemo.org/git/?p=python/shiboken + +Build requirements +================== + ++ CMake >= 2.6.0 ++ Qt4.5 libraries and development headers >= 4.5.0 ++ :ref:`api-extractor` + development headers + +Building and installing +======================= + +To build and install just follow the generic cmake instructions in +section :ref:`cmake-primer`. + +Debian packaging +================ + +In order to compile this package in a debian environment, make sure the +following packages are installed: + +* debhelper (>= 5) +* cdbs +* cmake (>= 2.6.0) +* libqt4-dev (>= 4.5) +* libapiextractor-dev (>= 0.1) + +And then you can build the package using:: + + $ dpkg-buildpackage -rfakeroot |