summaryrefslogtreecommitdiff
path: root/lib/wx/api_gen/README
blob: 364dbdd9f25477700a78d4f3f45269aba0175430 (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
API GENERATION:
    Most of the code in wx is generated.
    Users of wxErlang should not normally need to regenerate the generated code,
    as it is checked in by wxErlang developers, when changes are made.

REQUIREMENTS:
    The code generation requires doxygen (1.8.17) which is
    used to parse wxWidgets c++ interface headers and generate xml files (in
    wx_xml/).

CONFIGURATION:
    wxapi.conf contains the specification to the code generator.  The code
    generator reads the specification and parses the xml files and
    produces the erlang and the 'C' code.

    Adding/changing stuff/classes should be done by updating wxapi.conf
    and running make. Sometimes the code generator will require changes,
    I haven't thought of everything yet.

RUNNING:
    I use the following alias wxgen='make GL_DIR=/home/dgud/opengl WX_DIR=/home/dgud/src/wxWidgets'

    We have some patches in the wxWidgets interface files to be able to use it to generate the interface,
    so use our clone of wxWidgets, and checkout 'wx_api_gen' branch.

    I keep the opengl headers separate so I don't go backwards in version when generating the code
    from another machine.

    Also gl.h from different vendors differ so keep it consistent,
    I have used mesa's gl.h and the glext.h from opengl.org
    (version see GL_GLEXT_VERSION in gl.hrl)

    I also get the xml documentation from https://github.com/KhronosGroup/OpenGL-Refpages
    setup 'export GL_MAN_SRC_DIR = /home/User/src/OpenGL-Refpages'
    otherwise the OpenGL docs will not be generated.

CONTRIBUTION:
    Send me patches