Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-03-2009, 05:48 PM   #16
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
LUA + IUP: First beta release...

Quote:
Originally Posted by hansel View Post
I finally (after a long search, lots of downloads, lots of compile attempts) found a gui toolkit for the Iliad
[snip]
I've managed to port it to the Iliad. I'll make a decent package for it later, but I am so happy now that I wanted to let you know! I can feel the karma already ;-) [snip]
Have fun!
Hi All,
Here is a first release to play with (with a working demo). Unpack the tgz on your memory card, an click the icon

The following will happen (hopefully):
  • The first time Lua and the UIP (gui toolkit) package will be installed (in /usr/local, eating about 1.4 MB). If you have installed my earlier Lua package: it will be upgraded neatly!
  • The run.sh script starts the demo script (hello.wlua) with Lua (/usr/local/bin/lua). The screen refresh is handled by a small xepdmgr like program called xx.

I know the led blinks: I'll fix that later...

The sources and the build script for the Lua-Iliad can be found here:https://dev.mobileread.com/svn/luailiad/trunk/
xx (the refresh) can be found here: https://dev.mobileread.com/trac/luailiad/wiki/refresh

Look at the script, play with it, and let me know what you think...

Have fun,
Hansel.
Attached Thumbnails
Click image for larger version

Name:	luauip.png
Views:	490
Size:	32.8 KB
ID:	22598  
Attached Files
File Type: gz lua_iup_test-1.1.tar.gz (486.1 KB, 416 views)

Last edited by hansel; 02-03-2009 at 06:21 PM.
hansel is offline   Reply With Quote
Old 02-04-2009, 05:04 PM   #17
kapoira
Connoisseur
kapoira has a complete set of Star Wars action figures.kapoira has a complete set of Star Wars action figures.kapoira has a complete set of Star Wars action figures.
 
Posts: 81
Karma: 292
Join Date: Nov 2006
Device: i62HD + T68
Hansel many thanks to what are you doing for the iliad ;-)

can you tell me how i can try to port the pyqt because the python is ported and i want to port a project that i have with pyqt to read e-books , many thanks in advance.
kapoira is offline   Reply With Quote
Advert
Old 02-05-2009, 01:04 AM   #18
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Quote:
Originally Posted by kapoira View Post
can you tell me how i can try to port the pyqt because the python is ported and i want to port a project that i have with pyqt to read e-books , many thanks in advance.
There's no quick trick for that... you need knowledge, , experience, lots of time, luck, google, some more time, forums, more time, some more luck again...

The problem is that beforehand you have no way of knowing if you will succeed, so you could waste a lot of time for nothing.A good first step trying to compile everything on a standard Linux box. If that fails: just drop the project! My advice: take notes of everything you do and start by looking at the dependencies (which version of which library do you need?). Try porting the most exotic part first...

Good luck!

Last edited by hansel; 02-05-2009 at 04:17 AM.
hansel is offline   Reply With Quote
Old 02-05-2009, 08:53 AM   #19
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
I can't agree with hansel's words any more. There is no simple instructions for porting jobs. You will encounter different problems during the process, and there is no standard way (or ways) to solve them.
It maybe difficult to port a single application, and it may be tripple harder to port fundamental libs. It's impossible to collect all information and solutions before you do start doing the porting job.
ericshliao is offline   Reply With Quote
Old 02-07-2009, 12:12 PM   #20
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Progress report...

Update: UIP looks great. I'm still struggling with some widgets (images on buttons and texts on radio buttons do not show on the Iliad). Apart from that it's quite easy to make a nice gui. Selecting fonts and font sizes works. Hand written text from the virtual keyboard gets in the text fields)

As you may guest form the picture, I started a small calendar app...

To be continued...

PS: I use UIP from Lua, but it can also be called form C/C++
Attached Thumbnails
Click image for larger version

Name:	IMG_3452.JPG
Views:	480
Size:	110.3 KB
ID:	22809  

