flashsdk 1.0.13.pre → 1.0.14.pre

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.
Files changed (46) hide show
  1. data/Gemfile +1 -1
  2. data/Gemfile.lock +2 -4
  3. data/VERSION +1 -1
  4. data/lib/flashplayer/specification.rb +39 -35
  5. data/lib/flashplayer/system_mixins.rb +2 -5
  6. data/lib/flashplayer/task.legacy.rb +1 -1
  7. data/lib/flashsdk/adl.rb +5 -2
  8. data/lib/flashsdk/adt.rb +1 -2
  9. data/lib/flashsdk/amxmlc.rb +1 -2
  10. data/lib/flashsdk/compc.rb +0 -1
  11. data/lib/flashsdk/compiler_base.rb +111 -61
  12. data/lib/flashsdk/fcsh.rb +65 -0
  13. data/lib/flashsdk/fcsh_client.rb +36 -0
  14. data/lib/flashsdk/fdb.rb +767 -0
  15. data/lib/flashsdk/generators/class_generator.rb +37 -12
  16. data/lib/flashsdk/generators/flash_helper.rb +119 -23
  17. data/lib/flashsdk/module.rb +99 -1
  18. data/lib/flashsdk/mxmlc.rb +34 -8
  19. data/lib/flashsdk.rb +2 -0
  20. data/lib/flex3.rb +10 -9
  21. data/lib/flex4.rb +29 -0
  22. data/test/fixtures/sdk/fdb +62 -0
  23. data/test/fixtures/sdk/mxmlc +54 -0
  24. data/test/unit/adl_test.rb +1 -3
  25. data/test/unit/adt_test.rb +2 -3
  26. data/test/unit/amxmlc_test.rb +4 -2
  27. data/test/unit/class_generator_test.rb +1 -1
  28. data/test/unit/compc_test.rb +1 -2
  29. data/test/unit/fcsh_test.rb +35 -0
  30. data/test/unit/fdb_test.rb +49 -0
  31. data/test/unit/flash_helper_test.rb +21 -5
  32. data/test/unit/flashplayer_log_file_test.rb +2 -2
  33. data/test/unit/flashplayer_mm_config_test.rb +1 -1
  34. data/test/unit/flashplayer_module_test.rb +1 -1
  35. data/test/unit/flashplayer_task_test.rb +2 -2
  36. data/test/unit/flashplayer_trust_test.rb +1 -1
  37. data/test/unit/flex_generator_test.rb +1 -1
  38. data/test/unit/mxmlc_test.rb +27 -5
  39. data/test/unit/project_generator_test.rb +1 -1
  40. data/test/unit/test_helper.rb +3 -1
  41. data/test-stderr.log +1 -0
  42. data/test-stdout.log +58 -0
  43. metadata +15 -9
  44. data/lib/flashsdk/compc_legacy.rb +0 -149
  45. data/lib/flashsdk/mxmlc_legacy.rb +0 -135
  46. data/mate +0 -0
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'sprout', '>= 1.0.31.pre'
3
+ gem 'sprout', '>= 1.1.2.pre'
4
4
 
5
5
  group :development do
6
6
  gem "shoulda"
data/Gemfile.lock CHANGED
@@ -6,15 +6,13 @@ GEM
6
6
  rake
7
7
  open4 (1.0.1)
8
8
  rake (0.8.7)
9
- rdoc (2.5.11)
10
9
  rubyzip (0.9.4)
11
10
  shoulda (2.11.3)
12
- sprout (1.0.31.pre)
11
+ sprout (1.1.2.pre)
13
12
  archive-tar-minitar (= 0.5.2)
14
13
  bundler (>= 0.9.19)
15
14
  open4 (>= 0.9.6)
16
15
  rake (>= 0.8.7)
17
- rdoc (>= 2.5.8)
18
16
  rubyzip (= 0.9.4)
19
17
 
20
18
  PLATFORMS
@@ -23,4 +21,4 @@ PLATFORMS
23
21
  DEPENDENCIES
24
22
  mocha
25
23
  shoulda
