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 03-14-2007, 01:27 PM   #1
Adam B.
Addicted to Porting
Adam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the rough
 
Adam B.'s Avatar
 
Posts: 1,695
Karma: 7194
Join Date: Oct 2006
Location: Indianapolis, IN
Device: iRex iLiad, Nokia 770, Samsung i760
FBReader

Update 3/16/07

My port of FBReader is working well and is ready for users. Right now, the most difficult part is installation. I'll have to rely on someone else to put together an installation script.

With this method, I'm able to open up files supported by FBReader (chm,rtf,fb2,pdb,tcr,prc) directly from the content lister. The pagebar works, and the screen refreshes as it should.

Known Problems:
1) The first time you use the page bar, it may not respond. Simply press it again and it will work.
2) You will need to use the close soft-button in the upper right to exit. If you press one of the News, Books, Docs, Notes, hardware buttons, FBReader will be hidden in the background and continue running. You will need to close it through a shell, or restart for it to be closed.

Typical Disclaimers Apply. Do not install this unless you know what you are doing. Working in the root filesystem is very dangerous!! Is is possible (though unlikely) to brick your iLiad. I take no responsibility if you do so. Install at your own risk.

http://projects.mobileread.com/iliad...r/fbreader.zip

To install:
1) Put the fbreader folder on the root of your CompactFlash Card.
2) Copy the .fbreader folder to your /home/root/ directory. This contains the settings to make files readable on the iLiad. You can change all of these in the options dialog.
3) You will need to edit the /mnt/settings/er_registry.txt file in order to launch programs from the content lister. The is the most dangerous part of the installation. If this file is formatted incorrectly, you iLiad will be rendered useless.

Change
Code:
[USER_APPLICATIONS]
uaIDList=BROWSER;IPDF;APABIMOBI;IMAGEVIEWER;SETUP;PROFILES;EBA;SHELL
to
Code:
[USER_APPLICATIONS]
uaIDList=BROWSER;IPDF;APABIMOBI;IMAGEVIEWER;SETUP;PROFILES;EBA;SHELL;FBREADER
Below

Code:
[EBA]
category=viewer
arguments=<FILENAME>
exec=/usr/bin/eba
xResourceName=eba
channel=14
extensions=eba;EBA
Add

Code:
[FBREADER]
category=viewer
arguments=<FILENAME>
exec=/mnt/cf/fbreader/FBReader
xResourceName=fbreader
channel=14
extensions=chm;CHM;rtf;RTF;fb2;FB2;pdb;PDB;tcr;TCR;prc;PRC
Below

Code:
XEB=/usr/share/contentlister/Icon_books.png
Add

Code:
chm=/usr/share/contentlister/Icon_books.png
CHM=/usr/share/contentlister/Icon_books.png
rtf=/usr/share/contentlister/Icon_books.png
RTF=/usr/share/contentlister/Icon_books.png
fb2=/usr/share/contentlister/Icon_books.png
FB2=/usr/share/contentlister/Icon_books.png
pdb=/usr/share/contentlister/Icon_books.png
PDB=/usr/share/contentlister/Icon_books.png
tcr=/usr/share/contentlister/Icon_books.png
TCR=/usr/share/contentlister/Icon_books.png
prc=/usr/share/contentlister/Icon_newspapers.png
PRC=/usr/share/contentlister/Icon_newspapers.png
I've included a copy of my er_registry.txt in the zip file for comparison.

Hope you all like it. Below is a screenshot of it reading an RTF downloaded from ManyBooks.net
Attached Thumbnails
Click image for larger version

Name:	fbreader4.png
Views:	619
Size:	221.5 KB
ID:	2945  
Adam B. is offline   Reply With Quote
Old 03-14-2007, 01:35 PM   #2
vranghel
Addict
vranghel began at the beginning.
 
vranghel's Avatar
 
Posts: 285
Karma: 10
Join Date: Apr 2006
Location: Vancouver, Canada
Device: Proud Iliad owner
Looks promising, but there is still lots to be done to it.

Good luck, and keep up the good work
vranghel is offline   Reply With Quote
Old 03-14-2007, 02:00 PM   #3
Adam B.
Addicted to Porting
Adam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the rough
 
Adam B.'s Avatar
 
Posts: 1,695
Karma: 7194
Join Date: Oct 2006
Location: Indianapolis, IN
Device: iRex iLiad, Nokia 770, Samsung i760
Yeah, definitely a lot of work to do. Hence why I'm not releasing it yet.

At this point, I'm probably going to need to spend some time in FBReader's newsgroups and site to learn the ins and outs of the program.
Adam B. is offline   Reply With Quote
Old 03-14-2007, 02:04 PM   #4
chamcham
Junior Member
chamcham began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Apr 2004
can you tell me how you ported FBReader to iLiad?
Maybe I can try porting some other apps to iLiad and have people test them.

