Thursday, May 5, 2011
So as you may already be aware of, RIM just released their take on how tablets should be, also known as PlayBook. The PlayBook currently runs QNX as it's operating system, with which its apps are currently built in conjunction with the Adobe AIR 2.5 SDK. Just recently at the BlackBerry World Conference, the native SDK was unveiled (it was previously seen with their Quake 3 port).
Personally, I see the Native SDK as the most interesting, as it allows one to use the device to its full potential alongside its realtime operating system (RTOS), so I started to do some digging. I poked around with the simulator for a bit, when @stroughtonsmith suggested I download QNX's desktop environment, otherwise named the Neutrino SDP (software development platform). What's interesting here, is the fact that it's equipped with an arm cross-compiler. What this means, is that one can already create native applications for the PlayBook, which end up being very similar to those produced with the native SDK, as well as being sandboxed.
So after installing QNX from the DVD (can be to a virtual machine, or an actual desktop), boot it up, and login as root (no password is needed). Afterwards, simply write up an application in C/C++, and, when ready to compile, invoke the cross-compiler like so (help info here):
qcc -Vgcc_ntoarmle -o nativeapp nativeapp.c
To actually get this compiled application on the device, however, does require a little extra legwork... With the AIR SDK, we're given the ability to SSH into the device as "devuser", with Developer Mode enabled. First off I copied the compiled binary to the downloads folder (plug in the PlayBook, and access its shared folders). Now, even though this is on the PlayBook, it's unusable, since it doesn't have the proper permissions. Since devuser is sandboxed and limited, it can't set permissions. However, you can get around this by first setting the binary as executable, and then zipping it up:
chmod +x nativeapp zip nativeapp.zip nativeapp
Once you've copied that zip over to the downloads folder, copy it to somewhere on the device and unzip it (I used /tmp). From there you can run the binary!
I do recommend that you guys check this out, give it a go, and at the same time, get a little practice in before the Native SDK's release. Let me know how it goes! QNX is looking to be an awesome system to develop with!