summaryrefslogtreecommitdiff
path: root/eo_js/README
blob: e013ce71e94f0e22c7cc92e91f3ec10cb99d69e4 (plain) (blame)
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
############################################################################

EO Introspection - JavaScript Bindings

############################################################################

It analyzes XML files generated by EO introspection scanner and generates
module, which can be used with V8-based js-engine - elev8.

############################################################################

1. Generating js module for classes defined in XMLs:
    a. > python eo_js_gen.py --dir=XML_FOLDER --outdir=OUTDIR
         --module=MODULE_NAME --xmldir=INCLUDE_XML_DIR -lname -I/include
         -DSOME_PATH=\"/path\"

      In case if some class is needed
      (usually parent class, which is not in the tree being analyzed),
      include XMLs are searched in python system paths.
      If include file wasn't found, explicit --xmldir=INCLUDE_DIR dir is needed

      Files to be generated:
      - *.cc, *.h will be created for each *.xml
      - _module.cc with EoRegisterModule()
        if you need to call any functions on module load,
        add them in this func.
      - Makefile
   b. Compiling module:
      You can edit generated Makefile, if you need to add some additional flags
      > make 
      - modul_name.so will be genratade

      following files are needed to compile
      main.cc
      elm.h
      CElmObject.cc
      CElmObject.h

      *.so module will be compiled

############################################################################
############################################################################
############################################################################