generating LuaCocos2d.cpp

I have modified basic.lua in tolua*+ so ant is not needed to created LuaCocos2d.cpp
using this version of basic.lua simply execute the following line in tolua*+ directory

tolua++ “~~L" “basic.lua” "~~o” “…/…/scripting/lua/cocos2dx_support/LuaCocos2d.cpp” “Cocos2d.pkg”

by the way if you run ant with this basic.lua file it will still work.

Andre

ps: using this file the build.php and build.xml are no longer needed


basic.lua.zip (2.8 KB)

You should definitely see about getting this in, this is a pretty common area of question for people that try to re-generate with tolua. Thanks for posting, I am going to use this for sure :slight_smile:

I have created two batches in tolua*+
local.bat
tolua*+ “~~L" “basic.lua” “~~o” “LuaCocos2d.cpp” “Cocos2d.pkg
global.bat
tolua++”-L” “basic.lua” “-o” “…/…/scripting/lua/cocos2dx_support/LuaCocos2d.cpp” “Cocos2d.pkg”

normally I run local.bat so if errors occur they can be fixed before modifying the running file.

Good luck

Andre

I filed a pull request which includes these changes to basic.lua:

Merged. Hey, do you have a plan to add a lua target to cxx-generator ?
In that way, we will automatically generate lua binding glue codes when there is an api changes, rather than modify *.pkg files.