RhodesでAndroidとiPhoneのアプリを、と思ったけれど…

たぶん使わないと思うので足早に。

インストール

> mkdir rhodes_projects
> cd rhodes_projects
> rbenv gemset create 1.9.3-p194 rhodes
> echo rhodes > .rbenv-gemsets
> gem install rhodes
> rbenv rehash
> rhodes-setup
We will ask you a few questions below about your dev environment.

JDK path (required) (/Library/Java/Home): 
Android SDK path (blank to skip) (): /usr/local/Cellar/android-sdk/r20.0.1
Android NDK path (blank to skip) (): /usr/local/Cellar/android-ndk/r8b
Windows Mobile 6 SDK CabWiz (blank to skip) (): 
BlackBerry JDE 4.6 (blank to skip) (): 
BlackBerry JDE 4.6 MDS (blank to skip) (): 
BlackBerry JDE 4.2 (blank to skip) (): 
BlackBerry JDE 4.2 MDS (blank to skip) ():

プロジェクト作成

> rhogen app basestation
> cd basestation
> vi build.yml
android:
  version: 4.1

scaffold的ななにか。

> rhodes model cbase id
Generating with model generator:
     [ADDED]  app/Cbase/index.erb
     [ADDED]  app/Cbase/edit.erb
     [ADDED]  app/Cbase/new.erb
     [ADDED]  app/Cbase/show.erb
     [ADDED]  app/Cbase/index.bb.erb
     [ADDED]  app/Cbase/edit.bb.erb
     [ADDED]  app/Cbase/new.bb.erb
     [ADDED]  app/Cbase/show.bb.erb
     [ADDED]  app/Cbase/cbase_controller.rb
     [ADDED]  app/Cbase/cbase.rb
     [ADDED]  app/test/cbase_spec.rb

ビルド
> rake -T
> rake run:android

rakeながいよ

run:iphoneするならXcodeのPreferencesからiOS 5.0 Simulatorをinstallしておく。

> rake run:iphone

ながいー

うーん、Rubyでマルチプラットフォームは魅力なんだけど、うーん。。

広告