I am one of the lead developers for NME, a cross-platform, open-source framework.
The BlackBerry target is the newest platform we support. It took me less than two days to add.
We use a library called Simple DirectMedia Layer (SDL), which makes it much simpler to support multiple platforms. We use SDL for our desktop targets, as well as webOS and BlackBerry.
The first thing I needed to do was download and install the BlackBerry Native SDK.
Since I decided to use SDL in order to support BlackBerry, I used our webOS target as the basis for adding the platform. Since the Native SDK includes GCC, it did not take very much to modify our webOS toolchain settings in order to support BlackBerry.
We use a build tool that accepts XML-based settings for each compiler toolchain. Even though this is probably different than what you may use to compile C/C++ code, it should be simple to understand.
Once our code was compiling, I was able to check out the BlackBerry SDL project and compile it using the Momentics IDE that is included with the Native SDK. If you would prefer, you can also download the binaries I have already compiled for NME.
In addition to the ordinary “-lSDL” flag, we are also linking “-lbps -lscreen -lEGL -lGLESv1_CM -lm” to satisfy some of the system dependencies for the BlackBerry SDL port.
I was very surprised how much worked out of the box. webOS implements the accelerometer as an SDL joystick. Instead, BlackBerry has a system API to poll the accelerometer. I was able to easily implement the call.
Literally, the only other thing we needed was to adjust some directory paths. For the webOS target, we used Times, Arial and Courier as default fonts. Instead of being located under “/usr/share/fonts”, these were found on the PlayBook under “/usr/fonts/font_repository/monotype”. We are able to access the files inside our application package using “app/native”, the application storage directory at “data”, and the user documents directory at “shared/documents”
The package format and tools for bundling and installing applications is different than other platforms, but not very complex. NME includes command-line tools to build and install for each platform. The BlackBerry specific code is located here, and our template bar-descriptor.xml file is found here.
You can also find more information about packaging on the BlackBerry Developer site.
If you have any questions, I would be glad to help.