Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f09e369f08
Fetching contributors…

Cannot retrieve contributors at this time

1031 lines (646 sloc) 46.025 kb
# Build Rhodes Application
This page describes how to build Rhodes Application on all of our supported platforms: iPhone, RIM Blackberry, Windows Mobile and Android.
## All Platforms Prerequisites
### Required Software
You should check to see that the required software in installed on your computer, such as Ruby and RubyGems. See the
[installation instructions](install).
## Setting Up Rhodes Source Code
If you planning to modify or [extend](extensions) Rhodes, you will need the Rhodes source code. It is distributed under MIT license. You don't need it if you are not planning to modify/extend Rhodes.
Rhodes source code is available on You will need Git to get it. If you used [RhoStudio for Windows]( you probably already have Git installed on your system. Otherwise, load it from [here](
To clone Rhodes to your local computer, execute git clone from the command line:
$ git clone git://
$ cd rhodes
Checkout the branch you are interested in (if not the master branch):
$ git checkout -f -b <branchname> --track origin/<branchname>
To keep your branch up to date, use the git pull command:
$ git pull
Add the bin folder of this clone to your path. On Linux/Mac it is typically done in the .profile file. On Windows, it is done using the Control Panel.
Configure your environment by running the rhodes-setup script. This will attempt to auto-detect installed SDKs. It will prompt you to verify the SDK paths or enter paths for SDKs that cannot be detected.
$ rhodes-setup
You don't have to do it if you cloned sources, but if you want to build a Rhodes gem, do the following:
$ rake gem
$ gem install rhodes-[version].gem
## Setting Up build.yml
By default application use latest Rhodes gem installed on computer.
If you wish to use special version of Rhodes or use Rhodes git sources :
sdk: /Library/Ruby/Gems/1.8/gems/rhodes-3.0.2
OR for Rhodes sources:
sdk: ~/Projects/rhodes
After installing new Rhodes gem(3.2.x over any version less then 3.2.x), you need also open a command line window, navigate to the directory of your Rhodes application, and run the following command:
$ migrate-rhodes-app
The migrate-rhodes-app will remove sdk line from your build.yml to use latest Rhodes gem, it also will upgrade application Rakefile.
## Building a Rhodes Application for iPhone/iPad
iPhone/iPad versions of Rhodes apps must be built on Macintosh computers or on []( The instructions below describe how to do this from either the Macintosh Xcode development environment or from the command line on your local Macintosh.
### Prerequisites
To build for iPhone/iPad using you will need the following software installed:
* Mac OS X 10.6 or greater
* Follow [All Platforms Prerequisites](#all-platforms-prerequisites)
* iPhone SDK. We recommend the latest stable version available from the [iPhone Dev Center](
### Build a Rhodes Application with Xcode
If you wish to run your Rhodes application on an iOS device, you need to build and run it using an Xcode project.
Tell Rhodes to build from your Rhodes application.
$ rake switch_app
The switch_app command changes the rhobuild.yml in the Rhodes source code folder to point to your application, as in the following example for a Rhodes application named Store in the user's home folder:
app: /Users/NameOfUser/Store
Note that the switch_app command is only used when you run a Rhodes application within an IDE, such as Xcode: you run switch_app for each Rhodes application that you run in Xcode. The switch_app command does not affect Rhodes applications that you build and run on the command line.
Now run the following command to tell Rhodes to set up the Xcode environment for your Rhodes application:
$ rake build:iphone:setup_xcode_project
Then in the Rhodes source code folder (the path in your Rhodes application build.yml file), navigate to the /platform/iphone folder and open rrhorunner.xcodeproj. This will open your Rhodes application in Xcode.
In the Xcode Scheme menu, select the proper scheme before you build and run your project. Click on the Scheme menu.
<img src="" alt="xcode scheme" />
Select the Scheme for your project under rrhorunner. You can select to run in the simulator.
<img src="" alt="xcode scheme simulator" />
Now you can build and run in Xcode to run your project in the iOS simulator.
If you are an Apple developer, you can run your Rhodes application on your iOS device. In Xcode, select your rhorunner target, click on the Build Settings tab, and see that your code signing information that you installed as an Apple developer is set up and selected.
<img src="" alt="xcode build settings" />
Plug in your iOS device. In Xcode, under Scheme, select iOS device under rhorunner. Then build and run.
<img src="" alt="xcode scheme device" />
For more information on running on your iOS device from Xcode, go to the [Apple developer site](, go to the iOS Developer Library, and search on "managing devices", or "run applications on a device," or similar.
You can edit your Rhodes code for your Rhodes application in a text editor, save your changes, do a Clean in Xcode so that your changes will register in Xcode, and then rebuild and run your project from Xcode.
The resulting application package (*.app) is located in your Rhodes source code folder under /platform/iphone/build/, in a folder named like [Debug/Release]-[iphoneos/iphonesimulator]/
### Building and Releasing on App Store
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](
### Restoring rrhorunner.xcodeproj
To restore the Xcode rrhorunner.xcodeproj to its original state:
$ rake build:iphone:restore_xcode_project
### Building iPhone Application from the Command Line
Unlike building the application from the Xcode GUI, when you build the application from the command line, use the rake command from the directory of the application that you had just generated with rhogen.
From the command line, navigate to the folder for your Rhodes application.
To run your Rhodes application in the iPhone simulator, run this rake command:
$ rake run:iphone
### Building the Application for the iOS Device
After you have modified and debugged your Rhodes application, you can prepare your application to install to your iOS device.
#### Modifying the build.yml
First, in your application's build.yml file, change sdk to iphoneos instead of iphonesimulator, configuration to Release instead of Debug, and add information such as codesignidentity.
sdk: iphoneos4.3
configuration: Release
codesignidentity: "iPhone Developer"
entitlements: ""
#### build.yml settings
The default build.yml settings generated for iphone are:
name: myapp
version: 1.0
sdk: iphonesimulator3.0
configuration: Debug
emulator: 3.0
emulatortarget: iphone
BundleIdentifier: com.yourcompany.yourapp
BundleURLScheme: yourapp
* name: name of your application. Will show on screen (iPhone application bundle display name)
* version: version of your application. iPhone application bundle version
* provisionprofile: The UUID of your provisioning profile to use when signing.
* sdk: The version of sdk used to build. Typically iphonesimulatorX.X or iphoneosX.X
* entitlements: propertylist file for entitlements for your build. Typically is Entitlements.plist
* codesignidentity: The name of the code signing identity to use when signing for device.
* configuration: Debug/Release/Distribution
* emulator: version of emulator for run application
* emulatortarget: device family for simulator (iphone/ipad)
* BundleIdentifier: bundle identifier - used in provisioning profile
* BundleURLScheme: bundle URL scheme of your app (used for opening your application from another application by using custom URL scheme)
** NOTE: BundleIdentifier and BundleURLScheme can contain only next symbols : "a"-"z", "A"-"Z", "0"-"9", "-", "." !
Here is an example of the iPhone settings in build.yml for a finished application:
name: JS App
version: 1.0
provisionprofile: E5931D39-CA68-48E4-A3AF-BB538E1C8CE6
sdk: iphoneos4.2
codesignidentity: "iPhone Developer: John Smith (MF99RW67WY)"
entitlements: ""
configuration: Release
emulator: 4.2
emulatortarget: ipad
BundleIdentifier: com.johnsmithcompany.jsapp
BundleURLScheme: jsapp
### Creating Your Application Package
Now you can create your .app file with this rake command:
$ rake device:iphone:production
The package named <b>your application</b> will be placed to `<your application folder>/bin/target/iOS/[sdkname]/[configuration]/[your application name].app` if you are using Rhodes from 2.2.4 version.
Result package named <b></b> will be placed to `<sdk directory>/platform/iphone/build/[Debug/Release/Distribution]-[iphoneos/iphonesimulator]/` if you are using Rhodes before 2.2.4 version.
### Installing Your Application Package to Your iOS Device
Use <b>iTunes</b> for installing your application package ( to the iOS device:
* Open iTunes.
* Under Library, select <b>Apps</b>.
* Drag and drop your application package into the Apps screen.
* Connect your device to iTunes.
* Under Library, select your device.
* Select the <b>Apps</b> tab in your iTunes device screen.
* In the Sync Apps list, check your application.
* Perform a sync. Your application is installed to your device.
## Build for Android
### Prerequisites
* [OS compatible with Android SDK](
* Follow [All Platforms Prerequisites](#all-platforms-prerequisites)
* Download the [Android SDK Starter Package](
* Run `<sdk>/tools/android` on OSX/Linux or `<sdk>/SDK Setup.exe` on Windows
* Go to Settings > check `Force https://... sources to be fetched using http://` and press `Save & Apply`.
* Go to Available > Expand ``
* Download the latest SDK version, latest platform (SDK Platform 2.2, for example) and latest "Google APIs" available.
* Set the environment variables ANDROID_HOME to where you installed the SDK, and add `<sdk path>/tools` to PATH
* Download and install the [Android NDK](
* Run `rhodes-setup` and tell Rhodes where you installed the Android SDK and NDK
In case if you are planning to work with native geo mapping (MapView interface), two things should be done:
* Android Maps API key should be retrieved from Google. Follow these [instructions]( 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`. Note that the `apikey` value must match a certificate used to sign an application (the key is different for debug and production signed build and debug key cannot be shared between different build computers).
* Enable 'mapping' in your application's `build.yml` (or in `<rhodes-root>/rhobuild.yml`):
mapping: yes
If you are using Eclipse (Optional) please follow [these instructions]( on how to increase Java memory space to use Android.
Please check your applications and change how you include css files into html pages.
For example, you will need to replace
<style type="text/css" media="screen">
@import "/public/js/iui/iui.css"; @import "/public/css/rho.css";
<link rel="stylesheet" href="public/js/iui/iui.css" type="text/css">
<link rel="stylesheet" href="public/css/rho.css" type="text/css">
Otherwise your css files will not be loaded in Android 1.5 (and higher)
### Device capabilities settings in build.yml
Attention ! On Android you should specify list of device capabilities need for you application. By default there are not any capabilities enabled !
This is important because all defined capability produce special <uses-permission ... > lines in AndroidManifest.xml specific to Android platfrom. Without enabled permission application can not access to device functions.
List of capabilities related to changes in AndroidManifest - add or remove this items in "capabilities" section in your build.yml:
### Set up minimal Andoid SDK API level
The minimal API level supported by Rhodes is 4 (Android 1.6)
It is possible to set greated minimal API level with build.yml. This will restrict installing an application on any Android OS prior to 3.0:
minSDK: 11
### Building app and running it in emulator from the command line
** NOTE: make sure that your PATH has the path to java bin. **
From the command line, in your rhodes application directory, run:
$ rake run:android
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:
version: 2.1
You can also specify emulator AVD name (see 'Android SDK and AVD Manager').
emulator: myDeviceEmulator20
Disable Android title in application :
android_title: 0
Setup fixed screen orientation for application (writed to Manifest, possible values: "portrait", "landscape") :
orientation: portrait
If the rake command gets stuck you can kill the command window, open another window, run:
$ adb start-server
$ rake run:android
** 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. **
To uninstall application from emulator, run:
$ rake uninstall:android
### Building app and running it on the device from the command line
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](
You can verify that your device is connected by executing:
$ adb devices
If connected, you'll see the device name listed.
If your machine doesn't "see" the device as connected, try killing the adb process first:
$ adb kill-server
$ adb install <filename>.apk
After you have your device connected, in your rhodes application directory, run:
$ rake run:android:device
This will build your application and sign it with auto-generated self-signed certificate
To uninstall from the device, run:
$ rake uninstall:android:device
If you want to build production version, edit your application's build.yml as below:
certificate: path/to/your/developer/certificate
password: "password-of-the-certificate"
alias: "keystore.alias"
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. The path to certificate may be absolute or relative to your app directory. If you don't want to use auto-generated certificate, refer to the [these instructions]( on how to create it manually.
After that run:
$ rake device:android:production
Signed APK will be located in `<rhodes-app-dir>/bin/target`. To install application on the device run:
$ adb -d install -r <rhodes-app-dir>/bin/target/<app-name>_signed.apk
### Building app in Eclipse
Please note: It is only Google API target (with Google mapping API) supported for Eclipse
Create a new workspace in the following directory: `<Rhodes>/platform/android`
Go to the Window > Preferences
Click on Android node in the tree and specify file path to the installed Android SDK (For example: `E:\android\android-sdk-windows`)
Import all projects from the following directory: `<Rhodes>/platform/android`
If you have set the option to build sources automatically all stuff will be compiled just after the import.
Select Properties from the Rhodes project context menu and select one of latest Google API target for Android.
Check bin directory. You should see Rhodes.apk file created. It will be signed with debug key provided with SDK.
Now you are ready to install your application on device and/or emulator.
In case of troubles in Eclipse while setting up the Android SDK and target try "Rhodes project context menu" > "Android Tools" > "Fix Project Properties".
It is possible your application has stopped unexpectedly just after the first build. In this case try to copy autogenerated java source files from the application folder <app>/bin/tmp to the Rhodes project.
### Getting application log from device or emulator
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:
$ rake device:android:getlog
$ rake emulator:android:getlog
Application log will be pulled from device/emulator and stored in your application directory with name RhoLog.txt.
To see all emulator messages run 'adb logcat' and start application on emulator
To see all device messages run 'adb -d logcat' and start application on device
## Build for BlackBerry
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.
### Prerequisites
* Follow [All Platforms Prerequisites](#all-platforms-prerequisites)
* Load and install Blackberry JDE version 4.6.0 or higher(5.0 or higher recommended for simulator usage) from [here](
* Run 'rhodes-setup' to specify Blackberry JDE paths or edit <rhodes>/rhobuild.yml manually:
jde: <jde_5.0>/components
sim: 9550
mds: <jde_5.0>/components/MDS
* Read about Blackberry Browser limitations of CSS, HTML and JavaScript. Get relevant documentation from [here](
### Build application using rhodes gem
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:
bbver: 5.0
#### To build and run using Blackberry simulator 5.0 and higher
Starting from Blackberry JDE 5.0, simulator supports loading application cod-files to simulator without restart. This feature greatly improve Blackberry development perfomance.
There are 2 possible scenarios available:
* Load application cod-file manually using Simulator menu: 'File\Load Blackberry application or theme...':
$ rake run:bb:startsim
$ rake package:bb:production_sim
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>'
After application modification:
$ rake package:bb:production_sim
And reload application cod-file in simulator using menu.
* Use rake commands to reload app on simulator.
$ rake run:bbapp
Start application on simulator and DO NOT close application in simulator.
After application modification:
$ rake run:bbapp
In case of simulator errors:
* Try load application cod-file manually.
* Try to uninstall application: select application icon on simulator and press Menu\Delete
* Close simulator and run clean.bat in simulator folder
#### To build and run using Blackberry simulator
Run in application root directory:
$ rake run:bb
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.
Modify your application and run run rake script again:
$ rake run:bb
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`
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 *.
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.
##### Some known issues while building for BB simulator
Run `rake config:checkbb` and see are any problems reported
Run rake scripts from windows console. Do not use bash or similar tools.
When emulator starts, open Blackberry Internet Browser and browse for some web site. If you are unable to browse:
* check that MDS is running - it should be console window started with emulator.
* open manage connection (blackberry menu button)\check Mobile Network
Check your JAVA_HOME environment variable: it should NOT contain 'bin' at the end.
Do not use 'localhost' or '' for sync server address if you host sync server on your machine. Use local computer name instead.
#### To build application for the device
You have to sign application before loading it to device. Go [here]( to get Code Signing Keys.
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.
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:
bbsignpwd: <password>
$ rake device:bb:production
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.
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 []( Gallery feature to host your builds as well.
##### Some known issues while building for BB device
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:
[Incorrect password error when attempting to register signature keys](
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:
* [The signature key window disappears after receiving the private key prompt](
* [Supported versions of Java for different BlackBerry JDE versions](
If you still have a problems then [manually register CSI files](
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
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.
#### Application log on the device
The log is written to the file 'rholog.txt':
* If your device has SD card log will place to `<Media Card>\Rho\<app name>` folder.
* If your device doesn't have SD card log will place to `<Device Memory>\home\user\rho\<app name>`.
To see or copy log file to your computer:
* Add menu item Log to your application menu
* Call `RhoConf.show_log` or `RhoConf.send_log` somewhere in your app (for example on the settings page)
* Open Media application on the Phone, select Menu\explore. You can view log file or send it via bluetooth
* 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.
**NOTE: Do not forget to turn 'Mass Storage support' OFF, otherwise Rhodes wouldn't be able write to the files! **
#### Connectivity on the device
If your phone has Wifi connectivity Rhodes will use it without any additional efforts. In case of GPRS, you should :
* Setup mobile network: Phone Options\Mobile Network\Data Services ON, Connection preferences: Should be not WiFi-Only.
* Setup APN address: Phone Options\Advanced settings\TCP/IP/APN settings enabled. APN should address specific for your provider (wap.cingular for example).
#### Event log from device
Read Blackberry article on [how to enable, access, and extract the event logs on a BlackBerry smartphone](
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.
Connect the BlackBerry smartphone to the computer using a USB cable.
Open the command prompt and type:
$ cd c:\Program Files\Common Files\Research In Motion\AppLoader
On a 64-bit system, type:
$ cd c:\Program Files (x86)\Common Files\Research In Motion\AppLoader
$ Loader.exe /eventlog c:\log.txt
The log.txt file is the extracted log and should appear on the `C:\` drive.
** NOTE: To obtain the Loader.exe tool, install BlackBerry® Desktop Manager 4.7 or later, or visit []( to check for updates for the BlackBerry smartphone that will install the necessary components to your computer. **
** 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` **
### Build rhodes from the source code using Eclipse
* You should have Blackberry Eclipse IDE installed.
* Please make sure that there are no .metadata folder in rhodes\platform\bb folder.
* Go to `<rhodescheckout>` and run:
$ rake build:bb:devrhobundle
* Run eclipse and choose rhodes\platform\bb as a workspace directory. Do not create workspace!
* Open menu Window\Preferences
* Blackberry java plug-in\Warnings - check all 3 chekboxes to suppress all warnings
* Java\Compiler - set Compiler compliance level to 1.4
* Go to File\Import... menu. Select `General\Existing projects into Workspace` workspace node. Press Next.
* Browse for `<rhodes>\platform\bb\RubyVM`. Press Finish. The project will be automatically build.
* Browse for `<rhodes>\platform\bb\Hsqldb`. Press Finish. The project will be automatically build.
* Browse for `<rhodes>\platform\bb\Rhodes`. Press Finish. The project will be automatically build.
* Go to Run\Debug Configurations - double click on Blackberry simulator
* select all projects in Projects tab
* got to Simulator tab, select Memory, check Use PC file system for SDCard files, add `Rho` to PC file system for SDCard files edit box
* Press Debug
Congratulations! It is all done.
#### Known issues with Eclipse build
Sometime BB Eclipse project is checked in in a wrong state and wouldn't build correctly after loading:
* 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.
* Check and set project dependencies correctly: select `Project/Properties...` menu and navigate to BlackBerry Project Dependencies.... Set following dependencies:
* PersLite doesn't have any dependencies
* PersImplJSR75 depends on PersLite
* RhoBundle depends on RubyVM
* RubyVM doesn't have any dependencies
* rhodes depends on PersLite, PersImplJSR75, RhoBundle, RubyVM
#### Rebuilding After Code Changes
Go to `<rhodescheckout>` and run:
$ rake build:bb:rhobundle
It should re-create `rhodes\platform\bb\RhoBundle\RhoBundle.jar`
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.
#### Eclipse simulator debug instructions
Open `Debug\Open debug dialog...` from toolbar (small bug icons). Dbl-click on Blackberry simulator node.
Go to Simulator page and choose Profile other than Default. Check 'Launch Mobile Data System Connection service with simulator' checkbox.
** NOTE: you may have to install MDS on your computer if it is not installed. **
Press Debug button. Simulator starts. Eclipse may ask you about missing debug files, press 'Don't ask me again button'.
You can also clean emulator and start emulator again:
$ run <JDE_HOME>\simulator\clean.bat
Press Menu button on emulator. Go to Downloads, run Rhodes
## Build for Symbian
Note that Symbian versions of your Rhodes app must be built in a Windows environment.
### Prerequisites
* Follow [All Platforms Prerequisites](#all-platforms-prerequisites)
* Visual Studio 2005 Service Pack 1 installed
* [Qt SDK](
If you want to build for Symbian device you have to install QT and QT Mobility for Symbian on your device.
You can find installation files in QT SDK folder like below:
For Symbian 9.4
QT - C:/QtSDK/Symbian/sis/Symbian1/Qt/4.7.3/qt.sis
(install it only on disc C:, before install pls close all opened applications)
QT WebKit - C:/QtSDK/Symbian/sis/Symbian1/Qt/4.7.3/qtwebkit.sis
QT Mobility - C:/QtSDK/Symbian/sis/Symbian1/QtMobility/1.1.3/qtmobility.sis
For Symbian 9.5
QT - C:/QtSDK/Symbian/sis/Symbian3/Qt/4.7.3/qt.sis
(install it only on disc C:, before install pls close all opened applications)
QT WebKit - C:/QtSDK/Symbian/sis/Symbian3/Qt/4.7.3/qtwebkit.sis
QT Mobility - C:/QtSDK/Symbian/sis/Symbian3/QtMobility/1.1.3/qtmobility.sis
Then open file - C:/QtSDK/Symbian/SDKs/Symbian1Qt473/epoc32/include/cntdb.h and replace below two strings:
CContactConverter& CContactDatabase::ConverterL(const TUid& aFormat);
CContactConverter& CContactDatabase::ConverterL(const TUid& aFormat, const TInt64 aContactFieldFilter, MConverterCallBack* aCallback, const TVCardVersion aVersion,const TBool aExportTel);
with these strings:
CContactConverter& ConverterL(const TUid& aFormat);
CContactConverter& ConverterL(const TUid& aFormat, const TInt64 aContactFieldFilter, MConverterCallBack* aCallback, const TVCardVersion aVersion,const TBool aExportTel);
NOTE: You have to install Rhodes on the same local disk with QtSDK!
### Build application from the command line
Add pathes to Qt SDK and MS Visual Studio 2005 to rhobuild.yml in the Rhodes folder:
qtsymbian-sdk: C:/QtSDK
msvs2005: C:/Program Files/Microsoft Visual Studio 8
### To build and run application on emulator(Visual Studio 2005 only) :
$ rake run:symbian
### To build application sis-file for the device:
$ rake device:symbian:production
NOTE: This command creates two sis-files: signed for testing and unsigned for production signing. See <app_root>/bin/target/sym folder for sis-files.
### To clean all binaries run:
$ rake clean:symbian
NOTE: If the clean rake task doesn't respond long time while it is being executed then stop it and delete folder like this: C:/QtSDK/Symbian/SDKs/Symbian1Qt473/epoc32/BUILD/.../rhodes
NOTE: If You want to use your own UID for application you can redefine it in build.yml. You can find information about UID here -
## Build for Windows Mobile
Note that Windows Mobile versions of your Rhodes app must be built in a Windows environment.
### Prerequisites
* Follow [All Platforms Prerequisites](#all-platforms-prerequisites)
* .NET Compact Framework
* Windows Mobile 6 Professional SDK(s)
* Microsoft Active Sync 4.5 for Windows XP; Windows Mobile Device Center for Windows Vista or higher
* Microsoft Device Emulator 3.0 for Windows Vista or higher
* Visual Studio 2005 Service Pack 1 installed or Visual Studio 2008.
* [7-zip](
NOTE: It is a good idea to install Windows Mobile 6 Professional last, since it needs to be installed after Visual Studio, and since the Windows Mobile 6 Professional install process will tell you if you forgot to install any of the other prerequisites.
### Allow DMA Connections
On Windows XP, open ActiveSync main window and open the File menu; on Windows Vista and above, open Windows Mobile Device Center and click Mobile Device Settings.
Select Connection Settings, then select the checkbox "Allow connections to one of the following."
Select "DMA" from the list box. DMA Connection is required to work with the Windows Mobile emulator.
### Add Paths
Add path to vcbuild.exe and CabWiz.exe to rhobuild.yml in the Rhodes folder (example location: `C:/InstantRhodes/ruby/lib/ruby/gems/1.8/gems/rhodes-3.0.2`).
vcbuild: `C:/Program Files/Microsoft Visual Studio 8/VC/vcpackages/vcbuild.exe`
cabwiz: `C:/Program Files/Windows Mobile 6 SDK/Tools/CabWiz`
On 64-bit installations:
vcbuild: `C:/Program Files (x86)/Microsoft Visual Studio 8/VC/vcpackages/vcbuild.exe`
cabwiz: `C:/Program Files (x86)/Windows Mobile 6 SDK/Tools/CabWiz`
### Build and Run application on device or emulator (Visual Studio 2008 only):
To build cab-file, install it, and run application on emulator, run:
$ rake run:wm:cab
Before you install the application on your Windows Mobile device, first connect your device via USB cable. Then check that your device is connected with ActiveSync on Windows XP or with Windows Mobile Device Center on Windows Vista or above.
To build cab-file, install it, and run application on device, run:
$ rake run:wm:device:cab
After the build process completes, the device will ask you to install the app. Disconnect the USB cable from the device before you install.
### Build application cab-file for the device
$ rake device:wm:production
If you want the application to be signed automatically 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:
wmsign: <disk:/path/MySign.pfx>
You can find more information about Windows Mobile code signing at:
### Deploy application on device
First, connect your device to your computer. You can use USB-cable, bluetooth or any other method. To use computer internet, start ActiveSync or Windows Mobile Device Center.
You can use rake tasks to deploy the application. See the previous section, 'Build application from the command line.' The device should be connected via USB-cable.
Manually copy the .cab file to the device. For example, you can use the device File Explorer to display the .cab file that is on the computer. Click on that .cab file and the installation process will be started; after it is finished, you should see the app icon on your device in Programs.
### Build from IDE
Checkout the rhodes source code from github (you have this source code already if you installed Instant Rhodes).
Open `<source-code-root>\platform\wm\rhodes.sln` in Visual Studio (example location for <source-code-root>: `C:/InstantRhodes/ruby/lib/ruby/gems/1.8/gems/rhodes-3.0.2`).
In Visual Studio, select Windows Mobile 6 Professional and build Release configuration.
Edit the file `rhobuild.yml` in the Rhodes folder:
* Check that the path to Cabwiz is defined, for example, `C:/Program Files/Windows Mobile 6 SDK/Tools/CabWiz`.
* Define the path to your application folder.
$ rake build:wm:devrhobundle
Make sure you cradle your emulator (menu Tools/Device Emulator Manager/Select Running Emulator/Actions/Cradle)
Copy `rhodes.exe` and `rhobundle` (located at `<source-code-root>\platform\wm\bin\Win32\rhodes\Debug\rho`) created at the previous step to the device: `My Computer\Mobile Device` and folder in Program Files on that device (for example, `\Program Files\rhodes`). You can first delete the contents of `\Program Files\rhodes\rho` folder on your device if you want to ensure there are no old files left over.
If you changed your application, then recompile your application code by running the following command again, and copying `rhobundle` and `rhodes.exe` again:
$ rake build:wm:devrhobundle
If you changed your application and built it using rake tasks, then to compile your application:
$ rake device:wm
Copy `<your_app_directory>\bin\target\` content to `\My Documents\` on your device or the emulator, execute that .cab to install the app, and then run the installed app to see the changes.
### Logging
To read the log file from the emulator or your device:
* Connect to the device or emulator using ActiveSync or Windows Mobile Device Center.
* Press explore on ActiveSync window, File Management on Windows Mobile Device Center.
* Navigate to `My Device\Program Files\<your_app_name>\rho\rholog.txt`
## Build for Windows
### Prerequisites
* Follow [All Platforms Prerequisites](#all-platforms-prerequisites)
* Visual Studio 2005 Service Pack 1 installed, Visual Studio 2008 or Visual Studio 2010 (Express editions are also supported)
* WTL : :
* unzip to folder: <VS path>\VC\WTL
* open in Visual studio menu `Tools\Options\Projects and solutions\VC++ directories`. Select platform - `Win32`; Show directories for - `Include files`; Add - `$(VCInstallDir)wtl\include`
### Build application from the command line
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:
<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>
If you use Visual Studio 2010 : add path to `msbuild` to `rhobuild.yml` in rhodes folder:
vcbuild: msbuild
To build and run emulator run:
$rake run:win32
To clean all binaries run:
$rake clean:win32
### Logging
Rholog.txt is placed in `<rhodes folder>\platform\wm\bin\win32\rhodes\Debug\rho`
## Build for Windows Phone 7
### Prerequisites
* Follow [All Platforms Prerequisites](#all-platforms-prerequisites)
* Windows 7 OS
* Visual Studio 2010 installed or VS Express for Windows Phone and VS Express for C#
* [Windows Phone Developer Tools 7.1 Beta](
* Add path to `msbuild` to `rhobuild.yml` in rhodes folder. For example:
msbuild: C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
### Application changes
* Add to application build.yml productid GUID. For example:
productid: 632621d0-5ecb-012e-2c97-482a1411c191
NOTE: When you use rhodes command to generate application, productid is generated automatically
* Windows Phone 7 does not support POST method in HTML forms. So you have to change all form method to GET or use javascript to do it:
Copy file:
to your application public/js folder
Modify layout.erb:
<%if System::get_property('platform') == 'WP7' %>
<script src="/public/js/wp7.js" type="text/javascript"></script>
<% end %>
<% if System::get_property('platform') == 'WP7' %>
<body onload="wp7_change_forms_action_to_get()">
<% else %>
<% end %>
<%%= @content %>
This script just replace FORM action to GET:
function wp7_change_forms_action_to_get() {
for(i=0;i<document.forms.length; i++)
document.forms[i].method = "GET";
You can use [Rhodes Application Generator](#generator) to see application code with all this changes
NOTE: in form action when using url_for specify :action => :create to call create controller method
### Build and run using Rhodes gem
* Install Rhodes gem
* Run application simulator:
$rake run:wp
* Run application device:
$rake run:wp:device
* See log in application folder : rholog.txt
NOTE: When running on device you may need to disconnect USB cable from device to see log
* After Application code modifications, run rake commands. DO NOT close simulator!
### Build from sources
* Checkout rhodes source code from github
* Get IronRuby master branch to parent folder of rhodes:
$ git clone
rename IronLanguages folder to IronRuby
* Build IronRuby(Once)
rake build:wp:ironruby
### Build from IDE
#### IronRuby
* Copy folder `rhodes\platform\wp7\IronRuby\Languages` to `IronRuby`
* Open `IronRuby\Solutions\Ruby.sln` in VS 2010 or VS Express 2010 for C#.
* Select 'Silverlight3Debug|Any CPU' or 'Silverlight3Release|Any CPU' in solution configuration and build solution
#### Rhodes
* Open `rhodes\platform\wp7\rhodes.sln` in VS 2010 or VS Express 2010 for Windows Phone.
* Select Debug or Release configuration, Windows Phone 7 Emulator target and build solution.
* Run emulator by pressing Start Debugging or Start Without Debugging
* After Application code modifications , build Rhodes solution and Start Debugging. DO NOT close emulator!
* See log in VS output console (Debug mode only)
## How to set application name and icon
### Application Name
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:
name: My Own App
### Application Icon
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
### iPhone using xCode
* Target->info->General->Name
* Target->info->Build->Product Name (for all configurations)
* rhodes\platform\iphone\icon.png, icon57.png, icon72.png, icon114.png - change to your icons
* check rhodes\platform\iphone\Info.plist it should contain BundleName=${PRODUCT_NAME}
### Windows Mobile
Windows Mobile Shell program caches program icons. This cache is cleared only when device or simulator is restarted.
So if you change icon of application, you have to restart device/simulator(uninstall/install is not enough).
### Symbian
You can change icon for your Symbian application replacing icon.svg which is in your application icon folder with a new one.
Jump to Line
Something went wrong with that request. Please try again.