Skip to content


Subversion checkout URL

You can clone with
Download ZIP
100644 133 lines (97 sloc) 8.639 kb
866c5f7 @qingbiao Source repo clean up
qingbiao authored
1 # About BlackBerry® WebWorks™
3 The BlackBerry® WebWorks™ for the BlackBerry Smartphone OS allows web and mobile web developers to use the SDK in combination with their development
4 tooling of choice to develop, test and package up their web applications as BlackBerry WebWorks applications for smartphones.
5 BlackBerry WebWorks applications can be distributed through the BlackBerry App World™ storefront and they run on the BlackBerry® Smartphones
6 with access to the hardware.
8 The project is open source under the [Apache 2.0]( license.
10 * Advanced Standards
11 * Powerful Integration
12 * Open
14 [Read more]( about the BlackBerry WebWorks open source project
16 ## Downloads
17 Full installers for Windows and Mac OS X can be found on the [product download page](
19 ## Reference Material & Community
20 You can also find associated reference material for the BlackBerry WebWorks platform as well as community forums for building and contributing to the BlackBerry WebWorks project
22 * [API Reference](
23 * [Installation and Developer Guides](
24 * [Community Forums](
25 * [Project Contributor Forums](
26 * [Open Source Project Contributor Forums](
28 ## Building the Source Code
30 ### Download and install Maven on Windows®
31 Note: In order to build the source code you must have the [Java SE Development Kit v1.6]( or higher installed
33 1. The first step is to [Download Maven v3.0]( and create an installation directory.
34 2. On the Maven download page, select the _(Binary zip)_ format of the latest Maven v3.0 from the mirror of your choice.
35 3. When the download is finished, take the file and unzip it to the "C:\Program Files\Apache Software Foundation" directory. If the directory does not exist create it.
36 4. The second step is to add environment variables. From the start menu right click on "My Computer" and click on properties. If you are on Windows XP click the advanced tab then click on environment variables. If you arer using Windows 7 click on advanced systems settings then click on environment variables.
37 5. To add the first environment variable, look under system variables, click on the new button and enter "M2_HOME" (without the quotes) for the variable name and enter the path to your maven installation directory for the variable value e.g. C:\Program Files\Apache Software Foundation\apache-maven-(your version number). Click ok when you're done.
38 6. Add a second environment variable with "M2" for the name and "%M2_HOME%\bin" (without the quotes) as the value.
39 7. If JAVA_HOME is not listed as one of the variables under System Variables then add a new environment variable with "JAVA_HOME" as the name and the path to you JDK installation directory (not the bin folder) as the value.
40 8. Click on the Path variable and click edit. Then add the following string to the end of value for path:
42 "%JAVA_HOME%\bin;%M2%"
44 9. Open up a command prompt and type "mvn --version". _NOTE: If you already had a command prompt open, close it and open a new one so that your changes are reflected._ You should see some information about your maven installation. If you get a prompt stating that the command was not found then you probably made a mistake in one of the previous steps.
46 ### Download and install maven on Mac OSX
48 Note: In order to build the source code you must have the Java Development Kit version 1.6 installed.
51 #### Using MacPorts
52 It is recommended to install Maven on OSX using MacPorts. If you do not currently have MacPorts you can install it from
54 1. Run the following command:
56 sudo port install maven3
58 2. Run mvn --version to vertify that it is correctly installed.
60 If you do not wish to use MacPorts simply use the following instructions.
62 #### Without using MacPorts
63 1. Extract the distribution archive, i.e. apache-maven-3.0.3-bin.tar.gz to the directory you wish to install Maven 3.0.3. These instructions assume you chose /usr/local/apache-maven. The subdirectory apache-maven-3.0.3 will be created from the archive.
64 2. In a command terminal, add the M2_HOME environment variable, e.g. export M2_HOME=/usr/local/apache-maven/apache-maven-3.0.3.
65 3. Add the M2 environment variable, e.g. export M2=$M2_HOME/bin.
66 4. Optional: Add the MAVEN_OPTS environment variable to specify JVM properties, e.g. export MAVEN_OPTS="-Xms256m -Xmx512m". This environment variable can be used to supply extra options to Maven.
67 5. Add M2 environment variable to your path, e.g. export PATH=$M2:$PATH.
68 6. Make sure that JAVA_HOME is set to the location of your JDK, e.g. export JAVA_HOME=/usr/java/jdk1.5.0_02 and that $JAVA_HOME/bin is in your PATH environment variable.
69 7. Run mvn --version to verify that it is correctly installed.
71 ### Download and install gcc compiler on Windows®
72 1. The first step is to download the automated installer for MinGW from
73 [here.](
74 2. After the installer has been downloaded run the installer. Follow the
75 installation instructions in the installer and make sure you note the
76 installation directory for MingGW which is C:\MinGW by default.
77 3. When you have installed MinGW on your machine navigate to the
78 environment variable settings as stated above when installing Maven on Windows.
79 4. Find the Path environment variable and click the "Edit" button.
80 5. Append ";(Path to MinGW)\bin" to the value of the environment varible e.g.
81 if MinGW is installed at C:\MinGW then you should append ";C:\MinGW\bin" to the
82 Path environment variable.
84 ### Download and install gcc compiler on Mac OS X
86 #### Register for an Apple Developer Connection Account
87 1. Navigate to []( You will
88 be taken to a page with a prompt for your Apple ID. Click the "Join Now" link.
89 2. On the next page scroll down to the bottom of the page and click on the
90 "Learn More" link. On the following page click on the "Get Started" link and
91 follow the instructions for the Apple Developer Registration process.
93 #### Download and Install XCode
94 Once you're registered. Navigate to
95 []( and download the
96 XCode Tools (Version) disk image file. Double click the file and
97 follow the installations steps to complete the installation.
99 ### Build the project
101 From command line, change to the root directory of the WebWorks repository and run the following commands:
103 mvn clean install -DPRODUCT_VERSION=[version]
105 The version is the WebWorks version that you want to build (e.g.
106 The first time the build is run it will take up to 5 minutes to complete and will require an internet connection. Subsequent builds take around 2 minutes.
108 If the build is successful two zip files will be generated in a "target" directory located in the root of the WebWorks repository.
109 The Two zip files are "" for Windows and "" for Mac.
112 ## Patching an Existing WebWorks Installation
114 1. Locate your existing WebWorks SDK installation. The default path is
115 "C:\Program Files\Research In Motion\BlackBerry WebWorks SDK (Version)"
116 for Windows and
117 "/Developer/SDKs/Research In Motion/BlackBerry WebWorks SDK (Version)"
118 for Mac.
119 2. In your WebWorks installation directory backup and delete the following files/folders:
120 - "bbwp" executable file in root folder
121 - "bbwp.jar", "", "tld.txt" in bin folder
122 - "device_templates" and "ext" folder
123 3. The output of the build is stored in the target folder in the root
124 directory. It contains two zip files, ""
125 for windows and "" for Mac. Unzip the zip
126 file for your platform into your installation directory.
127 4. If you are using Windows, open up the backup "bin\" file
128 and copy the path located in the java element to the java element in the
129 new "bin\" file.
130 5. You can now start building WebWorks applications with the patched SDK.
Something went wrong with that request. Please try again.