26
- sprout (>= 1.0.31.pre)
24
+ sprout (>= 1.1.2.pre)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.13.pre
1
+ 1.0.14.pre
@@ -1,41 +1,45 @@
1
- require 'flashsdk'
2
-
3
- Sprout::Specification.new do |s|
4
- s.name = FlashPlayer::NAME
5
- s.version = FlashPlayer::VERSION
1
+ require 'flashsdk'
6
2
 
7
3
  ##
8
- # NOTE: The order of these declarations is important, the RubyFeature.load method
9
- # will search for the first match that is appropriate for the end user system.
10
- #
11
- # Current releases of the Ruby One-Click Installer for Windows actually
12
- # run on top of Mingw, and OSX is a *nix variant, which means that
13
- # all System types (in Ruby at least) derive from UnixSystem.
14
- #
15
- # This means that the Linux/Unix declaration will
16
- # match everyone, so it is effectively the same as ':universal'
17
- s.add_remote_file_target do |t|
18
- t.platform = :windows
19
- t.archive_type = :exe
20
- t.url = "http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_sa_debug.exe"
21
- t.md5 = "1f5e411f96817b56c99111a06f4c727f"
22
- t.add_executable :flashplayer, "1f5e411f96817b56c99111a06f4c727f.exe"
23
- end
4
+ # This is the Flash Player Sprout::Specification and is how
5
+ # we figure out from where to load the Flash Player for the
6
+ # current user system.
7
+ Sprout::Specification.new do |s|
8
+ s.name = FlashPlayer::NAME
9
+ s.version = FlashPlayer::VERSION
24
10
 
25
- s.add_remote_file_target do |t|
26
- t.platform = :osx
27
- t.archive_type = :zip
28
- t.url = "http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_sa_debug.app.zip"
29
- t.md5 = "1c5ef8aeb1aa4a6cee7970d5c7ee9a55"
30
- t.add_executable :flashplayer, "Flash Player Debugger.app"
31
- end
11
+ ##
12
+ # NOTE: The order of these declarations is important, the RubyFeature.load method
13
+ # will search for the first match that is appropriate for the end user system.
14
+ #
15
+ # Current releases of the Ruby One-Click Installer for Windows actually
16
+ # run on top of Mingw, and OSX is a *nix variant, which means that
17
+ # all System types (in Ruby at least) derive from UnixSystem.
18
+ #
19
+ # This means that the Linux/Unix declaration will
20
+ # match everyone, so it is effectively the same as ':universal'
21
+ s.add_remote_file_target do |t|
22
+ t.platform = :windows
23
+ t.archive_type = :exe
24
+ t.url = "http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_sa_debug.exe"
25
+ t.md5 = "1f5e411f96817b56c99111a06f4c727f"
26
+ t.add_executable :flashplayer, "1f5e411f96817b56c99111a06f4c727f.exe"
27
+ end
28
+
29
+ s.add_remote_file_target do |t|
30
+ t.platform = :osx
31
+ t.archive_type = :zip
32
+ t.url = "http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_sa_debug.app.zip"
33
+ t.md5 = "1c5ef8aeb1aa4a6cee7970d5c7ee9a55"
34
+ t.add_executable :flashplayer, "Flash Player Debugger.app"
35
+ end
32
36
 
33
- s.add_remote_file_target do |t|
34
- t.platform = :linux
35
- t.archive_type = :tgz
36
- t.url = "http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_sa_debug.tar.gz"
37
- t.md5 = "1efa254bc7d6e0c11a61984ae34bfaa7"
38
- t.add_executable :flashplayer, "flashplayerdebugger"
37
+ s.add_remote_file_target do |t|
38
+ t.platform = :linux
39
+ t.archive_type = :tgz
40
+ t.url = "http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_sa_debug.tar.gz"
41
+ t.md5 = "1efa254bc7d6e0c11a61984ae34bfaa7"
42
+ t.add_executable :flashplayer, "flashplayerdebugger"
43
+ end
39
44
  end
40
- end
41
45
 
@@ -1,9 +1,6 @@
1
- ##
2
- # Update the native System instances
3
- # to handle FlashPlayer launching in
4
- # order to overcome non-cli limitations.
5
- #
1
+
6
2
  module Sprout
3
+
7
4
  module System
8
5
 
9
6
  class WinSystem
@@ -130,7 +130,7 @@
130
130
  @test_result ||= ''
131
131
  end
132
132
 
