Saturday, 8 December 2012

Simple Setup SDL on Blackberry OS 10 on a Mac



Yes, I'm started to play with BlackBerry OS 10.
Trust me, when I said BBOS10 is an incredible os, with a lot of potential and the main developer tools are also great: I have only positive words for Webworks and Cascades. If you are a developer you should check the developer.blackberry.com website.

Games, Games, Games!
This is a little guide on how to setup SDL to develop with BBOS10 and a Mac.
This guide is intended for a real bb10 device... but you can simply change some step and make the whole works with the simulator.
Let's go with the steps:
  1. Download BBOS10 Native Development Kit and install it (and the simulator if you don't have a device)
  2. Download the sample/template SDL project that you can find attached, in a answer, on this link http://supportforums.blackberry.com/t5/Native-Development/Problems-getting-SDL-to-work/td-p/1569839 : this  .zip file contains also the 2 library SDL and TouchOverlay (a library for integrate touch on SDL 4 Blackberry). Extract the sample somewhere on your disk.
  3. Go on  www.github.com/blackberry/sdl and git clone the project.
  4. Launch the BlackBerry Native SDK (point 1), than go on File->Import->Existing project into workspace and in the new window select the root directory of the uncompressed sample at point 2. Press Finish.
  5. Now you have to correct some broken link in the project. Right click on the SDLHelloWorld project and press Properties. 
  6. In the new window you have to check and correct the following parameters:
check the includes path.. remove the eventually QNX_Target symbol and put an absolute path

add the "m" library to the list

Correct also the library path

Build and Run the project and you should see something like this:


If you would like an updated compiled version of SDL and TouchOverlay check this post: http://www.joshuagranick.com/blog/2012/07/05/nme-adding-the-blackberry-cpp-native-target-in-48-hours/ (very useful) and expecially this link.
Happy coding!