2011-09-19 14:47:17 +08:00
|
|
|
1. Generating the lua<-->C bindings with tolua++
|
2011-11-15 17:01:07 +08:00
|
|
|
tolua++.exe -tCocos2d -o LuaCocos2d.cpp Cocos2d.pkg
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2011-09-19 14:47:17 +08:00
|
|
|
An ant script has been provided to generate the relevant files, to do this after
|
|
|
|
modifying the .pkg files you should use the following command in this directory:
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2011-09-19 14:47:17 +08:00
|
|
|
ant
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2011-09-19 14:47:17 +08:00
|
|
|
This will generate the bindings file, patch it to compile successfully and move it
|
|
|
|
to the standard destination.
|
2011-06-24 21:03:33 +08:00
|
|
|
|
2011-09-19 14:47:17 +08:00
|
|
|
2. Writing .pkg files
|
2011-06-24 21:03:33 +08:00
|
|
|
|
2011-09-19 14:47:17 +08:00
|
|
|
1) enum keeps the same
|
|
|
|
2) remove CC_DLL for the class defines, pay attention to multi inherites
|
|
|
|
3) remove inline keyword for declaration and implementation
|
|
|
|
4) remove public protect and private
|
|
|
|
5) remove the decalration of class member variable
|
|
|
|
6) keep static keyword
|
|
|
|
7) remove memeber functions that declared as private or protected
|