133
- def define # :nodoc:
133
+ def define
134
134
  CLEAN.add(test_result_file)
135
135
  end
136
136
 
data/lib/flashsdk/adl.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  module FlashSDK
2
2
 
3
- class ADL
4
- include Sprout::Executable
3
+ class ADL < Sprout::Executable::Base
5
4
 
6
5
  add_param :runtime, Path
7
6
 
@@ -41,6 +40,10 @@ module FlashSDK
41
40
  end
42
41
  end
43
42
 
43
+ ##
44
+ # TODO: This should NOT be here!
45
+ # This is preventing that method from working
46
+ # as expected only after this FILE is required.
44
47
  class Sprout::System::UnixSystem
45
48
 
46
49
  def should_repair_executable path
data/lib/flashsdk/adt.rb CHANGED
@@ -33,8 +33,7 @@ module FlashSDK
33
33
  # desc "Compile, certify and package the AIR application"
34
34
  # task package => 'bin/SomeProject.air'
35
35
  #
36
- class ADT
37
- include Sprout::Executable
36
+ class ADT < Sprout::Executable::Base
38
37
  #NOTE:
39
38
  # The order of these parameters is important!
40
39
  # Please do not alphabetize or rearrange unless you're
@@ -2,8 +2,7 @@ module FlashSDK
2
2
 
3
3
  ##
4
4
  # This is a wrapper for the AIR MXMLC compiler.
5
- class AMXMLC < MXMLC
6
- include Sprout::Executable
5
+ class AMXMLC < MXMLC
7
6
 
8
7
  ##
9
8
  # The default executable target.
@@ -1,7 +1,6 @@
1
1
  module FlashSDK
2
2
 
3
3
  class COMPC < CompilerBase
4
- include Sprout::Executable
5
4
 
6
5
  ##
7
6
  # Outputs the SWC file into an open directory format rather than a SWC file
@@ -1,15 +1,21 @@
1
1
  module FlashSDK
2
2
 
3
- class CompilerBase
4
- include Sprout::Executable
3
+ ##
4
+ # This is the abstract base class that defines common fields for ActionScript compilers like {FlashSDK::MXMLC} and {FlashSDK::COMPC}.
5
+ #
6
+ # @abstract
7
+ #
8
+ class CompilerBase < Sprout::Executable::Base
5
9
 
6
10
  ##
7
11
  # Enables accessibility features when compiling the Flex application or SWC file. The default value is false.
8
12
  #
13
+ # t.accessible = true
14
+ #
9
15
  add_param :accessible, Boolean, { :hidden_value => true }
10
16
 
11
17
  ##
12
- # Sets the file encoding for ActionScript files. For more information see: http://livedocs.adobe.com/flex/2/docs/00001503.html#149244
18
+ # Sets the file encoding for ActionScript files.
13
19
  #
14
20
  add_param :actionscript_file_encoding, String
15
21
 
@@ -34,22 +40,20 @@ module FlashSDK
34
40
  ##
35
41
  # Sets the value of the {context.root} token in channel definitions in the flex-services.xml file. If you do not specify the value of this option, Flex uses an empty string.
36
42
  #
37
- # For more information on using the {context.root} token, see http://livedocs.adobe.com/flex/2/docs/00001446.html#205687.
38
- #
39
43
  add_param :context_root, Path
40
44
 
41
45
  ##
42
- # Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380).
46
+ # Sets metadata in the resulting SWF file.
43
47
  #
44
48
  add_param :contributor, String
45
49
 
46
50
  ##
47
- # Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380)
51
+ # Sets metadata in the resulting SWF file.
48
52
  #
49
53
  add_param :creator, String
50
54
 
51
55
  ##
52
- # Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380)
56
+ # Sets metadata in the resulting SWF file.
53
57
  #
54
58
  add_param :date, String
55
59
 
@@ -76,7 +80,7 @@ module FlashSDK
76
80
  #
77
81
  # -default-background-color=0xCCCCFF
78
82
  #
79
- # The default value is null. The default background of a Flex application is an image of a gray gradient. You must override this image for the value of the default-background-color option to be visible. For more information, see Editing application settings (http://livedocs.adobe.com/flex/2/docs/00001504.html#138781).
83
+ # The default value is null. The default background of a Flex application is an image of a gray gradient. You must override this image for the value of the default-background-color option to be visible.
80
84
  #
