Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-03-2013, 06:21 PM   #1
koenieee
Enthusiast
koenieee doesn't litterkoenieee doesn't litterkoenieee doesn't litter
 
Posts: 49
Karma: 208
Join Date: Nov 2012
Device: Kobo Glo
Cool [Tutorial] - QT Apps without nickel

Sorry for my bad english

We can run QT standalone apps without using nickel.
I created this tutorial for other people to learn and make something nice for our Kobo's.

First I want to thank the following people:

- sergeyvl12
- tonyv
maybe others, tell me if you belong to this list.

First, make sure you have a fully working Kobo Development enviroment (besure to compile QT 4.8.0, not 4.6
This tutorial requires also telnet/ssh!
Look at the attachments for all the files!

Step 1
Unzip the QT_drivers.zip package to /usr/local/Trolltech/QtEmbedded-4.8.0-arm/plugins/

Step 2
Create a little example QT application
(run qmake in the dir, then make)
or use my one.

Step 2a
Because my fonts weren't working (rounded squares, no text), I used the fonts sergeyvl12 provided, look at the attachments file.

Step 3
make somewhere on your Kobo a new Sh script and edit it to your needs:
Code:
#!/bin/sh
#Optional: export QT_PLUGIN_PATH=/mnt/onboard/checkers/qt_plugins
export LD_LIBRARY_PATH=/usr/local/Trolltech/QtEmbedded-4.8.0-arm/lib
export QWS_MOUSE_PROTO=KindleTS
export QWS_DISPLAY=Transformed:kindlefb:Rot90
#unzip fonts to /mnt/onboard
export QT_QWS_FONTDIR=/mnt/onboard/fonts
killall nickel
#run your app
/mnt/onboard/Kobo_QT_Example -qws
Step 4
Run the sh script you just saved

To exit the program tap CTRL+C, to go back to nickel you need to restart the device or run the SH script from here: http://pastebin.com/gEuQpaU5

If all went well you see something like this:


Messagebox:


Ofcourse not in color


Let me know if you got problems or tips, I hope I didn't forget something.
Attached Files
File Type: zip QT_drivers.zip (37.9 KB, 681 views)
File Type: zip Kobo_QT_Example.zip (12.1 KB, 635 views)
File Type: zip fonts.zip (4.20 MB, 609 views)

Last edited by koenieee; 01-03-2013 at 06:27 PM.
koenieee is offline   Reply With Quote
Old 01-03-2013, 09:03 PM   #2
sysKin
Connoisseur
sysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the end
 
sysKin's Avatar
 
Posts: 56
Karma: 31830
Join Date: Oct 2012
Location: Australia
Device: Aura HD, after a train ate my Glo
This is great!

Is there any hope to make a program that can be run from nickel (ie. started from the plugin), suspends nickel somehow, runs until it's closed, and then the device goes back to nickel?

It would be much more practical because it would run like one of the "extras" apps.

sysKin is offline   Reply With Quote
Advert
Old 01-04-2013, 04:34 AM   #3
koenieee
Enthusiast
koenieee doesn't litterkoenieee doesn't litterkoenieee doesn't litter
 
Posts: 49
Karma: 208
Join Date: Nov 2012
Device: Kobo Glo
Well, using the the plugin interface from 'ah-', you can start the shell script, and in QT you make a button to another shell script to start nickel again.
Shell script to start nickel again: http://pastebin.com/gEuQpaU5
Code:
void App::on_pushButton_2_clicked()
{
    QMessageBox msgBox;
    msgBox.setText("Wait for nickel");
    msgBox.exec();
    QProcess *proc = new QProcess();
    proc->start("/home/admin/nickel_start.sh", QStringList());
     QApplication::quit();
}
The only thing is, the wifi doesn't work when you restart nickel, only after a reboot everything is back to normal.
koenieee is offline   Reply With Quote
Old 01-04-2013, 08:48 AM   #4
sergeyvl12
ebook fan
sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.
 
Posts: 735
Karma: 2528718
Join Date: Dec 2010
Device: PocketBook 301+, Kindle 3 Wi-Fi, Onyx Boox A62, Kindle Touch
Thanks!

Here I've created a topic that describes Kobo Launcher. It it more convenient way to run Qt applications because it acts as qws server. KoboLauncher also can be customized to run your own applications (it creates dynamic menu).

I've also shared KoboLauncher and Qt plugins sources.
sergeyvl12 is offline   Reply With Quote
Reply

Tags
awesome, kobo, standalone


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
nickel replacement sven Kobo Developer's Corner 25 01-15-2013 05:43 PM
Eink stanalone demo Qt eink driver for standalone qt apps ie no nickel nickel tonyv Kobo Developer's Corner 2 12-27-2012 09:35 AM
Correct pro file for Nickel koenieee Kobo Developer's Corner 3 12-20-2012 02:16 PM
Glo Problem with Kobo Nickel font RobertJSawyer Kobo Reader 1 10-14-2012 07:38 PM
Touch Someone’s started a Nickel replacement... Spheres Kobo Developer's Corner 9 08-04-2012 12:13 AM


All times are GMT -4. The time now is 03:55 PM.


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