rhodes 3.0.1.beta.2 → 3.0.1.beta.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -95,6 +95,16 @@ Open up a command window and switch to your application's directory. Run:
95
95
 
96
96
  This changes your rhobuild.yml in the SDK folder to point to your application.
97
97
 
98
+ Prepare XCode rrhorunner.xcodeproj and other files for current application :
99
+
100
+ :::term
101
+ rake build:iphone:setup_xcode_project
102
+
103
+ Restore original XCode rrhorunner.xcodeproj and other files :
104
+
105
+ :::term
106
+ rake build:iphone:restore_xcode_project
107
+
98
108
  After you change application code just run 'Build and Go' command in XCode to build for the simulator.
99
109
 
100
110
  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.
@@ -24,7 +24,7 @@ Rhodes provide access to device specific capabilities such as GPS, PIM, camera,
24
24
  <tr><td class='cap'>Toolbar</td><td>1.2.2</td><td>2.3</td><td>3.0</td><td class='tbd'>n/a</td><td>1.5</td><td>3.0</td></tr>
25
25
  <tr><td class='cap'>Tab Bar</td><td>1.2.2</td><td class='tbd'>3.5</td><td class='tbd'>TBD</td><td class='tbd'>n/a</td><td>1.5</td><td class='tbd'>3.5</td></tr>
26
26
  <tr><td class='cap'>Nav Bar</td><td>2.0</td><td class='tbd'>3.5</td><td class='tbd'>TBD</td><td class='tbd'>n/a</td><td>2.0</td><td class='tbd'>4.0</td></tr>
27
- <tr><td class='cap'>Signature Capture</td><td>2.1</td><td class='tbd'>3.5</td><td class='tbd'>TBD</td><td class='tbd'>3.5</td><td>2.1</td><td class='tbd'>4.0</td></tr>
27
+ <tr><td class='cap'>Signature Capture</td><td>2.1</td><td>3.0</td><td class='tbd'>TBD</td><td class='tbd'>3.5</td><td>2.1</td><td class='tbd'>4.0</td></tr>
28
28
  <tr class='tbd'><td class='cap'>Audio/Video capture</td><td>4.0</td><td>4.0</td><td class='tbd'>TBD</td><td>4.0</td><td>4.0</td><td>4.0</td></tr>
29
29
  <tr><td class='cap'>Bluetooth</td><td>2.2</td><td>2.2</td><td class='tbd'>TBD</td><td>2.2</td><td>2.2</td><td class='tbd'>4.0</td></tr>
30
30
  <tr><td class='cap'>NFC</td><td class='tbd'>TBD</td><td class='tbd'>TBD</td><td class='tbd'>TBD</td><td class='tbd'>TBD</td><td>3.0</td><td class='tbd'>4.0</td></tr>
data/doc/ui.txt CHANGED
@@ -160,7 +160,7 @@ If you are using xCode to build for iPhone, you should add to your project Defau
160
160
  * Default-LandscapeLeft.png; size 1024x768 - for iPad in LandscapeLeft orientation on start, if not defined then Default-Landscape.png will be used
161
161
  * Default-LandscapeRight.png; size 1024x768 - for iPad in LandscapeRight orientation on start, if not defined then Default-Landscape.png will be used
162
162
 
163
- **NOTE: Use rake command once and it will update xcode project. **
163
+ **NOTE: Use rake command "rake build:iphone:setup_xcode_project" for setup XCode project for current application (include loading images, icons, etc.) **
164
164
 
