04-04-2010, 06:17 PM | #1 |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Lua 5.1 MegaPackage for DR
EDIT 20101214: new release: v3
IMPORTANT: version 3 and up needs the core base package v4 in https://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 https://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] https://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) ... 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:
Last edited by Iņigo; 12-14-2010 at 07:50 PM. Reason: New release: v3 |
04-04-2010, 06:33 PM | #2 |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Examples
EDIT 20100428: added examples. Copy "tests" directory inside attached file into SD/Programs folder
Keep reading? ok, ok, let's go for some fun now... Don't run it if you are not in beta tester mood and don't blame me if your device breaks. It works perfectly for me but... Copy "test" directory in above package in SD card /Programs folder on your DR800. Browse and try some of the examples. * MultiCalc Great Hansel's calculator, initially released for Iliad. Works great on DR800. https://www.mobileread.com/forums/showthread.php?t=42946 * MiniPad Great Hansel's notepad-like application, initially released for Iliad. It's not so useful for the DR800 without modifications... maybe without the hardcoded keyboard... https://www.mobileread.com/forums/showthread.php?t=60585 * Toolbox Yours' tiny apps. Originally released for Iliad. Works superbly. Try the file browser and enjoy the speed. Some features don't work as they were written for Iliad. https://www.mobileread.com/forums/showthread.php?t=60885 There is also a screenshot of Xiliad, a sample lua-based web server. https://www.mobileread.com/forums/showthread.php?t=36799 I will continue improving the Toolbox, specially FileExplorer in future weeks. Hope you enjoy this as much as me ;-) Iņigo Last edited by Iņigo; 04-28-2010 at 11:44 AM. Reason: Added examples |
Advert | |
|
04-04-2010, 06:36 PM | #3 |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
*nothing here*
Last edited by Iņigo; 04-04-2010 at 06:39 PM. |
04-05-2010, 12:58 AM | #4 |
本の虫
Posts: 242
Karma: 344
Join Date: May 2008
Location: USA
Device: Kindle3, DXG, Fire ˇ iPad, iPod
|
Iņigo, thank you very much. I remember you mentioning in another post that you were thinking of doing this. I'm grateful that you went through with it. Time for me to put Android aside for a while and have some fun with Lua.
(As I write this the link to the package is removed. I'm guessing you found a reason to make a change to it. I'll check back for the download at another time.) |
04-05-2010, 03:59 AM | #5 | |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
|
|
Advert | |
|
04-05-2010, 09:41 AM | #6 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
This also works on the DR1000 (tested with R2.0 Beta)!
Thanks very much, I am looking forward to your updates. |
04-05-2010, 04:05 PM | #7 | |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
Perhaps, once DR1000 and DR800 new versions are released, we'll have to stop a bit and think together the way we port applications in order to work in both devices and not duplicate efforts. If firmware is common for both devices we could have same infraestructure (common libs, apps, etc). I'm thinking on this structure: Code:
SD Card /Programs _config _base _bin _etc _lib _share ... _FBReader _osmo _xournal ... <desktop files here> _base would be the equivalent of /usr. And each program will be contained in its own directory. This way, LD_LIBRARY_PATH and such variables could be common for all programs and the launchers could be practically the same. In fact I've already assembled common-runtime-libs for the DR800 with some of the libs the apps I ported apps use (fribidi, linebreak, art_lpgl, gnomecanvas, poppler, goocanvas, vte...). But I'll wait after the new release in order to include only needed and newer libraries. I'm also thinking about my needs as a developer/porter. We could ask iRex for them. F.e. support "Icon" in .desktop files. What do you think? Is it worth to create a new thread to discuss this common infraestructure among all DR* developers/porters? Iņigo |
|
04-06-2010, 02:20 AM | #8 | |||||
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Quote:
Quote:
Quote:
Quote:
Quote:
Starting with a thread to discuss the common infrastructure would be a good starting point. Marcel. |
|||||
04-27-2010, 07:37 PM | #9 |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
New release: v1
v1 - 2010/04/27 23:20:27
. requires libs from core _base package v1 . webkit and poppler bindings work now, but not sure about vte Download from first message. |
04-28-2010, 06:50 AM | #10 |
Tatütatuter
Posts: 390
Karma: 3148
Join Date: Oct 2008
Location: Germany, Baden, Karlsruhe
Device: Aura H2O, Glo HD, Paperwhite, PRS-950
|
Toolbox and MiniPad will not start... Their desktop-files are different from MultiCalc. Maybe thats the problem.
MultiCalc works fine (Osmo too) |
04-28-2010, 11:48 AM | #11 | |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
Anyway, I'ved added a test package with some examples (MultiPad, MiniCalc and Toolbox to the 2nd message). Uncompress into SD/Programs, navigate to tests folder and enjoy. i.e. the structure must be: Code:
SD/ Programs/ _base/ _config/ _lua/ tests/ |
|
04-28-2010, 03:48 PM | #12 |
Tatütatuter
Posts: 390
Karma: 3148
Join Date: Oct 2008
Location: Germany, Baden, Karlsruhe
Device: Aura H2O, Glo HD, Paperwhite, PRS-950
|
I have this structure. Toolbox and MiniPad do not start. I've changed the desktop-files and the lua-files for testing purposes - Until now I was not able to get them starting. Sorry.
|
04-28-2010, 04:54 PM | #13 | |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
I see on your profile you have a DR1000, which firmware version are you using? This package shouldn't work on v1.x for DR1000. |
|
04-29-2010, 02:04 AM | #14 |
Tatütatuter
Posts: 390
Karma: 3148
Join Date: Oct 2008
Location: Germany, Baden, Karlsruhe
Device: Aura H2O, Glo HD, Paperwhite, PRS-950
|
It's the Beta2 for the DR1000.
|
04-29-2010, 05:46 AM | #15 |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Could you try to run from the command line?
Either: a) install usbnet from https://www.mobileread.com/forums/showthread.php?t=81699 and connect via ssh from your PC or b) using a terminal in the DR https://www.mobileread.com/forums/showthread.php?t=81119 and then run: Code:
# cd /media/mmcblk0p1/Programs/tests # /media/mmcblk0p1/Programs/_lua/bin/lua _code/MultiCalc.lua # /media/mmcblk0p1/Programs/tests/_code/minipad.sh If Minipad doesn't run showing an error like: Code:
/media/mmcblk0p1/Programs/tests/_code/minipad.sh: cd: line 3: can't cd to _code/MiniPad /media/mmcblk0p1/Programs/_lua/bin/lua: cannot open MiniPad.lua: No such file or directory from "cd _code/MiniPad" to "cd /media/mmcblk0p1/Programs/tests/_code/MiniPad", without the ". Same for Toolbox. |
Tags |
development, dr800, framework, lua |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DR800 ANN: DR800+. Port of some DR1000 features to the DR800 | Iņigo | iRex | 274 | 04-05-2013 02:24 PM |
DR800 | parryl | iRex | 1 | 08-06-2010 03:00 PM |
DR800 ANN: RunDebug and Icon lua scripts | Iņigo | iRex | 4 | 07-21-2010 07:35 AM |
iLiad Lua: scripting for Iliad | hansel | iRex Developer's Corner | 3 | 12-14-2008 06:51 PM |