81
85
  # This is an advanced option.
82
86
  #
@@ -122,10 +126,6 @@ module FlashSDK
122
126
  ##
123
127
  # Defines the location of the default style sheet. Setting this option overrides the implicit use of the defaults.css style sheet in the framework.swc file.
124
128
  #
125
- # For more information on the defaults.css file, see Using Styles and Themes (http://livedocs.adobe.com/flex/2/docs/00000751.html#241755) in Flex 2 Developer's Guide.
126
- #
127
- # This is an advanced option.
128
- #
129
129
  add_param :default_css_url, Url
130
130
 
131
131
  ##
@@ -136,7 +136,7 @@ module FlashSDK
136
136
  add_param :define_conditional, Strings, { :shell_name => "-define" }
137
137
 
138
138
  ##
139
- # Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380).
139
+ # Sets metadata in the resulting SWF file.
140
140
  #
141
141
  add_param :description, String
142
142
 
@@ -165,8 +165,6 @@ module FlashSDK
165
165
  #
166
166
  # This option provides compile-time link checking for external references that are dynamically linked.
167
167
  #
168
- # For more information about dynamic linking, see About linking (http://livedocs.adobe.com/flex/2/docs/00001521.html#205852).
169
- #
170
168
  # This is an advanced option.
171
169
  #
172
170
  add_param :externs, Strings
@@ -174,8 +172,6 @@ module FlashSDK
174
172
  ##
175
173
  # Specifies a list of SWC files or directories to exclude from linking when compiling a SWF file. This option provides compile-time link checking for external components that are dynamically linked.
176
174
  #
177
- # For more information about dynamic linking, see About linking (http://livedocs.adobe.com/flex/2/docs/00001521.html#205852).
178
- #
179
175
  # You can use the += operator to append the new SWC file to the list of external libraries.
180
176
  #
181
177
  # This parameter has been aliased as +el+.
@@ -193,28 +189,28 @@ module FlashSDK
193
189
  add_param :file_specs, Files
194
190
 
195
191
  ##
196
- # Specifies the range of Unicode settings for that language. For more information, see Using Styles and Themes (http://livedocs.adobe.com/flex/2/docs/00000751.html#241755) in Flex 2 Developer's Guide.
192
+ # Specifies the range of Unicode settings for that language.
197
193
  #
198
194
  # This is an advanced option.
199
195
  #
200
196
  add_param :fonts_languages_language_range, String, { :shell_name => "-compiler.fonts.languages.language-range" }
201
197
 
202
198
  ##
203
- # Defines the font manager. The default is flash.fonts.JREFontManager. You can also use the flash.fonts.BatikFontManager. For more information, see Using Styles and Themes in Flex 2 Developer's Guide (http://livedocs.adobe.com/flex/2/docs/00000751.html#241755).
199
+ # Defines the font manager. The default is flash.fonts.JREFontManager. You can also use the flash.fonts.BatikFontManager.
204
200
  #
205
201
  # This is an advanced option.
206
202
  #
207
203
  add_param :fonts_managers, Strings
208
204
 
209
205
  ##
210
- # Sets the maximum number of fonts to keep in the server cache. For more information, see Caching fonts and glyphs (http://livedocs.adobe.com/flex/2/docs/00001469.html#208457).
206
+ # Sets the maximum number of fonts to keep in the server cache.
211
207
  #
212
208
  # This is an advanced option.
213
209
  #
214
210
  add_param :fonts_max_cached_fonts, Number
215
211
 
216
212
  ##
217
- # Sets the maximum number of character glyph-outlines to keep in the server cache for each font face. For more information, see Caching fonts and glyphs (http://livedocs.adobe.com/flex/2/docs/00001469.html#208457).
213
+ # Sets the maximum number of character glyph-outlines to keep in the server cache for each font face.
218
214
  #
219
215
  # This is an advanced option.
220
216
  #
@@ -271,7 +267,7 @@ module FlashSDK
271
267
  add_param :include_path, Paths
272
268
 
273
269
  ##
274
- # Enables incremental compilation. For more information, see About incremental compilation (http://livedocs.adobe.com/flex/2/docs/00001506.html#153980).
270
+ # Enables incremental compilation.
275
271
  #
