BB10, WebWorks, and Linux - Setting your system up for BlackBerry Development

I intend this blog post to be the first of two, three, or even four posts detailing my personal BlackBerry 10 WebWorks development in Linux; I hope these posts will help other people decide to create BlackBerry 10 WebWorks in Linux, or at least learn a little something interesting. This first post will only go over getting the BB10 WebWorks packaging/signing SDK set up in Linux. A later blog post will go over tools used for actual WebWorks app development.

*** After you build a bbUI WebWorks App in Linux, submit it in the OSBBx bbUI.js Contest! ***

A few weeks back, I got a BBM from Joe (ice2921) from BlackBerryOS  asking me if I knew why he might be getting a signing error for a BlackBerry app he was trying to build on Linux. I told him I wasn't sure, because although I've fiddled around with Linux for a few  years now, RIM has not offered much support for Linux; the only SDK available for Linux was for C++ (native), and I haven't had an opportunity to try to learn native programming yet.

I explained all that to Joe, and he told me it was a WebWorks app that he was trying to get sign. He let me know that he and another BlackBerryOS member, Mike (badtoyz) was trying to port the BlackBerry 10 WebWorks SDK to Linux, and had nearly successfully done so (by now you probably have read about it on Nerdberry, BlackBerryOS, or another BlackBerry blog). I  was impressed, and although I was unable to help Joe I asked him to keep me up to date on the project. Well, a few days later, the Linux WebWorks SDK was released to Github.

Yesterday I finally had some time to download and set up the SDK, and it was  a fairly simple process, once I got it completed. Just to make things easy for everyone else, I'll outline the steps here.

Prerequisites: Install Linux (I assume that if you've gotten this far, you've probably already done this). I'm personally using Ubuntu, although I believe that the Linux WebWorks SDK will work on any Linux system.

You will also need to install Java on your system. If you're using Ubuntu, or an Ubuntu based derivative (like Linux Mint, ElementaryOS, and thousands of other distros), OpenJDK is in your repos and the software center (Fedora, OpenSuse, etc. likely has OpenJDK readily available as well, but I mostly only have experience with debian based distros).

Step 1:  Set up your signing keys. If you don't have signing keys, you'll need to install the Native Linux SDK, which you can get from BlackBerry's Developer Site. If you have set up signing keys in Linux or on a Mac, you can use your existing signing keys. The files that need to be backed up are yourkeyname.p12barsigner.csk and barsigner.db.  By default, the yourkeyname.p12 file will be named author.p12 and be located in the same directory as barsigner.csk and barsigner.db, and depending on your PC system will be located in:

  • Windows® XP:  %HOMEPATH%\Local Settings\Application Data\Research In Motion
  • Windows Vista® and Windows 7®:  %HOMEPATH%\AppData\Local\Research In Motion
  • Mac OS:  ~/Library/Research In Motion
All you do is copy those three files (I store them in my Dropbox) into ~/.rim on your Linux system (for the non-Linux savvy, that means /home/user name/.rim). More information on doing this can be found in the BlackBerry Support Forums.

Step 2: Download the BB10 WebWorks SDK from Mike's Github page and extract the files onto your computer system. I recommend putting them somewhere easy to access. I personally have them in ~/BlackBerry/badtoyz-BB10-WebWorks-SDK.

Step 3: Place your WebWorks files (.htm/.html, .css, and .js) files into a .zip  file, and place the .zip into the same folder as the SDK.

Step 4: Launch the terminal and cd to your SDK folder.

Step 5: Package and sign your app just like you would with the command line under any other PC OS! That is, run

./bbwp -g KeyStorePassword -buildID number -o output location

I packaged an enyo.js Flickr app last night, and the command I ran was

./bbwp -g mypassword -v -buildID 7 -o compiled

The -v in what I ran is optional and gives you more information about any errors that occur; you can get more compilation parameters like that from RIM's Developer Site.

And that's it! Your app is compiled, and ready to be sideloaded to your Developer Alpha (or run in a simulator) for testing!

Mike said he might try to port the PlayBooks SDK, but I suspect that might be a it more difficult because WebWorks in TabletOS depends on Adobe Air, whereas in BB10 it used c++.

If you use the Linux WebWorks SDK, be sure to tweet @badtoyz letting him know you liked it, and post on his Github Page if you run into any bugs!

Stay tuned for BB10, WebWorks, and Linux blog post #2 - Creating a WebWorks App in Linux!

Shane Cridlebaugh

Co-founder and legal nay-sayer of OSBB. Owner of SCrApps Application Development, WebWorks aficionado, Open Source contributor. SCrid2000 on most blogs. I build awesome BlackBerry apps when I'm not doing legal work or spending time with my wife and two boys.

Follow me on Twitter - @GShaneC

Check out my apps in BlackBerry World


Leave your comments

Post comment as a guest

  • No comments found
Subscribe to the official OSBB BBM Channel!



Back to top