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 12-18-2008, 03:51 AM   #1
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: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Djview4 v4.4 for iLiad (for developers only)

This is only a partially (now fully) working porting. I could enter its GUI, but failed to do anything more. So I put it here, not in "iLiad Software Releases" category. It's just another proof that QT app can be ported to iLiad.

I have put all QT libs and djvulibre lib in the package. Other libs, such as libtiff and libX11 may be obtained from Midori package that I realeased several days ago.

Download from this link.

Added:
xepdmgr contributed by Antartica is required.
Attached Thumbnails
Click image for larger version

Name:	2009-02-14_090510.png
Views:	469
Size:	17.4 KB
ID:	23487   Click image for larger version

Name:	2009-02-14_090711.png
Views:	560
Size:	62.8 KB
ID:	23488   Click image for larger version

Name:	2009-02-14_090749.png
Views:	472
Size:	71.1 KB
ID:	23489  

Last edited by ericshliao; 02-13-2009 at 11:14 PM.
ericshliao is offline   Reply With Quote
Old 12-18-2008, 06:01 AM   #2
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: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Because File Open menu is not working, to open a djvu file, just edit "run.sh" and insert "djvu.file.name" after ./bin/djvu4. You will see the content of djvu file.

Added:
OMG! This port can enter fullscreen mode and hide toolbar and pagebar. But I don't know how to go back to window mode. If I can fix the non-stop blinking LED and link page-turn to iLiad page-flip bar, there will be a working release.

Last edited by ericshliao; 12-18-2008 at 06:14 AM.
ericshliao is offline   Reply With Quote
Old 12-18-2008, 08:04 AM   #3
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
Hi ericshliao,

The intersting functions are in liberipc
Code:
// busy indicator
erIpcStartClient(ER_BUSYD_CHANNEL, &erbusyChannel);
busySetBusy(erbusyChannel, ccBusyState_Blink);
busySetBusy(erbusyChannel, ccBusyState_On);
busySetBusy(erbusyChannel, ccBusyState_Off);


