Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added lua support to linux platform #1290

Merged
merged 1 commit into from Dec 10, 2012

Conversation

Projects
None yet
3 participants
@ivzave
Copy link
Contributor

ivzave commented Sep 7, 2012

Overview:

  • added liblua project & makefile
  • added HelloLua project & makefile
  • added TestLua project & makefile
  • fixed make-all-linux-project.sh to build added stuff
  • fixed build.php script for generating tolua++ bindings
@minggo

This comment has been minimized.

Copy link
Contributor

minggo commented Sep 7, 2012

Thank you.
I will test it ASAP.

@ivzave

This comment has been minimized.

Copy link
Contributor Author

ivzave commented Sep 13, 2012

I wish to update this but I need the new build.xml ant script (the current one in repo generates incorrect bindings). I can't contact YuLei since he doesn't own a profile on github. Can anybody ask him to commit the new ant script he used to generate bindings?

@dumganhar

This comment has been minimized.

Copy link
Contributor

dumganhar commented Sep 13, 2012

Hi, ivzave,
Here is the YuLei's github address: https://github.com/dualface

@ivzave

This comment has been minimized.

Copy link
Contributor Author

ivzave commented Sep 13, 2012

Thanks.

styck pushed a commit to styck/cocos2d-x that referenced this pull request Oct 3, 2012

styck pushed a commit to styck/cocos2d-x that referenced this pull request Oct 3, 2012

EOT;
$replace = <<<EOT
va_list args;
__VA_COPY(args, *((va_list*) tolua_tousertype(tolua_S,3,0)));

This comment has been minimized.

Copy link
@dumganhar

dumganhar Dec 6, 2012

Contributor

Why should use va_copy? If not using it, it's also compiled ok.
What's more, it seems that CCMenu::alignItemInColumns cannot works correctly,
When app run into tolua_Cocos2d_CCMenu_alignItemsInColumns00, an error occurs.
Any ideas?

This comment has been minimized.

Copy link
@ivzave

ivzave Dec 6, 2012

Author Contributor

GCC for 64-bit target defines va_list as an array so it can't be assigned directly. va_copy is arch-independent way to copy va_lists in GCC.
How did you test alignItemsInColumns? Is lua able to generate C va_lists? I think there's no need in public va_list methods.

This comment has been minimized.

Copy link
@dumganhar

dumganhar Dec 6, 2012

Contributor

So did you just add va_list to make it compiled ok on Linux 64bit machine?
Yep, i think tolua++ doesn't support va_lists .

This comment has been minimized.

Copy link
@ivzave

ivzave Dec 6, 2012

Author Contributor

Yes, va_copy is for linux 64-bit compatibility. If we remove
void alignItemsInColumns(unsigned int columns, va_list args);
void alignItemsInRows(unsigned int rows, va_list args);
from CCMenu.pkg then there's no need in this fix.

This comment has been minimized.

Copy link
@dumganhar

dumganhar Dec 6, 2012

Contributor

OK, i will contact YuLei and ask him whether we should delete these two functions.
Thanks.

This comment has been minimized.

Copy link
@dumganhar

dumganhar Dec 6, 2012

Contributor

Hey, i tested it on my ARCHLINUX 64bit machine, but no errors occured without using va_copy.
What's the distribution of linux you are using?

This comment has been minimized.

Copy link
@ivzave

ivzave Dec 6, 2012

Author Contributor

Ubuntu 12.04, gcc 4.6.3. I can test it again later today and report any problems.

This comment has been minimized.

Copy link
@dumganhar

dumganhar Dec 6, 2012

Contributor

OK, thank you.

This comment has been minimized.

Copy link
@ivzave

ivzave Dec 6, 2012

Author Contributor

Still getting errors with stock LuaCocos2d.cpp:
../../../scripting/lua/cocos2dx_support/LuaCocos2d.cpp: In function ‘int tolua_Cocos2d_CCMenu_alignItemsInColumns00(lua_State*)’: ../../../scripting/lua/cocos2dx_support/LuaCocos2d.cpp:41885:61: error: array must be initialized with a brace-enclosed initializer ../../../scripting/lua/cocos2dx_support/LuaCocos2d.cpp: In function ‘int tolua_Cocos2d_CCMenu_alignItemsInRows00(lua_State*)’: ../../../scripting/lua/cocos2dx_support/LuaCocos2d.cpp:41920:61: error: array must be initialized with a brace-enclosed initializer

@dumganhar dumganhar merged commit 8ae14d4 into cocos2d:gles20 Dec 10, 2012

@dumganhar

This comment has been minimized.

Copy link
Contributor

dumganhar commented Dec 10, 2012

Merged at #1752.
Thanks.

angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 28, 2014

angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 28, 2014

angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 29, 2014

angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 29, 2014

minggo added a commit that referenced this pull request May 4, 2014

minggo added a commit that referenced this pull request May 4, 2014

Merge pull request #966 from minggo/iss1290_shader_path
fixed #1290:use Shaders folder in correct way
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.