Page 1 of 1

Problems with loading .el files on Android

Posted: Sat Jan 07, 2017 11:46 pm
by adijagiel
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.

Image

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...
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

Re: Problems with loading .el files on Android

Posted: Sat Jan 07, 2017 11:52 pm
by bartbes
I happen to recognize that game.. and they are encrypted lua files. So I guess their encryption is doing its job. Even if you did get past the encryption, they use a modified love engine, so it won't run on a normal love build anyway.