Release

From Rhomobile

Jump to: navigation, search

Contents

Current Release - 1.4.2

1.4.2 CHANGELOG

Please make sure to review the Rhodes and RhoSync pages periodically for information on new features.

Getting New Versions

Choose one of three options, then review the upgrade instructions for the version you downloaded.

Option A: If you already have rhodes as a gem installed, you can simply do:

 [sudo] gem update rhodes
 rhodes-setup

Option B: If you were tracking rhodes by a specific branch, just run:

 git remote update
 git checkout -b <new-branch> --track origin/<new-branch> (if you want the latest <new-branch> code)

or

 git checkout <tag> (if you want the specific released version)

Option C: If you downloaded rhodes from github directly, you can download the new versions here:

 http://github.com/rhomobile/rhodes/downloads

1.2.2 -> 1.4.x Upgrade Instructions

  • Rho::RhoConfig::add_source was changed, you don't have to specify source_id:
Rho::RhoConfig::add_source("SrcName", {"url"=>"SrcUrl"})

If you want to specify source sync order use priority:

Rho::RhoConfig::add_source("SrcName", {"url"=>"SrcUrl", "priority"=>0})

0 - is top priority

  • Run "upgrade-rhodes-app" from your application directory.

1.2.1 -> 1.2.2 Upgrade Instructions

  • install gem or put <rhodescheckout>/bin on your path
  • run command line 'upgrade-rhodes-app' in your applications folder


1.1.x -> 1.2.x Upgrade Instructions

1. Set syncserver in your rhoconfig.txt:

syncserver = 'http://mysyncserver.com/apps/NewApp/sources/'


2. Update your config.rb for your object, say 'SugarAccount':

Rho::RhoConfig::add_source("SugarAccount", {"url"=>"#{Rho::RhoConfig.syncserver}SugarAccounts", "source_id"=>9893}) #=> SyncEngine will create the string 'http://mysyncserver.com/apps/NewApp/sources/SugarAccounts'

Rhodes will use the entire url string here since it starts with 'http' prefix.

NOTE: You can also just use a relative url in config.rb now, and it will be appended to the syncserver property:

Rho::RhoConfig::add_source("SugarAccount", {"url"=>"SugarAccounts", "source_id"=>9893}) #=> SyncEngine will create the string 'http://mysyncserver.com/apps/NewApp/sources/SugarAccounts'


3. Update your login code (usually in the settings controller), to include a callback:

SyncEngine.login(@params['login'], @params['password'], (url_for :action => :login_callback))


4. Define a login callback (or copy the login callback code from a generated app):

def login_callback
  err_code = @params['error_code'].to_i
  if err_code == 0
    # run sync if we were successful
    WebView.navigate Rho::RhoConfig.start_path
    SyncEngine.dosync
  else
    @msg = @params['error_message']
    if @msg == nil or @msg.length == 0 
      @msg = Rho::RhoError.new(err_code).message
    end
    WebView.navigate ( url_for :action => :login, :query => {:msg => @msg} )
  end  
end


5. Remove 'rho_build.conf' file if you have one. You do not need it anymore. All configuration related to building rhodes from source is done with rhobuild.yml.


6. Create a "wait.erb" or create a similar template to render in the login action of Settings controller. This template will be rendered when the login action completes. The login_callback action will be called when the SyncEngine finishes logging into RhoSync. If you generate a new application with 1.2.x, you will see this template in the 'app/Settings' directory.


7. Change all instances of
SyncEngine::trigger_sync_db_reset
to
Rhom::Rhom.database_full_reset
in your application (usually in the Settings controller).


8. Update env->version in build.yml to "1.2.x" where x is your latest rhodes gem version (i.e. "1.2.1").


9. '[sudo] gem update rhodes' and verify 1.2.0+ is installed!

1.0.x -> 1.1.x Upgrade Instructions

1. Copy the following into a file called "rhoconfig.txt" in your application root folder (or generate a new application and copy the file from there):

# Startup page for your application
start_path = '/app'

# Path to the options page (in this case handled by javascript)
options_path = '/app/Settings'

# Location of bundle url (i.e. from rhohub.com)
rhobundle_zip_url = nil

# Optional password to access bundle (usually not required)
rhobundle_zip_pwd = nil

# Rhodes runtime properties
MinSeverity  = 0
LogToOutput = 1
LogCategories = *
ExcludeLogCategories =
KeepTrackOfLastVisitedPage = 0 
LastVisitedPage = ''

2. Remove config.rb from application root folder.

3. Either run "[sudo] gem update rhodes" OR follow the steps below to install the local gems to your machine, you may skip the prebuild steps if you don't want to build from source.

Rhodes Release Process

The Rhodes Release Process consists of the following steps:

  1. Install & test rhodes gems locally on your machine (Note: You may want to run only this step if you are just interested in testing the latest unstable branch)
  2. Push gem to gemcutter.org
  3. Update relevant wiki documentation (this page!)

Install Gems Locally & Test

MAC:

cd <rhodescheckout>/rhodes/
sudo gem uninstall rhodes
sudo rake install

Windows:

cd <rhodescheckout>\rhodes\
gem uninstall rhodes
rake install

Now test your favorite rhodes application!

cd <myfavoriterhodesapp>
rake -T

rake clean:android              # Clean Android
rake clean:bb                   # Clean bb
rake clean:iphone               # Clean iphone
rake clean:wm                   # Clean wm
rake clobber_rdoc               # Remove rdoc products
rake config:checkbb             # Check local blackberry configuration
rake device:android:debug       # Build debug self signed for device
rake device:android:production  # Build production signed for device
rake device:bb:debug            # Build debug for device
rake device:bb:production       # Build production for device
rake device:iphone:production   # Builds and signs iphone for production
rake device:wm:production       # Build production for device or emulator
rake run:android                # build and launch emulator
rake run:bb                     # Builds everything, loads and starts bb sim and mds
rake run:bbdev                  # Same as run:bb, but only supports one app at a time and works faster
rake run:iphone                 # Builds everything, launches iphone simulator

Release & Publish

cd <rhodescheckout>/rhodes
rake gem
gem push rhodes-<version>.gem

Now see if your release of rhodes installs!

[sudo] gem update rhodes

Now update wiki with appropriate documentation & bump the current version.

Personal tools