rhodes 3.3.0.beta.3 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Manifest.txt +2 -0
- data/platform/iphone/iTunesArtwork.jpg +0 -0
- data/platform/iphone/rbuild/ApplicationPlist.erb +41 -0
- data/platform/iphone/rbuild/iphone.rake +135 -2
- data/version +1 -1
- metadata +6 -6
data/Manifest.txt
CHANGED
|
@@ -1946,7 +1946,9 @@ platform/iphone/icon114.png
|
|
|
1946
1946
|
platform/iphone/icon57.png
|
|
1947
1947
|
platform/iphone/icon72.png
|
|
1948
1948
|
platform/iphone/Info.plist
|
|
1949
|
+
platform/iphone/iTunesArtwork.jpg
|
|
1949
1950
|
platform/iphone/main.m
|
|
1951
|
+
platform/iphone/rbuild/ApplicationPlist.erb
|
|
1950
1952
|
platform/iphone/rbuild/findRhodesGuid.rb
|
|
1951
1953
|
platform/iphone/rbuild/iphone.rake
|
|
1952
1954
|
platform/iphone/rhoextlib/dosyscall.c
|
|
Binary file
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>items</key>
|
|
6
|
+
<array>
|
|
7
|
+
<dict>
|
|
8
|
+
<key>assets</key>
|
|
9
|
+
<array>
|
|
10
|
+
<dict>
|
|
11
|
+
<key>kind</key>
|
|
12
|
+
<string>software-package</string>
|
|
13
|
+
<key>url</key>
|
|
14
|
+
<string><%= $plist_ipa_url %></string>
|
|
15
|
+
</dict>
|
|
16
|
+
<dict>
|
|
17
|
+
<key>kind</key>
|
|
18
|
+
<string>display-image</string>
|
|
19
|
+
<key>needs-shine</key>
|
|
20
|
+
<true/>
|
|
21
|
+
<key>url</key>
|
|
22
|
+
<string><%= $plist_icon_url %></string>
|
|
23
|
+
</dict>
|
|
24
|
+
</array>
|
|
25
|
+
<key>metadata</key>
|
|
26
|
+
<dict>
|
|
27
|
+
<key>bundle-identifier</key>
|
|
28
|
+
<string><%= $plist_bundle_id %></string>
|
|
29
|
+
<key>bundle-version</key>
|
|
30
|
+
<string><%= $plist_bundle_version %></string>
|
|
31
|
+
<key>kind</key>
|
|
32
|
+
<string>software</string>
|
|
33
|
+
<key>subtitle</key>
|
|
34
|
+
<string><%= $plist_subtitle %></string>
|
|
35
|
+
<key>title</key>
|
|
36
|
+
<string><%= $plist_title %></string>
|
|
37
|
+
</dict>
|
|
38
|
+
</dict>
|
|
39
|
+
</array>
|
|
40
|
+
</dict>
|
|
41
|
+
</plist>
|
|
@@ -195,8 +195,99 @@ def make_app_info
|
|
|
195
195
|
File.open(fname,"w") { |f| f.write(buf) }
|
|
196
196
|
end
|
|
197
197
|
|
|
198
|
+
|
|
199
|
+
def prepare_production_ipa (app_path, app_name)
|
|
200
|
+
puts 'Preparing *.IPA file ...'
|
|
201
|
+
|
|
202
|
+
tmp_dir = File.join(app_path, "tmp_ipa")
|
|
203
|
+
mkdir_p tmp_dir
|
|
204
|
+
payload_dir = File.join(tmp_dir, "Payload")
|
|
205
|
+
mkdir_p payload_dir
|
|
206
|
+
app_file = File.join(app_path, app_name + ".app")
|
|
207
|
+
app_in_payload = File.join(payload_dir, app_name + ".app")
|
|
208
|
+
cp_r app_file, app_in_payload
|
|
209
|
+
|
|
210
|
+
itunes_artwork = File.join($config["build"]["iphonepath"], "iTunesArtwork.jpg")
|
|
211
|
+
itunes_artwork_dst = File.join(tmp_dir, "iTunesArtwork")
|
|
212
|
+
|
|
213
|
+
if !$app_config["iphone"].nil?
|
|
214
|
+
if !$app_config["iphone"]["production"].nil?
|
|
215
|
+
if !$app_config["iphone"]["production"]["ipa_itunesartwork_image"].nil?
|
|
216
|
+
art_test_name = $app_config["iphone"]["production"]["ipa_itunesartwork_image"]
|
|
217
|
+
if File.exists? art_test_name
|
|
218
|
+
itunes_artwork = art_test_name
|
|
219
|
+
else
|
|
220
|
+
art_test_name = File.join($app_path,$app_config["iphone"]["production"]["ipa_itunesartwork_image"])
|
|
221
|
+
if File.exists? art_test_name
|
|
222
|
+
itunes_artwork = art_test_name
|
|
223
|
+
else
|
|
224
|
+
itunes_artwork = $app_config["iphone"]["production"]["ipa_itunesartwork_image"]
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
cp itunes_artwork, itunes_artwork_dst
|
|
232
|
+
|
|
233
|
+
currentdir = Dir.pwd()
|
|
234
|
+
chdir tmp_dir
|
|
235
|
+
sh %{zip -r temporary_archive.zip .}
|
|
236
|
+
ipa_file_path = File.join(app_path, app_name + ".ipa")
|
|
237
|
+
rm_rf ipa_file_path
|
|
238
|
+
cp 'temporary_archive.zip', ipa_file_path
|
|
239
|
+
Dir.chdir currentdir
|
|
240
|
+
rm_rf tmp_dir
|
|
241
|
+
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
def copy_all_png_from_icon_folder_to_product(app_path)
|
|
245
|
+
app_icon_folder = File.join($app_path, 'icon')
|
|
246
|
+
rm_rf File.join(app_path, "*.png")
|
|
247
|
+
Dir.glob(File.join(app_icon_folder, "*.png")).each do |icon_file|
|
|
248
|
+
cp icon_file, app_path
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
def prepare_production_plist (app_path, app_name)
|
|
253
|
+
puts 'Preparing application production plist ...'
|
|
254
|
+
|
|
255
|
+
$plist_title = app_name
|
|
256
|
+
$plist_subtitle = app_name
|
|
257
|
+
$plist_icon_url = "http://example.com/icon57.png"
|
|
258
|
+
$plist_ipa_url = "http://example.com/Application.ipa"
|
|
259
|
+
|
|
260
|
+
appname = $app_config["name"] ? $app_config["name"] : "rhorunner"
|
|
261
|
+
vendor = $app_config['vendor'] ? $app_config['vendor'] : "rhomobile"
|
|
262
|
+
$plist_bundle_id = "com.#{vendor}.#{appname}"
|
|
263
|
+
$plist_bundle_id = $app_config["iphone"]["BundleIdentifier"] unless $app_config["iphone"]["BundleIdentifier"].nil?
|
|
264
|
+
|
|
265
|
+
$plist_bundle_version = "1.0"
|
|
266
|
+
$plist_bundle_version = $app_config["version"] unless $app_config["version"].nil?
|
|
267
|
+
|
|
268
|
+
if !$app_config["iphone"].nil?
|
|
269
|
+
if !$app_config["iphone"]["production"].nil?
|
|
270
|
+
plist_title = $app_config["iphone"]["production"]["app_plist_title"] unless $app_config["iphone"]["production"]["app_plist_title"].nil?
|
|
271
|
+
plist_subtitle = $app_config["iphone"]["production"]["app_plist_subtitle"] unless $app_config["iphone"]["production"]["app_plist_subtitle"].nil?
|
|
272
|
+
plist_icon_url = $app_config["iphone"]["production"]["app_plist_icon_url"] unless $app_config["iphone"]["production"]["app_plist_icon_url"].nil?
|
|
273
|
+
plist_ipa_url = $app_config["iphone"]["production"]["app_plist_ipa_url"] unless $app_config["iphone"]["production"]["app_plist_ipa_url"].nil?
|
|
274
|
+
end
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
rbText = ERB.new( IO.read(File.join($config["build"]["iphonepath"], "rbuild", "ApplicationPlist.erb")) ).result
|
|
278
|
+
fAlx = File.new(File.join(app_path, app_name + ".plist"), "w")
|
|
279
|
+
fAlx.write(rbText)
|
|
280
|
+
fAlx.close()
|
|
281
|
+
end
|
|
282
|
+
|
|
198
283
|
ICONS = [['icon', 'icon57'], ['icon57','icon57'], ['icon72','icon72'], ['icon114','icon114']]
|
|
199
284
|
|
|
285
|
+
def copy_all_icons_to_production_folder
|
|
286
|
+
ICONS.each do |pair|
|
|
287
|
+
|
|
288
|
+
end
|
|
289
|
+
end
|
|
290
|
+
|
|
200
291
|
def restore_app_icon
|
|
201
292
|
puts "restore icon"
|
|
202
293
|
ipath = $config["build"]["iphonepath"]
|
|
@@ -276,7 +367,43 @@ def set_default_images(make_bak)
|
|
|
276
367
|
end
|
|
277
368
|
end
|
|
278
369
|
|
|
370
|
+
def copy_entitlements_file_from_app
|
|
371
|
+
enti_rho_name = File.join($config["build"]["iphonepath"], "Entitlements.plist")
|
|
372
|
+
enti_app_name = File.join($app_path, "Entitlements.plist")
|
|
373
|
+
|
|
374
|
+
if !$app_config["iphone"].nil?
|
|
375
|
+
if !$app_config["iphone"]["entitlements_file"].nil?
|
|
376
|
+
enti_test_name = $app_config["iphone"]["entitlements_file"]
|
|
377
|
+
if File.exists? enti_test_name
|
|
378
|
+
enti_app_name = enti_test_name
|
|
379
|
+
else
|
|
380
|
+
enti_test_name = File.join($app_path, $app_config["iphone"]["entitlements_file"])
|
|
381
|
+
if File.exists? enti_test_name
|
|
382
|
+
enti_app_name = enti_test_name
|
|
383
|
+
else
|
|
384
|
+
enti_app_name = $app_config["iphone"]["entitlements_file"]
|
|
385
|
+
end
|
|
386
|
+
end
|
|
387
|
+
end
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
if File.exists? enti_app_name
|
|
391
|
+
puts 'Copy Entitlements.plist from application ...'
|
|
392
|
+
cp enti_rho_name, (enti_rho_name + '_bak')
|
|
393
|
+
rm_f enti_rho_name
|
|
394
|
+
cp enti_app_name,enti_rho_name
|
|
395
|
+
end
|
|
396
|
+
end
|
|
279
397
|
|
|
398
|
+
def restore_entitlements_file
|
|
399
|
+
enti_rho_name = File.join($config["build"]["iphonepath"], "Entitlements.plist")
|
|
400
|
+
if File.exists? (enti_rho_name + '_bak')
|
|
401
|
+
puts 'restore Entitlements.plist ...'
|
|
402
|
+
rm_f enti_rho_name
|
|
403
|
+
cp (enti_rho_name + '_bak'), enti_rho_name
|
|
404
|
+
rm_f (enti_rho_name + '_bak')
|
|
405
|
+
end
|
|
406
|
+
end
|
|
280
407
|
|
|
281
408
|
|
|
282
409
|
def set_signing_identity(identity,profile,entitlements)
|
|
@@ -296,7 +423,6 @@ def set_signing_identity(identity,profile,entitlements)
|
|
|
296
423
|
end
|
|
297
424
|
|
|
298
425
|
File.open(fname,"w") { |f| f.write(buf) }
|
|
299
|
-
|
|
300
426
|
end
|
|
301
427
|
|
|
302
428
|
def basedir
|
|
@@ -529,6 +655,8 @@ namespace "build" do
|
|
|
529
655
|
end
|
|
530
656
|
|
|
531
657
|
set_signing_identity($signidentity,$provisionprofile,$entitlements.to_s) if $signidentity.to_s != ""
|
|
658
|
+
copy_entitlements_file_from_app
|
|
659
|
+
|
|
532
660
|
end
|
|
533
661
|
|
|
534
662
|
# desc "Build rhodes"
|
|
@@ -563,6 +691,7 @@ namespace "build" do
|
|
|
563
691
|
end
|
|
564
692
|
|
|
565
693
|
set_signing_identity($signidentity,$provisionprofile,$entitlements.to_s) if $signidentity.to_s != ""
|
|
694
|
+
copy_entitlements_file_from_app
|
|
566
695
|
|
|
567
696
|
chdir $config["build"]["iphonepath"]
|
|
568
697
|
|
|
@@ -584,6 +713,7 @@ namespace "build" do
|
|
|
584
713
|
set_app_url_scheme(saved_url_scheme) unless $app_config["iphone"]["BundleURLScheme"].nil?
|
|
585
714
|
set_app_url_name(saved_url_name) unless $app_config["iphone"]["BundleIdentifier"].nil?
|
|
586
715
|
|
|
716
|
+
restore_entitlements_file
|
|
587
717
|
restore_default_images
|
|
588
718
|
restore_app_icon
|
|
589
719
|
|
|
@@ -1095,7 +1225,10 @@ namespace "device" do
|
|
|
1095
1225
|
puts 'copy result build package to application target folder ...'
|
|
1096
1226
|
cp_r src_file, dst_file
|
|
1097
1227
|
make_app_info
|
|
1098
|
-
|
|
1228
|
+
prepare_production_ipa(app_path, appname)
|
|
1229
|
+
prepare_production_plist(app_path, appname)
|
|
1230
|
+
copy_all_png_from_icon_folder_to_product(app_path)
|
|
1231
|
+
|
|
1099
1232
|
end
|
|
1100
1233
|
end
|
|
1101
1234
|
|
data/version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.3.0
|
|
1
|
+
3.3.0
|
metadata
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rhodes
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
5
|
-
prerelease:
|
|
4
|
+
hash: 11
|
|
5
|
+
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 3
|
|
8
8
|
- 3
|
|
9
9
|
- 0
|
|
10
|
-
|
|
11
|
-
- 3
|
|
12
|
-
version: 3.3.0.beta.3
|
|
10
|
+
version: 3.3.0
|
|
13
11
|
platform: ruby
|
|
14
12
|
authors:
|
|
15
13
|
- Rhomobile
|
|
@@ -17,7 +15,7 @@ autorequire:
|
|
|
17
15
|
bindir: bin
|
|
18
16
|
cert_chain: []
|
|
19
17
|
|
|
20
|
-
date: 2011-12-
|
|
18
|
+
date: 2011-12-30 00:00:00 -08:00
|
|
21
19
|
default_executable:
|
|
22
20
|
dependencies:
|
|
23
21
|
- !ruby/object:Gem::Dependency
|
|
@@ -2064,7 +2062,9 @@ files:
|
|
|
2064
2062
|
- platform/iphone/icon57.png
|
|
2065
2063
|
- platform/iphone/icon72.png
|
|
2066
2064
|
- platform/iphone/Info.plist
|
|
2065
|
+
- platform/iphone/iTunesArtwork.jpg
|
|
2067
2066
|
- platform/iphone/main.m
|
|
2067
|
+
- platform/iphone/rbuild/ApplicationPlist.erb
|
|
2068
2068
|
- platform/iphone/rbuild/findRhodesGuid.rb
|
|
2069
2069
|
- platform/iphone/rbuild/iphone.rake
|
|
2070
2070
|
- platform/iphone/rhoextlib/dosyscall.c
|