cocos2d / cocos2d-x-3rd-party-libs-src

Dependencies of cocos2d-x.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How To change the version of liblua.a?

mowenchuxin opened this issue · comments

commented

I can build the liblua.a on mac. but I found that the version of lua is 5.1.4 and which I need is 5.1 , I tried to change the version from 5.1.4 to 5.1 in the file rules.mak ,but I don't know how to change the SHA512SUMS file. Because I don't know how is the check code created. So how can I do next?

commented

Hi, Have U see this question? I Really need your answers, Please Give me a Reply, Thanks.

Did you mean luajit? Now engine uses luajit, and used lua source code before. About SHA512SUMS, i think you should download the zip/tar.gz file first, then use shasum -a 512 file_path to generate the sum and replace the value of it.

commented

Thank U for Reply.
I have tried as you say to get the sum check code, it works. But when I go to completing the liblua.a, it has errors like this:
(cd lua-5.1 && patch -fp1) < ../../contrib/src/lua/lua-macosx-support.patch
patching file Makefile
Hunk #1 FAILED at 38.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.rej
patching file src/Makefile
Hunk #2 FAILED at 97.
1 out of 2 hunks FAILED -- saving rejects to file src/Makefile.rej
make: [lua] Error 1

I try to know the reason of this error and found that I need to have the right version of all the ".patch" files emmmm=_=, it seems like a lot of work...
so ,will U give me a "liblua.a"of the version lua5.1 directly? Thanks.



谢谢回复。
(英文水平欠佳,如果没看懂的话直接看中文吧。。。)
我按照你说的成功获取了 lua-5.1.tar.gz 的sha校验码,可以匹配成功。当我继续去编译liblua.a文件时报错了,去网上大概了解了下:
answer1 ,
answer2
均表示编译报错是因为用的.patch文件版本不对,而且这个文件里面的函数是根据相应版本里面各个文件的行列值来做处理的。。。换言之就是所有.patch文件全得是对应的版本才可以编译成功。。。
。我下面该怎么做,或者你们那边有可以用的lua51的liblua.a文件直接提供一份吗?


背景:在做一个换皮项目,引擎是用的很老的quick-cocos2d-2.2.1, 目前模拟器上32位可以跑通(luajit),64位需要用lua,看了下项目里面用到的是5.1版本的lua,现在缺该版本的liblua.a文件,编译成功的5.1.4版本的那个文件不能用。

I suggest you using luajit for all platforms as latest v3 codes. Luajit supports 64 bit too.

commented

It's an old project not new, with about half a million lines of code...

Then i suggest you using lua source code instead.