Last edited by hansel; 02-07-2009 at 12:17 PM.
hansel is offline   Reply With Quote
Advert
Old 02-10-2009, 12:38 PM   #21
tikitu
Junior Member
tikitu began at the beginning.
 
Posts: 6
Karma: 14
Join Date: Jul 2008
Location: Amsterdam
Device: iLiad
Fantastic! My thesis supervisor will kill me...

Hansel that's fantastic work! I'll be downloading and playing tonight, most certainly...

I've had a vision for ages, of an interface that would be book-oriented (as opposed to file-oriented; actually for me it would be published-paper-oriented, for wrangling hundreds of papers in a research project). It would be backed by a database, and have features like tagging, title/author info, whatever -- and a field for "I've read this" or "This file hasn't even been opened yet".

Prematurely, I'm backing your port for letting someone make this happen. (Maybe even me, if I can learn lua quick enough, and convince my supervisor I'm still writing at the same time...)
tikitu is offline   Reply With Quote
Old 02-11-2009, 08:02 PM   #22
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: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
lua sample code for iLiad & iup problems

Hi,

first, thanks Hansen for porting Lua.

I've previously experimented with my preferred language -python - in the iLiad, but it's too slow to be usable as core. Though not as beauty as it, Lua is quite good, easy and powerful, so I'm learning it nowdays.

I think that Lua could be a good scripting language for the iLiad, even it could substitute some internal C/C++ code because of its easy embedding, simplyfing the writting of new features and keeping speed.

While experimenting with Lua, I 've written the attached sample program. It displays directory contents and parse manifest.xml files to get some extra information. Don't expect high quality, this is the first code I write in.

I have the purpose to build a proof-of-concept file manager to experiment with diferent look&feels.

And this brings me to the second point in this post.
Looking at iup it looks like the perfect GUI for the iLiad, but I'm having some problems to test iup code.

I haven't been able to compile iup on my desktop (Fedora 10 Linux x86_64), and binary packages don't work either... how do you manage? Could you share the env you are using to write and test lua&iup code, please?

Also, I miss some iup libs, such as iupluacontrols, iupx, iuplua_pplot, iuplua_imglib. Extra bonus for cd, im and luasql packages ;-)


Thanks for sharing,
Iņigo
Attached Files
File Type: gz iliad_fs.lua.gz (1.9 KB, 367 views)
Iņigo is offline   Reply With Quote
Old 02-12-2009, 02:30 AM   #23
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
hello Iņigo (and all),
Quote:
Originally Posted by Iņigo View Post
Hi,
first, thanks Hansen for porting Lua.
Thanks for trying it! I think really has potential for the Iliad, mut it needs some developers and experimenters to take off.
I've previously experimented with my preferred language -python - in the iLiad, but it's too slow to be usable as core. Though not as beauty as it, Lua is quite good, easy and powerful, so I'm learning it nowdays.
My prefered language is Ruby. Great but same disadvantages as Python. The more I play with Lua, the more I like it. The only drawback so far is that there are not so many libraries.
Quote:
I haven't been able to compile iup on my desktop (Fedora 10 Linux x86_64), and binary packages don't work either... how do you manage? Could you share the env you are using to write and test lua&iup code, please?
I had no problems to build Lua and Iup on my Ubuntu PC.
For Lua and the basic Uip stuff: I have a script that builds them from scratch (the tgz's of the sources). That's very handy if you build them often.
I keep everything in svn (even the sources I downloaded). You can browse everyting here: https://dev.mobileread.com/trac/luailiad/browser/trunk
The script I use to build on Linux (Ubuntu) is https://dev.mobileread.com/trac/luai...me_from_tgz.sh. If you want to play with it, you can retrieve everything with just one command:
Code:
svn co https://dev.mobileread.com/svn/luailiad/trunk luailiad
Quote:
Also, I miss some iup libs, such as iupluacontrols, iupx, iuplua_pplot, iuplua_imglib. Extra bonus for cd, im and luasql packages ;-)
This has the following reasons: a) I want to keep the basic Lua package small, b)I have still some issues with Iup itself on the Iliad (the text of check buttons and images on buttons do not show), c) I'm still not 100% sure that Iup will be fast enough on the Iliad for complex Gui's (say 100+ widtgets), d) lack of spare time: I have a job, a wife, a church, friends..... and an Iliad

