Skip to content
Browse files

updated blackberry to 2.4.0

  • Loading branch information...
1 parent 8eaa8d3 commit 86f07b285e90d7199a730c4dd444bdc6a9007212 @stevengill stevengill committed Feb 12, 2013
Showing with 27,093 additions and 3 deletions.
  1. +1 −1 lib/blackberry/VERSION
  2. +1 −1 lib/blackberry/bin/templates/project/www/VERSION
  3. +1 −1 lib/blackberry/bin/templates/project/www/index.html
  4. +456 −0 lib/blackberry/blackberry.xml
  5. +160 −0 lib/blackberry/build.xml
  6. +34 −0 lib/blackberry/cordova/build
  7. +41 −0 lib/blackberry/cordova/run
  8. BIN lib/blackberry/lib/ant-contrib/ant-contrib-1.0b3.jar
  9. +40 −0 lib/blackberry/lib/cordova.2.4.0/ext-air/Cordova_Network/library.xml
  10. +88 −0 lib/blackberry/lib/cordova.2.4.0/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as
  11. +16 −0 lib/blackberry/lib/cordova.2.4.0/ext-qnx/org.apache.cordova/client.js
  12. +34 −0 lib/blackberry/lib/cordova.2.4.0/ext-qnx/org.apache.cordova/index.js
  13. +5 −0 lib/blackberry/lib/cordova.2.4.0/ext-qnx/org.apache.cordova/manifest.json
  14. +1 −0 lib/blackberry/lib/cordova.2.4.0/ext-qnx/readme.md
  15. BIN lib/blackberry/lib/cordova.2.4.0/ext/cordova.2.4.0.jar
  16. +10,326 −0 lib/blackberry/lib/cordova.2.4.0/javascript/cordova-2.4.0.js
  17. +338 −0 lib/blackberry/playbook.xml
  18. +137 −0 lib/blackberry/project.properties
  19. +336 −0 lib/blackberry/qnx.xml
  20. +296 −0 lib/blackberry/www/LICENSE
  21. +8 −0 lib/blackberry/www/NOTICE
  22. +30 −0 lib/blackberry/www/README.md
  23. +1 −0 lib/blackberry/www/VERSION
  24. +96 −0 lib/blackberry/www/config.xml
  25. +10,326 −0 lib/blackberry/www/cordova-2.4.0.js
  26. +115 −0 lib/blackberry/www/css/index.css
  27. +40 −0 lib/blackberry/www/ext-air/Cordova_Network/library.xml
  28. +88 −0 lib/blackberry/www/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as
  29. +16 −0 lib/blackberry/www/ext-qnx/org.apache.cordova/client.js
  30. +34 −0 lib/blackberry/www/ext-qnx/org.apache.cordova/index.js
  31. +5 −0 lib/blackberry/www/ext-qnx/org.apache.cordova/manifest.json
  32. +1 −0 lib/blackberry/www/ext-qnx/readme.md
  33. BIN lib/blackberry/www/ext/cordova.2.4.0.jar
  34. BIN lib/blackberry/www/img/logo.png
  35. +42 −0 lib/blackberry/www/index.html
  36. +49 −0 lib/blackberry/www/js/index.js
  37. +482 −0 lib/blackberry/www/json2.js
  38. +35 −0 lib/blackberry/www/plugins.xml
  39. BIN lib/blackberry/www/res/icon/blackberry/icon-80.png
  40. BIN lib/blackberry/www/res/resourceBundles/ar.js.gz
  41. BIN lib/blackberry/www/res/resourceBundles/ar_AE.js.gz
  42. BIN lib/blackberry/www/res/resourceBundles/ar_BH.js.gz
  43. BIN lib/blackberry/www/res/resourceBundles/ar_DZ.js.gz
  44. BIN lib/blackberry/www/res/resourceBundles/ar_EG.js.gz
  45. BIN lib/blackberry/www/res/resourceBundles/ar_IQ.js.gz
  46. BIN lib/blackberry/www/res/resourceBundles/ar_JO.js.gz
  47. BIN lib/blackberry/www/res/resourceBundles/ar_KW.js.gz
  48. BIN lib/blackberry/www/res/resourceBundles/ar_LB.js.gz
  49. BIN lib/blackberry/www/res/resourceBundles/ar_LY.js.gz
  50. BIN lib/blackberry/www/res/resourceBundles/ar_MA.js.gz
  51. BIN lib/blackberry/www/res/resourceBundles/ar_OM.js.gz
  52. BIN lib/blackberry/www/res/resourceBundles/ar_QA.js.gz
  53. BIN lib/blackberry/www/res/resourceBundles/ar_SA.js.gz
  54. BIN lib/blackberry/www/res/resourceBundles/ar_SD.js.gz
  55. BIN lib/blackberry/www/res/resourceBundles/ar_SY.js.gz
  56. BIN lib/blackberry/www/res/resourceBundles/ar_TN.js.gz
  57. BIN lib/blackberry/www/res/resourceBundles/ar_YE.js.gz
  58. BIN lib/blackberry/www/res/resourceBundles/be.js.gz
  59. BIN lib/blackberry/www/res/resourceBundles/be_BY.js.gz
  60. BIN lib/blackberry/www/res/resourceBundles/bg.js.gz
  61. BIN lib/blackberry/www/res/resourceBundles/bg_BG.js.gz
  62. BIN lib/blackberry/www/res/resourceBundles/bn_IN.js.gz
  63. BIN lib/blackberry/www/res/resourceBundles/ca.js.gz
  64. BIN lib/blackberry/www/res/resourceBundles/ca_ES.js.gz
  65. BIN lib/blackberry/www/res/resourceBundles/ca_ES_PREEURO.js.gz
  66. BIN lib/blackberry/www/res/resourceBundles/cs.js.gz
  67. BIN lib/blackberry/www/res/resourceBundles/cs_CZ.js.gz
  68. BIN lib/blackberry/www/res/resourceBundles/cs_CZ_EURO.js.gz
  69. BIN lib/blackberry/www/res/resourceBundles/cs_CZ_PREEURO.js.gz
  70. BIN lib/blackberry/www/res/resourceBundles/da.js.gz
  71. BIN lib/blackberry/www/res/resourceBundles/da_DK.js.gz
  72. BIN lib/blackberry/www/res/resourceBundles/da_DK_EURO.js.gz
  73. BIN lib/blackberry/www/res/resourceBundles/de.js.gz
  74. BIN lib/blackberry/www/res/resourceBundles/de_AT.js.gz
  75. BIN lib/blackberry/www/res/resourceBundles/de_AT_PREEURO.js.gz
  76. BIN lib/blackberry/www/res/resourceBundles/de_CH.js.gz
  77. BIN lib/blackberry/www/res/resourceBundles/de_DE.js.gz
  78. BIN lib/blackberry/www/res/resourceBundles/de_DE_PREEURO.js.gz
  79. BIN lib/blackberry/www/res/resourceBundles/de_LU.js.gz
  80. BIN lib/blackberry/www/res/resourceBundles/de_LU_PREEURO.js.gz
  81. BIN lib/blackberry/www/res/resourceBundles/el.js.gz
  82. BIN lib/blackberry/www/res/resourceBundles/el_CY.js.gz
  83. BIN lib/blackberry/www/res/resourceBundles/el_CY_EURO.js.gz
  84. BIN lib/blackberry/www/res/resourceBundles/el_CY_PREEURO.js.gz
  85. BIN lib/blackberry/www/res/resourceBundles/el_GR.js.gz
  86. BIN lib/blackberry/www/res/resourceBundles/el_GR_PREEURO.js.gz
  87. BIN lib/blackberry/www/res/resourceBundles/en.js.gz
  88. BIN lib/blackberry/www/res/resourceBundles/en_AU.js.gz
  89. BIN lib/blackberry/www/res/resourceBundles/en_BE.js.gz
  90. BIN lib/blackberry/www/res/resourceBundles/en_BE_PREEURO.js.gz
  91. BIN lib/blackberry/www/res/resourceBundles/en_CA.js.gz
  92. BIN lib/blackberry/www/res/resourceBundles/en_GB.js.gz
  93. BIN lib/blackberry/www/res/resourceBundles/en_GB_EURO.js.gz
  94. BIN lib/blackberry/www/res/resourceBundles/en_HK.js.gz
  95. BIN lib/blackberry/www/res/resourceBundles/en_IE.js.gz
  96. BIN lib/blackberry/www/res/resourceBundles/en_IE_PREEURO.js.gz
  97. BIN lib/blackberry/www/res/resourceBundles/en_IN.js.gz
  98. BIN lib/blackberry/www/res/resourceBundles/en_MT.js.gz
  99. BIN lib/blackberry/www/res/resourceBundles/en_NZ.js.gz
  100. BIN lib/blackberry/www/res/resourceBundles/en_PH.js.gz
  101. BIN lib/blackberry/www/res/resourceBundles/en_SG.js.gz
  102. BIN lib/blackberry/www/res/resourceBundles/en_US.js.gz
  103. BIN lib/blackberry/www/res/resourceBundles/en_ZA.js.gz
  104. BIN lib/blackberry/www/res/resourceBundles/es.js.gz
  105. BIN lib/blackberry/www/res/resourceBundles/es_AR.js.gz
  106. BIN lib/blackberry/www/res/resourceBundles/es_BO.js.gz
  107. BIN lib/blackberry/www/res/resourceBundles/es_CL.js.gz
  108. BIN lib/blackberry/www/res/resourceBundles/es_CO.js.gz
  109. BIN lib/blackberry/www/res/resourceBundles/es_CR.js.gz
  110. BIN lib/blackberry/www/res/resourceBundles/es_DO.js.gz
  111. BIN lib/blackberry/www/res/resourceBundles/es_EC.js.gz
  112. BIN lib/blackberry/www/res/resourceBundles/es_ES.js.gz
  113. BIN lib/blackberry/www/res/resourceBundles/es_ES_PREEURO.js.gz
  114. BIN lib/blackberry/www/res/resourceBundles/es_GT.js.gz
  115. BIN lib/blackberry/www/res/resourceBundles/es_HN.js.gz
  116. BIN lib/blackberry/www/res/resourceBundles/es_MX.js.gz
  117. BIN lib/blackberry/www/res/resourceBundles/es_NI.js.gz
  118. BIN lib/blackberry/www/res/resourceBundles/es_PA.js.gz
  119. BIN lib/blackberry/www/res/resourceBundles/es_PE.js.gz
  120. BIN lib/blackberry/www/res/resourceBundles/es_PR.js.gz
  121. BIN lib/blackberry/www/res/resourceBundles/es_PY.js.gz
  122. BIN lib/blackberry/www/res/resourceBundles/es_SV.js.gz
  123. BIN lib/blackberry/www/res/resourceBundles/es_US.js.gz
  124. BIN lib/blackberry/www/res/resourceBundles/es_UY.js.gz
  125. BIN lib/blackberry/www/res/resourceBundles/es_VE.js.gz
  126. BIN lib/blackberry/www/res/resourceBundles/et.js.gz
  127. BIN lib/blackberry/www/res/resourceBundles/et_EE.js.gz
  128. BIN lib/blackberry/www/res/resourceBundles/et_EE_EURO.js.gz
  129. BIN lib/blackberry/www/res/resourceBundles/et_EE_PREEURO.js.gz
  130. BIN lib/blackberry/www/res/resourceBundles/fi.js.gz
  131. BIN lib/blackberry/www/res/resourceBundles/fi_FI.js.gz
  132. BIN lib/blackberry/www/res/resourceBundles/fi_FI_PREEURO.js.gz
  133. BIN lib/blackberry/www/res/resourceBundles/fr.js.gz
  134. BIN lib/blackberry/www/res/resourceBundles/fr_BE.js.gz
  135. BIN lib/blackberry/www/res/resourceBundles/fr_BE_PREEURO.js.gz
  136. BIN lib/blackberry/www/res/resourceBundles/fr_CA.js.gz
  137. BIN lib/blackberry/www/res/resourceBundles/fr_CH.js.gz
  138. BIN lib/blackberry/www/res/resourceBundles/fr_FR.js.gz
  139. BIN lib/blackberry/www/res/resourceBundles/fr_FR_PREEURO.js.gz
  140. BIN lib/blackberry/www/res/resourceBundles/fr_LU.js.gz
  141. BIN lib/blackberry/www/res/resourceBundles/fr_LU_PREEURO.js.gz
  142. BIN lib/blackberry/www/res/resourceBundles/ga.js.gz
  143. BIN lib/blackberry/www/res/resourceBundles/ga_IE.js.gz
  144. BIN lib/blackberry/www/res/resourceBundles/gu.js.gz
  145. BIN lib/blackberry/www/res/resourceBundles/gu_IN.js.gz
  146. BIN lib/blackberry/www/res/resourceBundles/hi_IN.js.gz
  147. BIN lib/blackberry/www/res/resourceBundles/hr.js.gz
  148. BIN lib/blackberry/www/res/resourceBundles/hr_HR.js.gz
  149. BIN lib/blackberry/www/res/resourceBundles/hu.js.gz
  150. BIN lib/blackberry/www/res/resourceBundles/hu_HU.js.gz
  151. BIN lib/blackberry/www/res/resourceBundles/hu_HU_EURO.js.gz
  152. BIN lib/blackberry/www/res/resourceBundles/hu_HU_PREEURO.js.gz
  153. BIN lib/blackberry/www/res/resourceBundles/in.js.gz
  154. BIN lib/blackberry/www/res/resourceBundles/in_ID.js.gz
  155. BIN lib/blackberry/www/res/resourceBundles/is.js.gz
  156. BIN lib/blackberry/www/res/resourceBundles/is_IS.js.gz
  157. BIN lib/blackberry/www/res/resourceBundles/it.js.gz
  158. BIN lib/blackberry/www/res/resourceBundles/it_CH.js.gz
  159. BIN lib/blackberry/www/res/resourceBundles/it_IT.js.gz
  160. BIN lib/blackberry/www/res/resourceBundles/it_IT_PREEURO.js.gz
  161. BIN lib/blackberry/www/res/resourceBundles/iw.js.gz
  162. BIN lib/blackberry/www/res/resourceBundles/iw_IL.js.gz
  163. BIN lib/blackberry/www/res/resourceBundles/ja.js.gz
  164. BIN lib/blackberry/www/res/resourceBundles/ja_JP.js.gz
  165. BIN lib/blackberry/www/res/resourceBundles/ja_JP_JP.js.gz
  166. BIN lib/blackberry/www/res/resourceBundles/kk.js.gz
  167. BIN lib/blackberry/www/res/resourceBundles/kk_KZ.js.gz
  168. BIN lib/blackberry/www/res/resourceBundles/kn.js.gz
  169. BIN lib/blackberry/www/res/resourceBundles/kn_IN.js.gz
  170. BIN lib/blackberry/www/res/resourceBundles/ko.js.gz
  171. BIN lib/blackberry/www/res/resourceBundles/ko_KR.js.gz
  172. BIN lib/blackberry/www/res/resourceBundles/lt.js.gz
  173. BIN lib/blackberry/www/res/resourceBundles/lt_LT.js.gz
  174. BIN lib/blackberry/www/res/resourceBundles/lt_LT_EURO.js.gz
  175. BIN lib/blackberry/www/res/resourceBundles/lt_LT_PREEURO.js.gz
  176. BIN lib/blackberry/www/res/resourceBundles/lv.js.gz
  177. BIN lib/blackberry/www/res/resourceBundles/lv_LV.js.gz
  178. BIN lib/blackberry/www/res/resourceBundles/lv_LV_EURO.js.gz
  179. BIN lib/blackberry/www/res/resourceBundles/lv_LV_PREEURO.js.gz
  180. BIN lib/blackberry/www/res/resourceBundles/mk.js.gz
  181. BIN lib/blackberry/www/res/resourceBundles/mk_MK.js.gz
  182. BIN lib/blackberry/www/res/resourceBundles/ml_IN.js.gz
  183. BIN lib/blackberry/www/res/resourceBundles/mr.js.gz
  184. BIN lib/blackberry/www/res/resourceBundles/mr_IN.js.gz
  185. BIN lib/blackberry/www/res/resourceBundles/ms.js.gz
  186. BIN lib/blackberry/www/res/resourceBundles/ms_MY.js.gz
  187. BIN lib/blackberry/www/res/resourceBundles/mt.js.gz
  188. BIN lib/blackberry/www/res/resourceBundles/mt_MT.js.gz
  189. BIN lib/blackberry/www/res/resourceBundles/mt_MT_EURO.js.gz
  190. BIN lib/blackberry/www/res/resourceBundles/mt_MT_PREEURO.js.gz
  191. BIN lib/blackberry/www/res/resourceBundles/nb_NO.js.gz
  192. BIN lib/blackberry/www/res/resourceBundles/nl.js.gz
  193. BIN lib/blackberry/www/res/resourceBundles/nl_BE.js.gz
  194. BIN lib/blackberry/www/res/resourceBundles/nl_BE_PREEURO.js.gz
  195. BIN lib/blackberry/www/res/resourceBundles/nl_NL.js.gz
  196. BIN lib/blackberry/www/res/resourceBundles/nl_NL_PREEURO.js.gz
  197. BIN lib/blackberry/www/res/resourceBundles/no.js.gz
  198. BIN lib/blackberry/www/res/resourceBundles/no_NO.js.gz
  199. BIN lib/blackberry/www/res/resourceBundles/no_NO_NY.js.gz
  200. BIN lib/blackberry/www/res/resourceBundles/or_IN.js.gz
  201. BIN lib/blackberry/www/res/resourceBundles/pa.js.gz
  202. BIN lib/blackberry/www/res/resourceBundles/pa_IN.js.gz
  203. BIN lib/blackberry/www/res/resourceBundles/pl.js.gz
  204. BIN lib/blackberry/www/res/resourceBundles/pl_PL.js.gz
  205. BIN lib/blackberry/www/res/resourceBundles/pl_PL_EURO.js.gz
  206. BIN lib/blackberry/www/res/resourceBundles/pl_PL_PREEURO.js.gz
  207. BIN lib/blackberry/www/res/resourceBundles/pt.js.gz
  208. BIN lib/blackberry/www/res/resourceBundles/pt_BR.js.gz
  209. BIN lib/blackberry/www/res/resourceBundles/pt_PT.js.gz
  210. BIN lib/blackberry/www/res/resourceBundles/pt_PT_PREEURO.js.gz
  211. BIN lib/blackberry/www/res/resourceBundles/ro.js.gz
  212. BIN lib/blackberry/www/res/resourceBundles/ro_RO.js.gz
  213. BIN lib/blackberry/www/res/resourceBundles/ru.js.gz
  214. BIN lib/blackberry/www/res/resourceBundles/ru_RU.js.gz
  215. BIN lib/blackberry/www/res/resourceBundles/sh.js.gz
  216. BIN lib/blackberry/www/res/resourceBundles/sh_CS.js.gz
  217. BIN lib/blackberry/www/res/resourceBundles/sk.js.gz
  218. BIN lib/blackberry/www/res/resourceBundles/sk_SK.js.gz
  219. BIN lib/blackberry/www/res/resourceBundles/sk_SK_EURO.js.gz
  220. BIN lib/blackberry/www/res/resourceBundles/sk_SK_PREEURO.js.gz
  221. BIN lib/blackberry/www/res/resourceBundles/sl.js.gz
  222. BIN lib/blackberry/www/res/resourceBundles/sl_SI.js.gz
  223. BIN lib/blackberry/www/res/resourceBundles/sl_SI_PREEURO.js.gz
  224. BIN lib/blackberry/www/res/resourceBundles/sq.js.gz
  225. BIN lib/blackberry/www/res/resourceBundles/sq_AL.js.gz
  226. BIN lib/blackberry/www/res/resourceBundles/sr.js.gz
  227. BIN lib/blackberry/www/res/resourceBundles/sr_BA.js.gz
  228. BIN lib/blackberry/www/res/resourceBundles/sr_CS.js.gz
  229. BIN lib/blackberry/www/res/resourceBundles/sr_ME.js.gz
  230. BIN lib/blackberry/www/res/resourceBundles/sr_RS.js.gz
  231. BIN lib/blackberry/www/res/resourceBundles/sr_RS_Cyrl.js.gz
  232. BIN lib/blackberry/www/res/resourceBundles/sr_RS_Latn.js.gz
  233. BIN lib/blackberry/www/res/resourceBundles/sv.js.gz
  234. BIN lib/blackberry/www/res/resourceBundles/sv_SE.js.gz
  235. BIN lib/blackberry/www/res/resourceBundles/sv_SE_EURO.js.gz
  236. BIN lib/blackberry/www/res/resourceBundles/sv_SE_PREEURO.js.gz
  237. BIN lib/blackberry/www/res/resourceBundles/ta.js.gz
  238. BIN lib/blackberry/www/res/resourceBundles/ta_IN.js.gz
  239. BIN lib/blackberry/www/res/resourceBundles/te.js.gz
  240. BIN lib/blackberry/www/res/resourceBundles/te_IN.js.gz
  241. BIN lib/blackberry/www/res/resourceBundles/th.js.gz
  242. BIN lib/blackberry/www/res/resourceBundles/th_TH.js.gz
  243. BIN lib/blackberry/www/res/resourceBundles/th_TH_TH.js.gz
  244. BIN lib/blackberry/www/res/resourceBundles/tr.js.gz
  245. BIN lib/blackberry/www/res/resourceBundles/tr_TR.js.gz
  246. BIN lib/blackberry/www/res/resourceBundles/uk.js.gz
  247. BIN lib/blackberry/www/res/resourceBundles/uk_UA.js.gz
  248. BIN lib/blackberry/www/res/resourceBundles/vi.js.gz
  249. BIN lib/blackberry/www/res/resourceBundles/vi_VN.js.gz
  250. BIN lib/blackberry/www/res/resourceBundles/zh.js.gz
  251. BIN lib/blackberry/www/res/resourceBundles/zh_CN.js.gz
  252. BIN lib/blackberry/www/res/resourceBundles/zh_HK.js.gz
  253. BIN lib/blackberry/www/res/resourceBundles/zh_SG.js.gz
  254. BIN lib/blackberry/www/res/resourceBundles/zh_TW.js.gz
  255. BIN lib/blackberry/www/res/screen/blackberry/screen-225.png
  256. +68 −0 lib/blackberry/www/spec.html
  257. +33 −0 lib/blackberry/www/spec/helper.js
  258. +67 −0 lib/blackberry/www/spec/index.js
  259. +20 −0 lib/blackberry/www/spec/lib/jasmine-1.2.0/MIT.LICENSE
  260. +616 −0 lib/blackberry/www/spec/lib/jasmine-1.2.0/jasmine-html.js
  261. +81 −0 lib/blackberry/www/spec/lib/jasmine-1.2.0/jasmine.css
  262. +2,529 −0 lib/blackberry/www/spec/lib/jasmine-1.2.0/jasmine.js
