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 are LGPL licensed and can therefore be used with your own Kindle apps, personal or commercial. (as long as you follow the terms of that license)
Read these terms and click to download: I ACCEPT THE TERMS AND CONDITIONS
UPDATE:I've made the LGPL-licensed source code available, as well as a build folder for building the packages themselves (based on others' great packager work). There is also a new set of packages available on the download page linked to above that may work with the newer firmware versions. (Let me know if they work, and if there's no trouble I'll remove the older packages)
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
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.
This is about using my favorite software platform everywhere I can. It's a gorgeous library, and I hope it does well.