I think it's not very difficult to port the libraries you mention, but it takes some time to build and test them in a reliable and documented way...

Please proceed with your file manager! try to give it a simple gui. We'll see how far we can get with Lua and Uip...

Last edited by hansel; 02-12-2009 at 06:39 AM.
hansel is offline   Reply With Quote
Old 02-12-2009, 09:46 AM   #24
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: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Hello,

Quote:
Originally Posted by hansel
hello Iņigo (and all),
I had no problems to build Lua and Iup on my Ubuntu PC.

For Lua and the basic Uip stuff: I have a script that builds them from scratch (the tgz's of the sources). That's very handy if you build them often.
I keep everything in svn (even the sources I downloaded). You can browse everyting here: https://dev.mobileread.com/trac/luailiad/browser/trunk
The script I use to build on Linux (Ubuntu) is https://dev.mobileread.com/trac/luai...me_from_tgz.sh. If you want to play with it, you can retrieve everything with just one command:
Code:
svn co https://dev.mobileread.com/svn/luailiad/trunk luailiad
The same error happens with binary packages from luaforge/sourceforge and with the diferent compilations I've tried (including your method)... I presume it's a bug in the loading step with 64bits archs. I'll try to debug it when I have free time.


Quote:
Originally Posted by hansel
This has the following reasons: a) I want to keep the basic Lua package small, b)I have still some issues with Iup itself on the Iliad (the text of check buttons and images on buttons do not show), c) I'm still not 100% sure that Iup will be fast enough on the Iliad for complex Gui's (say 100+ widtgets), d) lack of spare time: I have a job, a wife, a church, friends..... and an Iliad

I think it's not very difficult to port the libraries you mention, but it takes some time to build and test them in a reliable and documented way...

Please proceed with your file manager! try to give it a simple gui. We'll see how far we can get with Lua and Uip...
Have you tried using lua-gtk directly... I might be faster than iup.
I'll try to port it as my first step.

Kind regards,
Iņigo
Iņigo is offline   Reply With Quote
Old 02-12-2009, 10:18 AM   #25
Atom_
Enthusiast
Atom_ began at the beginning.
 
Posts: 26
Karma: 11
Join Date: Jan 2009
Location: Spain
Device: iLiad
I love the community around here.... great job!

Quote:
Originally Posted by Iņigo View Post
I've previously experimented with my preferred language -python - in the iLiad, but it's too slow to be usable as core. Though not as beauty as it, Lua is quite good, easy and powerful, so I'm learning it nowdays.
Hi tocayo (namesake?). I was thinking just about the same a couple of days ago. I want to go into iLiad programming/porting (hopefully when I finish my thesis) but python seemed a bit bulky for the task. So I'm also going to check lua out ;-)

Thanks hansel for the port!
Atom_ is offline   Reply With Quote
Old 02-12-2009, 11:13 AM   #26
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Quote:
Originally Posted by Iņigo View Post
Have you tried using lua-gtk directly... I might be faster than iup.I'll try to port it as my first step.
Lua-gtk is hard to build for the Iliad. I've spent several evenings trying. I learned a lot... (see post 12 in this thread and the end of https://www.mobileread.com/forums/showthread.php?t=34051)
If I ever end up using gtk directly from Lua, I'll do my own bindings. This is not difficult (with tolua++) if you do only the functions you need, and don't try to support all features of all versions of all functions...
hansel is offline   Reply With Quote
Old 02-12-2009, 03:32 PM   #27
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: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Bad and good news ;-)