165
165
  You can see examples of all these images in [Rhodes-System-Api-Samples](http://github.com/rhomobile/rhodes-system-api-samples) application.
166
166
 
@@ -180,7 +180,7 @@ def debug_handle_cmd(inline)
180
180
  end
181
181
  end
182
182
  if processed
183
- $_cmd = $_cmd.sub(/^([^\n\r]*)[\n\r]+(.*$)/, "\\2")
183
+ $_cmd = $_cmd.sub(/^([^\n\r]*)([\n\r]+(.*)|)$/, "\\3")
184
184
  $_wait = wait if inline
185
185
  end
186
186
  processed
@@ -101,6 +101,41 @@ def set_app_url_scheme(newname)
101
101
  return ret_value
102
102
  end
103
103
 
104
+ BAKUP_FILES = ['rhorunner.xcodeproj', 'Entitlements.plist', 'icon.png', 'icon114.png', 'icon57.png', 'icon72.png', 'Info.plist']
105
+ CLEAR_FILES = ['Default.png', 'Default@2x.png', 'Default-Portrait.png', 'Default-PortraitUpsideDown.png', 'Default-Landscape.png', 'Default-LadscapeLeft.png', 'Default-LandscapeRight.png']
106
+
107
+ def make_project_bakup
108
+ BAKUP_FILES.each do |f|
109
+ filename_origin = $config["build"]["iphonepath"] + "/" +f
110
+ filename_bak = $config["build"]["iphonepath"] + "/project_bakup/" +f
111
+ is_folder = File.directory? filename_bak
112
+ if File.exists? filename_origin
113
+ if (!File.exists? filename_bak) && (!is_folder)
114
+ bak_folder = $config["build"]["iphonepath"] + "/project_bakup"
115
+ mkdir_p bak_folder
116
+ cp_r filename_origin,filename_bak
117
+ end
118
+ end
119
+ end
120
+ end
121
+
122
+ def restore_project_from_bak
123
+ BAKUP_FILES.each do |f|
124
+ filename_origin = $config["build"]["iphonepath"] + "/" +f
125
+ filename_bak = $config["build"]["iphonepath"] + "/project_bakup/" +f
126
+ if File.exists? filename_bak
127
+ rm_rf filename_origin
128
+ cp_r filename_bak,filename_origin
129
+ end
130
+ end
131
+ CLEAR_FILES.each do |f|
132
+ filename = $config["build"]["iphonepath"] + "/" +f
133
+ if File.exists? filename
134
+ rm_rf filename
135
+ end
136
+ end
137
+ end
138
+
104
139
  def set_app_url_name(newname)
105
140
  ret_value = ''
106
141
  fname = $config["build"]["iphonepath"] + "/Info.plist"
@@ -148,7 +183,7 @@ def restore_app_icon
148
183
  end
149
184
  end
150
185
 
151
- def set_app_icon
186
+ def set_app_icon(make_bak)
152
187
  puts "set icon"
153
188
  ipath = $config["build"]["iphonepath"]
154
189
  begin
@@ -156,7 +191,9 @@ def set_app_icon
156
191
  ibak = File.join(ipath, name + '.bak')
157
192
  icon = File.join(ipath, name + '.png')
158
193
  appicon = File.join($app_path, 'icon', name + '.png')
159
- cp icon, ibak unless File.exists? ibak
194
+ if make_bak
195
+ cp icon, ibak unless File.exists? ibak
196
+ end
160
197
  cp appicon, ipath
161
198
  end
162
199
  rescue => e
@@ -181,7 +218,7 @@ def restore_default_images
181
218
  end
182
219
  end
183
220
 
184
- def set_default_images
221
+ def set_default_images(make_bak)
185
222
  puts "set_default_images"
186
223
  ipath = $config["build"]["iphonepath"]
187
224
  begin
@@ -192,7 +229,9 @@ def set_default_images
192
229
  appimage = File.join($app_path, 'app', name + '.png')
193
230
  appsimage = File.join($app_path, 'app', name + '.iphone.png')
194
231
  if File.exists? imag
195
- cp imag, ibak unless File.exists? ibak
232
+ if make_bak
233
+ cp imag, ibak unless File.exists? ibak
234
+ end
196
235
  end
197
236
  #bundlei = File.join($srcdir, defname + '.png')
198
237
  #cp appimage, bundlei unless !File.exist? appimage
@@ -357,6 +396,7 @@ namespace "config" do
357
396
  #xcode_configuration = ENV['CONFIGURATION']
358
397
  #$configuration = xcode_configuration if not xcode_configuration.nil?
359
398
 
399
+ make_project_bakup
360
400
  end
361
401
  end
362
402
 
@@ -419,7 +459,35 @@ namespace "build" do
419
459
  end
420
460
  end
421
461
  end
422
-
462
+
463
+ task :restore_xcode_project => ["config:iphone"] do
464
+ restore_project_from_bak
465
+ end
466
+
467
+ task :setup_xcode_project => ["config:iphone"] do
468
+ restore_project_from_bak
469
+
470
+ appname = $app_config["name"] ? $app_config["name"] : "rhorunner"
471
+ vendor = $app_config['vendor'] ? $app_config['vendor'] : "rhomobile"
472
+ bundle_identifier = "com.#{vendor}.#{appname}"
473
+ bundle_identifier = $app_config["iphone"]["BundleIdentifier"] unless $app_config["iphone"]["BundleIdentifier"].nil?
474
+ saved_identifier = set_app_bundle_identifier(bundle_identifier)
475
+
476
+ saved_url_scheme = set_app_url_scheme($app_config["iphone"]["BundleURLScheme"]) unless $app_config["iphone"]["BundleURLScheme"].nil?
477
+ saved_url_name = set_app_url_name(bundle_identifier)
478
+
479
+ set_app_icon(false)
480
+ set_default_images(false)
481
+
482
+ if $entitlements == ""
483
+ if $configuration == "Distribution"
484
+ $entitlements = "Entitlements.plist"
485
+ end
486
+ end
487
+
488
+ set_signing_identity($signidentity,$provisionprofile,$entitlements.to_s) if $signidentity.to_s != ""
489
+ end
490
+
423
491
  # desc "Build rhodes"
424
492
  task :rhodes => ["config:iphone", "build:iphone:rhobundle"] do
425
493
 
@@ -432,6 +500,7 @@ namespace "build" do
432
500
  saved_name = set_app_name($app_config["name"]) unless $app_config["name"].nil?
433
501
  saved_version = set_app_version($app_config["version"]) unless $app_config["version"].nil?
434
502
 
503
+
435
504
  appname = $app_config["name"] ? $app_config["name"] : "rhorunner"
436
505
  vendor = $app_config['vendor'] ? $app_config['vendor'] : "rhomobile"
437
506
  bundle_identifier = "com.#{vendor}.#{appname}"
@@ -441,8 +510,8 @@ namespace "build" do
441
510
  saved_url_scheme = set_app_url_scheme($app_config["iphone"]["BundleURLScheme"]) unless $app_config["iphone"]["BundleURLScheme"].nil?
442
511
  saved_url_name = set_app_url_name(bundle_identifier)
443
512
 
444
- set_app_icon
445
- set_default_images
513
+ set_app_icon(true)
514
+ set_default_images(true)
446
515
 
447
516
  if $entitlements == ""
448
517
  if $configuration == "Distribution"
@@ -3,7 +3,7 @@ require "lib/rhodes.rb"
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = %q{rhodes}
6
- s.version = "3.0.1.beta.2"
6
+ s.version = "3.0.1.beta.3"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.authors = ["Rhomobile"]
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhodes
3
3
  version: !ruby/object:Gem::Version
4
- hash: 62196431
4
+ hash: 62196429
5
5
  prerelease: true
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
9
  - 1
10
10
  - beta
11
- - 2
12
- version: 3.0.1.beta.2
11
+ - 3
12
+ version: 3.0.1.beta.3
13
13
  platform: ruby
14
14
  authors:
15
15
  - Rhomobile
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-05-23 00:00:00 -07:00
20
+ date: 2011-05-24 00:00:00 -07:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -1075,6 +1075,7 @@ files:
1075
1075
  - lib/test/rho_stubs.rb
1076
1076
  - lib/test/syncdb.sqlite
1077
1077
  - LICENSE
1078
+ - Manifest.txt
1078
1079
  - platform/android/build/android.rake
1079
1080
  - platform/android/build/androidcommon.rb
1080
1081
  - platform/android/build/libcurl_build.files