276
272
  # This option is true by default for the Flex Builder application compiler. For the command-line compiler, the default is false. The web-tier compiler does not support incremental compilation.
277
273
  #
@@ -311,7 +307,7 @@ module FlashSDK
311
307
  add_param :keep_generated_actionscript, Boolean
312
308
 
313
309
  ##
314
- # Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380).
310
+ # Sets metadata in the resulting SWF file.
315
311
  #
316
312
  add_param :language, String
317
313
 
@@ -375,8 +371,6 @@ module FlashSDK
375
371
  #
376
372
  # The file format output by this command can be used to write a file for input to the load-externs option.
377
373
  #
378
- # For more information on the report, see Examining linker dependencies (http://livedocs.adobe.com/flex/2/docs/00001394.html#211202).
379
- #
380
374
  # This is an advanced option.
381
375
  #
382
376
  add_param :link_report, File
@@ -390,8 +384,6 @@ module FlashSDK
390
384
  #
391
385
  # Use the += operator to chain this configuration file to other configuration files.
392
386
  #
393
- # For more information on using configuration files to provide options to the command-line compilers, see About configuration files (http://livedocs.adobe.com/flex/2/docs/00001490.html#138195).
394
- #
395
387
  add_param :load_config, Files
396
388
 
397
389
  ##
@@ -403,14 +395,8 @@ module FlashSDK
403
395
  #
404
396
  # The XML file uses the same syntax as the one produced by the link-report option.
405
397
  #
406
- # For more information on the report, see Examining linker dependencies (http://livedocs.adobe.com/flex/2/docs/00001394.html#211202).
407
- #
408
398
  # This option provides compile-time link checking for external components that are dynamically linked.
409
399
  #
410
- # For more information about dynamic linking, see About linking (http://livedocs.adobe.com/flex/2/docs/00001521.html#205852).
411
- #
412
- # This is an advanced option.
413
- #
414
400
  add_param :load_externs, File
415
401
 
416
402
  ##
@@ -424,25 +410,21 @@ module FlashSDK
424
410
  #
425
411
  # mxmlc -locale en_EN -source-path locale/{locale} -file-specs MainApp.mxml
426
412
  #
427
- # For more information, see Localizing Flex Applicationsin (http://livedocs.adobe.com/flex/2/docs/00000898.html#129288) Flex 2 Developer's Guide.
428
- #
429
413
  add_param :locale, String
430
414
 
431
415
  ##
432
- # Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380).
416
+ # Sets metadata in the resulting SWF file.
433
417
  #
434
418
  add_param :localized_description, String
435
419
 
436
420
  ##
437
- # Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380)."
421
+ # Sets metadata in the resulting SWF file.
438
422
  #
439
423
  add_param :localized_title, String
440
424
 
441
425
  ##
442
426
  # Specifies a namespace for the MXML file. You must include a URI and the location of the manifest file that defines the contents of this namespace. This path is relative to the MXML file.
443
427
  #
444
- # For more information about manifest files, see About manifest files (http://livedocs.adobe.com/flex/2/docs/00001519.html#134676).
445
- #
446
428
  add_param :namespaces_namespace, String
447
429
 
448
430
  ##
@@ -466,7 +448,7 @@ module FlashSDK
466
448
  add_param :output, File, { :file_task_name => true }
467
449
 
468
450
  ##
469
- # Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380).
451
+ # Sets metadata in the resulting SWF file.
470
452
  #
471
453
  add_param :publisher, String
472
454
 
@@ -478,8 +460,6 @@ module FlashSDK
478
460
  ##
479
461
  # Prints a list of resource bundles to input to the compc compiler to create a resource bundle SWC file. The filename argument is the name of the file that contains the list of bundles.
480
462
  #
481
- # For more information, see Localizing Flex Applications (http://livedocs.adobe.com/flex/2/docs/00000898.html#129288) in Flex 2 Developer's Guide.
482
- #
483
463
  add_param :resource_bundle_list, File
484
464
 
485
465
  ##
@@ -487,8 +467,6 @@ module FlashSDK
487
467
  #
488
468
  # You specify the location of the SWF file relative to the deployment location of the application. For example, if you store a file named library.swf file in the web_root/libraries directory on the web server, and the application in the web root, you specify libraries/library.swf.