// pagebar
erIpcStartClient(ER_PAGEBAR_CHANNEL, &erpagebarChannel);
... (more functions, because redrawing is involved
Clear examples can be found in the ipdf code, in src/channels.[cpp .h]
http://iliad.hpelbers.org/irexdox/ip...CChannels.html
hansel is offline   Reply With Quote
Old 12-18-2008, 08:11 AM   #4
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: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Thanx. I know that. In fact, I have incoporated the code in my own imanga viewer. Because I am not familiar with C++ and I don't know QT programming, the hard part is to find proper places in djview4 to declare erIPC variable and insert these function.

Last edited by ericshliao; 12-18-2008 at 08:14 AM.
ericshliao is offline   Reply With Quote
Old 12-19-2008, 01:57 AM   #5
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: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
I am thinking one question:
How does a QT app register its IPC channel to contentlister? For GTK apps, I can use gtk_window_set_wmclass("sh","sh) to make it have channel 14 that is given to shell. Is it possible to do it in generic QT way? Or should I insert "#include "gtk/gtk.h" and make it a QT & GTK hybrid app?
ericshliao is offline   Reply With Quote
Old 12-22-2008, 09:35 AM   #6
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: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Well, the package that I released seems a fully working one. It just need some finetune. Almost all problems are solved or circumvented. I have fully integrated djview4 into iLiad now.
Here is some info for those who want to use this package to view djvu file.

1.Because open file menu and open button on toolbar are not working, file can only be opened from shell script. To make it happen, in "run.sh", adding filename of djvu file after ./bin/djview4 wil make the file open when you start djview4.
If you want to select djvu file to be opened from contentlister, try the following:
Edit /mnt/settings/registry/registry.xml, add the following two sections into proper place in "registry.xml".
Code:
    <application type="DJVU">
      <appCategory>viewer</appCategory>
      <argMask>_FILENAME_</argMask>
      <execute>/media/card/programs/djview4/run.sh</execute>
      <supportFormat>
        <extName>djvu</extName>
      </supportFormat>
      <xResourceName>sh</xResourceName>
      <ipcChannel>14</ipcChannel>
      <appIconPath/>
    </application>
Code:
    <extensionInfo>
      <associateApp>DJVU</associateApp>
      <extName>djvu</extName>
      <extIcon>/usr/share/contentlister/Icon_djvu.png</extIcon>
    </extensionInfo>
In "run.sh", add "$1" (with quote mark) after ./bin/djview4

Copy a icon file named "Icon_djvu.png" to /usr/share/contenlister

2. There seems some delay when you execute djview4 from contentlister, push page-flip bar or up (or down) arrow key will make it execute imeediately (I guess so because I saw led started to blink).

3. After djview4 GUI is shown, the led just don't stop blinking. Tap on the page-bar icon will stop it.

4. djview4 will create a config file in "~/.config/DjVuLibre which is named "DjView.conf". You can edit it to fit your need. Here is a example that I modified to fit my own needs. Download the attachment and unpack it in ~ to replace original "~/.config/DjVuLibre/DjView.conf". Edit a line starts with "tools=" to make the toolbar fit your needs.

5. After djvu file is open, you can enter fullscreen mode (via Menu->View->Fullscreen). With proper config, fullscreen mode only hides pagebar and toolbar of iLiad. Menu bar and toolbar of djview4 are still shown for users to navigate between pages, zoom, rotate, search, and quit.
Attached Files
File Type: zip DjView.zip (849 Bytes, 426 views)

Last edited by ericshliao; 12-22-2008 at 12:02 PM.
ericshliao is offline   Reply With Quote
Old 12-27-2008, 08:37 AM   #7
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: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Just found a line in "qdjview.cpp":
Code:
  setWindowTitle(tr("DjView"));
This line might have the same purpose with "gtk_window_set_title()". So, if you want to try, replace the line
Code:
      <xResourceName>sh</xResourceName>
word in registry.xml with
Code:
      <xResourceName>DjView</xResourceName>
See if it can make DjView communicate with contentlister.

Last edited by ericshliao; 12-27-2008 at 08:48 AM.
ericshliao is offline   Reply With Quote
Old 02-08-2009, 03:46 PM   #8
Viacheslav
Connoisseur
Viacheslav doesn't litterViacheslav doesn't litter
 
Posts: 59
Karma: 136
Join Date: Dec 2008
Device: iRex DR1000
Where is the source or patches for this build? I need a DJVU viewer for DR1000 and these binaries will not work on it.
Viacheslav is offline   Reply With Quote
Old 08-30-2009, 08:15 AM   #9
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: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
This is Djview4.5 for iLiad with QT4.5.2, djvulibre3.5.22 and xepdmgr. I have added LED control code and make it responsive to pageflip button. Thanx Max and Hensel.
Some modifications are also made to add "fullscreen mode" and "exit program" to toolbar.


To install:
1. Unpack the attached package to /media/card/programs (MMC/SD), and then a dir "djview4" will emerge. Installing to other directory shoudl also be working, but I am not sure.
2. Modify "registry.xml" as I described in the 6th post. If you don't care about LED flashing and pageflip button, and you don't want to open djvu files from contentlister, this step can be skipped.

To use:
1. You can open a djvu file either from contentlister (must modify registry.xml) or from menubar of djview4.
2. I have configured the toolbar to contain the most needed functions. The left-most button on toolbar is fullscreen mode, the right-most button is exit. You can try the other buttons on toolbar. I believe the toolbar already provided most needed function even if iLiad buttons are not avaialbe.
3. In djview4 default, toolbar is not available in fullscreen-mode, I made some modification in its configuration to make toolbar available in fullscreen-mode. I believe it's best for iLiad. If you have other ideas, please tell me.
4. In case of failing to execute, cd to dir "djview4" and execute ./run.sh in mrxvt to get error message.

Known problem:
1. You may find some ghost effect in window-mode, and some flickering in fullscreen-mode. The problem is noticed but I am not sure if I can fix it. (Added: I know how to solve the flickering problem now.)
2. Except page-flip button, other buttons on iLiad are not defined in djview4 for the time being. I'll map the key-binding in future release.
Code:
overview (the top-left button on iLiad): exit program
short page-down: flip to next page
short page-up: flip to previous page
short up-arrow: scrolling up (in continuous mode)
return (big dot): show or hide toolbar
down-arrow: scrolling down (in continuous mode)

long page-down: disabled because of iLiad's defect
long page-up: toggle continuous mode
long up-arrow: zoom-in
long return: toggle fullscreen and window mode
long down-arrow: zoom-out
3. Sometimes, page-flip button will cause the LED go wild. To fix it, just click on the pagebar icon on the lower bottom (available only in window-mode) or the center of the screen. Page-flip button should be working again. The problem is caused by long page-flip not defined in Djview4, and it will be fixed in future release.
4. Djview4 will not go to last open page when you open a previously open ebook. I am not sure if it can be fixed with minimal modification.
Attached Files
File Type: zip djview4.zip (11.83 MB, 1053 views)

Last edited by ericshliao; 09-12-2009 at 04:14 PM.
ericshliao is offline   Reply With Quote
Old 01-07-2010, 02:53 PM   #10
viritrilbia
Junior Member
viritrilbia began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2010
Device: iLiad
Trying to install this I get "libtiff.so.3: cannot open shared object file: No such file or directory". The first post says that libtiff is in the Midori package, but the download link in the Midori thread appears to be broken. Where can I get the necessary libraries?
viritrilbia is offline   Reply With Quote
Old 01-07-2010, 07:57 PM   #11
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: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Here:http://www.mobileread.com/forums/sho...04&postcount=4
ericshliao is offline   Reply With Quote
Old 02-06-2010, 02:49 AM   #12
BrentBaccala
Junior Member
BrentBaccala began at the beginning.
 
BrentBaccala's Avatar
 
Posts: 3
Karma: 10
Join Date: Feb 2010
Device: Irex Iliad; Sony Reader PRS-600
Patches to djview source code?

ericshliao, could you post the patches to the source code, please?

I've gotten the program working, but it's painfully slow to start up, so I'd like to take a look at optimizing it.

Thanks.
BrentBaccala is offline   Reply With Quote
Old 02-06-2010, 04:44 AM   #13
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: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
This is the patched source code. It's the last snapshot of my work, but I don't quite remember what I did to the source code.

If you are suffering from the slow starting problem, to some extent it can be solved by modifying /mnt/settings/registry/registy.xml.

BTW, running QTGui on iLiad is time consuming and memory consuming. If you are serious about viewing djvu format on iLiad, you might want to try the Lua way. See it here:http://www.mobileread.com/forums/showthread.php?t=61857
Attached Files
File Type: gz djview4-4.5.mod3.tar.gz (964.9 KB, 191 views)

Last edited by ericshliao; 02-06-2010 at 04:58 AM.
ericshliao is offline   Reply With Quote
Old 02-08-2010, 12:39 AM   #14
BrentBaccala
Junior Member
BrentBaccala began at the beginning.
 
BrentBaccala's Avatar
 
Posts: 3
Karma: 10
Join Date: Feb 2010
Device: Irex Iliad; Sony Reader PRS-600
Thanks. I'll take a look at both.
BrentBaccala 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
Developers for the Entourage eDGe?? lucasfinley enTourage eDGe 5 02-15-2010 08:18 PM
BeBook looking for developers! Slite BeBook 4 10-09-2008 01:36 PM
iLiad irex developers program ?! thetechnobear iRex Developer's Corner 4 04-13-2008 11:32 AM
iRex looking for talented developers Adam B. iRex 0 08-03-2007 07:37 AM
iLiad Two simple questions for the mighty iLiad developers narve iRex Developer's Corner 14 04-11-2007 12:08 PM


All times are GMT -4. The time now is 04:37 PM.


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