Skip to content

Latest commit

 

History

History

source_maker

Table of Contents:
------------------------
1. Code Generator
2. Using the source maker
3. Dumps
4. Config Templates
5. Source Templates
6. Templates
7. Class Selector
	

Code generator
------------------------
File: code_generator.php:

This script reads the files on the json directory and 
generates the source code that wraps the wxWidgets classes.

It uses a semi-template based system to facilitate editing the desired
generated code.


Using the source maker:
------------------------
cd tools/source_maker	
php code_generator.php

This will produce a bunch of source and header files like:
	aui.h
	aui.cpp
	php_wxwidgets.h
	wxwidgets.cpp
	common.h
	etc...
	
It also generates a file named discarded.log that stores all methods
and functions that were removed from the source code generation for
various reasons.

The generated source files are meant to replace the ones in the module 
source root.

To make the process simpler you can use the utility go.sh/go.bat 
to automatically update the source files. You can even use the
build script (only for linux at this time) on the root directory to
automate the process of generating new source files and compiling.

	
Config Templates
------------------------
The config_templates directory has the files that serve as the skeleton
for generating the config.m4 and config.w32 with the generated source
files for correct compilation.
		
		
Source Templates
------------------------
The source_templates directory has the files that serve as the skeleton
of the wxWidgets php extension. These files have some comment tags or 
php variables inserted that the code generator uses to insert the 
necessary source code to declare classes, constants and functions.

		
Templates
------------------------
The templates directory holds files with parts of the skeleton that are 
going to be inserted by the code generator on the classes.cpp and classes.h
files. The templates files are used in combination of some functions 
declared on the include directory. The idea is to make edition of output
code much easier.


Class Selector
------------------------
The directory class_selector has the GUI utility (written with wxPHP
itself) used to inspect and enable/disable bindings.

To use this utility you need to have a working library of wxPHP and run:

php /path/to/source_maker/class_selector/selector.php