View
2 lib/blackberry/VERSION
@@ -1 +1 @@
-2.4.0rc1
+2.4.0
View
2 lib/blackberry/bin/templates/project/www/VERSION
@@ -1 +1 @@
-2.4.0rc1
+2.4.0
View
2 lib/blackberry/bin/templates/project/www/index.html
@@ -33,7 +33,7 @@
<p class="event received">Device is Ready</p>
</div>
</div>
- <script type="text/javascript" src="cordova-2.4.0rc1.js"></script>
+ <script type="text/javascript" src="cordova-2.4.0.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
app.initialize();
View
456 lib/blackberry/blackberry.xml
@@ -0,0 +1,456 @@
+<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 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="generate.ext" value="cod" />
+ <property name="globalization" value="false" />
+
+ <!-- BlackBerry WebWorks Packager directory is required. -->
+ <fail unless="properties.blackberry.bbwp.dir" message="Please specify BlackBerry WebWorks Packager directory using 'blackberry.bbwp.dir' in your 'project.properties' file." />
+
+ <!-- OS identification -->
+ <condition property="isMacOSX" else="false">
+ <and>
+ <os family="mac" />
+ <os family="unix" />
+ </and>
+ </condition>
+
+ <condition property="javaloader" value="${properties.blackberry.bbwp.dir}/bin/javaloader" else="${properties.blackberry.bbwp.dir}/bin/JavaLoader.exe">
+ <equals arg1="${isMacOSX}" arg2="true" />
+ </condition>
+
+ <condition property="bbwp" value="${properties.blackberry.bbwp.dir}/bbwp" else="${properties.blackberry.bbwp.dir}/bbwp.exe">
+ <equals arg1="${isMacOSX}" arg2="true" />
+ </condition>
+
+
+ <!-- LOAD DEVICE -->
+
+ <target name="load-device" depends="package-app">
+ <bbwp code-sign="true" />
+ <exec executable="${javaloader}" dir="." failonerror="true">
+ <arg value="-u" />
+ <arg value="-w${properties.blackberry.sim.password}" />
+ <arg value="load" />
+ <arg file="${build.dir}/StandardInstall/${cod.name}.cod" />
+ </exec>
+ </target>
+
+ <!-- DEBUG-LOAD DEVICE -->
+
+ <target name="debug-device" depends="package-app">
+ <bbwp code-sign="true" debug="true" />
+ <exec executable="${javaloader}" dir="." failonerror="true">
+ <arg value="-u" />
+ <arg value="-w${properties.blackberry.sim.password}" />
+ <arg value="load" />
+ <arg file="${build.dir}/StandardInstall/${cod.name}.cod" />
+ </exec>
+ </target>
+
+ <!-- LOAD SIMULATOR -->
+
+ <target name="load-simulator" depends="build">
+
+ <!-- Find the simulator directory -->
+ <set-simulator-dir />
+
+ <!-- Locate BBWP simulator directory. There may be multiple, so choose the first. -->
+ <path id="bbwp.sim.path">
+ <first>
+ <fileset dir="${properties.blackberry.bbwp.dir}/simpack">
+ <include name="**/handhelds.manifest.txt" />
+ </fileset>
+ </first>
+ </path>
+ <dirname property="bbwp.sim.dir" file="${toString:bbwp.sim.path}" />
+
+ <!-- Simulator directory: Use sim.dir property if set in project.properties file.
+ Otherwise, use bbwp simulator directory. -->
+ <condition
+ property="simulator.dir"
+ value="${properties.blackberry.sim.dir}"
+ else="${bbwp.sim.dir}">
+ <available file="${properties.blackberry.sim.dir}" type="dir" />
+ </condition>
+ <echo message="Simulator directory=${simulator.dir}" />
+
+ <!-- Simulator binary: Use sim.bin property if set in project.properties file
+ or try setting to 'defaultSimulator.bat' in simulator directory. -->
+ <condition
+ property="sim.bin"
+ value="${properties.blackberry.sim.bin}"
+ else="defaultSimulator.bat">
+ <available file="${simulator.dir}/${properties.blackberry.sim.bin}"/>
+ </condition>
+
+ <!-- If simulator executable does not exist, use the first device listed
+ in the 'handhelds.manifest.txt' file in the simulator directory. -->
+ <loadfile
+ property="device.list"
+ srcFile="${simulator.dir}/handhelds.manifest.txt">
+ <filterchain>
+ <tokenFilter>
+ <stringtokenizer/>
+ </tokenFilter>
+ </filterchain>
+ </loadfile>
+
+ <propertyregex property="device"
+ input="${device.list}"
+ regexp="^\d{4}"
+ select="\0"
+ override="true" />
+ <property name="device.bin" value="${device}.bat" />
+
+ <condition
+ property="simulator.bin"
+ value="${sim.bin}"
+ else="${device.bin}">
+ <available file="${simulator.dir}/${sim.bin}" />
+ </condition>
+
+ <echo message="Simulator executable=${simulator.dir}/${simulator.bin}" />
+
+ <!-- Close running simulators -->
+ <echo message="Closing all running simulators..." />
+ <exec executable="${simulator.dir}/fledgecontroller.exe" dir="${simulator.dir}" spawn="false">
+ <arg value="/execute=kill" />
+ </exec>
+
+ <!-- MDS directory: Use mds.dir property if set in project.properties file.
+ Otherwise, use bbwp MDS directory. -->
+ <condition
+ property="mds.dir"
+ value="${properties.blackberry.mds.dir}"
+ else="${properties.blackberry.bbwp.dir}/mds">
+ <available file="${properties.blackberry.mds.dir}" type="dir" />
+ </condition>
+ <echo message="MDS directory=${mds.dir}" />
+
+ <copy todir="${simulator.dir}">
+ <fileset dir="${build.dir}/StandardInstall" includes="*.cod, *.cso, *.csl, *.alx" />
+ </copy>
+ <exec executable="${mds.dir}/run.bat" dir="${mds.dir}" spawn="true" />
+ <exec executable="${simulator.dir}/${simulator.bin}" dir="${simulator.dir}" spawn="true" />
+
+ <!-- Only invoke FledgeHook.exe if it is found. Newer versions of the
+ WebWorks SDK do not include it. -->
+ <if>
+ <available file="${properties.blackberry.bbwp.dir}/FledgeHook.exe" />
+ <then>
+ <exec executable="${properties.blackberry.bbwp.dir}/FledgeHook.exe" dir="${properties.blackberry.bbwp.dir}" spawn="true" />
+ </then>
+ </if>
+ </target>
+
+ <target name="debug-simulator" depends="package-app">
+ <bbwp code-sign="false" debug="true" />
+
+ <!-- Find the simulator directory -->
+ <set-simulator-dir />
+
+ <!-- Locate BBWP simulator directory. There may be multiple, so choose the first. -->
+ <path id="bbwp.sim.path">
+ <first>
+ <fileset dir="${properties.blackberry.bbwp.dir}/simpack">
+ <include name="**/handhelds.manifest.txt" />
+ </fileset>
+ </first>
+ </path>
+ <dirname property="bbwp.sim.dir" file="${toString:bbwp.sim.path}" />
+
+ <!-- Simulator directory: Use sim.dir property if set in project.properties file.
+ Otherwise, use bbwp simulator directory. -->
+ <condition
+ property="simulator.dir"
+ value="${properties.blackberry.sim.dir}"
+ else="${bbwp.sim.dir}">
+ <available file="${properties.blackberry.sim.dir}" type="dir" />
+ </condition>
+ <echo message="Simulator directory=${simulator.dir}" />
+
+ <!-- Simulator binary: Use sim.bin property if set in project.properties file
+ or try setting to 'defaultSimulator.bat' in simulator directory. -->
+ <condition
+ property="sim.bin"
+ value="${properties.blackberry.sim.bin}"
+ else="defaultSimulator.bat">
+ <available file="${simulator.dir}/${properties.blackberry.sim.bin}"/>
+ </condition>
+
+ <!-- If simulator executable does not exist, use the first device listed
+ in the 'handhelds.manifest.txt' file in the simulator directory. -->
+ <loadfile
+ property="device.list"
+ srcFile="${simulator.dir}/handhelds.manifest.txt">
+ <filterchain>
+ <tokenFilter>
+ <stringtokenizer/>
+ </tokenFilter>
+ </filterchain>
+ </loadfile>
+
+ <propertyregex property="device"
+ input="${device.list}"
+ regexp="^\d{4}"
+ select="\0"
+ override="true" />
+ <property name="device.bin" value="${device}.bat" />
+
+ <condition
+ property="simulator.bin"
+ value="${sim.bin}"
+ else="${device.bin}">
+ <available file="${simulator.dir}/${sim.bin}" />
+ </condition>
+
+ <echo message="Simulator executable=${simulator.dir}/${simulator.bin}" />
+
+ <!-- Close running simulators -->
+ <echo message="Closing all running simulators..." />
+ <exec executable="${simulator.dir}/fledgecontroller.exe" dir="${simulator.dir}" spawn="false">
+ <arg value="/execute=kill" />
+ </exec>
+
+ <!-- MDS directory: Use mds.dir property if set in project.properties file.
+ Otherwise, use bbwp MDS directory. -->
+ <condition
+ property="mds.dir"
+ value="${properties.blackberry.mds.dir}"
+ else="${properties.blackberry.bbwp.dir}/mds">
+ <available file="${properties.blackberry.mds.dir}" type="dir" />
+ </condition>
+ <echo message="MDS directory=${mds.dir}" />
+
+ <copy todir="${simulator.dir}">
+ <fileset dir="${build.dir}/StandardInstall" includes="*.cod, *.cso, *.csl, *.alx" />
+ </copy>
+ <exec executable="${mds.dir}/run.bat" dir="${mds.dir}" spawn="true" />
+ <exec executable="${simulator.dir}/${simulator.bin}" dir="${simulator.dir}" spawn="true" />
+
+ <!-- Only invoke FledgeHook.exe if it is found. Newer versions of the
+ WebWorks SDK do not include it. -->
+ <if>
+ <available file="${properties.blackberry.bbwp.dir}/FledgeHook.exe" />
+ <then>
+ <exec executable="${properties.blackberry.bbwp.dir}/FledgeHook.exe" dir="${properties.blackberry.bbwp.dir}" spawn="true" />
+ </then>
+ </if>
+ </target>
+
+ <!-- PACKAGE-APP -->
+
+ <target name="package-app" depends="generate-cod-name, clean">
+ <!-- Copy the WebWorks application -->
+ <mkdir dir="${widget.dir}" />
+ <copy todir="${widget.dir}" overwrite="true">
+ <fileset dir="www" >
+ <exclude name="ext-air/**"/>
+ <exclude name="ext-qnx/**"/>
+ <exclude name="res/resourceBundles/**" unless="${globalization}"/>
+ </fileset>
+ </copy>
+
+ <!-- Package the WebWorks app by zipping the widget dir. -->
+ <mkdir dir="${build.dir}" />
+ <zip compress="false" destfile="${build.dir}/${cod.name}.zip" basedir="${widget.dir}" excludes="**/build/**,**/.settings/**,**/.project" />
+ </target>
+
+ <!-- BUILD -->
+
+ <target name="build" depends="package-app">
+ <bbwp code-sign="${code.sign}" />
+ </target>
+
+ <!-- BBWP MACRO -->
+
+ <macrodef name="bbwp">
+ <attribute name="code-sign" default="false" />
+ <attribute name="debug" default="false" />
+ <sequential>
+ <!-- check if debug flag was passed in and set an appropriate flag for CLI exec of bbwp -->
+ <if>
+ <equals arg1="@{debug}" arg2="true" />
+ <then>
+ <property name="debug.flag" value="/d" />
+ </then>
+ <else>
+ <property name="debug.flag" value="" />
+ </else>
+ </if>
+
+ <!-- Ensure bbwp executable exists. -->
+ <property name="properties.blackberry.bbwp.bin" location="${bbwp}" />
+ <available file="${properties.blackberry.bbwp.bin}" property="properties.blackberry.bbwp.exists" />
+ <fail unless="properties.blackberry.bbwp.exists" message="Cannot find ${properties.blackberry.bbwp.bin}. Please edit 'blackberry.bbwp.dir' in your 'project.properties' file." />
+
+ <if>
+ <equals arg1="@{code-sign}" arg2="true" />
+ <then>
+ <exec executable="${properties.blackberry.bbwp.bin}">
+ <arg file="${build.dir}/${cod.name}.zip" />
+ <arg value="/g" />
+ <arg value="${properties.blackberry.sigtool.password}" />
+ <arg line="${debug.flag} /o" />
+ <arg file="${build.dir}" />
+ </exec>
+ </then>
+ <else>
+ <exec executable="${properties.blackberry.bbwp.bin}">
+ <arg file="${build.dir}/${cod.name}.zip" />
+ <arg line="${debug.flag} /o" />
+ <arg file="${build.dir}" />
+ </exec>
+ </else>
+ </if>
+ </sequential>
+ </macrodef>
+
+ <!-- CLEAN -->
+
+ <target name="clean">
+ <delete dir="${build.dir}" />
+ <delete dir="${widget.dir}" />
+ </target>
+
+ <!-- CLEAN DEVICE -->
+
+ <target name="clean-device" depends="generate-cod-name">
+ <exec executable="${javaloader}">
+ <arg value="-usb" />
+ <arg value="erase" />
+ <arg value="-f" />
+ <arg value="${cod.name}.cod" />
+ </exec>
+ </target>
+
+ <!-- CLEAN SIMULATOR -->
+
+ <target name="clean-simulator">
+ <!-- Find the simulator directory -->
+ <set-simulator-dir />
+
+ <exec executable="${simulator.dir}/clean.bat" dir="${simulator.dir}" />
+
+ <delete>
+ <fileset dir="${simulator.dir}" includes="*.cod,*.csl,*.cso,*.debug,*.jar" />
+ </delete>
+ </target>
+
+ <!-- HELPER TASKS -->
+
+ <target name="generate-cod-name">
+ <xmlproperty file="www/config.xml" prefix="config.xml" />
+ <propertyregex property="cod.name"
+ input="${config.xml.widget.name}"
+ regexp="(\W+)"
+ replace=""
+ casesensitive="false"
+ global="true"
+ defaultValue="${config.xml.widget.name}" />
+ <echo message="Generated name: ${cod.name}.cod" />
+ </target>
+
+ <!-- MACRO: SET SIMULATOR DIRECTORY -->
+
+ <macrodef name="set-simulator-dir">
+ <sequential>
+ <!-- Locate BBWP simulator directory. There may be multiple, so choose the first. -->
+ <path id="bbwp.sim.path">
+ <first>
+ <fileset dir="${properties.blackberry.bbwp.dir}/simpack">
+ <include name="**/handhelds.manifest.txt" />
+ </fileset>
+ </first>
+ </path>
+ <dirname property="bbwp.sim.dir" file="${toString:bbwp.sim.path}" />
+
+ <!-- Simulator directory: Use sim.dir property if set in project.properties file.
+ Otherwise, use bbwp simulator directory. -->
+ <condition
+ property="simulator.dir"
+ value="${properties.blackberry.sim.dir}"
+ else="${bbwp.sim.dir}">
+ <available file="${properties.blackberry.sim.dir}" type="dir" />
+ </condition>
+ <echo message="Simulator directory=${simulator.dir}" />
+ </sequential>
+ </macrodef>
+
+ <!-- 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
+
+COMMANDS
+ help .............. Show this help menu.
+ ant, ant help
+
+ load-device ....... Builds and deploys project to a connected USB device.
+ ant load-device
+
+ load-simulator .... Builds and deploys project to default simulator.
+ ant load-simulator
+
+ build ............. Compiles and packages the project for deployment.
+ ant build
+
+ clean ............. Remove all files from the build/ directory.
+ ant clean
+
+ clean-device ...... Remove this project from the connected USB device.
+ ant clean-device
+
+ clean-simulator ... Remove this project from the simulator (takes a while).
+ ant 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>
View
160 lib/blackberry/build.xml
@@ -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>
View
34 lib/blackberry/cordova/build
@@ -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
41 lib/blackberry/cordova/run
@@ -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
View
BIN lib/blackberry/lib/ant-contrib/ant-contrib-1.0b3.jar
Binary file not shown.
View
40 lib/blackberry/lib/cordova.2.4.0/ext-air/Cordova_Network/library.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+-->
+<library isWhitelist="true">
+ <extension>
+ <entryClass>org.apache.cordova.network.Network</entryClass>
+ </extension>
+
+ <platforms>
+ <platform value="AIR">
+ <target version="default" config="AIR_XHR" />
+ </platform>
+ </platforms>
+
+ <configurations>
+ <configuration name="AIR_XHR" version="1.0" comment="For XHR architecture for Java implementation">
+ <src type="text/actionscript" path="src" comment="ActionScript implementation" />
+ </configuration>
+ </configurations>
+
+ <features>
+ <feature id="org.apache.cordova" version="1.0.0" />
+ </features>
+</library>
View
88 ...berry/lib/cordova.2.4.0/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ *
+ * Copyright (c) 2011, Research In Motion Limited.
+ */
+
+
+package org.apache.cordova.network {
+ import flash.net.NetworkInfo;
+ import flash.net.NetworkInterface;
+ import flash.events.Event;
+ import qnx.system.Device;
+
+ import webworks.extension.DefaultExtension;
+
+ public class Network extends DefaultExtension{
+
+ private var _jsFunctionCallbackIDs:Array = [];
+ private const FEATURE_ID:Array = [ "org.apache.cordova" ];
+
+ public function Network() {
+ //Attach event listener once only
+ NetworkInfo.networkInfo.addEventListener(flash.events.Event.NETWORK_CHANGE, networkChange);
+ }
+
+ override public function getFeatureList():Array {
+ return FEATURE_ID;
+ }
+
+ public function getConnectionInfo(param:String):void{
+ if(_jsFunctionCallbackIDs.indexOf(param) < 0){
+ _jsFunctionCallbackIDs.push(param);
+ }
+ }
+
+ public function getDeviceInfo(id:String):void{
+ evalJavaScriptEvent(id, [{
+ "uuid" : Device.device.pin,
+ "version": Device.device.scmBundle
+ }]);
+ }
+
+ private function networkChange( event: Event ) : void {
+
+ /**
+ * Right now, we only care if there is a connection or not, since PlayBook only has WiFi
+ * At the JS layer, we will map this from offline/online.
+ * At some point in the future where there are more connection types on PlayBook,
+ * we will want to attempt to map this to the real Cordova connection types...
+ */
+
+ var haveCoverage : Boolean = false;
+ var networkStatus : String = "offline";
+ var connectionType = "none";
+
+ NetworkInfo.networkInfo.findInterfaces().some(
+ function callback(item:NetworkInterface, index:int, vector:Vector.<NetworkInterface>):Boolean {
+ this.webView.executeJavaScript("alert('Network Interface ' + item.name)");
+ haveCoverage = item.active || haveCoverage;
+ return haveCoverage;
+ }, this);
+
+ if (haveCoverage) {
+ networkStatus = "online";
+ connectionType = "wifi";
+ }
+
+ for (var i:Number=0; i<_jsFunctionCallbackIDs.length ; i++){
+ evalJavaScriptEvent(_jsFunctionCallbackIDs[i], [{"type" : connectionType, "event" : networkStatus }] );
+ }
+ }
+ }
+}
View
16 lib/blackberry/lib/cordova.2.4.0/ext-qnx/org.apache.cordova/client.js
@@ -0,0 +1,16 @@
+/*
+ * Copyright 2010-2011 Research In Motion Limited.
+ *
+ * Licensed 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.
+ */
+
View
34 lib/blackberry/lib/cordova.2.4.0/ext-qnx/org.apache.cordova/index.js
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2010-2011 Research In Motion Limited.
+ *
+ * Licensed 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.
+ */
+
+var Whitelist = require("../../lib/policy/whitelist").Whitelist,
+ whitelist = new Whitelist(),
+ noop = function () {};
+
+module.exports = {
+ isWhitelisted: function (success, fail, args) {
+ var url = JSON.parse(decodeURIComponent(args[0])),
+ success = success || noop,
+ fail = fail || noop;
+
+ if (url) {
+ success(whitelist.isAccessAllowed(url));
+ }
+ else {
+ error("please provide an url");
+ }
+ }
+};
View
5 lib/blackberry/lib/cordova.2.4.0/ext-qnx/org.apache.cordova/manifest.json
@@ -0,0 +1,5 @@
+{
+ "global": false,
+ "namespace": "org.apache.cordova",
+ "dependencies": []
+}
View
1 lib/blackberry/lib/cordova.2.4.0/ext-qnx/readme.md
@@ -0,0 +1 @@
+Placeholder for native extensions needed on qnx
View
BIN lib/blackberry/lib/cordova.2.4.0/ext/cordova.2.4.0.jar
Binary file not shown.
View
10,326 lib/blackberry/lib/cordova.2.4.0/javascript/cordova-2.4.0.js
10,326 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
338 lib/blackberry/playbook.xml
@@ -0,0 +1,338 @@
+<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 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="generate.ext" value="cod" />
+ <property name="build.num.file" value="buildId.txt" />
+
+ <!-- BlackBerry WebWorks Packager for Tablets directory is required. -->
+ <fail unless="properties.playbook.bbwp.dir" message="Please specify BlackBerry WebWorks Packager directory using 'playbook.bbwp.dir' in your 'project.properties' file." />
+
+ <!-- OS identification -->
+ <condition property="isMacOSX" else="false">
+ <and>
+ <os family="mac" />
+ <os family="unix" />
+ </and>
+ </condition>
+
+ <condition property="bbwp" value="${properties.playbook.bbwp.dir}/bbwp" else="${properties.playbook.bbwp.dir}/bbwp.exe">
+ <equals arg1="${isMacOSX}" arg2="true" />
+ </condition>
+
+ <condition property="blackberry-deploy" value="${properties.playbook.bbwp.dir}/blackberry-tablet-sdk/bin/blackberry-deploy" else="${properties.playbook.bbwp.dir}/blackberry-tablet-sdk/bin/blackberry-deploy.bat">
+ <equals arg1="${isMacOSX}" arg2="true" />
+ </condition>
+
+ <condition property="blackberry-debugtokenrequest" value="${properties.playbook.bbwp.dir}/blackberry-tablet-sdk/bin/blackberry-debugtokenrequest" else="${properties.playbook.bbwp.dir}/blackberry-tablet-sdk/bin/blackberry-debugtokenrequest.bat">
+ <equals arg1="${isMacOSX}" arg2="true" />
+ </condition>
+
+ <!-- LOAD DEVICE -->
+
+ <target name="load-device" depends="package-app">
+ <bbwp code-sign="true" />
+
+ <exec executable="${blackberry-deploy}" dir="." failonerror="true">
+ <arg value="-installApp" />
+ <arg value="-launchApp" />
+ <arg value="-device" />
+ <arg value="${properties.playbook.device.ip}" />
+ <arg value="-password" />
+ <arg value="${properties.playbook.device.password}" />
+ <arg value="-package" />
+ <arg file="${build.dir}/${cod.name}.bar" />
+ </exec>
+ </target>
+
+ <!-- DEBUG-LOAD DEVICE -->
+
+ <target name="debug-device" depends="package-app">
+ <if>
+ <equals arg1="${properties.playbook.device.pin}" arg2="" />
+ <then>
+ <echo>
+ If you fill in the playbook.device.pin value you can use debug tokens!
+ This means you won't have to worry about having a unique version in config.xml every time.
+ </echo>
+ <bbwp code-sign="true" debug="true" />
+ </then>
+ <else>
+ <generate-debug-token />
+ <bbwp code-sign="false" debug="true" />
+ </else>
+ </if>
+
+ <exec executable="${blackberry-deploy}" dir="." failonerror="true">
+ <arg value="-installApp" />
+ <arg value="-launchApp" />
+ <arg value="-device" />
+ <arg value="${properties.playbook.device.ip}" />
+ <arg value="-password" />
+ <arg value="${properties.playbook.device.password}" />
+ <arg value="-package" />
+ <arg file="${build.dir}/${cod.name}.bar" />
+ </exec>
+ </target>
+
+ <!-- LOAD SIMULATOR -->
+
+ <target name="load-simulator" depends="build">
+
+ <echo>This tool will not open the simulator for you </echo>
+
+ <exec executable="${blackberry-deploy}" dir="." failonerror="true">
+ <arg value="-installApp" />
+ <arg value="-launchApp" />
+ <arg value="-device" />
+ <arg value="${properties.playbook.sim.ip}" />
+ <arg value="-password" />
+ <arg value="${properties.playbook.sim.password}" />
+ <arg value="-package" />
+ <arg file="${build.dir}/${cod.name}.bar" />
+ </exec>
+ </target>
+
+ <target name="debug-simulator" depends="package-app">
+ <bbwp code-sign="false" debug="true" />
+ <echo>This tool will not open the simulator for you </echo>
+
+ <exec executable="${blackberry-deploy}" dir="." failonerror="true">
+ <arg value="-installApp" />
+ <arg value="-launchApp" />
+ <arg value="-device" />
+ <arg value="${properties.playbook.sim.ip}" />
+ <arg value="-password" />
+ <arg value="${properties.playbook.sim.password}" />
+ <arg value="-package" />
+ <arg file="${build.dir}/${cod.name}.bar" />
+ </exec>
+ </target>
+ <!-- PACKAGE-APP -->
+
+ <target name="package-app" depends="generate-cod-name, clean">
+ <!-- Copy the WebWorks application -->
+ <mkdir dir="${widget.dir}" />
+ <copy todir="${widget.dir}" overwrite="true">
+ <fileset dir="www" >
+ <exclude name="ext/**"/>
+ <exclude name="ext-air/**"/>
+ <exclude name="res/resourceBundles/**"/>
+ </fileset>
+ </copy>
+
+ <!-- Update WebWorks Packager with the AIR APIs -->
+ <copy todir="${properties.playbook.bbwp.dir}\ext" overwrite="true">
+ <fileset dir="www/ext-air" excludes="README.md" />
+ </copy>
+
+ <!-- Package the WebWorks app by zipping the widget dir. -->
+ <mkdir dir="${build.dir}" />
+ <zip compress="false" destfile="${build.dir}/${cod.name}.zip" basedir="${widget.dir}" excludes="**/build/**,**/.settings/**,**/.project" />
+ </target>
+
+ <!-- BUILD -->
+
+ <target name="build" depends="package-app">
+ <bbwp code-sign="${code.sign}" />
+ </target>
+
+ <!-- BBWP MACRO -->
+
+ <macrodef name="bbwp">
+ <attribute name="code-sign" default="false" />
+ <attribute name="debug" default="false" />
+ <sequential>
+ <!-- check if debug flag was passed in and set an appropriate flag for CLI exec of bbwp -->
+ <if>
+ <equals arg1="@{debug}" arg2="true" />
+ <then>
+ <property name="debug.flag" value="-d" />
+ </then>
+ <else>
+ <property name="debug.flag" value="" />
+ </else>
+ </if>
+ <buildnumber file="${build.num.file}" />
+ <if>
+ <equals arg1="@{code-sign}" arg2="true" />
+ <then>
+ <exec executable="${bbwp}">
+ <arg file="${build.dir}/${cod.name}.zip" />
+ <arg value="-gcsk" />
+ <arg value="${properties.playbook.sigtool.csk.password}" />
+ <arg value="-gp12" />
+ <arg value="${properties.playbook.sigtool.p12.password}" />
+ <arg value="-o" />
+ <arg file="${build.dir}" />
+ <arg line="${debug.flag} -buildId" />
+ <arg value="${build.number}" />
+ </exec>
+ </then>
+ <else>
+ <exec executable="${bbwp}">
+ <arg file="${build.dir}/${cod.name}.zip" />
+ <arg value="-o" />
+ <arg file="${build.dir}" />
+ <arg line="${debug.flag} -buildId" />
+ <arg value="${build.number}" />
+ </exec>
+ </else>
+ </if>
+ </sequential>
+ </macrodef>
+
+ <!-- install debug token" -->
+ <macrodef name="generate-debug-token">
+ <sequential>
+ <exec executable="${blackberry-debugtokenrequest}" dir="." failonerror="true">
+ <arg value="-storepass" />
+ <arg value="${properties.playbook.sigtool.csk.password}" />
+ <arg value="-deviceID" />
+ <arg value="0x${properties.playbook.device.pin}" />
+ <arg file="${properties.playbook.bbwp.dir}/debugtoken.bar" />
+ </exec>
+
+ <exec executable="${blackberry-deploy}" dir="." failonerror="true">
+ <arg value="-installApp" />
+ <arg value="-launchApp" />
+ <arg value="-device" />
+ <arg value="${properties.playbook.device.ip}" />
+ <arg value="-password" />
+ <arg value="${properties.playbook.device.password}" />
+ <arg value="-package" />
+ <arg file="${properties.playbook.bbwp.dir}/debugtoken.bar" />
+ </exec>
+
+ <replaceregexp
+ file="${properties.playbook.bbwp.dir}/bin/bbwp.properties"
+ match='&lt;debug_token&gt;.*&lt;\/debug_token&gt;'
+ replace='&lt;debug_token&gt;${properties.playbook.bbwp.dir}/debugtoken.bar&lt;/debug_token&gt;'
+ byline='true'/>
+ </sequential>
+ </macrodef>
+
+ <!-- CLEAN -->
+
+ <target name="clean">
+ <delete dir="${build.dir}" />
+ <delete dir="${widget.dir}" />
+ </target>
+
+ <!-- CLEAN DEVICE -->
+
+ <target name="clean-device" depends="generate-cod-name">
+ <exec executable="${blackberry-deploy}" dir="." failonerror="true">
+ <arg value="-uninstallApp" />
+ <arg value="-device" />
+ <arg value="${properties.playbook.device.ip}" />
+ <arg value="-password" />
+ <arg value="${properties.playbook.device.password}" />
+ <arg value="-package" />
+ <arg file="${build.dir}/${cod.name}.bar" />
+ </exec>
+ </target>
+
+ <!-- CLEAN SIMULATOR -->
+
+ <target name="clean-simulator" depends="generate-cod-name">
+ <exec executable="${blackberry-deploy}" dir="." failonerror="true">
+ <arg value="-uninstallApp" />
+ <arg value="-device" />
+ <arg value="${properties.playbook.sim.ip}" />
+ <arg value="-password" />
+ <arg value="${properties.playbook.sim.password}" />
+ <arg value="-package" />
+ <arg file="${build.dir}/${cod.name}.bar" />
+ </exec>
+ </target>
+
+ <!-- HELPER TASKS -->
+
+ <target name="generate-cod-name">
+ <xmlproperty file="www/config.xml" prefix="config.xml" />
+ <propertyregex property="cod.name"
+ input="${config.xml.widget.name}"
+ regexp="(\W+)"
+ replace=""
+ casesensitive="false"
+ global="true"
+ defaultValue="${config.xml.widget.name}" />
+ <echo message="Generated name: ${cod.name}.bar" />
+ </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
+
+COMMANDS
+ help .............. Show this help menu.
+ ant, ant help
+
+ load-device ....... Builds and deploys project to a connected USB device.
+ ant load-device
+
+ load-simulator .... Builds and deploys project to default simulator.
+ ant load-simulator
+
+ build ............. Compiles and packages the project for deployment.
+ ant build
+
+ clean ............. Remove all files from the build/ directory.
+ ant clean
+
+ clean-device ...... Remove this project from the connected USB device.
+ ant clean-device
+
+ clean-simulator ... Remove this project from the simulator (takes a while).
+ ant clean-simulator
+
+GETTING STARTED
+ 1. Edit project.properties
+
+ 2. &lt;ant &lt;TARGET&gt; 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 &lt;TARGET&gt; load-device&gt;.
+ </echo>
+ </target>
+</project>
View
137 lib/blackberry/project.properties
@@ -0,0 +1,137 @@
+# BlackBerry WebWorks Packager Directory
+#
+# The BlackBerry WebWorks Packager (bbwp) is required for compiling and packaging
+# BlackBerry WebWorks applications for deployment to a BlackBerry device
+# or simulator. The bbwp utility is installed with the standalone BlackBerry
+# WebWorks SDK, and as part of the BlackBerry Web Plugin for Eclipse.
+#
+# Please specify the location of the BlackBerry WebWorks Packager in your
+# environment.
+#
+# Typical location of bbwp for standalone BlackBerry WebWorks SDK installation:
+# C:\Program Files (x86)\Research In Motion\BlackBerry Widget Packager
+#
+# Typical location of bbwp for BlackBerry Web Plugin for Eclipse installation:
+# C:\Eclipse-3.5.2\plugins\net.rim.browser.tools.wcpc_1.0.0.201003191451-126\wcpc
+#
+# The ANT script is brittle and requires you to escape the backslashes.
+# e.g. C:\some\path must be C:\\some\\path
+#
+# Please remember to:
+# - Double escape your backslahses (i.e. \ must be \\)
+# - Do not add a trailing slash (e.g. C:\some\path)
+#
+blackberry.bbwp.dir=C:\\Program Files\\Research In Motion\\BlackBerry WebWorks Packager
+playbook.bbwp.dir=C:\\Program Files\\Research In Motion\\BlackBerry WebWorks SDK for TabletOS 2.1.0.6\\bbwp
+qnx.bbwp.dir=/Developer/SDKs/Research In Motion/BlackBerry 10 WebWorks SDK 1.0.4.7
+
+# (Optional) Simulator Directory
+#
+# If sim.dir is not specified, the build script will use the simulator directory
+# within the BlackBerry WebWorks Packager.
+#
+blackberry.sim.dir=C:\\Program Files\\Research In Motion\BlackBerry WebWorks Packager\\simpack\\6.0.0.227
+
+# (Optional) Simulator Binary
+#
+# If sim.bin is not specified, the build script will attempt to use the default
+# simulator in the simulator directory.
+#
+#blackberry.sim.bin=9700.bat
+
+# (Optional) MDS Directory
+#
+# If mds.dir is not specified, the build script will attempt to use the MDS that
+# is installed with the BlackBerry WebWorks Packager.
+#
+blackberry.mds.dir=C:\\Program Files\\Research In Motion\\BlackBerry WebWorks Packager\\mds
+
+# BlackBerry Code Signing Password
+#
+# If you leave this field blank, then
+# the signing tool will prompt you each time
+#
+blackberry.sigtool.password=
+
+# Playbook Code Signing Password
+#
+# If you leave these fields blank, then
+# signing will fail
+#
+playbook.sigtool.csk.password=
+playbook.sigtool.p12.password=
+
+# BB10 Code Signing Password
+qnx.sigtool.password=
+
+# BlackBerry Simulator Password
+#
+# If you leave this field blank, then
+# you cannot deploy to simulator
+#
+blackberry.sim.password=
+
+# Playbook Simulator IP
+#
+# If you leave this field blank, then
+# you cannot deploy to simulator
+#
+playbook.sim.ip=
+
+# Playbook Simulator Password
+#
+# If you leave this field blank, then
+# you cannot deploy to simulator
+#
+playbook.sim.password=
+
+# Playbook Device IP
+#
+# If you leave this field blank, then
+# you cannot deploy to device
+#
+playbook.device.ip=
+
+# Playbook Device Password
+#
+# If you leave this field blank, then
+# you cannot deploy to device
+#
+playbook.device.password=
+# PlayBook Device PIN
+#
+# Fill this value in to use debug tokens when debuging on the device
+playbook.device.pin=
+
+# QNX Simulator IP
+#
+# If you leave this field blank, then
+# you cannot deploy to simulator
+#
+qnx.sim.ip=
+
+# QNX Simulator Password
+#
+# If you leave this field blank, then
+# you cannot deploy to simulator
+#
+qnx.sim.password=
+
+# QNX Device IP
+#
+# If you leave this field blank, then
+# you cannot deploy to device
+#
+qnx.device.ip=
+
+# QNX Device Password
+#
+# If you leave this field blank, then
+# you cannot deploy to device
+#
+qnx.device.password=
+
+# QNX Device PIN
+#
+# Fill this value in to use debug tokens when debuging on the device
+qnx.device.pin=
View
336 lib/blackberry/qnx.xml
@@ -0,0 +1,336 @@
+<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 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="generate.ext" value="cod" />
+ <property name="build.num.file" value="buildId.txt" />
+
+ <!-- BlackBerry WebWorks Packager for Tablets directory is required. -->
+ <fail unless="properties.qnx.bbwp.dir" message="Please specify BlackBerry WebWorks Packager directory using 'qnx.bbwp.dir' in your 'project.properties' file." />
+
+ <!-- OS identification -->
+ <condition property="isMacOSX" else="false">
+ <and>
+ <os family="mac" />
+ <os family="unix" />
+ </and>
+ </condition>
+
+ <condition property="bbwp" value="${properties.qnx.bbwp.dir}/bbwp" else="${properties.qnx.bbwp.dir}/bbwp.bat">
+ <equals arg1="${isMacOSX}" arg2="true" />
+ </condition>
+
+ <condition property="blackberry-deploy" value="${properties.qnx.bbwp.dir}/dependencies/tools/bin/blackberry-deploy" else="${properties.qnx.bbwp.dir}/dependencies/tools/bin/blackberry-deploy.bat">
+ <equals arg1="${isMacOSX}" arg2="true" />
+ </condition>
+
+ <condition property="blackberry-debugtokenrequest" value="${properties.qnx.bbwp.dir}/dependencies/tools/bin/blackberry-debugtokenrequest" else="${properties.qnx.bbwp.dir}/dependencies/tools/bin/blackberry-debugtokenrequest.bat">
+ <equals arg1="${isMacOSX}" arg2="true" />
+ </condition>
+
+ <!-- LOAD DEVICE -->
+
+ <target name="load-device" depends="package-app">
+ <bbwp code-sign="true" />
+
+ <exec executable="${blackberry-deploy}" dir="." failonerror="true">
+ <arg value="-installApp" />
+ <arg value="-launchApp" />
+ <arg value="-device" />
+ <arg value="${properties.qnx.device.ip}" />
+ <arg value="-password" />
+ <arg value="${properties.qnx.device.password}" />
+ <arg value="-package" />
+ <arg file="${build.dir}/device/${cod.name}.bar" />
+ </exec>
+ </target>
+
+ <!-- DEBUG-LOAD DEVICE -->
+
+ <target name="debug-device" depends="package-app">
+ <if>
+ <equals arg1="${properties.qnx.device.pin}" arg2="" />
+ <then>
+ <echo>
+ If you fill in the qnx.device.pin value you can use debug tokens!
+ This means you won't have to worry about having a unique version in config.xml every time.
+ </echo>
+ <bbwp code-sign="true" debug="true" />
+ </then>
+ <else>
+ <generate-debug-token />
+ <bbwp code-sign="false" debug="true" />
+ </else>
+ </if>
+
+ <exec executable="${blackberry-deploy}" dir="." failonerror="true">
+ <arg value="-installApp" />
+ <arg value="-launchApp" />
+ <arg value="-device" />
+ <arg value="${properties.qnx.device.ip}" />
+ <arg value="-password" />
+ <arg value="${properties.qnx.device.password}" />
+ <arg value="-package" />
+ <arg file="${build.dir}/device/${cod.name}.bar" />
+ </exec>
+ </target>
+
+ <!-- LOAD SIMULATOR -->
+
+ <target name="load-simulator" depends="build">
+
+ <echo>This tool will not open the simulator for you </echo>
+
+ <exec executable="${blackberry-deploy}" dir="." failonerror="true">
+ <arg value="-installApp" />
+ <arg value="-launchApp" />
+ <arg value="-device" />
+ <arg value="${properties.qnx.sim.ip}" />
+ <arg value="-password" />
+ <arg value="${properties.qnx.sim.password}" />
+ <arg value="-package" />
+ <arg file="${build.dir}/simulator/${cod.name}.bar" />
+ </exec>
+ </target>
+
+ <target name="debug-simulator" depends="package-app">
+
+ <bbwp code-sign="false" debug="true" />
+ <echo>This tool will not open the simulator for you </echo>
+
+ <exec executable="${blackberry-deploy}" dir="." failonerror="true">
+ <arg value="-installApp" />
+ <arg value="-launchApp" />
+ <arg value="-device" />
+ <arg value="${properties.qnx.sim.ip}" />
+ <arg value="-password" />
+ <arg value="${properties.qnx.sim.password}" />
+ <arg value="-package" />
+ <arg file="${build.dir}/simulator/${cod.name}.bar" />
+ </exec>
+ </target>
+
+ <!-- PACKAGE-APP -->
+
+ <target name="package-app" depends="generate-cod-name, clean">
+ <!-- Copy the WebWorks application -->
+ <mkdir dir="${widget.dir}" />
+ <copy todir="${widget.dir}" overwrite="true">
+ <fileset dir="www" >
+ <exclude name="ext/**"/>
+ <exclude name="ext-air/**"/>
+ <exclude name="res/resourceBundles/**"/>
+ </fileset>
+ </copy>
+
+ <!-- Update WebWorks Packager with the QNX APIs -->
+ <copy todir="${properties.qnx.bbwp.dir}\Framework\ext" overwrite="true">
+ <fileset dir="www/ext-qnx" excludes="readme.md" />
+ </copy>
+
+ <!-- Package the WebWorks app by zipping the widget dir. -->
+ <mkdir dir="${build.dir}" />
+ <zip compress="false" destfile="${build.dir}/${cod.name}.zip" basedir="${widget.dir}" excludes="**/build/**,**/.settings/**,**/.project" />
+ </target>
+
+ <!-- BUILD -->
+
+ <target name="build" depends="package-app">
+ <bbwp code-sign="${code.sign}" />
+ </target>
+
+ <!-- BBWP MACRO -->
+
+ <macrodef name="bbwp">
+ <attribute name="code-sign" default="false" />
+ <attribute name="debug" default="false" />
+ <sequential>
+ <!-- check if debug flag was passed in and set an appropriate flag for CLI exec of bbwp -->
+ <if>
+ <equals arg1="@{debug}" arg2="true" />
+ <then>
+ <property name="debug.flag" value="-d" />
+ </then>
+ <else>
+ <property name="debug.flag" value="" />
+ </else>
+ </if>
+ <buildnumber file="${build.num.file}" />
+ <if>
+ <equals arg1="@{code-sign}" arg2="true" />
+ <then>
+ <exec executable="${bbwp}">
+ <arg file="${build.dir}/${cod.name}.zip" />
+ <arg value="-g" />
+ <arg value="${properties.qnx.sigtool.password}" />
+ <arg value="-o" />
+ <arg file="${build.dir}" />
+ <arg line="${debug.flag} -b" />
+ <arg value="${build.number}" />
+ <arg value="--loglevel" />
+ <arg value="error" />
+ </exec>
+ </then>
+ <else>
+ <exec executable="${bbwp}">
+ <arg file="${build.dir}/${cod.name}.zip" />
+ <arg value="-o" />
+ <arg file="${build.dir}" />
+ <arg line="${debug.flag}" />
+ <arg value="--loglevel" />
+ <arg value="error" />
+ </exec>
+ </else>
+ </if>
+ </sequential>
+ </macrodef>
+
+ <!-- install debug token" -->
+ <macrodef name="generate-debug-token">
+ <sequential>
+ <exec executable="${blackberry-debugtokenrequest}" dir="." failonerror="true">
+ <arg value="-storepass" />
+ <arg value="${properties.qnx.sigtool.password}" />
+ <arg value="-deviceID" />
+ <arg value="0x${properties.qnx.device.pin}" />
+ <arg file="${properties.qnx.bbwp.dir}/debugtoken.bar" />
+ </exec>
+
+ <exec executable="${blackberry-deploy}" dir="." failonerror="true">
+ <arg value="-installApp" />
+ <arg value="-device" />
+ <arg value="${properties.qnx.device.ip}" />
+ <arg value="-password" />
+ <arg value="${properties.qnx.device.password}" />
+ <arg value="-package" />
+ <arg file="${properties.qnx.bbwp.dir}/debugtoken.bar" />
+ </exec>
+ </sequential>
+ </macrodef>
+
+
+ <!-- CLEAN -->
+
+ <target name="clean">
+ <delete dir="${build.dir}" />
+ <delete dir="${widget.dir}" />
+ </target>
+
+ <!-- CLEAN DEVICE -->
+
+ <target name="clean-device" depends="generate-cod-name">
+ <exec executable="${blackberry-deploy}" dir="." failonerror="true">
+ <arg value="-uninstallApp" />
+ <arg value="-device" />
+ <arg value="${properties.qnx.device.ip}" />
+ <arg value="-password" />
+ <arg value="${properties.qnx.device.password}" />
+ <arg value="-package" />
+ <arg file="${build.dir}/device/${cod.name}.bar" />
+ </exec>
+ </target>
+
+ <!-- CLEAN SIMULATOR -->
+
+ <target name="clean-simulator" depends="generate-cod-name">
+ <exec executable="${blackberry-deploy}" dir="." failonerror="true">
+ <arg value="-uninstallApp" />
+ <arg value="-device" />
+ <arg value="${properties.qnx.sim.ip}" />
+ <arg value="-password" />
+ <arg value="${properties.qnx.sim.password}" />
+ <arg value="-package" />
+ <arg file="${build.dir}/simulator/${cod.name}.bar" />
+ </exec>
+ </target>
+
+ <!-- HELPER TASKS -->
+
+ <target name="generate-cod-name">
+ <xmlproperty file="www/config.xml" prefix="config.xml" />
+ <propertyregex property="cod.name"
+ input="${config.xml.widget.name}"
+ regexp="(\W+)"
+ replace=""
+ casesensitive="false"
+ global="true"
+ defaultValue="${config.xml.widget.name}" />
+ <echo message="Generated name: ${cod.name}.bar" />
+ </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
+
+COMMANDS
+ help .............. Show this help menu.
+ ant, ant help
+
+ load-device ....... Builds and deploys project to a connected USB device.
+ ant load-device
+
+ load-simulator .... Builds and deploys project to default simulator.
+ ant load-simulator
+
+ build ............. Compiles and packages the project for deployment.
+ ant build
+
+ clean ............. Remove all files from the build/ directory.
+ ant clean
+
+ clean-device ...... Remove this project from the connected USB device.
+ ant clean-device
+
+ clean-simulator ...