Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 133 lines (97 sloc) 8.639 kb
866c5f7 @qingbiao Source repo clean up
qingbiao authored
1 # About BlackBerry® WebWorks™
2
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.
7
8 The project is open source under the [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) license.
9
10 * Advanced Standards
11 * Powerful Integration
12 * Open
13
14 [Read more](http://blackberry.github.com) about the BlackBerry WebWorks open source project
15
16 ## Downloads
17 Full installers for Windows and Mac OS X can be found on the [product download page](http://developer.blackberry.com/html5/download/sdk)
18
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
21
22 * [API Reference](http://developer.blackberry.com/html5/api)
23 * [Installation and Developer Guides](http://developer.blackberry.com/html5/documentation)
24 * [Community Forums](http://supportforums.blackberry.com/t5/Web-Development/bd-p/browser_dev)
25 * [Project Contributor Forums](http://supportforums.blackberry.com/t5/BlackBerry-WebWorks/bd-p/ww_con)
26 * [Open Source Project Contributor Forums](http://supportforums.blackberry.com/t5/BlackBerry-WebWorks/bd-p/ww_con)
27
28 ## Building the Source Code
29
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](http://java.sun.com/javase/downloads/index.jsp#jdk) or higher installed
32
33 1. The first step is to [Download Maven v3.0](http://maven.apache.org/download.html) 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:
41
42 "%JAVA_HOME%\bin;%M2%"
43
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.
45
46 ### Download and install maven on Mac OSX
47
48 Note: In order to build the source code you must have the Java Development Kit version 1.6 installed.
49
50
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 http://www.macports.org/install.php.
53
54 1. Run the following command:
55
56 sudo port install maven3
57
58 2. Run mvn --version to vertify that it is correctly installed.
59
60 If you do not wish to use MacPorts simply use the following instructions.
61
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.
70
71 ### Download and install gcc compiler on Windows®
72 1. The first step is to download the automated installer for MinGW from
73 [here.](http://sourceforge.net/projects/mingw/files/).
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.
83
84 ### Download and install gcc compiler on Mac OS X
85
86 #### Register for an Apple Developer Connection Account
87 1. Navigate to [http://connect.apple.com](http://connect.apple.com). 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.
92
93 #### Download and Install XCode
94 Once you're registered. Navigate to
95 [http://connect.apple.com](http://connect.apple.com) and download the
96 XCode Tools (Version) disk image file. Double click the file and
97 follow the installations steps to complete the installation.
98
99 ### Build the project
100
101 From command line, change to the root directory of the WebWorks repository and run the following commands:
102
103 mvn clean install -DPRODUCT_VERSION=[version]
104
105 The version is the WebWorks version that you want to build (e.g. 2.3.0.1).
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.
107
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 "WebWorksForSmartphoneWin.zip" for Windows and "WebWorksForSmartphoneMac.zip" for Mac.
110
111
112 ## Patching an Existing WebWorks Installation
113
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", "bbwp.properties", "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, "WebWorksForSmartphoneWin.zip"
125 for windows and "WebWorksForSmartphoneMac.zip" 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\bbwp.properties" file
128 and copy the path located in the java element to the java element in the
129 new "bin\bbwp.properties" file.
130 5. You can now start building WebWorks applications with the patched SDK.
131
132
Something went wrong with that request. Please try again.