Quote:
Originally Posted by hansel View Post
Lua-gtk is hard to build for the Iliad. I've spent several evenings trying. I learned a lot... (see post 12 in this thread and the end of https://www.mobileread.com/forums/showthread.php?t=34051)
If I ever end up using gtk directly from Lua, I'll do my own bindings. This is not difficult (with tolua++) if you do only the functions you need, and don't try to support all features of all versions of all functions...
First, the bad news: I've looked at compiling Lua-gtk and is a very complex task; it needs libffi, gccxml and other packages not easy to be compiled on iLiad. The huge effort is not worthy...

but ...

what do you think about http://oproj.tuxfamily.org/wiki/doku.php?id=projects
Code looks very simple and at least it has been very easy to compile on my desktop machine. They even have a sqlite port for lua!!!


What do you think, people, to create an irc channel devoted to iliad and iliad development? I've joined #iliad on irc.oftc.net if anyone is interested.

Iņigo
Iņigo is offline   Reply With Quote
Old 02-12-2009, 03:45 PM   #28
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Quote:
Originally Posted by Iņigo View Post
what do you think about http://oproj.tuxfamily.org/wiki/doku.php?id=projects
Code looks very simple and at least it has been very easy to compile on my desktop machine.
Nice stuff! Didn't know about that site.

BUT: They say:
Code:
Dependencies Lua 5.1, lobj 0.9, GTK+ 2.12 and libglade 2.6 (optional).
The Iliad has gtk+2.6. Upgrading gtk is not a trivial task (and gives a whole set of big libraries)... I've spent a few evenings...

You might try it with gtk 2.6 and see if you can get it through the compiler... The sources look simple indeed. Maybe it's easy to patch it for gtk-2.6?

Edit: 12-feb: just tried to build lobj for Iliad: it needs at least glib-2.16, Iliad has 2.6, my ubuntu has 2.18
NOTE: I have a list of Iliad libraries here: http://wiki.hpelbers.org/Libraries_o...ard_2:12_Iliad

Last edited by hansel; 02-12-2009 at 04:56 PM.
hansel is offline   Reply With Quote
Old 02-12-2009, 04:05 PM   #29
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
To upgrade GTK+, developers have to upgrade the underlying libs, including GLIB, PANGO, CAIRO, GDK. And to upgrade those underlying libs, the whole X is to be upgraded. That's what I did to my cross-compile environment. After it's done, porting tasks will be much easier (of course with Antartica's xepdmgr).

I am thinking to replace some of the fundamental libs provided by iRex, but I still lack the energy to do it.

Last edited by ericshliao; 02-12-2009 at 04:09 PM.
ericshliao is offline   Reply With Quote
Old 02-12-2009, 05:11 PM   #30
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: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
I'll try to compile these packages and patch accordingly for gtk+ v2.6. But I don't have much spare time until the weekend.

Anyway, and looking at the hypothetical iliadOS v3.0, we should upgrade all system libraries, so in that situation we will use canonical lgui versions ;-)

It's only a temporary solution.
Iņigo is offline   Reply With Quote
Reply

Tags
gtk+, iliad, lgob, lua, networking, xml

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pandigital announce the black Novel Nate the great News 0 08-18-2010 05:21 PM
iLiad China iLiad users can get developer package. ericshliao iRex Developer's Corner 35 03-20-2010 05:21 AM
iLiad Announce: Glade4Lua, develop graphical apps for the Iliad hansel iRex Developer's Corner 1 10-27-2009 05:00 PM
Sony to announce colour e-book ? markiehill News 11 08-22-2009 12:45 PM
Proud to announce our new moderator! Alexander Turcic Announcements 5 12-08-2003 11:18 PM


All times are GMT -4. The time now is 02:57 PM.


MobileRead.com is a privately owned, operated and funded community.