Problems with loading .el files on Android
Posted: Sat Jan 07, 2017 11:46 pm
Hi!
Last weekend I found that I can run one of my favorite games on my Android tablet, because this game uses Love2D engine which have many ports on other platforms. I decided to start fun and making my own port basing on solution I found (bitbucket.org/MartinFelis/love-android-sdl2). Everything works fine, I cloned repository, builded code with android ndk, changed icons and strings, made apk package... And then I got error. Game I wanted to port has problem with few files which load at startup. I started to learn basics of the Love and Lua work, but I have not yet solved the problem.
The problem is in the main.lua 'require' functions.
There is the code:
From what I know if in 'require' function parameter is no file extension, script looks for .lua file. But in Engine folder is only .el (Emacs Lisp? eLua?) compiled files. On Windows everything is working fine but on Android it looking for other extensions like .lua, .so, other locations like /usr/local/lib/lua/5.1/Engine... It just does not see .el extensions.
I hope someone has some ideas what could go wrong.
Thank you in advance
Adrian
Last weekend I found that I can run one of my favorite games on my Android tablet, because this game uses Love2D engine which have many ports on other platforms. I decided to start fun and making my own port basing on solution I found (bitbucket.org/MartinFelis/love-android-sdl2). Everything works fine, I cloned repository, builded code with android ndk, changed icons and strings, made apk package... And then I got error. Game I wanted to port has problem with few files which load at startup. I started to learn basics of the Love and Lua work, but I have not yet solved the problem.
The problem is in the main.lua 'require' functions.
There is the code:
Code: Select all
require("Engine/GlobalVariables");
local events = require("Engine/Events")
local gamesetup = require("Engine/GameSetup")
local customE = require("Engine/CustomError")
--etc...
I hope someone has some ideas what could go wrong.
Thank you in advance
Adrian