aboutsummaryrefslogtreecommitdiffstats
path: root/doc/generatingdocs.rst
blob: 1423aab47a9cfbee338c7a956e49cb4bfbd5d2eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
How to generate this documentation
**********************************

Pre-requisites
--------------

You will need:

1. Qt4 source code (for API documentation).
2. Generator runner with shiboken plugin
3. PySide source code
4. cmake
5. sphinx

Extracting documentation from Qt4
---------------------------------

The API documentation is generated from source code comments (for now, just
``qdoc3`` tool is supported, ``doxygen`` support will be added soon).

``qdoc3`` is the tool used to generate the oficial Qt4 documentation, you will
use it to generate a bunch of XML files that will be used by boostpythongenerator
to create the documentation.

So, go to Qt4 source directory and type:

::

    $ cp /path/to/pyside/sources/doc/pyside.qdocconf tools/qdoc3/test/pyside.qdocconf
    $ QTDIR=`pwd` qdoc3 tools/qdoc3/test/pyside.qdocconf
    $ export QT_SRC_DIR=`pwd` # the next step uses this variable.

The xml files now can be found at ``$QT_SRC_DIR/qt4xmldoc``.

Last step
---------

You need to tell PySide where it can find the generated XML files and the Qt4
source directory (XML files refers to it in some tags). So, go to the PySide
directory and type:

::

    $ mkdir build
    $ cmake -DCMAKE_INSTALL_PREFIX=/usr -DDOC_DATA_DIR=$QT_SRC_DIR/qt4xmldoc -DQT_SRC_DIR=$QT_SRC_DIR ..
    $ make apidoc
    $ make apidocinstall

Where:
    * *PATH_TO_QT_SOURCE_DIR* is the path to the Qt4 sources.
    * *PATH_TO_XMLS* is the path to the xml's generated by qdoc3 tool.

The documentation will be installed at ``/usr/share/doc/pyside/index.html``, change
the *CMAKE_INSTALL_PREFIX* value if you want to install the documentation in another
directory.