Thanks.
chamcham is offline   Reply With Quote
Old 03-14-2007, 02:16 PM   #5
Adam B.
Addicted to Porting
Adam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the rough
 
Adam B.'s Avatar
 
Posts: 1,695
Karma: 7194
Join Date: Oct 2006
Location: Indianapolis, IN
Device: iRex iLiad, Nokia 770, Samsung i760
This article explains how to setup the tool chain: http://wiki.mobileread.com/wiki/Ilia...cial_toolchain

Other than that, it's just a matter of finding and downloading the needed dependencies. Some programs are easier to port than others.
Adam B. is offline   Reply With Quote
Old 03-14-2007, 08:07 PM   #6
Adam B.
Addicted to Porting
Adam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the rough
 
Adam B.'s Avatar
 
Posts: 1,695
Karma: 7194
Join Date: Oct 2006
Location: Indianapolis, IN
Device: iRex iLiad, Nokia 770, Samsung i760
Even more progress (see attached).

Now comes the part where I may need some help.

1) Pagebar and buttons do nothing. They also cause the activity light to flash until the program is closed.
2) No option to close the program. I guess FBReader relies on the window manager to do it, but since we don't have a close button I don't know how to add this.
3) FBReader doesn't have the option that I can see to run from a dynamic location. The way I was able to get the icons and settings working, was because I made a symbolic link from /usr/local to /mnt/usb/fbreader. While this works for me, it's not practical for the average user.
4) I messed up my toolchain while testing. I'm using scratchbox. If anyone (*cough*Antartica*cough* ) has an up to date (2.9.1) toolchain, it would be great.

I may talk to FBReader developers to see if they can help. I'm sure they'd love to get a complete port to the iLiad.
Attached Thumbnails
Click image for larger version

Name:	fbreader.png
Views:	494
Size:	156.9 KB
ID:	2936   Click image for larger version

Name:	fbreader1.png
Views:	516
Size:	247.7 KB
ID:	2937   Click image for larger version

Name:	fbreader2.png
Views:	487
Size:	53.0 KB
ID:	2938   Click image for larger version

Name:	fbreader3.png
Views:	694
Size:	107.4 KB
ID:	2939  
Adam B. is offline   Reply With Quote
Old 03-15-2007, 05:45 AM   #7
Antartica
Evangelist
Antartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-books
 
Posts: 415
Karma: 754
Join Date: Jun 2006
Location: Madrid, Spain
Device: iliad, onhandpc, newton, zaurus
Quote:
Originally Posted by Adam B.
Even more progress (see attached).
Excellent work, Adam!

Quote:
Originally Posted by Adam B.
Now comes the part where I may need some help.

1) Pagebar and buttons do nothing. They also cause the activity light to flash until the program is closed.
Hardware buttons only works if the application in registered to th X server as "sh". In gtk1.x this is done with

gtk_window_set_wmclass(GTK_WINDOW(my_main_window), "sh", "sh");

In Gtk2 there should be some equivalent method. Searching a bit in Goocle, it seems that the wmclass is an attribute of the window in Gtk2 (no especial method, just ask for the attribute of wmclass), but I have not found any code example.


As for the flashing, there is a bug in muy patch to libX11.so that doesn't turn off the led. It should, as it tourns it off the first time, but then the same code stop working. Maybe it's that I cannot reuse some variables from one call to the next... but as I don't have a lot of documentation about the usage of liberbusyd, it's by trial-and-error :-(.

Quote:
Originally Posted by Adam B.
2) No option to close the program. I guess FBReader relies on the window manager to do it, but since we don't have a close button I don't know how to add this.
You could try with "q" in the virtual keyboard. If fbreader behaves as the majority of UNIX apps, it should exit :-).

Quote:
Originally Posted by Adam B.
3) FBReader doesn't have the option that I can see to run from a dynamic location. The way I was able to get the icons and settings working, was because I made a symbolic link from /usr/local to /mnt/usb/fbreader. While this works for me, it's not practical for the average user.
In the configure, pass it something like "--datadir=./" and try if that works. If not, pass another string and replace it in the final executable with sed (yes, it's a hack, but it works. You should only replace strings with other strings of the same length, or you will corrupt the executable).

Quote:
Originally Posted by Adam B.
4) I messed up my toolchain while testing. I'm using scratchbox. If anyone (*cough*Antartica*cough* ) has an up to date (2.9.1) toolchain, it would be great.
Its a work in progress. I will post a new toolchain sometime, but I'm just starting with it :-).

