RhoSimulator allows to run Rhodes applications without lengthy build process and to debug them in RhoStudio. Currently RhoSimulator works on Windows only.
If you have the Rhodes gem, then RhoSimulator is installed already.
If you would like to run RhoSimulator without Rhodes gem, download Windows or
Mac OS X version, extract it and specify path to rhosimulator.exe
or RhoSimulator.app
respectively at rhodes/rhobuild.yml
:
env: paths: rhosimulator: <RhoSimulator folder>
Alternatively you may build your own customized version of RhoSimulator as described below.
To run application in RhoSimulator just run in rhodes or application folder:
#run RhoSimulator to simulate specific platform: rake run:android:rhosimulator rake run:iphone:rhosimulator #bbver from build.yml will be used as System.get_property('os_version') rake run:bb:rhosimulator rake run:wm:rhosimulator rake run:wp:rhosimulator #run RhoSimulator to simulate 'WINDOWS_DESKTOP' platform: rake run:win32:rhosimulator
If you modified Rhodes application sources, just press ‘Refresh’ in RhoSimulator to reload application, i.e. generally no RhoSimulator restart is required. The restart of RhoSimulator is required only if a model was added/modified or some code was added to the AppApplication class.
In present version of RhoStudio you may:
If you use custom native extensions, then running and debugging your applications in RhoSimulator requires a custom build. Follow these instructions to build your own customized version of RhoSimulator.
Clean temporary and generated files by running the rake command in the rhodes
source folder:
rake clean:win32
rhodes
source (if haven’t done it already) as described here. Don’t forget to add the bin
folder to your path, run rhodes-setup
and update Rhodes SDK path in build.yml
at your application root folder.If you’re using Xcode 4.4 or later, then you must install the OS 10.6 SDK as follows:
Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
. You should see a folder named MacOSX10.6.sdk
Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
.MacOSX10.6.sdk
folder from the SDKs folder on the older disk image to the SDKs folder in the newer Xcode.First build the Qt libraries for Mac from sources to enable HTTPS protocol support in RhoSimulator:
Qt libraries
~/qt-4.8.2
PATH
environment variable does not contain the path to any previously installed Qt binariesAdd to your ~/.bash_profile
the new environment variable QTDIR
by adding the line (or by changing the existing QTDIR
variable):
export QTDIR=/Developer/SDKs/Qt
Restart terminal windows to enable new environment setting.
~/qt-4.8.2/src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro
~/qt-4.8.2/src/plugins/bearer/corewlan/corewlan.pro
Open Terminal.app
and issue commands:
$ cd ~/qt-4.8.2 $ ./configure -opensource -platform macx-g++ -nomake examples -nomake demos -nomake docs -qt-libpng -qt-libjpeg -qt-libtiff -qt-libmng -no-qt3support -webkit -release -prefix /Developer/SDKs/Qt -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk $ make $ sudo make install
If you’re using Xcode 4.2 or earlier, then change the last line of ./configure
command to:
-sdk /Developer/SDKs/MacOSX10.6.sdk
Be aware that it will take a while to build the Qt libraries from sources (maybe few hours or so).
To enable digest
native extensions bundled with Rhodes SDK make sure that the default application in your rhobuild.yml
is the framework_spec
:
app: [...]/rhodes/spec/framework_spec
To compile RhoSimulator with the custom native extensions change this path to your own Rhodes application home folder.
It should be noted that extensions you’d like to compile into RhoSimulator should be listed in the main extensions
section of your Rhodes application build.yml
(but not in its platform-specific extensions
sections).
When you’ve finished all the preliminary steps for your OS, the only thing you need to do is to run the rake command in the rhodes
source folder:
rake build:rhosimulator
To run Rhodes applications in the custom built RhoSimulator, please ensure that no env:
» paths:
» rhosimulator:
line is present at your rhobuild.yml
(if present, remove that line).
<path-to-ruby>\lib\ruby\gems\<version-number>\gems\rhodes-<version-number>\platform\wm\rhodes.sln
SimulatorRelease|Win32
rhobuild.yml
:
env:
paths:
rhosimulator: platform/wm/bin/win32/rhodes/SimulatorRelease