Comments (12)
I think so too. I can't imagine anyone running scripts this large on phones :) We sure don't. Our scripts are a few hundred lines max. When we started our app, I was very happy to find this package. I'm a fan of lua since ages and being able to customize our app with lua is the best thing since sliced bread. When I'm able to give at least something back, I'm more than happy to do so.
from keralua.
Ah ok, thanks for the clarification :) You see, I have no idea what I did here :)
from keralua.
Looks like re-defining a few things in src/liolib.c fixes this for us. I added
#define l_fseek(f,o,w) fseek(f,o,w)
#define l_ftell(f) ftell(f)
#define l_seeknum long
in line 131, which sets l_fseek to fseek unconditionally. This gives a few warnings about redefined macros in the build. Of course this is an ugly "fix". But it might help to fix this in a proper way. Until then, we can use a patched version of liblua53.so in our app.
from keralua.
You will need to use platform >= 24.
Lua 5.3 added support to large files (>4gb) to in order to use it you will need to bump you Android Platform
https://github.com/NLua/lua/blob/master/android_build/jni/Application.mk#L2
from keralua.
We build our app with targetSdkVersion=27, but must support Android 4.1.x (minSdkVersion=16) still. Most users of our app are using Android 6.x. If I understand all of this correctly, any KeraLua/NLua that uses Lua>=5.3 will only run on Android>=7.0? If so, we will have to use a patched version without large file support.
from keralua.
I've enabled the LUA_USE_POSIX
for Android, if we drop that probably should work if you build from source, you don't need to re-define Lua source code already fallback to the ISO-C definitions if LUA_USE_POSIX
Android NDK is pretty bad, and they have added to latest POSIX libraries only in the past releases. I can try to rollback to a older version, but Android 4.1 is too old 😭
from keralua.
No worries :) I did some changes to Android,mk and Application.mk in our fork (https://github.com/MichaelSB/lua/tree/master) and this seems to do the job without changing the source of lua. Our app is B2B running on pretty expensive devices, so we are forced to support ancient versions of Android forever. I'm closing this, it's solved for us. Many thanks for your feedback, it pushed me in the right direction :)
from keralua.
@MichaelSB do you mind share you solution? I can try to bump to official NLua nuget this way you could consume from NuGet (and this may benefit other Xamarin.Android users).
from keralua.
No, not at all. Everything we changed is in the fork mentioned above and in https://github.com/MichaelSB/KeraLua for the KeraLua-Changes: lua submodule pointing to our lua and I bumped the version number in AssemblyInfo.cs today to make VS2019 shut up about some conflict we got. Feel free to use (and/or change) whatever you want. I'd be very happy, if we could use an official package again some time in the future :)
from keralua.
Thank you, I think worth remove the large file support in order to support a more broad base of Android versions.
from keralua.
The large file support is not for the scripts, is for the io library. if you use io.open
to read a binary file.
from keralua.
Great! Many thanks :)
from keralua.
Related Issues (20)
- Logo Copyright HOT 1
- Can't Build using VS 2019 Native Tools HOT 5
- 当lua代码出现死循环 我该怎么停止运行 这个时候button没有反应
- Fails to load lua53 assembly when building with Mono. HOT 9
- when reference by a classlib and build with any cpu (vs 2019) HOT 9
- State.NewLib State.SetFuncs: Attempted to read or write protected memory HOT 1
- Docs / Examples HOT 2
- How to use KeraLua.Lua.NewUserData correctly HOT 2
- Where is cyrillic support? HOT 6
- LuaSocket Debugger Support
- Build fails in Ubuntu/WSL using latest git HOT 1
- Linux library is not portable across distributions HOT 1
- Is it thread clean , when use as one tread one lua VM
- Can you open only some libraries? HOT 5
- Why data can be written at an offset memory location? HOT 1
- Can The State Be Set?
- Value returned from Lua.FromIntPtr should not be Disposable HOT 6
- DllNotFoundException with Unity
- NLua.Exceptions.LuaScriptException:“[string "chunk"]:3: attempt to index a nil value (global 'bit')” HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keralua.