Quote:
Originally Posted by Adam B.
I may talk to FBReader developers to see if they can help. I'm sure they'd love to get a complete port to the iLiad.
I agree :-).
Antartica is offline   Reply With Quote
Old 03-15-2007, 11:38 AM   #8
nekokami
fruminous edugeek
nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.
 
nekokami's Avatar
 
Posts: 6,745
Karma: 551260
Join Date: Oct 2006
Location: Northeast US
Device: iPad, eBw 1150
This is brilliant. In one port you'll be meeting the needs of just about every format request I've seen for the iLiad. (I can't imagine why iRex didn't include this in the first place.)

Are you able to get the Vision Objects HWR to input to fields, or is the virtual keyboard the only option? Maybe that could be a later enhancement -- if I understand what iRex has said about the Vision Objects functions correctly, it should be possible to use that feature anywhere, but it may not be simple or automatic.
nekokami is offline   Reply With Quote
Old 03-15-2007, 01:20 PM   #9
Adam B.
Addicted to Porting
Adam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the rough
 
Adam B.'s Avatar
 
Posts: 1,695
Karma: 7194
Join Date: Oct 2006
Location: Indianapolis, IN
Device: iRex iLiad, Nokia 770, Samsung i760
The close button was a simple enough addtiion. It doesn't have an icon, but that's alright because the default "icon missing" icon is an X. Closing gracefully solved the problem of settings not being saved. All of the functions seem to be working as well. I'll have to research the GTK wmclass issue. And yes, handwriting recognition does work for fields.

Right now my biggest problem is getting libraries/versions straight. Sometimes the screen doesn't want to update by itself after selecting something. I'll have to tap again in a blank area to get it to update.

Overall though, I don't see why this shouldn't eventually be very useful on the iLiad.
Attached Thumbnails
Click image for larger version

Name:	fbreader4.png
Views:	463
Size:	221.5 KB
ID:	2944  
Adam B. is offline   Reply With Quote
Old 03-15-2007, 01:28 PM   #10
Antartica
Evangelist
Antartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-books
 
Posts: 415
Karma: 754
Join Date: Jun 2006
Location: Madrid, Spain
Device: iliad, onhandpc, newton, zaurus
Quote:
Originally Posted by Adam B.
The close button was a simple enough addtiion. It doesn't have an icon, but that's alright because the default "icon missing" icon is an X. Closing gracefully solved the problem of settings not being saved. All of the functions seem to be working as well. I'll have to research the GTK wmclass issue. And yes, handwriting recognition does work for fields.
The close icon is a very clean solution possible :-). Perfect.

Quote:
Originally Posted by Adam B.
Right now my biggest problem is getting libraries/versions straight. Sometimes the screen doesn't want to update by itself after selecting something. I'll have to tap again in a blank area to get it to update.
After executing fbreader, you should have a file named "iliad_refresh.conf". It contains the timeout for updating the screen after having detected some message passing betwen the program and the X server (that file is created by my patched version of libX11.so). Edit it to have a larger value (it's in milliseconds), and test if the problem disappears.

However, the larger that timeout is, there is more lag between doing some action in the UI and seeing the feedback in the screen.

Quote:
Originally Posted by Adam B.
Overall though, I don't see why this shouldn't eventually be very useful on the iLiad.
Joking, eh? It will be the dream of a lot of MRs come true ;-).

Good work.
Antartica is offline   Reply With Quote
Old 03-15-2007, 02:04 PM   #11
Adam B.
Addicted to Porting
Adam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the rough
 
Adam B.'s Avatar
 
Posts: 1,695
Karma: 7194
Join Date: Oct 2006
Location: Indianapolis, IN
Device: iRex iLiad, Nokia 770, Samsung i760
Quote:
Originally Posted by Antartica
Joking, eh? It will be the dream of a lot of MRs come true ;-).
I agree, but I won't be happy until I can select a file (chm, rtf, etc) from the contentlister, and have it open up directly into FBReader. Maybe some iRex devs can implement those enhancements to the contentlister in the next version.

Also, page turning is leaving behind a lot of ghosting since the screen isn't blanked when I move to the next page. I don't know if this will be solved by getting the hardware buttons working...

Last edited by Adam B.; 03-15-2007 at 06:42 PM.
Adam B. is offline   Reply With Quote
Old 03-15-2007, 02:32 PM   #12
nekokami
fruminous edugeek
nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.
 
nekokami's Avatar
 
Posts: 6,745
Karma: 551260
Join Date: Oct 2006
Location: Northeast US
Device: iPad, eBw 1150
I think iRex is opting not to release the source of the content lister, IIRC, so someone may have to write a replacement. (Personally, I think that could only be an improvement.)
nekokami is offline   Reply With Quote
Old 03-15-2007, 03:35 PM   #13
Adam B.
Addicted to Porting
Adam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the rough
 
Adam B.'s Avatar
 
