View Single Post
Old 04-04-2010, 06:17 PM   #1
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 711
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, in love with iRex DR800S. Also a K4NT. Now a Kobo Aura
Lightbulb Lua 5.1 MegaPackage for DR

EDIT 20101214: new release: v3

IMPORTANT: version 3 and up needs the core base package v4 in http://www.mobileread.com/forums/sho...d.php?p=887725

Lua 5.1 MegaPackage for DR

This is a megapackage including Lua interpreter bundled with a lot of useful modules and bindings compiled for the iRex DR devices, and some useful and interesting scripts.
All in all, it's a complete development framework to build applications for the iRex DR800 and DR1000, in 4 MB!!!

Note you need the core base package, version 4, which you can find at http://www.mobileread.com/forums/sho...d.php?p=887725

I've tried to emulate Hansel's incredible Lua port for Iliad [1] [2], but I've added some new packages. Consult section below to learn about all the modules included.

Not all of the included packages have been tested so please try and report any broken module. By now I'm aware of next non working packages: alien, and vte.

I've included the documentation, examples and tests of all the packages in the "docs" directory. You should not copy them to the DR device.

[1] https://dev.mobileread.com/trac/luailiad/wiki
[2] http://www.mobileread.com/forums/showthread.php?t=36483


Steps to install:
1. enable SD card folders browsing (advance settings or look for the dr.ini file hack in mobileread forum)
2. connect device to your computer using the USB cable
3. create a folder "/Programs" in SD card root if it does not exist yet
4. you need libs core package installed into SD card/Programs/_base
5. copy "_lua" and "Tools" directory there

Now, you should have something like:
Code:
    SD card
	/Programs
            _base            (directory)
            _lua               (directory)
            Tools             (directory)
                RunDebug.desktop  (file)
                Icons.desktop     (file)
            ...
Don't copy "docs" folder or any other files to your DR, they are not necessary.


Scripts included:
There are some scripts included with this package in _lua/scripts directory.
You could use them as examples, but they also have their interest and purpose.

* run_debug.lua
This application lets run some other programs and get the output. It is specially useful to execute command line based scripts or to check why some applications don't start correctly.
It understands some special types of files like lua, python or shell scripts. Even it can run the proper command if you select a .desktop file!
It can be started from its own .desktop file, no command line needed.

* icons.lua
A script which generates images for some types of files, updating device global database so you can see these images when browsing.
It currently supports next file types:
. Programs: parses .desktop files looking for an Icon entry
. FB2 files: extracts cover image if the ebook has one

* gui-icons.lua
A GUI frontend for icons.lua


Modules included:
[Detailed information in the README file]

Base: lua, LuaFileSystem, LuaPosix, luaexpat, stdlib, penlight, alien, lpack, LuaBitOp, rings, lrandom, lmd5, lbase64, date, gzio, lpeg, lualogging, luaprofiler, lpc, luadaemon

Network: LuaSocket, luacurl, luajson, cgilua, xavante, copas, coxpcal, wsapi, orbit

GUI: lgob (gobject, glib, gdk, atk, gtk, pango, cairo, gtksourceview, gtkspell, poppler, goocanvas, vte, webkit), lplot

Extra: nixio, ldbi, luadbus, ldbus, lhpdf


And now what?
Ok, ok... read next message...


Enjoy,
Iņigo Serna

Changes:
Spoiler:
Code:
v3 - 2010/12/14 23:39:13
. new modules:
  - gzio v0.9
  - luaplot v0.2.0
  - ldbus
  - lbase64
  - lmd5
  - lrandom
  - date v2.0.1
  - lpeg v0.10
  - lualogging v1.1.4
  - luaprofiler v2.0.2
  - lpc v1.0.0
  - luadaemon v1.0.0
. updated modules:
  - posix 5.1.7
  - stdlib v16
  - lgob v10.11
  - ldbi.sqlite v0.3
  - hpdf v1.0
. improved icons.lua script, now supports fb2 files
. added gui-icons.lua script

v2 - 2010/05/19 14:54:12
. added run_debug.lua and icons.lua scripts
. fixed ldbi.sqlite

v1 - 2010/04/27 23:20:27
. needs libs from core _base package v1
. webkit and poppler bindings work now, but not sure about vte

v0 - 2010/04/05 00:10:13
. initial test release
Attached Files
File Type: gz lua51-dr-v3.tar.gz (2.68 MB, 139 views)

Last edited by Iņigo; 12-14-2010 at 07:50 PM. Reason: New release: v3
Iņigo is offline   Reply With Quote