Projects > cpp > Issues > Bug #2665

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

Generation of scripting/lua/cocos2dx_support/LuaCocos2d.cpp is unclear

Bug #2665 [Rejected]
godyZ 2013-08-21 09:30 . Updated over 9 years ago

(9re opened this issue 9 months ago in github)

I have read the description in https://github.com/cocos2d/cocos2d-x/blob/gles20/tools/tolua%2B%2B/README

and by using tolua**~~1.0.92
I cannot make the same LuaCocos2d.cpp by
\$ ant~~buildfile build_macosx.xml
instead it generates LuaCocos2d.cpp with many diffs like
static int tolua_collect_CCAnimationFrame
{
CCAnimationFrame* self = tolua_tousertype;

  • Mtolua_delete;
  • return 0;
  • delete self;
  • return 0; }

@ -5609,9 +5534,7@ static int tolua_Cocos2d_CCArray_createWithObject00(lua_State* tolua_S)
CCObject* pObject = ((CCObject**) tolua_tousertype);
{
CCArray** tolua_ret = (CCArray**) CCArray::createWithObject;

  • int nID = ? tolua_ret~~>m_uID :~~1;
  • int** pLuaID = (tolua_ret) ? &tolua_ret~~>m_nLuaID : NULL; ~~ toluafix_pushusertype_ccobject(tolua_S, nID, pLuaID, (void*)tolua_ret,“CCArray”);
  • tolua_pushusertype(tolua_S,(void*)tolua_ret,“CCArray”); } }

I made some modification on ccLanguageType for supporting japanese(#1665) and generated LuaCocos2d.cpp but most of diffs are unintended so I have to git add —patch and select the changes that I really wanted.

I want to know the proper way to do it.

Comments:

dualface commented:
For mac, please use tolua**.Mac.zip.
For windows, use tolua**.zip.
Use build.php generate valid LuaCocos2d.cpp
\$ cd tools/tolua*+
\$ php build.php
9re commented :
Thanks!
Isn’t there linux version or source code version for tolua*+?

dualface 2013-08-21 11:08

The ant is outdated, please use tools/tolua++/build.sh。

WenHai 2014-01-09 02:39
  • Status changed from New to Rejected

The tool for generation lua bind code is tools\tolua\genbindings.sh on last version.

zhangxm 2014-01-09 06:10
  • Target version deleted (Candidate)

Atom PDF

Status:Rejected
Start date:2013-08-21
Priority:Normal
Due date:
Assignee:-
% Done:

0%

Category:lua
Target version:-