Posts: 1,695
Karma: 7194
Join Date: Oct 2006
Location: Indianapolis, IN
Device: iRex iLiad, Nokia 770, Samsung i760
I was able to get the pagebar working with the gtk_window_set_wmclass statement.

I've finally got it working to a point where it's ready for an (early) alpha release. It works, but there's still work to do.

Known Issues:
1) Symbolic link needs to be created at /usr/local. I thought I was able to change this with the make file, but I still have more testing to do.
2) Screen doesn't always update. When this happens, you will need to tap a blank area of the screen (I just tap the lower left most corner) to get it to update. This happens when the program initally loads, and some other places. iliad_refresh.comf had no effect on this.
3) Activity light continues to flash after pressing hardware button. I'll have to wait for Antartica to patch his libX11.so before this is fixed.

Typical Disclaimers Apply. Do not install this unless you know what you are doing. Working in the root filesystem is very dangerous!! Is is possible (though unlikely) to brick your iLiad. I take no responsibility if you do so. Install at your own risk.

http://adamrb.googlepages.com/fbreader.zip

To install:
1) Put the fbreader folder somewhere. It's 15MB, so a memory card would probably be best.
2) Make a symbolic link from /usr/local pointing to the directory where you put fbreader. EX: If you put the fbreader folder on your SD/MMC card, enter "ln -s /mnt/card/fbreader /usr/local"
3) Copy the .fbreader folder to your /home/root/ directory. This contains the settings to make files readable on the iLiad. You can change all of these in the options dialog.

Last edited by Adam B.; 03-15-2007 at 03:44 PM.
Adam B. is offline   Reply With Quote
Old 03-15-2007, 04:07 PM   #14
CommanderROR
eink fanatic
CommanderROR is fluent in JavaScript as well as Klingon.CommanderROR is fluent in JavaScript as well as Klingon.CommanderROR is fluent in JavaScript as well as Klingon.CommanderROR is fluent in JavaScript as well as Klingon.CommanderROR is fluent in JavaScript as well as Klingon.CommanderROR is fluent in JavaScript as well as Klingon.CommanderROR is fluent in JavaScript as well as Klingon.CommanderROR is fluent in JavaScript as well as Klingon.CommanderROR is fluent in JavaScript as well as Klingon.CommanderROR is fluent in JavaScript as well as Klingon.CommanderROR is fluent in JavaScript as well as Klingon.
 
CommanderROR's Avatar
 
Posts: 2,022
Karma: 4924
Join Date: Mar 2006
Location: Germany
Device: STAReBOOK, iRex Iliad, Sony 505, Kindle 2
GREAT work Adam B.

I'm looking forward to seeing this nearing final status. At the moment it's not for the likes of me yet, but once it's working (at least beta-status) and yokos (or somebody) makes an installer I'll be sure to try it.
The only problem now is that I'm not using my ILiad anymore, and with a great reading software becoming available it would be cool to go back, but it is just so much more convenient to use the STAReBOOK, and more than a new reading software would be required to bring me back to the Iliad...unfortunately. My girlfriend uses the Iliad from time to time, bu I guess she won't realkly see the benefit of having fbreader on it...
CommanderROR is offline   Reply With Quote
Old 03-16-2007, 05:53 AM   #15
Antartica
Evangelist
Antartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-books
 
Posts: 415
Karma: 754
Join Date: Jun 2006
Location: Madrid, Spain
Device: iliad, onhandpc, newton, zaurus
Quote:
Originally Posted by Adam B.
I agree, but I won't be happy until I can select a file (chm, rtf, etc) from the contentlister, and have it open up directly into FBReader. Maybe some iRex devs can implement those enhancements to the contentlister in the next version.
Yep. The could look up some file or directory in /mnt/free for handlers for other formats...

It can be done as simple as:

/mnt/free/handlers/chm/exec

And exec that script when that file type is detected.

Quote:
Originally Posted by Adam B.
Also, page turning is leaving behind a lot of ghosting since the screen isn't blanked when I move to the next page. I don't know if this will be solved by getting the hardware buttons working...
Again, edit the iliad_refresh.conf. Change the first word to "Full" and you should be set. Look at the iliad_refresh.conf of the dillo port ;-).
Antartica is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Classic FBReader? JDługosz Barnes & Noble NOOK 2 07-13-2010 10:28 PM
Get FBReader 0.10.7 on OS 5.0 rogue_ronin Alternative Devices 11 09-27-2009 05:53 AM
fbreader on v3? ckphk HanLin eBook 7 03-31-2009 03:04 AM
where fbreader is placed? artur iRex 11 07-23-2008 01:38 PM
Why use FBReader? DeathtoToasters iRex 4 01-21-2008 12:34 PM


All times are GMT -4. The time now is 03:47 AM.


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