chexiongsheng / build_xlua_with_libs Goto Github PK
View Code? Open in Web Editor NEW为xLua集成几个常用库,方便使用
License: MIT License
为xLua集成几个常用库,方便使用
License: MIT License
该库的 lua-protobuf 是最新版本吗?
如果不是,我尝试 fork 该项目后,将最新的 lua-protobuf 上传至自己的仓库。通过 Actions 自动编译,这样的做法正确吗?
1 warning generated.
[ 78%] Building C object CMakeFiles/xlua.dir/lpeg/lpcap.c.o
[ 82%] Building C object CMakeFiles/xlua.dir/lpeg/lpcode.c.o
[ 86%] Building C object CMakeFiles/xlua.dir/lpeg/lpprint.c.o
[ 91%] Building C object CMakeFiles/xlua.dir/lpeg/lptree.c.o
[ 95%] Building C object CMakeFiles/xlua.dir/lpeg/lpvm.c.o
make[2]: *** No rule to make target '/home/runner/work/build_xlua_with_libs/build_xlua_with_libs/build/luajit-2.1.0b3/src/libluajit.a', needed by 'libxlua.so'. Stop.
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/xlua.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
cp: cannot stat 'build_lj_x86/libxlua.so': No such file or directory
Error: Process completed with exit code 1.
EntryPointNotFoundException: luaopen_protobuf_c
XLua.LuaDLL.Lua.LoadProtobufC (IntPtr L) (at Assets/BuildInInit.cs:49)
(wrapper native-to-managed) XLua.LuaDLL.Lua:LoadProtobufC (intptr)
XLua.LuaEnv.DoString (System.Byte[] chunk, System.String chunkName, XLua.LuaTable env) (at Assets/XLua/Src/LuaEnv.cs:270)
XLua.LuaEnv.DoString (System.String chunk, System.String chunkName, XLua.LuaTable env) (at Assets/XLua/Src/LuaEnv.cs:290)
Helloworld.Start () (at Assets/Helloworld/Helloworld.cs:32)
关于Plugins下x86和x86_64文件夹中的libxlua.so文件,有两个问题想请教一下:
一直以为x86和x86_64文件夹是放PC下的dll文件的,所以很费解为什么会有so文件呢。
版本为unityLTS 2019.4.6F1
安卓sdk为最新的
PC版本能正常运行,正常和服务器进行通讯。
但是打出来的安卓包启动后直接报cant find libc
然后后续的lua读取行为全部失败。
问题是这样的:
我先用cmake打出一个build64,里面包含了pbc,然后我按照你的例子去调用luaopen_protobuf_c,他就报错说是找不到这个入口。请问我该怎么办
请问可以提供android arm64库么,谢谢。
您好,请问下ffi库是否支持lua 5.4版本?看详情页面,以及 https://github.com/facebookarchive/luaffifb 的描述,目前只支持5.1-5.3,没有支持5.4,想问下我们这边裁剪后是否支持5.4。谢谢。
xlua帮忙编译个android平台带有pbc的吧,弄了好久android弄不好 只弄了ios、mac、windows平台带有pbc的 谢谢
用大佬的工程直接替换了Plugins/iOS/libxlua.a为build/plugin_luajit/Plugins/iOS/libxlua.a,然后导出xcode工程编译报错如下:(尝试设置xcode里的bitcode为No依然报错)
Showing All Messages
: '/Users/Documents/111/Libraries/Plugins/iOS/libxlua.a(lj_api.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
你好,因为项目要用pbc,所以重新编译了xlua。
但是在mac 下编译 安卓 会报错 :CMake Error at cmake/android.toolchain.cmake:739 (message):
Specified toolchain "arm-linux-androideabi-clang3.6" is missing in your NDK
or broken. Please verify that your NDK is working or select another
compiler toolchain.
win,ios,macos 都ok了。
安卓版本不能用mac编译 一定要linux吗。。
ndk 是 r10e.
使用都是 lua53 系列
非常感谢~
增加了 CustomLoader 后 require 'protoc' 会报错,暂时的解决方法是在 增加 CustomLoader 之前 先 require 这些模块。想问问车前辈还有别的推荐做法么。
可以集成云风的sproto进来么?我尝试集成,可能是方法不对,没法用,会报错EntryPointNotFoundException: luaopen_sproto_core
Plugin 'libxlua.so' is used from several locations:
Assets/Plugins/x86/libxlua.so would be copied to /libxlua.so
Assets/Plugins/x86_64/libxlua.so would be copied to /libxlua.so
Please fix plugin settings and try again.
UnityEditor.Modules.DefaultPluginImporterExtension:CheckFileCollisions(String)
UnityEditorInternal.PluginsHelper:CheckFileCollisions(BuildTarget) (at C:/buildslave/unity/build/Editor/Mono/Plugins/PluginsHelper.cs:25)
UnityEditor.HostView:OnGUI()
使用更新的插件,在build时报了上边的错误
请问大佬有什么解决方法吗?谢谢
不知道用v2.1.14的xlua配2.1.8的plugins有没有问题
能否更新下build下plugin_lua53里的plugin,由于没有mac 在cmke ios的库文件不是很方便,能否上传一下最新的105版本的plugin
如题,当服务端发送的json字符串中有null字段时,null会被解析成一个lua function...
例如:
{"a":{},"b":null}
这样的一个json数组,取b
的时候会得到一个function,而不是nil,
虽然能尽量通过规范来约束服务端尽量不发null过来,但是还是希望从代码层面就能杜绝这种情况的产生,
请问这里可以修改一下吗?
或者简单讲一下libs的编译过程,我去尝试修改一下代码
能集成一下云风的sproto么?
unity 2020 用的是plugins 目录下libs ,请问如何解决,看到网上有文章说 需要 设置-DLUAC_COMPATIBLE_FORMAT=ON重新编译。不过这个方案没有跑通,这问题有什么简单的解决方法没。
游戏中测试发现,经过pbc反序列化的嵌套类,在decode后如果没有使用里面的数据,将会出现数据为空的情况,lua中断点发现,嵌套类还没有经过反序列化。
测试代码如下
Lua代码,示例代码注释后两行
local protobuf = require 'protobuf'
protobuf.register(CS.UnityEngine.Resources.Load('proto/UserInfo.pb').bytes)
protobuf.register(CS.UnityEngine.Resources.Load('proto/User.pb').bytes)
local userInfo = {}
userInfo.name = 'world'
userInfo.diamond = 998
userInfo.level = 100
local user = { }
user.id = 1
user.status = { 1,0,2,4}
user.pwdMd5 = 'md5'
user.regTime = '2017-03-29 12:00:00'
user.info = userInfo
--序列化
local encode = protobuf.encode('User', user)
-- 反序列化
user_decode = protobuf.decode('User', encode)
--先不获取数据,断点可发现 user_decode.info这个嵌套类未被反序列化
--assert(user.id == user_decode.id and user.info.diamond == user_decode.info.diamond)
--print('hello', user_decode.info.name)
c#代码
public class userInfo
{
public string name;
public int diamond;
public int level;
}
public class user
{
public int id;
public int[] status;
public string pwdMd5;
public string regTime;
public userInfo info;
}
user us = LuaEnv.Global.Get<user>("user_decode");
Debug.Log(us.info.name);//null,嵌套类取不到,其他数据正常
这样的情况怎么处理呢?
make_android_lua53.bat中"-DCMAKE_BUILD_TYPE=Release/Relase?",是拼写错误还是两个没区别?官网的build中是正确拼写,您的库中拼写是错误的
-DPBC=ON
should be
-D PBC=ON
能否将lfs 集成到xlua libs 啊。
build android on win10.
android sdk has already contain cmake and ninja
请问一下make_ios_luajit.sh 在mac上执行需要密码 这个密码是什么密码呢?mac开机密码试过也不行
如题,xlua_get_lib_version()返回的版本号(100)和xlua当前的版本(101)对不上.
建议readme里面加个编译说明...
如果使用的xlua文件,能直接从xlua的仓库里引用最新的,就更好了...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.