489
469
  #
490
- # For more information about RSLs, see Using Runtime Shared Libraries. (http://livedocs.adobe.com/flex/2/docs/00001520.html#168690)
491
- #
492
470
  add_param :runtime_shared_libraries, Strings
493
471
 
494
472
  ##
@@ -497,9 +475,12 @@ module FlashSDK
497
475
  add_param_alias :rsl, :runtime_shared_libraries
498
476
 
499
477
  ##
500
- # [path-element] [rsl-url] [policy-file-url] [rsl-url] [policy-file-url]
501
- # alias -rslp
502
- # (repeatable)
478
+ # Runtime shared library path.
479
+ #
480
+ # t.runtime_shared_library_path << "[path-element] [rsl-url] [policy-file-url]"
481
+ #
482
+ # @see Sprout::MXMLC#rslp
483
+ #
503
484
  add_param :runtime_shared_library_path, Strings
504
485
 
505
486
  ##
@@ -517,8 +498,6 @@ module FlashSDK
517
498
  #
518
499
  # The default value is true.
519
500
  #
520
- # For more information about viewing warnings and errors, see Viewing warnings and errors (http://livedocs.adobe.com/flex/2/docs/00001517.html#182413).
521
- #
522
501
  add_param :show_actionscript_warnings, Boolean, { :default => true, :show_on_false => true }
523
502
 
524
503
  ##
@@ -526,8 +505,6 @@ module FlashSDK
526
505
  #
527
506
  # The default value is true.
528
507
  #
529
- # For more information about compiler warnings, see Using SWC files (http://livedocs.adobe.com/flex/2/docs/00001505.html#158337).
530
- #
531
508
  add_param :show_binding_warnings, Boolean, { :default => true, :show_on_false => true }
532
509
 
533
510
  ##
@@ -535,8 +512,6 @@ module FlashSDK
535
512
  #
536
513
  # The default value is true.
537
514
  #
538
- # For more information about viewing warnings and errors, see Viewing warnings and errors.
539
- #
540
515
  add_param :show_deprecation_warnings, Boolean, { :default => true, :show_on_false => true }
541
516
 
542
517
  ##
@@ -571,8 +546,6 @@ module FlashSDK
571
546
  #
572
547
  # The default value is true.
573
548
  #
574
- # For more information about viewing warnings and errors, see Viewing warnings and errors (http://livedocs.adobe.com/flex/2/docs/00001517.html#182413).
575
- #
576
549
  add_param :strict, Boolean, { :default => true, :show_on_false => true }
577
550
 
578
551
  ##
@@ -590,10 +563,10 @@ module FlashSDK
590
563
  add_param :theme, Files
591
564
 
592
565
  ##
593
- # Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380).
566
+ # Sets metadata in the resulting SWF file.
594
567
  #
595
568
  add_param :title, String
596
-
569
+
597
570
  ##
598
571
  # Specifies that the current application uses network services.
599
572
  #
@@ -601,8 +574,6 @@ module FlashSDK
601
574
  #
602
575
  # When the use-network property is set to false, the application can access the local filesystem (for example, use the XML.load() method with file: URLs) but not network services. In most circumstances, the value of this property should be true.
603
576
  #
604
- # For more information about the use-network property, see Applying Flex Security (http://livedocs.adobe.com/flex/2/docs/00001328.html#137544).
605
- #
606
577
  add_param :use_network, Boolean, { :default => true, :show_on_false => true }
607
578
 
608
579
  ##
@@ -618,7 +589,7 @@ module FlashSDK
618
589
  add_param :verify_digests, Boolean
619
590
 
620
591
  ##
621
- # Enables specified warnings. For more information, see Viewing warnings and errors (http://livedocs.adobe.com/flex/2/docs/00001517.html#182413).
592
+ # Enables specified warnings.
622
593
  #
623
594
  add_param :warn_warning_type, Boolean
624
595
 
@@ -629,12 +600,91 @@ module FlashSDK
629
600
  #
630
601
  add_param :warnings, Boolean
631
602
 
