summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2012-12-16 18:38:40 +0200
committerYakov Goldberg <yakov.g@samsung.com>2012-12-16 18:39:32 +0200
commit1f2d875a8612eb0844eb111ed38b45aa08267c16 (patch)
tree40dde18e1abeb485e7dd3bdeecd700c51287e9cc
parent1209e2c1e425f9c85d7e2662748d27bc2180a519 (diff)
README up
-rw-r--r--README92
1 files changed, 55 insertions, 37 deletions
diff --git a/README b/README
index ef0ef77..a980af8 100644
--- a/README
+++ b/README
@@ -37,7 +37,7 @@ EO Introspection
37 Graph generator 37 Graph generator
38 builds classes diagram according to XML-descriptions. 38 builds classes diagram according to XML-descriptions.
39 39
40 Pyhton code generator 40 Python code generator
41 analyzes XML files and generates Cython files that are compiled 41 analyzes XML files and generates Cython files that are compiled
42 into Python module. 42 into Python module.
43 43
@@ -80,10 +80,10 @@ EO Introspection
80 80
81 2.1 Folder introspection 81 2.1 Folder introspection
82 Scanner runs recursively on defined folders 82 Scanner runs recursively on defined folders
83 > eo_xml_gen.py --dir=IN_DIR --dir=IN_DIR2 --outdir=OUT_DIR 83 > eo_xml_gen.py --dir IN_DIR --dir IN_DIR2 --outdir OUT_DIR
84 script searches for dependencies in Python env paths. 84
85 If dependencies are not in Python search path, 85 Parent's classes should be found automatically in python search path.
86 --xmldir=XML_DIR can be needed 86 --xmldir=XML_DIR can be used to add additional search paths.
87 87
88 2.2 Building classes graph chart: 88 2.2 Building classes graph chart:
89 Graph generator runs recursively on defined folders 89 Graph generator runs recursively on defined folders
@@ -92,8 +92,8 @@ EO Introspection
92# > python eo_graph_gen.py --dir=FOLDER_WITH_XML1 --dir=FOLDER_WITH_XMLS --outfile=OUTFILE.dot 92# > python eo_graph_gen.py --dir=FOLDER_WITH_XML1 --dir=FOLDER_WITH_XMLS --outfile=OUTFILE.dot
93# > dot -Tpng OUTFILE.dot -o out.png 93# > dot -Tpng OUTFILE.dot -o out.png
94# > eog out.png 94# > eog out.png
95 > eo_graph_gen.py --dir=FOLDER_WITH_XML1 95 > eo_graph_gen.py --dir FOLDER_WITH_XML1
96 --dir=FOLDER_WITH_XMLS --outfile=graph.png 96 --dir FOLDER_WITH_XMLS --outfile graph.png
97 > eog graph.png 97 > eog graph.png
98 98
99 99
@@ -101,12 +101,24 @@ EO Introspection
1013. Generating python bindings 1013. Generating python bindings
102 102
103 3.1 Generating python module for classes defined in XMLs: 103 3.1 Generating python module for classes defined in XMLs:
104 > eo_py_gen.py --dir=XML_FOLDER --outdir=OUTDIR 104 > eo_py_gen.py --dir XML_DIR --outdir OUTDIR --module MODULE_NAME
105 --pkg="lib1 lib2" --module=MODULE_NAME --xmldir=INCLUDE_XML_DIR 105 --pkg "lib1 lib2" --xmldir INCLUDE_XML_DIR
106 -lname -I/include -DSOME_VAR=1 106 -lname -I/include -DSOME_VAR=1
107 107
108 --xmldir=XML_DIR - path to search for parent classes 108 Parent's classes should be found automatically in python search path.
109 --xmldir=XML_DIR can be used to add additional search paths.
110
111 --xmldir XML_DIR - path to search for parent classes
109 (XMLs fith parent classes descriptions) 112 (XMLs fith parent classes descriptions)
113 --outdir OUTDIR - directory for output.
114 --module - name of module to generate
115 --pkg "lib1 lib2" - provide libraries compilation information with pkg-config
116 --xmldir - path to parent's classes XMLSw, which are not in search path
117
118 -I - to include search path for headers
119 -L - to include search path for libraries
120 -l - library to link with
121 -D - to define macros
110 122
111 Files to be generated: 123 Files to be generated:
112 - *.pxi files will be created for each *.xml 124 - *.pxi files will be created for each *.xml
@@ -137,8 +149,6 @@ EO Introspection
137 > python setup.py install 149 > python setup.py install
138 150
139######################################################################## 151########################################################################
140########################################################################
141########################################################################
142 152
143 3.3 Creating PY base module for Eo base class: 153 3.3 Creating PY base module for Eo base class:
144 Base module folder being introspected - Eo lib itself 154 Base module folder being introspected - Eo lib itself
@@ -186,34 +196,42 @@ EO Introspection
186##################################################################### 196#####################################################################
187 197
1884. Generating js module for classes defined in XMLs: 1984. Generating js module for classes defined in XMLs:
189 a. > eo_js_gen.py --dir=XML_FOLDER --outdir=OUTDIR 199 > eo_js_gen.py --dir=XML_FOLDER --outdir=OUTDIR
190 --module=MODULE_NAME --xmldir=INCLUDE_XML_DIR -lname -I/include 200 --module=MODULE_NAME --xmldir=INCLUDE_XML_DIR -lname -I/include
191 -DSOME_PATH=\"/path\" 201 -DSOME_PATH=\"/path\"
202
203 Parent's classes should be found automatically in python search path.
204 --xmldir=XML_DIR can be used to add additional search paths.
205
206 --xmldir XML_DIR - path to search for parent classes
207 (XMLs fith parent classes descriptions)
208 --outdir OUTDIR - directory for output.
209 --module - name of module to generate
210 --pkg "lib1 lib2" - provide libraries compilation information with pkg-config
211 --xmldir - path to parent's classes XMLSw, which are not in search path
192 212
193 In case if some class is needed 213 -I - to include search path for headers
194 (usually parent class, which is not in the tree being analyzed), 214 -L - to include search path for libraries
195 include XMLs are searched in python system paths. 215 -l - library to link with
196 If include file wasn't found, 216 -D - to define macros
197 explicit --xmldir=INCLUDE_DIR dir is needed
198 217
199 Files to be generated: 218 Files to be generated:
200 - *.cc, *.h will be created for each *.xml 219 - *.cc, *.h will be created for each *.xml
201 - _module.cc with EoRegisterModule() 220 - _module.cc with EoRegisterModule() func
202 if you need to call any functions on module load, 221 if you need to call any functions on module load,
203 add them in this func. 222 add them in this func.
204 - Makefile 223 - Makefile
205 b. Compiling module: 224
206 You can edit generated Makefile, if you need to add some additional flags 225 Compiling module:
207 > make 226 You can edit generated Makefile, if you need to add some additional flags
208 - modul_name.so will be genrated 227 > make
209 228 - modul_name.so will be compiled
210 following files are needed to compile 229
211 main.cc 230
212 elm.h 231 /*
213 CElmObject.cc 232 Need to copy followinf files to compile module, (or static link?)
214 CElmObject.h 233 main.cc, elm.h, CElmObject.cc, CElmObject.h, _eobase.h, _eobase.c"
215 234 */
216 *.so module will be compiled
217 235
218#################################################################### 236####################################################################
219 237