Open GoogleCodeExporter opened 8 years ago
Just adding custom Chord facade would fit right ?
http://code.google.com/p/android-python27/wiki/TutorialHowToCreateCustomRpcFacad
e
Original comment by anthony....@gmail.com
on 3 Jun 2013 at 3:54
Thanks for your reply! I think I can easily create the RPC Facade as described
in the wiki.
I then want to invoke on the facade using the Lua scripting language. That
should work, right?
Original comment by john.j.j...@gmail.com
on 3 Jun 2013 at 5:41
[deleted comment]
Yes should work. You need to embed the Lua interpreter instead of the Python
one.
Lua is there: http://android-scripting.googlecode.com/files/lua_r2.zip
You would need to replace python27.zip by lua_r2.zip, extract it, set
interpreter path and env var for lua.
In GlobalConfig.java:
change to: public static final String PYTHON_ZIP_NAME = "lua_r2.zip";
remove: public static final String PYTHON_EXTRAS_ZIP_NAME =
"python_extras_27.zip";
In ScriptActivity.java change the interpreter path (chmod):
this.getFilesDir().getAbsolutePath() + "/lua/bin/lua"
And remove to part which extract python extras.
And in ScriptService.java (and BackgroundScriptService.java ) change
interpreter path + env var:
File pythonBinary = new File(this.getFilesDir().getAbsolutePath() +
"/lua/bin/lua");
And for var smth like:
environmentVariables.put("LUA_CPATH", this.getFilesDir().getAbsolutePath() +
"/lua/lib/lua/5.1/?.so" + ":" + this.getFilesDir().getAbsolutePath() +
"/lua/lib/lua/5.1/loadall.so" + ":" + this.getFilesDir().getAbsolutePath()
+"/lua/lib/lua/5.1/?/init.sl" + ":" + this.getFilesDir().getAbsolutePath() +
"/lua/lib/lua/5.1/?/?.so");
environmentVariables.put("LUA_PATH", this.getFilesDir().getAbsolutePath() +
"/lua/share/lua/5.1/?/?.lua" + ":" + this.getFilesDir().getAbsolutePath() +
"/lua/share/lua/5.1/?.lua" + ":" + this.getFilesDir().getAbsolutePath() +
"/lua/share/lua/5.1/?/init.lua" + ":" + this.getFilesDir().getAbsolutePath() +
"/lua/lib/lua/5.1/?.lua" + ":" + this.getFilesDir().getAbsolutePath() +
"/lua/lib/lua/5.1/?/init.lua");
That should be all.
Original comment by anthony....@gmail.com
on 3 Jun 2013 at 7:00
Original issue reported on code.google.com by
john.j.j...@gmail.com
on 3 Jun 2013 at 3:35