603
+ ##
604
+ # Set to true in order to compile with the Flex Compiler Shell (FCSH).
605
+ #
606
+ # You can set this value directly on a single compiler instance like:
607
+ #
608
+ # mxmlc 'bin/SomeProject.swf' do |t|
609
+ # t.input = 'src/SomeProject.as'
610
+ # t.use_fcsh = true
611
+ # end
612
+ #
613
+ # This value can also be set to true by sending it into Ruby as
614
+ # an environment variable like:
615
+ #
616
+ # rake test USE_FCSH=true
617
+ #
618
+ # If you always want to use FCSH, you can set this value in your .bashrc
619
+ # or .bash_profile like:
620
+ #
621
+ # export USE_FCSH=true
622
+ #
623
+ # There is also an :fcsh helper rake task that will set this value
624
+ # simply by executing it before your build tasks. You can do this
625
+ # from the terminal like:
626
+ #
627
+ # rake fcsh test
628
+ #
629
+ # Or:
630
+ #
631
+ # rake fcsh debug
632
+ #
633
+ # Or you can make it a prerequisite to any other build task like:
634
+ #
635
+ # mxmlc 'bin/SomeProject.swf' => :fcsh do |t|
636
+ # ...
637
+ # end
638
+ #
639
+ attr_accessor :use_fcsh
640
+
641
+ ##
642
+ # Temporary override while waiting for integration of next version!
643
+ # TODO: Remove this method override.
644
+ def execute
645
+ prepare
646
+ super
647
+ end
648
+
649
+ protected
650
+
651
+ ##
652
+ # Template method called by {Sprout::Executable} when
653
+ # a {Sprout::Library} is found in the Rake::Task prerequisite list.
654
+ #
655
+ # @param path [File] The path within the project where the library was copied.
656
+ #
657
+ # @return [File] The path that was provided.
658
+ #
632
659
  def library_added path
633
660
  if(path =~ /\.swc$/)
634
661
  self.library_path << path
635
662
  else
636
663
  self.source_path << path
637
664
  end
665
+ path
666
+ end
667
+
668
+ ##
669
+ # @override
670
+ def prepare
671
+ # Check for USE_FCSH on the environment
672
+ # variable hash, update instance value
673
+ # if found to be true:
674
+ if ENV['USE_FCSH'].to_s == 'true'
675
+ self.use_fcsh = true
676
+ end
677
+ super
678
+ end
679
+
680
+ ##
681
+ # @override
682
+ def execute_delegate
683
+ (use_fcsh) ? execute_with_fcsh : super
684
+ end
685
+
686
+ def execute_with_fcsh
687
+ #puts "[execute_with_fcsh] #{executable} #{to_shell}"
638
688
  end
639
689
 
640
690
  end
@@ -0,0 +1,65 @@
1
+
2
+ module FlashSDK
3
+
4
+ class FCSH < Sprout::Daemon
5
+
6
+ ##
7
+ # The the Ruby file that will load the expected
8
+ # Sprout::Specification.
9
+ #
10
+ # Default value is 'flex4'
11
+ set :pkg_name, 'flex4'
12
+
13
+ ##
14
+ # The default pkg version
15
+ #
16
+ set :pkg_version, ">= #{FlashSDK::VERSION}"
17
+
18
+ ##
19
+ # The default executable target.
20
+ #
21
+ set :executable, :fcsh
22
+
23
+ ##
24
+ # Set the default prompt that should be presented
25
+ # on stdout when fcsh is ready for input.
26
+ set :prompt, /^\(fcsh\) /
27
+
28
+ ##
29
+ # Clear the saved compilation target
30
+ # from memory.
31
+ #
32
+ # @param id [Integer]
33
+ #
34
+ add_action :clear
35
+
36
+ ##
37
+ # Perform compilation using COMPC and the
38
+ # provided arguments.
39
+ #
40
+ # @param options [String]
41
+ #
42
+ add_action :compc
43
+
44
+ ##
45
+ # Execute a saved compilation from the provided
46
+ # id number.
47
+ #
48
+ # @param id [Integer]
49
+ #
50
+ add_action :compile
51
+
52
+ ##
53
+ # Perform compilation using MXMLC and the
54
+ # provided arguments.
55
+ #
56
+ # @param options [String]
57
+ #
58
+ add_action :mxmlc
59
+
60
+ ##
61
+ # Exit FCSH
62
+ add_action :quit
63
+ end
64
+ end
65
+