Get your apps for Kindle, right now!
I've compiled the Qt software platform for the Kindle... and I've written plugins for the e-ink display, the keyboard, and the fiveway.
On this platform, I've created a great little sample app: Sudoku! Free Edition.
- 5 difficulty levels (easy, medium, hard, fiendish, and diabolical)
- 250 pregenerated boards (in the free edition)
- Custom mode to add your own game (from your local newspaper, for instance)
- Optional autofill of scratch marks
- Strategy view mode to easily see potential locations for each number
- Save and load as often as you want (keep that hard one for later)
- Automatically saves where you were when you last played
DISCLAIMER: This software is released AS-IS with ABSOLUTELY NO WARRANTY OF ANY KIND. Use of this software (and the Qt environment) may violate the terms of your Kindle service and/or warranty. Also, the Qt environment may interfere with future Kindle software updates from Amazon. The installation of this software indicates your knowledge and acceptance of these risks.
The Qt environment and Sudoku only add new features not previously present in the Kindle platform-- they do not replace or supercede standard Kindle functionality. They are not derivative works but are instead transformative in nature.ACCEPTABLE USES: The Sudoku! Free Edition game is for personal use only, do not redistribute it. The Qt platform proof-of-concept plugins can be used with your own Kindle apps, personal or commercial.
HOSTING: Please do not re-host the install packages for the Qt plugins except temporarily on the occasion that this site is not accessible. Refer people to this site instead. Do not redistribute the Sudoku game package. The Qt platform package and the uninstall packages can be re-hosted without limitations (to assist in any recovery, if it's ever required).
Read these terms and click to download: I ACCEPT THE TERMS AND CONDITIONS
You must follow these steps:
- Plug in your Kindle to your computer and copy the Qt platform update package (update_install_qt_xxx.bin, for example) to it's top level folder. Eject and disconnect the Kindle.
- Go to the settings page, and choose "Update your Kindle" from the menu. Press OK if a warning dialog pops up.
- Plug in your Kindle again and copy the plugins package to your Kindle (update_install_kindleqtplugins_xxx.bin). Eject and disconnect the Kindle.
- Go to the settings page again and choose "Update your Kindle" from the menu. Press OK on the warning dialog to do the install.
- Once this is done, RESTART YOUR KINDLE. The "restart" after the update isn't good enough. Go back to the settings page, and choose "Restart". This is necessary to get the hotkey manager running normally.
- Now copy the Sudoku install package (update_install_sudoku_xxx.bin, for example) the same way you did the Qt platform package in step 1.
- Run the "Update your Kindle" process from the settings page again.
- You're done! Try the hotkeys:
- S + U to play Sudoku (shuts down the framework, then restarts it when done)
- R + S + T reboots the Kindle
- N + F shuts down the normal Kindle framework
- F + W restarts the normal Kindle framework
- U + D runs a little update display script that may not appear to do anything
- S + C captures the screen and saves it in a folder called screenshots as screenN.jpg
Background
Once I received my Kindle DX, I quickly discovered that it is actually a Linux device with a ~533Mhz ARM processor. (It's actually a little embarrassing I didn't know that beforehand). To me, that just screamed Qt/Embedded. I was really itching to write some plugins ever since I saw the base classes in the Qt docs. It's good practice... I'll probably need to do something similar on a future embedded project.
Compiling Qt for the Kindle
After about a day of work, I figured out how to get Qt compiled. Most of that time was just getting Scratchbox set up properly with the right toolchain. I also had to create a VirtualBox VM with Ubuntu 9.10 x86 (32bit), since I run 64bit on the laptop. (as a bonus, using VMs keeps your main system nice and clean)
Once the cross-compiling environment was set up, it was actually easier to compile Qt for the Kindle than to do the same for VS2005.
Qt Platform Package Overview
After being compiled, the Qt libs were copied it over to the Kindle. They're a little too big for the small system partitions on the Kindle, so they were placed on the /mnt/us partition. That makes it visible when the Kindle is plugged in USB, which isn't ideal. It works, though.
The hotkey manager was added as the main way to run apps using the Qt platform. This will look for any multi-key combinations and run any existing scripts in the hotkey-scripts folder. The script names must have the keys in alphabetic order. It also won't trigger more than one script every 10 seconds.
The screenshot utility is just dumping the framebuffer at /proc/eink_fb/virtual_fb with the standard Linux dd command, and converting that raw data into JPEG with a simple command- line Qt app. Please don't abuse this utility. I find it very useful, and I hope developers who may end up using this Qt platform will use it to demonstrate what they've accomplished.
The fiveway plugin by default acts like a mouse... which so far is a pretty poor way to navigate on the Kindle. By passing in a "keypad" plugin option (Sudoku! uses this), it transitions over to cursor key mode. There's a script called fivewayspeedup which takes one parameter: either on or off. When enabled, it will tweak the auto-repeat settings for the fiveway to act a little more like a mouse. It's still a last resort interface.
Rationale
This is about using my favorite software platform everywhere I can. It's a gorgeous library, and I hope it does well.
Qt Everywhere!
Great project!
I tried to compile KindleSampleQt with my Ubuntu9.10 + maemo SDK (Diablo) immediately.
But following error occurred when execute on Kindle.
symbol lookup error: ./KindleSampleQt: undefined symbol: _ZN7QWidget8x11EventEP7_XEvent
If it's permitted, Please tell me your proper way to set up develop environment.
Posted by: Hitoriblog | 02/05/2010 at 10:27 PM
Try re-installing the Sudoku package, by copying the update_install_sudoku_???.bin to your Kindle, then running "Update your Kindle" from the settings menu. It sounds like it didn't install for some reason.
Posted by: darron | 02/02/2010 at 08:50 PM
Pushing the NF and the FW does it's things, but that's it. None of the other shortcuts work.
I've restarted a couple of times. No dice...
Posted by: Jack Lesshafft | 02/02/2010 at 08:17 PM
Excellent work! Going to try out on my DX tonight :)
Posted by: Hunter Davis | 02/01/2010 at 04:48 PM
Darron, excellent job! Easily installed and now playing the game. I had thought the Kindle was app-unfriendly, bu this opens up lots of possibilities...
Posted by: Capitolglow | 01/30/2010 at 06:59 PM
update: needed a restart, now it works fine thanks
Posted by: Adrian De los Santos | 01/30/2010 at 05:04 PM
Installed QT and sodoku.. restarted on each update, now.. how do i access sodoku ? tried pushing s and u but nothing happens ..
?
Posted by: Adrian De los Santos | 01/30/2010 at 04:40 PM