Permalink
Browse files

initial commit

  • Loading branch information...
1 parent f22da05 commit 30f815d78e942e8c2ef03059098282d22197315b Chad Tetreault committed Jan 11, 2013
View
Oops, something went wrong.
View
@@ -0,0 +1,60 @@
+# BlackBerry 10 Boostrap
+
+This sample demonstrates how to build a BlackBerry WebWorks app with PhoneGap - Powered by Apache Cordova.
+
+The sample code for this application is Open Source under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0.html).
+
+
+**Applies To**
+
+* [Apache Cordova](http://cordova.apache.org/)
+* [Adobe PhoneGap](http://www.phonegap.com)
+* [BlackBerry 10 WebWorks SDK](https://developer.blackberry.com/html5/download/sdk)
+
+**Author(s)**
+
+* [Chad Tetreault](http://www.twitter.com/chadtatro)
+
+**Dependencies**
+
+1. [Adobe PhoneGap v2.3](http://www.phonegap.com) is [licensed](http://www.apache.org/licenses/LICENSE-2.0) under the Apache License, Version 2.0.
+2. [jquery-1.7.2.js](http://code.jquery.com/jquery-1.7.2.js) is [dual licensed](http://jquery.org/license/) under the MIT or GPL Version 2 licenses.
+
+**Icons**<br/>
+Icons used here are from [http://subway.pixle.pl/rim](http://subway.pixle.pl/rim) are [licensed](http://creativecommons.org/licenses/by/3.0/) under the CC-BY-3.0 license. This is a subset of the Subway icons available at http://subway.pixle.pl/
+
+**To contribute code to this repository you must be [signed up as an official contributor](http://blackberry.github.com/howToContribute.html).**
+
+## Screenshots
+
+![Screenshot](https://github.com/ctetreault/Cordova-Samples/raw/master/BB10-Bootstrap/screenshot.png)
+
+## Getting Started
+
+To use this sample, refer to the [Getting Started With BlackBerry guide](http://docs.phonegap.com/en/2.3.0/guide_getting-started_blackberry_index.md.html#Getting%20Started%20with%20BlackBerry) which will take you through the entire setup, and building process.
+
+## Porting Resources
+
+If you're porting an existing PhoneGap application over to BlackBerry 10 refer to [Porting your existing PhoneGap app to BlackBerry 10](http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Porting-your-existing-PhoneGap-application-to-BlackBerry-10/ta-p/2070503) for lots of helpful information.
+
+## More Info
+
+* [BlackBerry HTML5 WebWorks](https://bdsc.webapps.blackberry.com/html5/) - Downloads, Getting Started guides, samples, code signing keys.
+* [BlackBerry WebWorks Development Guides](https://bdsc.webapps.blackberry.com/html5/documentation)
+* [BlackBerry WebWorks Community Forums](http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/bd-p/browser_dev)
+* [BlackBerry Open Source WebWorks Contributions Forums](http://supportforums.blackberry.com/t5/BlackBerry-WebWorks/bd-p/ww_con)
+
+
+## Contributing Changes
+
+Please see the [README](https://github.com/blackberry/BB10-WebWorks-Samples) of the BB10-WebWorks-Samples repository for instructions on how to add new Samples or make modifications to existing Samples.
+
+
+## Bug Reporting and Feature Requests
+
+If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/BB10-WebWorks-Samples/issues) for the Sample and send a message (via github messages) to the Sample Author(s) to let them know that you have filed an [Issue](https://github.com/blackberry/BB10-WebWorks-Samples/issues).
+
+## Disclaimer
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
View
@@ -0,0 +1,160 @@
+<project name="Build and Deploy a Cordova BlackBerry WebWorks Project" default="help">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+ <!-- LOAD ANT-CONTRIB LIBRARY -->
+
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties">
+ <classpath>
+ <pathelement location="./lib/ant-contrib/ant-contrib-1.0b3.jar" />
+ </classpath>
+ </taskdef>
+
+ <!-- LOAD PROPERTIES -->
+
+ <property prefix="properties" file="project.properties" />
+ <property name="build.dir" location="build" />
+ <property name="widget.dir" location="${build.dir}/widget" />
+ <property name="code.sign" value="false" />
+ <property name="globalization" value="false" />
+
+ <target name="blackberry" >
+ <property name="subant.file" value="blackberry.xml" />
+ </target>
+
+ <target name="playbook" >
+ <property name="subant.file" value="playbook.xml" />
+ </target>
+
+ <target name="qnx" >
+ <property name="subant.file" value="qnx.xml" />
+ </target>
+
+ <target name="load-device">
+ <subant target="load-device">
+ <fileset dir="." includes="${subant.file}"/>
+ </subant>
+ </target>
+
+ <target name="load-simulator">
+ <subant target="load-simulator">
+ <fileset dir="." includes="${subant.file}"/>
+ </subant>
+ </target>
+
+ <target name="debug-simulator">
+ <subant target="debug-simulator">
+ <fileset dir="." includes="${subant.file}"/>
+ </subant>
+ </target>
+
+ <target name="debug-device">
+ <subant target="debug-device">
+ <fileset dir="." includes="${subant.file}"/>
+ </subant>
+ </target>
+
+ <target name="build">
+ <subant target="build">
+ <fileset dir="." includes="${subant.file}"/>
+ </subant>
+ </target>
+
+ <target name="clean">
+ <subant target="clean">
+ <fileset dir="." includes="${subant.file}"/>
+ </subant>
+ </target>
+
+ <target name="clean-device">
+ <subant target="clean-device">
+ <fileset dir="." includes="${subant.file}"/>
+ </subant>
+ </target>
+
+ <target name="package-app">
+ <subant target="package-app">
+ <fileset dir="." includes="${subant.file}"/>
+ </subant>
+ </target>
+
+ <target name="clean-simulator">
+ <subant target="clean-simulator">
+ <fileset dir="." includes="${subant.file}"/>
+ </subant>
+ </target>
+
+ <!-- HELP -->
+
+ <target name="help">
+ <echo>
+NAME
+ ${ant.project.name}
+
+SYNOPSIS
+ ant TARGET COMMAND [-D&lt;argument&gt;=&lt;value&gt;]...
+
+DESCRIPTION
+ You can build and deploy your project to a device or simulator.
+
+TARGETS
+ blackberry ........ Builds a cod file and deploys to a device or simulator
+
+ playbook .......... Builds a bar file and deploys to a device or simulator
+
+ qnx ............... Builds a bar file and deploys to a device or simulator
+
+COMMANDS
+ help .............. Show this help menu.
+ ant, ant help
+
+ load-device ....... Builds and deploys project to a connected USB device.
+ ant TARGET load-device
+
+ load-simulator .... Builds and deploys project to default simulator.
+ ant TARGET load-simulator
+
+ build ............. Compiles and packages the project for deployment.
+ ant TARGET build
+
+ package-app ....... Packages the app into a WebWorks-compatible .zip file.
+ ant TARGET package-app
+
+ clean ............. Remove all files from the build/ directory.
+ ant TARGET clean
+
+ clean-device ...... Remove this project from the connected USB device.
+ ant TARGET clean-device
+
+ clean-simulator ... Remove this project from the simulator (takes a while).
+ ant TARGET clean-simulator
+
+GETTING STARTED
+ 1. Edit project.properties
+
+ 2. &lt;ant load-simulator&gt; to run the project on the simulator
+
+ 3. Customize your project by editing www/config.xml
+
+ 4. To run the project on a BlackBerry device, you will need to obtain
+ code signing keys from RIM. Once you have the key, a project is
+ installed by connecting a BlackBerry via USB and running
+ &lt;ant load-device&gt;.
+ </echo>
+ </target>
+</project>
@@ -0,0 +1,34 @@
+#! /bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+ANT=$(which ant)
+
+if [ -z "$1" ]
+then
+ echo 'usage: build <platform>'
+ echo 'where <platform> can be one of "blackberry", "playbook" or "qnx"'
+ echo 'NOTE: please customize the project.properties file first before using this command!'
+ exit 0
+fi
+
+if [ "$1" == "blackberry" -o "$1" == "playbook" -o "$1" == "qnx" ]
+then
+ $ANT $1 build
+else
+ echo 'Platform not recognized! Please use one of "blackberry", "playbook", or "qnx" for the platform parameter.'
+fi
View
@@ -0,0 +1,41 @@
+#! /bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+ANT=$(which ant)
+
+if [ -z "$1" ]
+then
+ echo 'usage: run <platform>'
+ echo 'where <platform> can be one of "blackberry", "playbook" or "qnx"'
+ echo 'NOTE: please customize the project.properties file first before using this command!'
+ exit 0
+fi
+
+if [ "$1" == "blackberry" -o "$1" == "playbook" -o "$1" == "qnx" ]
+then
+ echo 'Do you have a BlackBerry device connected to your computer? (y/n)'
+ read DEVICE
+ if [ $DEVICE == "y" ]
+ then
+ $ANT $1 debug-device
+ else
+ $ANT $1 load-simulator
+ fi
+else
+ echo 'Platform not recognized! Please use one of "blackberry", "playbook", or "qnx" for the platform parameter.'
+fi
Binary file not shown.
@@ -0,0 +1 @@
+Placeholder for native extensions needed on qnx
Oops, something went wrong.

0 comments on commit 30f815d

Please sign in to comment.