rhodes 2.2.6 → 2.3.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +20 -0
- data/README.md +46 -0
- data/Rakefile +85 -80
- data/bin/rhodes +2 -2
- data/bin/rhogen +1 -1
- data/doc/application.txt +277 -0
- data/doc/bb-css.txt +209 -0
- data/doc/build.txt +785 -0
- data/doc/configuration.txt +236 -0
- data/doc/connect-to-web-services.txt +282 -0
- data/doc/contributing.txt +64 -0
- data/doc/css-framework.txt +144 -0
- data/doc/device-caps.txt +1152 -0
- data/doc/extensions.txt +528 -0
- data/doc/files.txt +4 -0
- data/doc/generator.txt +141 -0
- data/doc/install.txt +35 -0
- data/doc/introduction.txt +88 -0
- data/doc/rhom.txt +826 -0
- data/doc/standard-css.txt +392 -0
- data/doc/synchronization.txt +542 -0
- data/doc/test-log-debug.txt +148 -0
- data/doc/tutorial.txt +136 -0
- data/doc/ui.txt +766 -0
- data/installer/EnvVarUpdate.nsh +328 -0
- data/installer/README.html +81 -0
- data/installer/RHOSYNC-LICENSE.txt +675 -0
- data/installer/icon.ico +0 -0
- data/installer/instant-rhodes.nsi +427 -0
- data/lib/build/jake.rb +15 -1
- data/lib/extensions/barcode/ext/barcode/platform/android/jni/src/imageprovider.cpp +1 -1
- data/lib/extensions/barcode/ext/barcode/platform/bb/Barcode6.files +45 -0
- data/lib/extensions/barcode/ext/barcode/platform/bb/Rakefile +6 -0
- data/lib/extensions/barcode/ext/barcode/platform/bb/barcode6.jdp +92 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Barcode.xcodeproj/project.pbxproj +7 -4
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Rakefile +2 -1
- data/lib/extensions/barcode/ext/barcode/platform/wm/src/wm_imageprovider.cpp +1 -1
- data/lib/extensions/digest-sha1/ext/build.bat +1 -0
- data/lib/extensions/digest-sha1/ext/digest-sha1.vcproj +335 -0
- data/lib/extensions/esri/ext/build +17 -0
- data/lib/extensions/esri/ext/build.bat +29 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewFactory.h +7 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewFactory.mm +58 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewFactoryRegister.mm +22 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewManager.h +21 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/ESRIViewManager.mm +32 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/InitESRI.c +5 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/MapViewControllerESRI.h +143 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Classes/MapViewControllerESRI.m +919 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/ESRI.xcodeproj/project.pbxproj +320 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/ESRI_Prefix.pch +7 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/Rakefile +76 -0
- data/lib/extensions/esri/ext.yml +3 -0
- data/lib/extensions/net-http/monitor.rb +265 -0
- data/lib/extensions/net-http/net/ftp.rb +981 -0
- data/lib/extensions/net-http/thread.rb +367 -0
- data/lib/extensions/rhocgi/cgi.rb +16 -0
- data/lib/extensions/rhospec/rhospec.rb +118 -0
- data/lib/framework/base64.rb +91 -0
- data/lib/framework/builtinME.rb +13 -10
- data/lib/framework/ostruct.rb +145 -0
- data/lib/framework/res/back_btn.wm.png +0 -0
- data/lib/framework/res/blue_pushpin.wm.png +0 -0
- data/lib/framework/res/blue_pushpin_small.wm.png +0 -0
- data/lib/framework/res/callout.wm.png +0 -0
- data/lib/framework/res/callout_link.wm.png +0 -0
- data/lib/framework/res/forward_btn.wm.png +0 -0
- data/lib/framework/res/home_btn.wm.png +0 -0
- data/lib/framework/res/options_btn.wm.png +0 -0
- data/lib/framework/res/refresh_btn.wm.png +0 -0
- data/lib/framework/rho/render.rb +5 -2
- data/lib/framework/rho/rho.rb +320 -50
- data/lib/framework/rho/rhoapplication.rb +48 -10
- data/lib/framework/rho/rhonativeviewmanager.rb +73 -0
- data/lib/framework/rho/rhosupport.rb +15 -1
- data/lib/framework/rho/rhotabbar.rb +29 -0
- data/lib/framework/rho/rhotoolbar.rb +17 -0
- data/lib/framework/rho/rhoutils.rb +22 -6
- data/lib/framework/rhodes.rb +1 -1
- data/lib/framework/rholang/rhomsg_de.rb +4 -3
- data/lib/framework/rholang/rhomsg_en.rb +1 -0
- data/lib/framework/rholang/rhomsg_es.rb +1 -0
- data/lib/framework/rholang/rhomsg_it.rb +1 -0
- data/lib/framework/rhom/rhom.rb +31 -10
- data/lib/framework/rhom/rhom_db_adapter.rb +33 -23
- data/lib/framework/rhom/rhom_object_factory.rb +465 -249
- data/lib/framework/rhom/rhom_source.rb +22 -7
- data/lib/framework/version.rb +1 -1
- data/lib/rhodes.rb +1 -1
- data/platform/android/Rhodes/AndroidManifest.xml +83 -20
- data/platform/android/Rhodes/gen/com/rhomobile/rhodes/R.java +5 -0
- data/platform/android/Rhodes/jni/include/rhodes/RhoClassFactory.h +2 -0
- data/platform/android/Rhodes/jni/include/rhodes/details/rhojava.inc +9 -5
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhodesAppOptions.h +53 -0
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhodesService.h +46 -56
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_SplashScreen.h +10 -0
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_mapview_MapView.h +93 -0
- data/platform/android/Rhodes/jni/include/rhodes/rhocryptimpl.h +38 -0
- data/platform/android/Rhodes/jni/include/rhodes.h +64 -8
- data/platform/android/Rhodes/jni/src/RhoClassFactory.cpp +6 -0
- data/platform/android/Rhodes/jni/src/alert.cpp +5 -11
- data/platform/android/Rhodes/jni/src/bluetooth.cpp +66 -29
- data/platform/android/Rhodes/jni/src/callbacks.cpp +24 -21
- data/platform/android/Rhodes/jni/src/camera.cpp +2 -6
- data/platform/android/Rhodes/jni/src/datetimepicker.cpp +13 -11
- data/platform/android/Rhodes/jni/src/event.cpp +9 -15
- data/platform/android/Rhodes/jni/src/fileapi.cpp +13 -27
- data/platform/android/Rhodes/jni/src/logconf.cpp +3 -3
- data/platform/android/Rhodes/jni/src/mapview.cpp +696 -16
- data/platform/android/Rhodes/jni/src/menu.cpp +3 -3
- data/platform/android/Rhodes/jni/src/nativebar.cpp +55 -4
- data/platform/android/Rhodes/jni/src/nativeview.cpp +33 -0
- data/platform/android/Rhodes/jni/src/phonebook.cpp +6 -11
- data/platform/android/Rhodes/jni/src/rhoconf.cpp +4 -4
- data/platform/android/Rhodes/jni/src/rhocryptimpl.cpp +87 -0
- data/platform/android/Rhodes/jni/src/rhodes.cpp +55 -34
- data/platform/android/Rhodes/jni/src/ringtones.cpp +2 -3
- data/platform/android/Rhodes/jni/src/signature.cpp +3 -5
- data/platform/android/Rhodes/jni/src/splashscreen.cpp +7 -0
- data/platform/android/Rhodes/jni/src/sslimpl.cpp +17 -20
- data/platform/android/Rhodes/jni/src/webview.cpp +13 -12
- data/platform/android/Rhodes/res/drawable/callout.png +0 -0
- data/platform/android/Rhodes/res/drawable/callout_link.png +0 -0
- data/platform/android/Rhodes/res/drawable/signature_cancel.png +0 -0
- data/platform/android/Rhodes/res/drawable/signature_clear.png +0 -0
- data/platform/android/Rhodes/res/drawable/signature_ok.png +0 -0
- data/platform/android/Rhodes/res/layout/datetime.xml +4 -0
- data/platform/android/Rhodes/res/layout/signature.xml +24 -17
- data/platform/android/Rhodes/res/layout/status_bar_ongoing_event_progress_bar.xml +102 -0
- data/platform/android/Rhodes/res/values/strings.xml +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/AndroidR.java +6 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Base64.java +575 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/BaseActivity.java +83 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/NativeBar.java +21 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushReceiver.java +23 -15
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushService.java +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoCryptImpl.java +151 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoMenu.java +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +372 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesAppOptions.java +11 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +58 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +705 -523
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RingtoneManager.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/SplashScreen.java +167 -85
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Utils.java +36 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/WebView.java +4 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java +33 -20
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/IRhoBluetoothManager.java +2 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothManager.java +2 -24
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothManagerNew.java +106 -36
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothManagerOld.java +15 -58
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothSession.java +0 -7
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/Camera.java +6 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/FileList.java +4 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/ImageCapture.java +91 -27
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePicker.java +6 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePickerScreen.java +275 -42
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/EventStore.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/file/RhoFileApi.java +1 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocationImpl.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/MainView.java +1 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +120 -43
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java +518 -28
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/AnnotationsOverlay.java +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/GoogleMapView.java +434 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapTouch.java +20 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapView.java +296 -336
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MultiTouchHandler.java +111 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/OneTouchHandler.java +77 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/TouchHandler.java +10 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/nativeview/RhoNativeViewManager.java +0 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/Contact.java +5 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessorNew.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessorOld.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/ImageCapture.java +6 -11
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/Signature.java +6 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/SignatureView.java +0 -7
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/ui/LogViewDialog.java +9 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/util/PerformOnUiThread.java +8 -8
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientNew.java +5 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientOld.java +11 -7
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsNew.java +3 -5
- data/platform/android/build/RhodesSRC_build.files +32 -23
- data/platform/android/build/android.rake +28 -11
- data/platform/android/build/androidcommon.rb +2 -0
- data/platform/android/build/librhocommon_build.files +9 -5
- data/platform/android/build/librhodes_build.files +1 -0
- data/platform/android/build/libruby_build.files +1 -0
- data/platform/bb/Hsqldb/Hsqldb.jdp +0 -2
- data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBResult.java +10 -2
- data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBStorage.java +37 -5
- data/platform/bb/Hsqldb/src/org/hsqldb/Column.java +5 -5
- data/platform/bb/Hsqldb/src/org/hsqldb/Expression.java +1 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/Function.java +73 -78
- data/platform/bb/Hsqldb/src/org/hsqldb/Library.java +288 -8
- data/platform/bb/RubyVM/RubyVM.jdp +3 -0
- data/platform/bb/RubyVM/src/com/rho/FilePath.java +13 -1
- data/platform/bb/RubyVM/src/com/rho/IRhoRubyHelper.java +2 -2
- data/platform/bb/RubyVM/src/com/rho/RhoAppAdapter.java +12 -0
- data/platform/bb/RubyVM/src/com/rho/RhoClassFactory.java +18 -1
- data/platform/bb/RubyVM/src/com/rho/RhoConf.java +128 -108
- data/platform/bb/RubyVM/src/com/rho/RhoLogConf.java +9 -10
- data/platform/bb/RubyVM/src/com/rho/RhoLogger.java +16 -1
- data/platform/bb/RubyVM/src/com/rho/RhoProfiler.java +1 -1
- data/platform/bb/RubyVM/src/com/rho/RhoRuby.java +20 -0
- data/platform/bb/RubyVM/src/com/rho/RhodesApp.java +5 -2
- data/platform/bb/RubyVM/src/com/rho/ThreadQueue.java +65 -46
- data/platform/bb/RubyVM/src/com/rho/db/DBAdapter.java +192 -50
- data/platform/bb/RubyVM/src/com/rho/db/DBAttrManager.java +8 -114
- data/platform/bb/RubyVM/src/com/rho/db/DBException.java +1 -1
- data/platform/bb/RubyVM/src/com/rho/db/IDBCallback.java +1 -1
- data/platform/bb/RubyVM/src/com/rho/db/IDBResult.java +5 -3
- data/platform/bb/RubyVM/src/com/rho/db/IDBStorage.java +5 -1
- data/platform/bb/RubyVM/src/com/rho/file/FileAccessBB.java +109 -0
- data/platform/bb/RubyVM/src/com/rho/file/RhoFile.java +85 -0
- data/platform/bb/RubyVM/src/com/rho/net/NetRequest.java +12 -4
- data/platform/bb/RubyVM/src/com/rho/net/NetResponse.java +5 -0
- data/platform/bb/RubyVM/src/com/rho/net/RhoConnection.java +37 -23
- data/platform/bb/RubyVM/src/com/rho/net/URI.java +84 -0
- data/platform/bb/RubyVM/src/com/rho/sync/ClientRegister.java +1 -1
- data/platform/bb/RubyVM/src/com/rho/sync/SyncEngine.java +119 -61
- data/platform/bb/RubyVM/src/com/rho/sync/SyncNotify.java +61 -24
- data/platform/bb/RubyVM/src/com/rho/sync/SyncSource.java +108 -54
- data/platform/bb/RubyVM/src/com/rho/sync/SyncThread.java +121 -163
- data/platform/bb/RubyVM/src/com/xruby/GeneratedMethods/RubyString_Methods.java +23 -0
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyMutex.java +1 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyRange.java +3 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyRegexp.java +3 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyString.java +208 -25
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyTime.java +3 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RhoSupport.java +5 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyAPI.java +12 -5
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyID.java +1 -0
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyKernelModule.java +16 -0
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyKernelModule_Methods.java +5 -0
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyValue.java +1 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/stdlib/RubyStringIO.java +4 -1
- data/platform/bb/{Hsqldb → RubyVM}/src/j2me/math/Number.java +33 -0
- data/platform/bb/build/RubyVM_build.files +3 -0
- data/platform/bb/build/bb.rake +140 -62
- data/platform/bb/build/hsqldb_build.files +0 -2
- data/platform/bb/build/rhodes_build.files +5 -0
- data/platform/bb/rhodes/platform/4.7/com/rho/RhoMainScreen.java +43 -7
- data/platform/bb/rhodes/platform/5.0/com/rho/BrowserAdapter5.java +23 -2
- data/platform/bb/rhodes/platform/5.0/com/rho/RhodesApplicationPlatform.java +5 -0
- data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteCopyResult.java +143 -0
- data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteResult.java +269 -0
- data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteStorage.java +446 -0
- data/platform/bb/rhodes/platform/common/com/rho/BrowserAdapter5.java +3 -0
- data/platform/bb/rhodes/platform/common/com/rho/RhoMainScreen.java +12 -2
- data/platform/bb/rhodes/platform/common/com/rho/db/SqliteCopyResult.java +2 -0
- data/platform/bb/rhodes/platform/common/com/rho/db/SqliteResult.java +2 -0
- data/platform/bb/rhodes/platform/common/com/rho/db/SqliteStorage.java +2 -0
- data/platform/bb/rhodes/resources/mappin.png +0 -0
- data/platform/bb/rhodes/rhodes.jdp +3 -0
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter.java +21 -18
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter5.java +150 -0
- data/platform/bb/rhodes/src/com/rho/IBrowserAdapter.java +1 -0
- data/platform/bb/rhodes/src/com/rho/RhoMainScreen.java +63 -4
- data/platform/bb/rhodes/src/com/rho/RhoRubyHelper.java +6 -5
- data/platform/bb/rhodes/src/com/rho/RhodesApplicationPlatform.java +242 -2
- data/platform/bb/rhodes/src/com/rho/db/SqliteCopyResult.java +143 -0
- data/platform/bb/rhodes/src/com/rho/db/SqliteResult.java +269 -0
- data/platform/bb/rhodes/src/com/rho/db/SqliteStorage.java +446 -0
- data/platform/bb/rhodes/src/com/rho/file/Jsr75File.java +1 -1
- data/platform/bb/rhodes/src/com/rho/net/NetworkAccess.java +71 -14
- data/platform/bb/rhodes/src/com/rho/net/bb/BBHttpConnection.java +4 -2
- data/platform/bb/rhodes/src/com/rho/rubyext/Alert.java +28 -12
- data/platform/bb/rhodes/src/com/rho/rubyext/System.java +100 -4
- data/platform/bb/rhodes/src/com/rho/rubyext/WebView.java +3 -2
- data/platform/bb/rhodes/src/com/rho/rubyext/XMLParser.java +1 -1
- data/platform/bb/rhodes/src/rhomobile/NativeBar.java +32 -0
- data/platform/bb/rhodes/src/rhomobile/PushListeningThread.java +9 -2
- data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +174 -41
- data/platform/bb/rhodes/src/rhomobile/datetime/DateTimePicker.java +52 -3
- data/platform/bb/rhodes/src/rhomobile/datetime/DateTimeScreen.java +33 -1
- data/platform/bb/rhodes/src/rhomobile/mapview/Annotation.java +2 -14
- data/platform/bb/rhodes/src/rhomobile/mapview/ESRIMapField.java +686 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/ESRIMapProvider.java +14 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/GeoCoding.java +13 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/GoogleGeoCoding.java +174 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/GoogleMapField.java +104 -330
- data/platform/bb/rhodes/src/rhomobile/mapview/MapTools.java +79 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/MapView.java +35 -12
- data/platform/bb/rhodes/src/rhomobile/mapview/MapViewParent.java +2 -1
- data/platform/bb/rhodes/src/rhomobile/mapview/MapViewScreen.java +336 -44
- data/platform/bb/rhodes/src/rhomobile/mapview/RhoMapField.java +3 -6
- data/platform/iphone/Classes/AppManager/AppManager.m +19 -4
- data/platform/iphone/Classes/DateTime.h +4 -0
- data/platform/iphone/Classes/DateTime.m +1 -1
- data/platform/iphone/Classes/DateTimePicker.m +8 -1
- data/platform/iphone/Classes/DateTimePickerDelegate.m +7 -1
- data/platform/iphone/Classes/Event/Event.m +2 -2
- data/platform/iphone/Classes/MapView/MapViewController.h +4 -1
- data/platform/iphone/Classes/MapView/MapViewController.m +6 -46
- data/platform/iphone/Classes/MapView/MapViewManager.h +26 -0
- data/platform/iphone/Classes/MapView/MapViewManager.m +172 -0
- data/platform/iphone/Classes/NativeBar.h +34 -0
- data/platform/iphone/Classes/NativeBar.m +131 -26
- data/platform/iphone/Classes/NativeView/NVDelegate.h +26 -0
- data/platform/iphone/Classes/NativeView/NVDelegate.m +40 -0
- data/platform/iphone/Classes/NativeView/NVViewController.h +24 -0
- data/platform/iphone/Classes/NativeView/NVViewController.m +90 -0
- data/platform/iphone/Classes/NativeView/RhoNativeViewManager.mm +449 -0
- data/platform/iphone/Classes/{RhoNativeViewManagerOC.h → NativeView/RhoNativeViewManagerOC.h} +15 -0
- data/platform/iphone/Classes/RhoAlert.m +3 -3
- data/platform/iphone/Classes/RhoMainView.h +3 -0
- data/platform/iphone/Classes/Rhodes.h +6 -2
- data/platform/iphone/Classes/Rhodes.m +47 -79
- data/platform/iphone/Classes/Signature/SignatureViewController.m +1 -0
- data/platform/iphone/Classes/SimpleMainView.h +18 -1
- data/platform/iphone/Classes/SimpleMainView.m +180 -35
- data/platform/iphone/Classes/SplitView/LeftViewController.h +1 -1
- data/platform/iphone/Classes/SplitView/LeftViewController.m +13 -7
- data/platform/iphone/Classes/SplitView/RightViewController.h +1 -1
- data/platform/iphone/Classes/SplitView/RightViewController.m +26 -11
- data/platform/iphone/Classes/SplitView/SplittedMainView.h +1 -6
- data/platform/iphone/Classes/SplitView/SplittedMainView.m +14 -52
- data/platform/iphone/Classes/TabbedMainView.h +25 -3
- data/platform/iphone/Classes/TabbedMainView.m +340 -14
- data/platform/iphone/ESRI/BluePushpin.png +0 -0
- data/platform/iphone/ESRI/BluePushpin@2x.png +0 -0
- data/platform/iphone/ESRI/esri.png +0 -0
- data/platform/iphone/ESRI/esri@2x.png +0 -0
- data/platform/iphone/Info.plist +1 -1
- data/platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj +26 -3
- data/platform/iphone/rbuild/iphone.rake +100 -4
- data/platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj +12 -0
- data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +116 -12
- data/platform/shared/SyncClient/SyncClient.cpp +29 -3
- data/platform/shared/SyncClient/SyncClient.h +2 -1
- data/platform/shared/common/IRhoClassFactory.h +3 -0
- data/platform/shared/common/IRhoCrypt.h +16 -0
- data/platform/shared/common/IRhoThreadImpl.h +1 -0
- data/platform/shared/common/RhoAppAdapter.h +2 -0
- data/platform/shared/common/RhoConf.cpp +97 -46
- data/platform/shared/common/RhoConf.h +14 -13
- data/platform/shared/common/RhoFile.cpp +10 -0
- data/platform/shared/common/RhoFile.h +1 -0
- data/platform/shared/common/RhoMath.cpp +43 -0
- data/platform/shared/common/RhoMath.h +27 -0
- data/platform/shared/common/RhoNativeViewManager.h +27 -1
- data/platform/shared/common/RhoPort.h +11 -0
- data/platform/shared/common/RhoStd.h +5 -0
- data/platform/shared/common/RhoThread.cpp +1 -1
- data/platform/shared/common/RhoThread.h +1 -1
- data/platform/shared/common/RhodesApp.cpp +381 -139
- data/platform/shared/common/RhodesApp.h +24 -10
- data/platform/shared/common/RhodesAppBase.cpp +72 -1
- data/platform/shared/common/RhodesAppBase.h +5 -1
- data/platform/shared/common/SplashScreen.h +4 -4
- data/platform/shared/common/ThreadQueue.cpp +44 -17
- data/platform/shared/common/ThreadQueue.h +4 -0
- data/platform/shared/common/app_build_configs.c +0 -1
- data/platform/shared/common/iphone/RhoClassfactory.h +6 -0
- data/platform/shared/common/iphone/RhoCryptImpl.h +47 -0
- data/platform/shared/common/iphone/RhoCryptImpl.mm +286 -0
- data/platform/shared/common/map/ESRIMapEngine.cpp +921 -0
- data/platform/shared/common/map/ESRIMapEngine.h +255 -0
- data/platform/shared/common/map/GoogleMapEngine.cpp +160 -0
- data/platform/shared/common/map/GoogleMapEngine.h +52 -0
- data/platform/shared/common/map/MapEngine.cpp +304 -0
- data/platform/shared/common/map/MapEngine.h +214 -0
- data/platform/shared/db/DBAdapter.cpp +147 -18
- data/platform/shared/db/DBAdapter.h +38 -12
- data/platform/shared/db/DBAttrManager.cpp +4 -3
- data/platform/shared/db/DBAttrManager.h +7 -7
- data/platform/shared/db/res/db/syncdb.triggers +0 -5
- data/platform/shared/db/res/db/syncdb_java.triggers +21 -0
- data/platform/shared/json/JSONIterator.cpp +11 -1
- data/platform/shared/json/JSONIterator.h +1 -0
- data/platform/shared/logging/RhoLogConf.cpp +29 -12
- data/platform/shared/net/CURLNetRequest.cpp +80 -25
- data/platform/shared/net/CURLNetRequest.h +6 -2
- data/platform/shared/net/HttpServer.cpp +12 -6
- data/platform/shared/net/HttpServer.h +2 -1
- data/platform/shared/net/INetRequest.h +1 -0
- data/platform/shared/ruby/ext/alert/alert.i +5 -0
- data/platform/shared/ruby/ext/alert/alert_wrap.c +439 -108
- data/platform/shared/ruby/ext/datetimepicker/datetimepicker.i +42 -0
- data/platform/shared/ruby/ext/datetimepicker/datetimepicker_wrap.c +521 -120
- data/platform/shared/ruby/ext/nativebar/nativebar.i +16 -0
- data/platform/shared/ruby/ext/nativebar/nativebar_wrap.c +623 -128
- data/platform/shared/ruby/ext/nativeviewmanager/nativeviewmanager.i +18 -0
- data/platform/shared/ruby/ext/nativeviewmanager/nativeviewmanager_wrap.c +2321 -0
- data/platform/shared/ruby/ext/rho/extensions.c +0 -1
- data/platform/shared/ruby/ext/rho/rhoruby.c +53 -0
- data/platform/shared/ruby/ext/rho/rhoruby.h +6 -0
- data/platform/shared/ruby/ext/sqlite3_api/sqlite3_api_wrap.c +6 -3
- data/platform/shared/ruby/ext/syncengine/syncengine.i +9 -1
- data/platform/shared/ruby/ext/syncengine/syncengine_wrap.c +61 -0
- data/platform/shared/ruby/ext/system/system.i +4 -0
- data/platform/shared/ruby/ext/system/system_wrap.c +33 -5
- data/platform/shared/rubyext/RhoAppAdapter.cpp +11 -1
- data/platform/shared/rubyext/System.cpp +9 -0
- data/platform/shared/rubyext/WebView.h +1 -0
- data/platform/shared/sqlite/crypto.c +907 -0
- data/platform/shared/sqlite/sqlite3.c +6 -0
- data/platform/shared/sync/SyncEngine.cpp +49 -19
- data/platform/shared/sync/SyncEngine.h +0 -1
- data/platform/shared/sync/SyncNotify.cpp +14 -5
- data/platform/shared/sync/SyncNotify.h +2 -2
- data/platform/shared/sync/SyncSource.cpp +79 -33
- data/platform/shared/sync/SyncSource.h +1 -0
- data/platform/shared/sync/SyncThread.cpp +26 -11
- data/platform/shared/xruby/src/com/xruby/compiler/codedom/StringExpression.java +4 -2
- data/platform/wm/RhoLib/RhoLib.vcproj +108 -72
- data/platform/wm/build/wm.rake +6 -0
- data/platform/wm/rhodes/Alert.cpp +4 -3
- data/platform/wm/rhodes/Alert.h +1 -1
- data/platform/wm/rhodes/DateTimePicker.cpp +30 -3
- data/platform/wm/rhodes/DateTimePicker.h +9 -1
- data/platform/wm/rhodes/MainWindow.cpp +121 -61
- data/platform/wm/rhodes/MainWindow.h +29 -4
- data/platform/wm/rhodes/MapView/Graphics.cpp +547 -0
- data/platform/wm/rhodes/MapView/Graphics.h +136 -0
- data/platform/wm/rhodes/MapView/MapViewManager.cpp +391 -0
- data/platform/wm/rhodes/MapView/MapViewManager.h +158 -0
- data/platform/wm/rhodes/RhoCryptImpl.cpp +248 -0
- data/platform/wm/rhodes/RhoCryptImpl.h +51 -0
- data/platform/wm/rhodes/RhoNativeViewManager.cpp +208 -0
- data/platform/wm/rhodes/Rhodes.cpp +94 -102
- data/platform/wm/rhodes/Rhodes.rc +27 -0
- data/platform/wm/rhodes/SyncStatusDlg.cpp +1 -0
- data/platform/wm/rhodes/SyncStatusDlg.h +2 -1
- data/platform/wm/rhodes/bluetooth/Bluetooth.cpp +7 -4
- data/platform/wm/rhodes/camera/Camera.cpp +36 -15
- data/platform/wm/rhodes/camera/Camera.h +0 -4
- data/platform/wm/rhodes/resource.h +10 -2
- data/platform/wm/rhodes/rho/common/RhoClassFactory.cpp +7 -0
- data/platform/wm/rhodes/rho/common/RhoClassFactory.h +1 -0
- data/platform/wm/rhodes/rho/net/NetRequestImpl.cpp +10 -2
- data/platform/wm/rhodes/rho/net/NetRequestImpl.h +10 -0
- data/platform/wm/rhodes/rho/rubyext/NativeToolbar.cpp +513 -0
- data/platform/wm/rhodes/rho/rubyext/NativeToolbar.h +74 -0
- data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +22 -10
- data/platform/wm/rhodes/rho/rubyext/WebView.cpp +5 -0
- data/platform/wm/rhodes/rhodes.vcproj +38 -2
- data/platform/wm/rhodes/stdafx.h +2 -1
- data/platform/wm/rubylib/rubylib.vcproj +12 -0
- data/rakefile.rb +85 -80
- data/res/build-tools/iphonesim/Source/iPhoneSimulator.m +14 -3
- data/res/build-tools/iphonesim/build/Release/iphonesim +0 -0
- data/res/build-tools/iphonesim/iphonesim.xcodeproj/project.pbxproj +2 -0
- data/res/build-tools/xruby-0.3.3.jar +0 -0
- data/res/generators/templates/application/app/application.rb +2 -2
- data/res/generators/templates/application/app/helpers/application_helper.rb +1 -1
- data/res/generators/templates/application/public/css/android.css +1 -0
- data/res/generators/templates/application/public/jqtouch/jquery.1.3.2.min.js +1 -1
- data/res/generators/templates/application/rhoconfig.txt +66 -14
- data/rhodes.gemspec +3 -3
- data/spec/framework_spec/app/spec/core/file/expand_path_spec.rb +7 -3
- data/spec/framework_spec/build.yml +1 -1
- data/spec/phone_spec/Rakefile +1 -0
- data/spec/phone_spec/app/Account/account.rb +2 -0
- data/spec/phone_spec/app/Account_s/account_s.rb +7 -0
- data/spec/phone_spec/app/spec/{fixtures → array/fixtures}/classes.rb +0 -0
- data/spec/phone_spec/app/spec/{array_pack_spec.rb → array/pack_spec.rb} +2 -1
- data/spec/phone_spec/app/spec/bulksync_spec.rb +1 -0
- data/spec/phone_spec/app/spec/contacts_spec.rb +2 -0
- data/spec/phone_spec/app/spec/rho_spec.rb +34 -233
- data/spec/phone_spec/app/spec/rhom_object_spec.rb +396 -87
- data/spec/phone_spec/app/spec/string/element_set_spec.rb +251 -0
- data/spec/phone_spec/app/spec/string/end_with_spec.rb +49 -0
- data/spec/phone_spec/app/spec/string/fixtures/classes.rb +27 -0
- data/spec/phone_spec/app/spec/{lstrip_spec.rb → string/lstrip_spec.rb} +0 -0
- data/spec/phone_spec/app/spec/string/replace_spec.rb +52 -0
- data/spec/phone_spec/app/spec/{rstrip_spec.rb → string/rstrip_spec.rb} +0 -0
- data/spec/phone_spec/app/spec/string/slice_spec.rb +473 -0
- data/spec/phone_spec/app/spec/string/split_spec.rb +302 -0
- data/spec/phone_spec/app/spec/string/start_with_spec.rb +48 -0
- data/spec/phone_spec/app/spec/{strip_spec.rb → string/strip_spec.rb} +0 -0
- data/spec/phone_spec/app/spec/syncengine_spec.rb +30 -1
- data/spec/phone_spec/app/spec_runner.rb +15 -7
- data/spec/phone_spec/build.yml +2 -2
- metadata +154 -25
- data/README.textile +0 -45
- data/platform/android/Rhodes/AndroidManifest.full.xml +0 -62
- data/platform/android/Rhodes/gen/com/rhomobile/rhodes/Manifest.java +0 -14
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoActivity.java +0 -20
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Rhodes.java +0 -193
- data/platform/bb/Hsqldb/src/com/rho/file/FileAccessBB.java +0 -25
- data/platform/bb/RubyVM/src/com/rho/AppBuildConfig.java +0 -22
- data/platform/bb/RubyVM/src/com/rho/Capabilities.java +0 -6
- data/platform/bb/RubyVM/src/com/rho/Extensions.java +0 -11
- data/platform/iphone/Classes/RhoNativeViewManager.mm +0 -226
data/doc/build.txt
ADDED
@@ -0,0 +1,785 @@
|
|
1
|
+
# Build Rhodes Application
|
2
|
+
|
3
|
+
This page describes how to build Rhodes Application on all of our supported platforms: iPhone, RIM Blackberry, Windows Mobile and Android.
|
4
|
+
|
5
|
+
## All Platforms Prerequisites
|
6
|
+
|
7
|
+
### Required Software
|
8
|
+
|
9
|
+
For Windows use [Instant Rhodes](install#install-on-windows). On Mac, Linux, and Windows (if you didn't use Instant Rhodes) make sure you have following software installed:
|
10
|
+
|
11
|
+
* Ruby 1.8.6 or 1.8.7. Load it from [here](http://www.ruby-lang.org/en/downloads/).
|
12
|
+
* RubyGems v1.3.7 or higher. Load it from [here](http://rubygems.org/).
|
13
|
+
* GNU make 3.80 or higher (required by gem). Probably you already have it installed if you are running Mac OS X or Linux. On Windows, download it from [here](http://gnuwin32.sourceforge.net/packages/make.htm) and install it somewhere on your system. Ensure you have location where it installed in your PATH environment variable.
|
14
|
+
* Rhodes gem. Run `[sudo] gem install rhodes` to install the latest rhodes gem.
|
15
|
+
**NOTE: If you get any "no such file to load -- something" messages while running the rake tasks or rhogen commands, this can usually be resolved by running '[sudo] gem install something'. **
|
16
|
+
|
17
|
+
Setup HOME environment variable:
|
18
|
+
|
19
|
+
C:\Documents and Settings\<account_name>
|
20
|
+
|
21
|
+
If you are planning to build for Blackberry or Android, make sure you have JDK version 1.6.0_2 or higher installed. Recommended version 6.0 update 11.
|
22
|
+
|
23
|
+
* Version 1.6.0_13 for Mac OSX 10.5 available [here](http://support.apple.com/downloads/Java_for_Mac_OS_X_10_5_Update_4). Install it and then run "Java Preferences" utility to change default version.
|
24
|
+
* Sun JDK for Windows or Linux is available [here](http://java.sun.com/javase/downloads/index.jsp). The 32-bit Windows version is required for Blackberry tools.
|
25
|
+
|
26
|
+
Make sure you set JAVA_HOME and that JAVA_HOME/bin is on your path.
|
27
|
+
|
28
|
+
## Setup Rhodes Source Code
|
29
|
+
|
30
|
+
If you planning to modify or [extend](extensions) Rhodes, you will need Rhodes source code. It is distributed under MIT license and it is perfectly all right for you to hack it if you want to. But you don't need it otherwise, having Rhodes gem installed is enough.
|
31
|
+
|
32
|
+
Rhodes source code is available on github.com and you will need Git to get it form there. If you used [Instant Rhodes](install#install-on-windows) you probably already have it installed on your system. Otherwise, load it form [here](http://git-scm.com).
|
33
|
+
|
34
|
+
To clone Rhodes, execute following from the command line:
|
35
|
+
|
36
|
+
:::term
|
37
|
+
$ git clone git://github.com/rhomobile/rhodes.git
|
38
|
+
$ cd rhodes
|
39
|
+
|
40
|
+
Checkout the branch you are interested in (if not master):
|
41
|
+
|
42
|
+
:::term
|
43
|
+
$ git checkout -f -b <branchname> --track origin/<branchname>
|
44
|
+
|
45
|
+
Make sure you're up-to-date on the branch:
|
46
|
+
|
47
|
+
:::term
|
48
|
+
$ git pull
|
49
|
+
|
50
|
+
Add the bin folder to your path. On Linux/Mac it is typically done via the .profile. On windows it is done via the system control panel.
|
51
|
+
|
52
|
+
Configure your environment by running the rhodes-setup script. This will attempt to auto-detect installed SDK's and will prompt you to verify them or enter ones that cannot be detected.
|
53
|
+
|
54
|
+
:::term
|
55
|
+
$ rhodes-setup
|
56
|
+
|
57
|
+
### Build rhodes gem from source
|
58
|
+
|
59
|
+
You don't have to do it if you cloned sources, but if you want to build rhodes gem then do following:
|
60
|
+
|
61
|
+
:::term
|
62
|
+
$ git clone git://github.com/rhomobile/rhodes.git
|
63
|
+
$ cd rhodes
|
64
|
+
$ rake gem
|
65
|
+
$ gem install rhodes-[version].gem
|
66
|
+
|
67
|
+
### Build from Rhodes sources directly without gem
|
68
|
+
|
69
|
+
To build your application from Rhodes source code just set sdk: property in the build.yml (it is in the root folder of your app) to the Rhodes source code root folder.
|
70
|
+
|
71
|
+
## Build for iPhone/iPad
|
72
|
+
|
73
|
+
iPhone/iPad versions of Rhodes Apps have to be built on Mac machines or could be build on [rhohub.com](http://rhohub.com). The instructions below describe how to do this from either the XCode development environment or from the command line on your local Mac.
|
74
|
+
|
75
|
+
### Prerequisites
|
76
|
+
|
77
|
+
To build for iPhone/iPad you will need following software installed:
|
78
|
+
|
79
|
+
* Mac OS X 10.5 (Leopard) or greater (Snow Leopard)
|
80
|
+
* Follow [All Platforms Prerequisites](#all-platforms-prerequisites)
|
81
|
+
* iPhone SDK. We recommend the latest stable version available from the [iPhone Dev Center](http://developer.apple.com/iphone/index.action)
|
82
|
+
|
83
|
+
### Build Application with XCode
|
84
|
+
|
85
|
+
To build for iPhone/iPad follow these steps:
|
86
|
+
|
87
|
+
Note the 'sdk:' value in your build.yml. You will use this in the next step.
|
88
|
+
|
89
|
+
Inside the <sdk directory from previous step>/platform/iphone directory is an iPhone XCode project, double-click on it to open XCode.
|
90
|
+
|
91
|
+
Open up a command window and switch to your application's directory. Run:
|
92
|
+
|
93
|
+
:::term
|
94
|
+
$ rake switch_app
|
95
|
+
|
96
|
+
This changes your rhobuild.yml in the SDK folder to point to your application.
|
97
|
+
|
98
|
+
After you change application code just run 'Build and Go' command in XCode to build for the simulator.
|
99
|
+
|
100
|
+
If you want to build for the device, open the 'rhorunner' target and select your code signing information that you installed from the apple developer site and change your active sdk to a device.
|
101
|
+
|
102
|
+
* Tip: after you make changes and want to see them reflected on the device, reset the simulator and repeat #2.
|
103
|
+
* Tip: to see a log of what is happening on the device, type command-shift-r in xcode to bring up the rhorunner console.
|
104
|
+
|
105
|
+
Result application package (*.app) located in <sdk directory>/platform/iphone/build/[Debug/Release]-[iphoneos/iphonesimulator]/rhorunner.app
|
106
|
+
|
107
|
+
### Build and Release on App Store
|
108
|
+
|
109
|
+
Once you have the application building with XCode as described above, it is treated as any other iPhone application when it comes to [signing and distributing to the app store](http://developer.apple.com/iphone/appstore/).
|
110
|
+
|
111
|
+
### Build Application from Command Line
|
112
|
+
|
113
|
+
Unlike building the application from the XCode GUI, you build the application from command line via the rake command inside the directory of the app you had just generated with rhogen.
|
114
|
+
|
115
|
+
Change directory to your rhodes application.
|
116
|
+
|
117
|
+
Look at the contents of build.yml and verify the following setting `applog`. Do not enter full path here, this file will be in your app directory:
|
118
|
+
|
119
|
+
applog: rholog.txt
|
120
|
+
|
121
|
+
Run:
|
122
|
+
|
123
|
+
:::term
|
124
|
+
$ rake run:iphone
|
125
|
+
|
126
|
+
Modify your application code. Exit application in simulator and run:
|
127
|
+
|
128
|
+
:::term
|
129
|
+
$ rake run:iphone
|
130
|
+
|
131
|
+
### Build application for device
|
132
|
+
|
133
|
+
Modify build.yml:
|
134
|
+
|
135
|
+
iphone:
|
136
|
+
sdk: iphoneos4.2
|
137
|
+
configuration: Release
|
138
|
+
codesignidentity: "iPhone Developer"
|
139
|
+
entitlements: ""
|
140
|
+
|
141
|
+
Run:
|
142
|
+
|
143
|
+
:::term
|
144
|
+
rake device:iphone:production
|
145
|
+
|
146
|
+
Result package named <b>your application name.app</b> will be placed to `<your application folder>/bin/target/iOS/[sdkname]/[configuration]/[your application name].app` if you using Rhodes from 2.2.4 version.
|
147
|
+
|
148
|
+
Result package named <b>rhorunner.app</b> will be placed to `<sdk directory>/platform/iphone/build/[Debug/Release/Distribution]-[iphoneos/iphonesimulator]/rhorunner.app` if you using Rhodes before 2.2.4 version.
|
149
|
+
|
150
|
+
### Install Application to device
|
151
|
+
Use <b>iTunes</b> for install you application package (your application name.app) to device:
|
152
|
+
|
153
|
+
* open iTunes
|
154
|
+
* select <b>Apps</b>, drag your application package and drop it to Apps screen
|
155
|
+
* connect your device to iTunes
|
156
|
+
* select you device in iTunes
|
157
|
+
* select <b>Apps</b> tab in your device screen
|
158
|
+
* check your application for install to device
|
159
|
+
* do Sync for install your application to device
|
160
|
+
|
161
|
+
### build.yml settings
|
162
|
+
|
163
|
+
The build.yml settings for iphone are the following:
|
164
|
+
|
165
|
+
name: myapp
|
166
|
+
version: 1.0
|
167
|
+
iphone:
|
168
|
+
provisionprofile:
|
169
|
+
sdk: iphonesimulator3.0
|
170
|
+
entitlements:
|
171
|
+
codesignidentity:
|
172
|
+
configuration: Debug
|
173
|
+
emulator: 3.0
|
174
|
+
emulatortarget: iphone
|
175
|
+
BundleIdentifier: com.yourcompany.yourapp
|
176
|
+
BundleURLScheme: yourapp
|
177
|
+
|
178
|
+
* name: name of your application. Will show on screen (iPhone application bundle display name)
|
179
|
+
* version: version of your application. iPhone application bundle version
|
180
|
+
* provisionprofile: The UUID of your provisioning profile to use when signing.
|
181
|
+
* sdk: The version of sdk used to build. Typically iphonesimulatorX.X or iphoneosX.X
|
182
|
+
* entitlements: propertylist file for entitlements for your build. Typically is Entitlements.plist
|
183
|
+
* codesignidentity: The name of the code signing identity to use when signing for device.
|
184
|
+
* configuration: Debug/Release/Distribution
|
185
|
+
* emulator: version of emulator for run application
|
186
|
+
* emulatortarget: device family for simulator (iphone/ipad)
|
187
|
+
* BundleIdentifier: bundle identifier - used in provisioning profile
|
188
|
+
* BundleURLScheme: bundle URL scheme of your app (used for open your application from another application by using of custom URL scheme)
|
189
|
+
|
190
|
+
|
191
|
+
Example of iPhone setting in build.yml of your application:
|
192
|
+
|
193
|
+
name: JS App
|
194
|
+
version: 1.0
|
195
|
+
iphone:
|
196
|
+
provisionprofile: E5931D39-CA68-48E4-A3AF-BB538E1C8CE6
|
197
|
+
sdk: iphoneos4.2
|
198
|
+
codesignidentity: "iPhone Developer: John Smith (MF99RW67WY)"
|
199
|
+
entitlements: ""
|
200
|
+
configuration: Release
|
201
|
+
emulator: 4.2
|
202
|
+
emulatortarget: ipad
|
203
|
+
BundleIdentifier: com.johnsmithcompany.jsapp
|
204
|
+
BundleURLScheme: jsapp
|
205
|
+
|
206
|
+
|
207
|
+
## Build for Android
|
208
|
+
|
209
|
+
### Prerequisites
|
210
|
+
|
211
|
+
* [OS compatible with Android SDK](http://developer.android.com/sdk/requirements.html)
|
212
|
+
* Follow [All Platforms Prerequisites](#all-platforms-prerequisites)
|
213
|
+
* Download the [Android SDK Starter Package](http://developer.android.com/sdk/index.html)
|
214
|
+
* Run `<sdk>/tools/android` on OSX/Linux or `<sdk>/SDK Setup.exe` on Windows
|
215
|
+
* Go to Settings > check `Force https://... sources to be fetched using http://` and press `Save & Apply`.
|
216
|
+
* Go to Available > Expand `https://dl-ssl.google.com`
|
217
|
+
* Download the latest SDK version, latest platform (SDK Platform 2.2, for example) and latest "Google APIs" available.
|
218
|
+
* Set the environment variables ANDROID_HOME to where you installed the SDK, and add `<sdk path>/tools` to PATH
|
219
|
+
* Download and install the [Android NDK](http://developer.android.com/sdk/ndk/index.html)
|
220
|
+
* Run `rhodes-setup` and tell Rhodes where you installed the Android SDK and NDK
|
221
|
+
|
222
|
+
In case if you are planning to work with native geo mapping (MapView interface), two things should be done:
|
223
|
+
|
224
|
+
* Android Maps API key should be retrieved from Google. Follow these [instructions](http://code.google.com/intl/en/android/add-ons/google-apis/mapkey.html) to get it. When key received, put it in your application's `build.yml` or share it across all your applications by adding it to `rhobuild.yml`:
|
225
|
+
|
226
|
+
android:
|
227
|
+
apikey: "GOOGLE-API-KEY-FOR-ANDROID"
|
228
|
+
|
229
|
+
* Enable 'mapping' in your application's `build.yml` (or in `<rhodes-root>/rhobuild.yml`):
|
230
|
+
|
231
|
+
android:
|
232
|
+
mapping: yes
|
233
|
+
|
234
|
+
If you are using Eclipse (Optional) please follow [these instructions](http://source.android.com/using-eclipse) on how to increase Java memory space to use Android.
|
235
|
+
|
236
|
+
|
237
|
+
Please check you applications and change the way how you include css files into html pages.
|
238
|
+
|
239
|
+
For example, you will need to replace
|
240
|
+
|
241
|
+
<style type="text/css" media="screen">
|
242
|
+
@import "/public/js/iui/iui.css"; @import "/public/css/rho.css";
|
243
|
+
</style>
|
244
|
+
|
245
|
+
with
|
246
|
+
|
247
|
+
<link rel="stylesheet" href="public/js/iui/iui.css" type="text/css">
|
248
|
+
<link rel="stylesheet" href="public/css/rho.css" type="text/css">
|
249
|
+
|
250
|
+
Otherwise your css files will not be loaded in Android 1.5 (and higher)
|
251
|
+
|
252
|
+
### Building app and running it in emulator from the command line
|
253
|
+
|
254
|
+
** NOTE: make sure that your PATH has the path to java bin. **
|
255
|
+
|
256
|
+
From the command line, in your rhodes application directory, run:
|
257
|
+
|
258
|
+
:::term
|
259
|
+
$ rake run:android
|
260
|
+
|
261
|
+
It will create (if needed) new virtual sdcard for emulator, then check if emulator is already running (and start if not) and upload application there. You can specify version of emulator you are want to run in your application's build.yml:
|
262
|
+
|
263
|
+
android:
|
264
|
+
version: 2.1
|
265
|
+
|
266
|
+
You can also specify emulator name (see Android SDK Manager tool in root of Android SDK folder).
|
267
|
+
|
268
|
+
android:
|
269
|
+
emulator: myDeviceEmulator20
|
270
|
+
|
271
|
+
If the rake command gets stuck you can kill the command window, open another window, run:
|
272
|
+
|
273
|
+
:::term
|
274
|
+
$ adb start-server
|
275
|
+
$ rake run:android
|
276
|
+
|
277
|
+
|
278
|
+
** NOTE: If you didn't run your Android simulator yet or don't have AVD configuration set, you will be asked a few questions about emulator configuration. You should answer "yes" for most questions or use default answers. As a result new AVD configuration will be created. **
|
279
|
+
|
280
|
+
To uninstall application from emulator, run:
|
281
|
+
|
282
|
+
:::term
|
283
|
+
$ rake uninstall:android
|
284
|
+
|
285
|
+
### Building app and running it on the device from the command line
|
286
|
+
|
287
|
+
If you have an Android device, you can develop and debug your Android applications just as usual. Launching your apps on a device works just the same as on the emulator, but there are a few things to do before you can start. Please check corresponding [Android documentation](http://developer.android.com/guide/developing/device.html).
|
288
|
+
|
289
|
+
You can verify that your device is connected by executing:
|
290
|
+
|
291
|
+
:::term
|
292
|
+
$ adb devices
|
293
|
+
|
294
|
+
If connected, you'll see the device name listed.
|
295
|
+
|
296
|
+
If your machine doesn't "see" the device as connected, try killing the adb process first:
|
297
|
+
|
298
|
+
:::term
|
299
|
+
$ adb kill-server
|
300
|
+
$ adb install <filename>.apk
|
301
|
+
|
302
|
+
After you have your device connected, in your rhodes application directory, run:
|
303
|
+
|
304
|
+
:::term
|
305
|
+
$ rake run:android:device
|
306
|
+
|
307
|
+
This will build your application and sign it with auto-generated self-signed certificate
|
308
|
+
|
309
|
+
To uninstall from the device, run:
|
310
|
+
|
311
|
+
:::term
|
312
|
+
$ rake uninstall:android:device
|
313
|
+
|
314
|
+
If you want to build production version, edit your application's build.yml as below:
|
315
|
+
|
316
|
+
android:
|
317
|
+
production:
|
318
|
+
certificate: /full/path/to/your/developer/certificate
|
319
|
+
password: "password-of-the-certificate"
|
320
|
+
alias: "keystore.alias"
|
321
|
+
|
322
|
+
This will use specified certificate to sign application. If certificate is not found, it will be auto-generated. In this case you'll be prompted with several questions like your name, organization etc. If you don't want to use auto-generated certificate, refer to the [these instructions](http://developer.android.com/guide/publishing/app-signing.html) on how to create it manually.
|
323
|
+
|
324
|
+
After that run:
|
325
|
+
|
326
|
+
:::term
|
327
|
+
$ rake device:android:production
|
328
|
+
|
329
|
+
Signed APK will be located in `<rhodes-app-dir>/bin/target`. To install application on the device run:
|
330
|
+
|
331
|
+
:::term
|
332
|
+
$ adb -d install -r <rhodes-app-dir>/bin/target/<app-name>_signed.apk
|
333
|
+
|
334
|
+
### Building app in Eclipse
|
335
|
+
|
336
|
+
Create a new workspace in the following directory: `<Rhodes>/platform/android`
|
337
|
+
|
338
|
+
Go to the Window > Preferences
|
339
|
+
|
340
|
+
Click on Android node in the tree and specify file path to the installed android SDK (For example: `E:\android\android-sdk-windows-1.6_r1`)
|
341
|
+
|
342
|
+
Import all projects from the following directory: `<Rhodes>/platform/android`
|
343
|
+
|
344
|
+
If you have set the option to build sources automatically all stuff will be compiled just after the import.
|
345
|
+
|
346
|
+
Right click on Rhodes project and select 1.6 target for Android.
|
347
|
+
|
348
|
+
Check bin directory. You should see Rhodes.apk file created. It will be signed with debug key provided with SDK.
|
349
|
+
|
350
|
+
Now you are ready to install your application on device and/or emulator.
|
351
|
+
|
352
|
+
### Getting application log from device or emulator
|
353
|
+
|
354
|
+
To get application log from device or emulator, from your application folder or from root of rhodes source tree (place where rhobuild.yml is located), issue command:
|
355
|
+
|
356
|
+
:::term
|
357
|
+
$ rake device:android:getlog
|
358
|
+
|
359
|
+
Or
|
360
|
+
:::term
|
361
|
+
$ rake emulator:android:getlog
|
362
|
+
|
363
|
+
Application log will be pulled from device/emulator and stored in your application directory with name RhoLog.txt.
|
364
|
+
|
365
|
+
To see all emulator messages run 'adb logcat' and start application on emulator
|
366
|
+
|
367
|
+
To see all device messages run 'adb -d logcat' and start application on device
|
368
|
+
|
369
|
+
## Build for BlackBerry
|
370
|
+
|
371
|
+
Blackberry SDK for Mac doesn't come with simulators so far. So for now we would assume you are using Windows to develop for BB.
|
372
|
+
|
373
|
+
### Prerequisites
|
374
|
+
* Follow [All Platforms Prerequisites](#all-platforms-prerequisites)
|
375
|
+
* Load and install Blackberry JDE version 4.6.0 or higher(5.0 or higher recommended for simulator usage) from [here](http://na.blackberry.com/eng/developers/)
|
376
|
+
* Read about Blackberry Browser limitations of CSS, HTML and JavaScript. Get relevant documentation from [here](http://na.blackberry.com/eng/support/docs/subcategories/?userType=21&category=BlackBerry+Browser).
|
377
|
+
|
378
|
+
### Build application using rhodes gem
|
379
|
+
|
380
|
+
Before you build edit build.yml from the application directory. Set the bbver to the target BB OS that you are building for. For example:
|
381
|
+
|
382
|
+
bbver: 5.0
|
383
|
+
|
384
|
+
#### To build and run using Blackberry simulator 5.0 and higher
|
385
|
+
Starting from Blackberry JDE 5.0, simulator supports loading application cod-files to simulator without restart. This feature greatly improve Blackberry development perfomance.
|
386
|
+
There are 2 possible scenarios available:
|
387
|
+
|
388
|
+
* Load application cod-file manually using Simulator menu: 'File\Load Blackberry application or theme...':
|
389
|
+
$ rake run:bb:startsim
|
390
|
+
$ rake package:bb:production_sim
|
391
|
+
|
392
|
+
In simulator window open menu: 'File\Load Blackberry application or theme...' and choose app cod-file:'<app_folder>/bin/target/<bb_ver>/<app_name.cod>'
|
393
|
+
|
394
|
+
After application modification:
|
395
|
+
$ rake package:bb:production_sim
|
396
|
+
And reload application cod-file in simulator using menu.
|
397
|
+
|
398
|
+
* Use rake commands to reload app on simulator.
|
399
|
+
|
400
|
+
$ rake run:bbapp
|
401
|
+
|
402
|
+
Start application on simulator and DO NOT close application in simulator.
|
403
|
+
After application modification:
|
404
|
+
$ rake run:bbapp
|
405
|
+
|
406
|
+
In case of simulator errors:
|
407
|
+
* Try load application cod-file manually.
|
408
|
+
* Try to uninstall application: select application icon on simulator and press Menu\Delete
|
409
|
+
* Close simulator and run clean.bat in simulator folder
|
410
|
+
|
411
|
+
#### To build and run using Blackberry simulator
|
412
|
+
|
413
|
+
Run in application root directory:
|
414
|
+
|
415
|
+
:::term
|
416
|
+
$ rake run:bb
|
417
|
+
|
418
|
+
Launch application from the simulator's Downloads menu item for 4.6 or from Main menu screen on 4.3 and below. Do not close Simulator manually after you have done testing. Script will restart simulator for you.
|
419
|
+
|
420
|
+
Modify your application and run run rake script again:
|
421
|
+
|
422
|
+
:::term
|
423
|
+
$ rake run:bb
|
424
|
+
|
425
|
+
|
426
|
+
To see application log change log settings in [rhoconfig.txt](configuration#run-time-configuration). Run your application and see log file at `<simulator folder>\sdcard\rho\<app_name>\RhoLog.txt`
|
427
|
+
|
428
|
+
To switch log on while running your application select menu\log\options form the application menu and set log level to Info and Message classes to APP or to *.
|
429
|
+
|
430
|
+
To clean all data (database and log) go to '<simulator folder>\sdcard` and remove rho folder. If you use Persistent Storage mode - remove app or run clean.bat in the simulator folder.
|
431
|
+
|
432
|
+
##### Some known issues while building for BB simulator
|
433
|
+
|
434
|
+
Run `rake config:checkbb` and see are any problems reported
|
435
|
+
|
436
|
+
Run rake scripts from windows console. Do not use bash or similar tools.
|
437
|
+
|
438
|
+
When emulator starts, open Blackberry Internet Browser and browse for some web site. If you are unable to browse:
|
439
|
+
|
440
|
+
* check that MDS is running - it should be console window started with emulator.
|
441
|
+
* open manage connection (blackberry menu button)\check Mobile Network
|
442
|
+
|
443
|
+
Check your JAVA_HOME environment variable: it should NOT contain 'bin' at the end.
|
444
|
+
|
445
|
+
Do not use 'localhost' or '127.0.0.0' for sync server address if you host sync server on your machine. Use local computer name instead.
|
446
|
+
|
447
|
+
|
448
|
+
#### To build application for the device
|
449
|
+
|
450
|
+
You have to sign application before loading it to device. Go [here](http://na.blackberry.com/eng/developers/javaappdev/codekeys.jsp) to get Code Signing Keys.
|
451
|
+
|
452
|
+
Once you have Code Signing Keys files (sigtool.csk and sigtool.db) you should put them in the 'bin' folder of your Blackberry jdk and sign your application.
|
453
|
+
|
454
|
+
If your target device is Blackberry JDK 4.3 and later, you can provide password in the rhobuild.yml file (located in the Rhodes SDK folder) in the 'build' section:
|
455
|
+
|
456
|
+
build:
|
457
|
+
bbsignpwd: <password>
|
458
|
+
|
459
|
+
Run:
|
460
|
+
|
461
|
+
:::term
|
462
|
+
$ rake device:bb:production
|
463
|
+
|
464
|
+
Built application will be available at `<application_directory>/bin/target`. For example, if you rake:bb:production, the files will be in a directory named for the SDK version, like /bin/target/4.6/ota-web. You should see many .cod files and a single .jad file.
|
465
|
+
|
466
|
+
You may deploy it to the device now. To do that upload .jad and all .cod files to a web server, then open the .jad file from the browser on your blackberry device. You may use [rhohub.com](http://rhohub.com) Gallery feature to host your builds as well.
|
467
|
+
|
468
|
+
##### Some known issues while building for BB device
|
469
|
+
|
470
|
+
After you get your CSI-file from Blackberry, you have to register them. If after dbl-click you will see message "Already registered" see instructions here:
|
471
|
+
[Incorrect password error when attempting to register signature keys](http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800989/Support_-_Incorrect_password_error_when_attempting_to_register_signature_keys.html?nodeid=1461314&vernum=0)
|
472
|
+
|
473
|
+
After press Yes in dialog 'Would you like to create a new key pair file' - nothing appear. No dialogs, no error messages, just nothing then this is a problem with Java SDK and Blackberry SDK versions. See more information here:
|
474
|
+
|
475
|
+
* [The signature key window disappears after receiving the private key prompt](http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800738/800989/Support_-_The_signature_key_window_disappears_after_receiving_the_private_key_prompt.html?nodeid=1313681&vernum=0)
|
476
|
+
* [Supported versions of Java for different BlackBerry JDE versions](http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800738/800901/What_Is_-_Supported_versions_of_Java_for_different_BlackBerry_JDE_versions.html?nodeid=1313614&vernum=0)
|
477
|
+
|
478
|
+
If you still have a problems then [manually register CSI files](http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800989/How_to_-_Manually_register_the_CSI_files.html?nodeid=800993&vernum=0)
|
479
|
+
|
480
|
+
Signature files can be only registered once per computer. If you register them for example in 4.6 Blackberry SDK , you can copy sigtool.csk and sigtool.db to bin directory of any other BB SDK
|
481
|
+
|
482
|
+
There is a problem with network on BlackBerry simulators under Windows 7. It causes syncing failure. There are two workarounds for this issue. One is to use MDS for network connection in simulator (build script does this automatically). The second workaround is to emulate WiFi connection in the simulator.
|
483
|
+
|
484
|
+
#### Application log on the device
|
485
|
+
|
486
|
+
The log is written to the file 'rholog.txt':
|
487
|
+
|
488
|
+
* If your device has SD card log will place to `<Media Card>\Rho\<app name>` folder.
|
489
|
+
* If your device doesn't have SD card log will place to `<Device Memory>\home\user\rho\<app name>`.
|
490
|
+
|
491
|
+
To see or copy log file to your computer:
|
492
|
+
|
493
|
+
* Add menu item Log to your application menu
|
494
|
+
* Call `RhoConf.show_log` or `RhoConf.send_log` somewhere in your app (for example on the settings page)
|
495
|
+
* Open Media application on the Phone, select Menu\explore. You can view log file or send it via bluetooth
|
496
|
+
* If you have SD card: Phone options\memory\Mass storage support - ON, save. Then connect device to the computer via cable and you will see USB disk drive in computer explorer. Copy `rholog.txt` to computer.
|
497
|
+
|
498
|
+
**NOTE: Do not forget to turn 'Mass Storage support' OFF, otherwise Rhodes wouldn't be able write to the files! **
|
499
|
+
|
500
|
+
#### Connectivity on the device
|
501
|
+
If your phone has Wifi connectivity Rhodes will use it without any additional efforts. In case of GPRS, you should :
|
502
|
+
|
503
|
+
* Setup mobile network: Phone Options\Mobile Network\Data Services ON, Connection preferences: Should be not WiFi-Only.
|
504
|
+
* Setup APN address: Phone Options\Advanced settings\TCP/IP/APN settings enabled. APN should address specific for your provider (wap.cingular for example).
|
505
|
+
|
506
|
+
#### Event log from device
|
507
|
+
|
508
|
+
Read Blackberry article on [how to enable, access, and extract the event logs on a BlackBerry smartphone](http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB05349).
|
509
|
+
|
510
|
+
Now you should be able to extract a full copy of BlackBerry smartphone event logs to a text file using loader.exe on a computer.
|
511
|
+
|
512
|
+
Connect the BlackBerry smartphone to the computer using a USB cable.
|
513
|
+
|
514
|
+
Open the command prompt and type:
|
515
|
+
|
516
|
+
:::term
|
517
|
+
$ cd c:\Program Files\Common Files\Research In Motion\AppLoader
|
518
|
+
|
519
|
+
On a 64-bit system, type:
|
520
|
+
|
521
|
+
:::term
|
522
|
+
$ cd c:\Program Files (x86)\Common Files\Research In Motion\AppLoader
|
523
|
+
|
524
|
+
Type:
|
525
|
+
|
526
|
+
:::term
|
527
|
+
$ Loader.exe /eventlog c:\log.txt
|
528
|
+
|
529
|
+
The log.txt file is the extracted log and should appear on the `C:\` drive.
|
530
|
+
|
531
|
+
** NOTE: To obtain the Loader.exe tool, install BlackBerry® Desktop Manager 4.7 or later, or visit [http://na.blackberry.com/eng/update/](http://na.blackberry.com/eng/update/) to check for updates for the BlackBerry smartphone that will install the necessary components to your computer. **
|
532
|
+
|
533
|
+
** NOTE: On some Windows Vista™ and Windows® 7 computers, even though c:\ was specified, the Java Event logs might be saved to the following location: `c:\Users\<username>\AppData\Local\VirtualStore\Program Files\Research In Motion\BlackBerry\Apploader` **
|
534
|
+
|
535
|
+
### Build rhodes from the source code using Eclipse
|
536
|
+
|
537
|
+
You should have Blackberry Eclipse IDE installed.
|
538
|
+
|
539
|
+
Please make sure that there are no .metadata folder in rhodes\platform\bb folder, check also that there are no .project and .classname files in any subfolders of `rhodes\platform\bb`.
|
540
|
+
|
541
|
+
Run eclipse and choose rhodes\platform\bb as a workspace directory. Do not create workspace!
|
542
|
+
|
543
|
+
Go to File\Import... menu. Select `Blackberry\Blackberry JDE` workspace node. Press Next. Browse for `rhodes\platform\bb\.BB.jdw\BB.jdw`. Press Finish. The project will be automatically build.
|
544
|
+
|
545
|
+
Go to Window\Preferences menu. Select `Blackberry JDE\Installed` components node.
|
546
|
+
|
547
|
+
Select JDE installation directory for your target device. Please note that Eclipse may not show all your installed JDE in the combobox, in this case press Browse button and choose desired JDE.
|
548
|
+
Eclipse for Blackberry has JDE in the `<Eclipse folder>\plug-ins\net.rim.eide.componentpack<version>`.
|
549
|
+
|
550
|
+
Choose Java home directory for selected JDE : jdk1.6.0_2 for JDE 4.2 and above.
|
551
|
+
|
552
|
+
Select MDS Simulator node and choose MDS from your JDE directory. Press OK.
|
553
|
+
|
554
|
+
Workspace will be recreated. Choose Clean all projects in the dialog. Press OK. RubyVM project should be built, check `rhodes\platform\bb\RubyVM\RubyVM.jar`
|
555
|
+
|
556
|
+
Go to `<rhodescheckout>` and run:
|
557
|
+
|
558
|
+
:::term
|
559
|
+
$ rake build:bb:rhobundle
|
560
|
+
|
561
|
+
It should create `rhodes\platform\bb\RhoBundle\RhoBundle.jar`
|
562
|
+
|
563
|
+
Return to Eclipse and select `Project\Clean...`, Clean all projects, press OK.
|
564
|
+
|
565
|
+
Congratulations! It is all done.
|
566
|
+
|
567
|
+
#### Known issues with Eclipse build
|
568
|
+
|
569
|
+
Sometime BB Eclipse project is checked in in a wrong state and wouldn't build correctly after loading:
|
570
|
+
|
571
|
+
* You need to make sure every sub-project is activated for BlackBerry: right-click on the sub-project and select `Activate for BlackBerry` menu item.
|
572
|
+
* Check and set project dependencies correctly: select `Project/Properties...` menu and navigate to BlackBerry Project Dependencies.... Set following dependencies:
|
573
|
+
* PersLite doesn't have any dependencies
|
574
|
+
* PersImplJSR75 depends on PersLite
|
575
|
+
* RhoBundle depends on RubyVM
|
576
|
+
* RubyVM doesn't have any dependencies
|
577
|
+
* rhodes depends on PersLite, PersImplJSR75, RhoBundle, RubyVM
|
578
|
+
|
579
|
+
#### Rebuilding After Code Changes
|
580
|
+
|
581
|
+
Go to `<rhodescheckout>` and run:
|
582
|
+
|
583
|
+
:::term
|
584
|
+
$ rake build:bb:rhobundle
|
585
|
+
|
586
|
+
It should re-create `rhodes\platform\bb\RhoBundle\RhoBundle.jar`
|
587
|
+
|
588
|
+
Right click on RhoBundle project in Eclipse and select Refresh. It should rebuild rhodes and RhoBundle. You can see messages in Builder Console. OR Just Clean all projects.
|
589
|
+
|
590
|
+
#### Eclipse simulator debug instructions
|
591
|
+
|
592
|
+
Open `Debug\Open debug dialog...` from toolbar (small bug icons). Dbl-click on Blackberry simulator node.
|
593
|
+
|
594
|
+
Go to Simulator page and choose Profile other than Default. Check 'Launch Mobile Data System Connection service with simulator' checkbox.
|
595
|
+
** NOTE: you may have to install MDS on your computer if it is not installed. **
|
596
|
+
|
597
|
+
Press Debug button. Simulator starts. Eclipse may ask you about missing debug files, press 'Don't ask me again button'.
|
598
|
+
|
599
|
+
You can also clean emulator and start emulator again:
|
600
|
+
|
601
|
+
:::term
|
602
|
+
$ run <JDE_HOME>\simulator\clean.bat
|
603
|
+
|
604
|
+
Press Menu button on emulator. Go to Downloads, run Rhodes
|
605
|
+
|
606
|
+
## Build for Windows Mobile
|
607
|
+
|
608
|
+
Note that Windows Mobile versions of your Rhodes app must be built in a Windows environment.
|
609
|
+
|
610
|
+
### Prerequisites
|
611
|
+
|
612
|
+
* Follow [All Platforms Prerequisites](#all-platforms-prerequisites)
|
613
|
+
* .NET Compact Framework
|
614
|
+
* Windows Mobile 6 Professional SDK(s)
|
615
|
+
* Microsoft Active Sync 4.5
|
616
|
+
* Visual Studio 2005 Service Pack 1 installed.
|
617
|
+
* [7-zip](http://www.7-zip.org/)
|
618
|
+
|
619
|
+
Open ActiveSync main window, go to the File -> Connection Settings, select checkbox "Allow connections to one of the following" and select "DMA" from the list box. It is required to work with emulator.
|
620
|
+
|
621
|
+
### Build application from the command line
|
622
|
+
|
623
|
+
Make sure that `C:\Program Files\Microsoft Visual Studio 8\VC\vcpackages` is in your path (required to run vcbuild.exe). Here is the list of paths which should be in PATH env variable:
|
624
|
+
|
625
|
+
<i>C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files\Microsoft Visual Studio 8\VC\BIN;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\bin;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\bin;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin</i>
|
626
|
+
|
627
|
+
Add path to CabWiz.exe to rhobuild.yml in the Rhodes folder:
|
628
|
+
|
629
|
+
env:
|
630
|
+
paths:
|
631
|
+
cabwiz: C:/Program Files/Windows Mobile 6 SDK/Tools/CabWiz
|
632
|
+
|
633
|
+
If you use Visual Studio 2010 : add path to msbuild to rhobuild.yml in rhodes folder:
|
634
|
+
|
635
|
+
env:
|
636
|
+
paths:
|
637
|
+
vcbuild: msbuild
|
638
|
+
|
639
|
+
Go to your application directory. From here you can run all of the Windows Mobile rake tasks.
|
640
|
+
|
641
|
+
To build and run application on emulator, run (fastest way):
|
642
|
+
|
643
|
+
:::term
|
644
|
+
$ rake run:wm:emu
|
645
|
+
|
646
|
+
To build cab-file, install it and run application on emulator, run:
|
647
|
+
|
648
|
+
:::term
|
649
|
+
$ rake run:wm:emucab
|
650
|
+
|
651
|
+
To build and run application on device, run (fastest way):
|
652
|
+
|
653
|
+
:::term
|
654
|
+
$ rake run:wm:dev
|
655
|
+
|
656
|
+
To build cab-file, install it and run application on device, run:
|
657
|
+
|
658
|
+
:::term
|
659
|
+
$ rake run:wm:devcab
|
660
|
+
|
661
|
+
To build application cab-file for the device, run:
|
662
|
+
|
663
|
+
:::term
|
664
|
+
$ rake device:wm:production
|
665
|
+
|
666
|
+
If you want the application to be signed automaticly during the build process, please add the 'wmsign' key with full path to your code signing certificate to the 'build' section of rhobuild.yml file:
|
667
|
+
|
668
|
+
wmsign: <disk:/path/MySign.pfx>
|
669
|
+
|
670
|
+
More information about Windows Mobile code signing you could find at:
|
671
|
+
http://msdn.microsoft.com/en-us/windowsmobile/dd569132.aspx
|
672
|
+
|
673
|
+
### To deploy application on device
|
674
|
+
First connect your device to computer. You can use USB-cable, bluetooth or any other method. To use computer internet you have to start ActiveSync.
|
675
|
+
|
676
|
+
* You can use rake tasks. See 'Build application from the command line' section. Device should be connected via USB-cable.
|
677
|
+
* You can manually copy .cab file to device, for example to Temp folder and click on cab-file on the device using File Explorer. Installation process will be started. After finish you should see app icon on the device
|
678
|
+
|
679
|
+
### Build from IDE
|
680
|
+
|
681
|
+
Checkout rhodes source code from github
|
682
|
+
|
683
|
+
Open `<source-code-root>\platform\wm\rhodes.sln` in Visual Studio.
|
684
|
+
|
685
|
+
Select Windows Mobile 6 Professional and build Release configuration.
|
686
|
+
|
687
|
+
Open the file `rhobuild.yml` using a text editor:
|
688
|
+
|
689
|
+
* define the path to CabWiz tool
|
690
|
+
* define the path to your application
|
691
|
+
|
692
|
+
Run
|
693
|
+
|
694
|
+
:::term
|
695
|
+
$ rake build:wm:devrhobundle
|
696
|
+
|
697
|
+
Make sure you cradle your emulator (menu Tools/Device Emulator Manager/Select Running Emulator/Actions/Cradle)
|
698
|
+
|
699
|
+
Copy `rhodes.exe` and `rhobundle` (located `<source-code-root>\platform\wm\bin\Win32\rhodes\Debug\rho`) created at the previous step to the device: `My Computer\Mobile Device` and folder on that device `\Program Files\rhodes`. You may delete content of `\Program Files\rhodes\rho` folder first to ensure there is no old files left.
|
700
|
+
|
701
|
+
If you changed your application, then to compile your application code run:
|
702
|
+
|
703
|
+
:::term
|
704
|
+
$ rake build:wm:devrhobundle
|
705
|
+
|
706
|
+
After that copy bundle from `<source-code-root>\platform\wm\bin\Win32\rhodes\Debug\rho` folder to the device or emulator folder `\Program Files\rhodes\rho` to see you changes.
|
707
|
+
|
708
|
+
If you changed your application and built it using rake tasks to compile your application:
|
709
|
+
|
710
|
+
:::term
|
711
|
+
$ rake device:wm
|
712
|
+
|
713
|
+
Copy '<appdir>\bin\target\rhodes.cab' content to device or emulator in `\My Documents\`, execute that .cab to install the app and then run your app to se the changes.
|
714
|
+
|
715
|
+
### Logging
|
716
|
+
To get log from emulator or device:
|
717
|
+
|
718
|
+
* connect device or emulator using ActiveSync
|
719
|
+
* press explore on ActiveSync window
|
720
|
+
* navigate to `My Device\Program Files\<app_name>\rholog.txt`
|
721
|
+
|
722
|
+
## Build for Windows
|
723
|
+
|
724
|
+
### Prerequisites
|
725
|
+
|
726
|
+
* Follow [All Platforms Prerequisites](#all-platforms-prerequisites)
|
727
|
+
* Visual Studio 2005 Service Pack 1 installed, Visual Studio 2008 or Visual Studio 2010 (Express editions are also supported)
|
728
|
+
* WTL : http://wtl.sourceforge.net/ :
|
729
|
+
* unzip to folder: <VS path>\VC\WTL
|
730
|
+
* open in Visual studio menu `Tools\Options\Projects and solutions\VC++ directories`. Select platform - `Win32`; Show directories for - `Include files`; Add - `$(VCInstallDir)wtl\include`
|
731
|
+
|
732
|
+
### Build application from the command line
|
733
|
+
|
734
|
+
Make sure that path to vcbuild.exe (something like `C:\Program Files\Microsoft Visual Studio 8\VC\vcpackages`) is in your PATH env variable. The list of paths which should be in PATH env variable:
|
735
|
+
|
736
|
+
<i>C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files\Microsoft Visual Studio 8\VC\BIN;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\bin;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\bin;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin</i>
|
737
|
+
|
738
|
+
If you use Visual Studio 2010 : add path to `msbuild` to `rhobuild.yml` in rhodes folder:
|
739
|
+
|
740
|
+
env:
|
741
|
+
paths:
|
742
|
+
vcbuild: msbuild
|
743
|
+
|
744
|
+
To build and run emulator run:
|
745
|
+
|
746
|
+
:::term
|
747
|
+
$ run:win32
|
748
|
+
|
749
|
+
To clean all binaries run:
|
750
|
+
|
751
|
+
:::term
|
752
|
+
$ clean:win32
|
753
|
+
|
754
|
+
### Logging
|
755
|
+
|
756
|
+
Rholog.txt is placed in `<rhodes folder>\platform\wm\bin\win32\rhodes\Debug\rho`
|
757
|
+
|
758
|
+
## How to set application name and icon
|
759
|
+
|
760
|
+
### Application Name
|
761
|
+
In the build.yml in your application folder there is an entry "name". This is the display name that the user will see on the device. Example:
|
762
|
+
|
763
|
+
name: My Own App
|
764
|
+
|
765
|
+
### Application Icon
|
766
|
+
Place your image to use as an icon in a folder called `icon` in your application. If you created an app called `testapp` then the folder would be `testapp/icon`. The icon should be named `icon.png` and `icon.ico` for Windows Mobile. Starting from iOS 4.0, Apple require three icons for application: 57x57, 72x72 and 114x114 pixels. Prepare such files, name them as `icon57.png`, `icon72.png` and `icon114.png` and place into `icon` folder
|
767
|
+
|
768
|
+
testapp/
|
769
|
+
build.yml
|
770
|
+
Rakefile
|
771
|
+
rhoconfig.txt
|
772
|
+
app/
|
773
|
+
public/
|
774
|
+
icon/
|
775
|
+
icon.png
|
776
|
+
icon.ico
|
777
|
+
|
778
|
+
### iPhone using xCode
|
779
|
+
|
780
|
+
* Target->info->General->Name
|
781
|
+
* Target->info->Build->Product Name (for all configurations)
|
782
|
+
* rhodes\platform\iphone\icon.png, icon57.png, icon72.png, icon114.png - change to your icons
|
783
|
+
* check rhodes\platform\iphone\Info.plist it should contain BundleName=${PRODUCT_NAME}
|
784
|
+
|
785
|
+
|