h4oflashsdk 1.0.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.
Files changed (94) hide show
  1. data/Gemfile +3 -0
  2. data/Gemfile.lock +41 -0
  3. data/POSTINSTALL.rdoc +79 -0
  4. data/README.textile +79 -0
  5. data/VERSION +1 -0
  6. data/bin/flashlog +8 -0
  7. data/bin/flashplayer +9 -0
  8. data/bin/sprout-as3 +9 -0
  9. data/bin/sprout-flex +8 -0
  10. data/ext/CloseFlashPlayerForDumbassOSX.scpt +6 -0
  11. data/ext/OpenFlashPlayerForDumbassOSX.scpt +12 -0
  12. data/flashsdk.gemspec +25 -0
  13. data/flashsdk.komodoproject +4 -0
  14. data/lib/flashplayer/errors.rb +12 -0
  15. data/lib/flashplayer/executable.rb +143 -0
  16. data/lib/flashplayer/log_file.rb +94 -0
  17. data/lib/flashplayer/mm_config.rb +96 -0
  18. data/lib/flashplayer/module.rb +51 -0
  19. data/lib/flashplayer/specification.rb +45 -0
  20. data/lib/flashplayer/system_mixins.rb +98 -0
  21. data/lib/flashplayer/task.legacy.rb +293 -0
  22. data/lib/flashplayer/task.rb +62 -0
  23. data/lib/flashplayer/trust.rb +45 -0
  24. data/lib/flashplayer.rb +9 -0
  25. data/lib/flashsdk/acompc.rb +29 -0
  26. data/lib/flashsdk/adl.rb +83 -0
  27. data/lib/flashsdk/adt.rb +276 -0
  28. data/lib/flashsdk/amxmlc.rb +28 -0
  29. data/lib/flashsdk/asdoc.rb +164 -0
  30. data/lib/flashsdk/compc.rb +124 -0
  31. data/lib/flashsdk/compiler_base.rb +1131 -0
  32. data/lib/flashsdk/fcsh.rb +173 -0
  33. data/lib/flashsdk/fcsh_socket.rb +167 -0
  34. data/lib/flashsdk/fdb.rb +833 -0
  35. data/lib/flashsdk/generators/class_generator.rb +87 -0
  36. data/lib/flashsdk/generators/flash_helper.rb +234 -0
  37. data/lib/flashsdk/generators/flex_project_generator.rb +30 -0
  38. data/lib/flashsdk/generators/project_generator.rb +31 -0
  39. data/lib/flashsdk/generators/templates/ActionScript3Class.as +9 -0
  40. data/lib/flashsdk/generators/templates/ActionScript3MainClass.as +11 -0
  41. data/lib/flashsdk/generators/templates/ActionScript3RunnerClass.as +19 -0
  42. data/lib/flashsdk/generators/templates/DefaultProjectImage.png +0 -0
  43. data/lib/flashsdk/generators/templates/Flex4Application.mxml +45 -0
  44. data/lib/flashsdk/generators/templates/Flex4Main.css +7 -0
  45. data/lib/flashsdk/generators/templates/Flex4Rakefile.rb +34 -0
  46. data/lib/flashsdk/generators/templates/Flex4RunnerClass.mxml +29 -0
  47. data/lib/flashsdk/generators/templates/FlexTestRunner.mxml +0 -0
  48. data/lib/flashsdk/generators/templates/Gemfile +5 -0
  49. data/lib/flashsdk/generators/templates/rakefile.rb +79 -0
  50. data/lib/flashsdk/module.rb +107 -0
  51. data/lib/flashsdk/mxmlc.rb +160 -0
  52. data/lib/flashsdk.rb +24 -0
  53. data/lib/flex3.rb +54 -0
  54. data/lib/flex4.rb +115 -0
  55. data/rakefile.rb +42 -0
  56. data/test/fixtures/acompc/simple/SomeAirFile.as +11 -0
  57. data/test/fixtures/air/simple/SomeProject.apk +1 -0
  58. data/test/fixtures/air/simple/SomeProject.as +11 -0
  59. data/test/fixtures/air/simple/SomeProject.mxml +9 -0
  60. data/test/fixtures/air/simple/SomeProject.pfx +0 -0
  61. data/test/fixtures/air/simple/SomeProject.swf +0 -0
  62. data/test/fixtures/air/simple/SomeProject.xml +13 -0
  63. data/test/fixtures/asdoc/lib/OtherFile.as +17 -0
  64. data/test/fixtures/asdoc/src/SomeFile.as +11 -0
  65. data/test/fixtures/compc/simple/SomeFile.as +11 -0
  66. data/test/fixtures/flashplayer/AsUnit Runner.swf +0 -0
  67. data/test/fixtures/mxmlc/broken/SomeFile.as +10 -0
  68. data/test/fixtures/mxmlc/simple/SomeFile.as +11 -0
  69. data/test/fixtures/sdk/fdb +90 -0
  70. data/test/fixtures/sdk/mxmlc +56 -0
  71. data/test/unit/acompc_test.rb +37 -0
  72. data/test/unit/adl_test.rb +32 -0
  73. data/test/unit/adt_test.rb +185 -0
  74. data/test/unit/amxmlc_test.rb +55 -0
  75. data/test/unit/asdoc_test.rb +45 -0
  76. data/test/unit/class_generator_test.rb +56 -0
  77. data/test/unit/compc_test.rb +37 -0
  78. data/test/unit/fake_flashplayer_system.rb +11 -0
  79. data/test/unit/fcsh_socket_test.rb +53 -0
  80. data/test/unit/fcsh_test.rb +55 -0
  81. data/test/unit/fdb_test.rb +54 -0
  82. data/test/unit/flash_helper_test.rb +43 -0
  83. data/test/unit/flashplayer_executable_test.rb +69 -0
  84. data/test/unit/flashplayer_log_file_test.rb +47 -0
  85. data/test/unit/flashplayer_mm_config_test.rb +74 -0
  86. data/test/unit/flashplayer_module_test.rb +56 -0
  87. data/test/unit/flashplayer_task_test.rb +91 -0
  88. data/test/unit/flashplayer_trust_test.rb +30 -0
  89. data/test/unit/flex_compiler_options_test.rb +213 -0
  90. data/test/unit/flex_generator_test.rb +37 -0
  91. data/test/unit/mxmlc_test.rb +65 -0
  92. data/test/unit/project_generator_test.rb +57 -0
  93. data/test/unit/test_helper.rb +18 -0
  94. metadata +284 -0
@@ -0,0 +1,107 @@
1
+ ##
2
+ #
3
+ # The FlashSDK is a collection of project and file generators,
4
+ # automated build tasks, external libraries, executables,
5
+ # and runtimes that make it possible to create SWF and AIR content.
6
+ #
7
+ # If you're just getting started with the FlashSDK, you'll probably
8
+ # want to read more about the following topics.
9
+ #
10
+ # = Generators
11
+ #
12
+ # The FlashSDK comes with a handful of standard generators. These
13
+ # generators should be installed into your system $PATH when you
14
+ # install the FlashSDK gem. In general, Sprout generators fall
15
+ # into one of two categories: a) Application Generators, or b) File
16
+ # Generators.
17
+ #
18
+ # Application Generators can be run from any directory on your system
19
+ # and will usually create a new folder and place a large number of
20
+ # files into that folder. These generators usually don't have any
21
+ # prerequisites in terms of where they're run.
22
+ #
23
+ # File Generators usually expect to be run within an existing project
24
+ # directory, and often have dependencies related to the type of
25
+ # project they're run in. For example, most Class generators expect
26
+ # to find a Gemfile in the same directory where they're run.
27
+ #
28
+ # If you're interested in creating your own Generators, please see
29
+ # the {Sprout::Generator} documentation.
30
+ #
31
+ # == See Also:
32
+ #
33
+ # {FlashSDK::ClassGenerator},
34
+ # {FlashSDK::FlexProjectGenerator},
35
+ # {FlashSDK::ProjectGenerator}
36
+ #
37
+ # = Rake Tasks
38
+ #
39
+ # The FlashSDK includes a number of automated build tasks that work with
40
+ # the Rake build system.
41
+ #
42
+ # If you're not familiar with Rake, you should
43
+ # stop right now and read Martin Fowler's essay introducing it to the
44
+ # world: http://martinfowler.com/articles/rake.html
45
+ #
46
+ # == See Also:
47
+ #
48
+ # {FlashSDK::MXMLC},
49
+ # {FlashSDK::COMPC},
50
+ # {FlashSDK::FDB},
51
+ # {FlashSDK::ADL},
52
+ # {FlashSDK::ADT},
53
+ # {FlashPlayer::Task}
54
+ #
55
+ # = Libraries
56
+ #
57
+ # There is a growing collection of libraries that have been made available
58
+ # to Sprouts users. The first of these projects is the automated
59
+ # unit test framework, AsUnit[http://asunit.org].
60
+ #
61
+ # To include a new Sprout Library into your project, you'll need to take the
62
+ # following steps:
63
+ #
64
+ # * Add it to your Gemfile like:
65
+ #
66
+ # gem "asunit4", ">= 4.0.0.pre"
67
+ #
68
+ # * Add it to your Rakefile like:
69
+ #
70
+ # library :asunit4
71
+ #
72
+ # * Add it to your Rake Task like:
73
+ #
74
+ # mxmlc 'bin/SomeProjectRunner.swf' => :asunit4 do |t|
75
+ # ...
76
+ # end
77
+ #
78
+ # * From your project root, run:
79
+ #
80
+ # bundle install
81
+ #
82
+ # If you're interested in learning more about how to _create_ new libraries,
83
+ # check out the {Sprout::Library} documentation.
84
+ #
85
+ # = Executables / Runtimes
86
+ #
87
+ # The FlasSDK also includes a number of tools that help us compile and run
88
+ # ActionScript (or AIR) applications.
89
+ #
90
+ # These executables are usually accessed via Rake, and shouldn't require
91
+ # any manual intervention, but some of you are interested in
92
+ # where these applications live and how to change how they're accessed.
93
+ #
94
+ # Following are the {Sprout::Specification}s that are included with the FlashSDK:
95
+ #
96
+ # * {file:flashsdk/lib/flashplayer/specification.rb}
97
+ # * {file:flashsdk/lib/flex3.rb}
98
+ # * {file:flashsdk/lib/flex4.rb}
99
+ #
100
+ module FlashSDK
101
+ # Do this strip, otherwise we get a carriage return
102
+ # after our version, and that poops on our archive folder
103
+ # after downloading...
104
+ version_file = File.join(File.dirname(__FILE__), '..', '..', 'VERSION')
105
+ VERSION = File.read(version_file).strip
106
+ end
107
+
@@ -0,0 +1,160 @@
1
+ module FlashSDK
2
+
3
+ ##
4
+ # The MXMLC task provides a rake front end to the Flex MXMLC command line compiler.
5
+ # This task is integrated with the LibraryTask so that if any dependencies are
6
+ # library tasks, they will be automatically added to the library_path or source_path
7
+ # depending on whether they provide a swc or sources.
8
+ #
9
+ # The entire MXMLC advanced interface has been provided here. All parameter names should be
10
+ # identical to what is available on the regular compiler except dashes have been replaced
11
+ # by underscores.
12
+ #
13
+ # The following example can be pasted in a file named 'rakefile.rb' which should be placed in the same folder as an ActionScript 3.0 class named 'SomeProject.as' that extends flash.display.Sprite.
14
+ #
15
+ # # Create a remote library dependency on the corelib swc.
16
+ # library :corelib
17
+ #
18
+ # # Alias the compilation task with one that is easier to type
19
+ # task :compile => 'SomeProject.swf'
20
+ #
21
+ # # Create an MXMLC named for the output file that it creates. This task depends on the
22
+ # # corelib library and will automatically add the corelib.swc to it's library_path
23
+ # mxmlc 'bin/SomeProject.swf' => :corelib do |t|
24
+ # t.input = 'src/SomeProject.as'
25
+ # t.default_size = '800,600'
26
+ # t.default_background_color = "#FFFFFF"
27
+ # t.library_path << 'lib/SomeLibrary.swc'
28
+ # t.source_path << 'lib/otherlib'
29
+ # end
30
+ #
31
+ # Remember that Rake files are really just regular Ruby code, so if you want to have some configuration information shared by multiple build tasks, just define a method like:
32
+ #
33
+ # def configure_tasks t
34
+ # t.library_path << 'lib/SomeLibrary.swc'
35
+ # t.source_path << 'lib/otherlib'
36
+ # end
37
+ #
38
+ # desc "Compile the project"
39
+ # mxmlc 'bin/SomeProject.swf' do |t|
40
+ # configure_tasks t
41
+ # t.input = 'src/SomeProject.as'
42
+ # end
43
+ #
44
+ # desc "Compile the test harness"
45
+ # mxmlc 'bin/SomeProjectRunner.swf' => :asunit4 do |t|
46
+ # configure_tasks t
47
+ # t.input = 'src/SomeProjectRunner.as'
48
+ # end
49
+ #
50
+ # == FCSH
51
+ #
52
+ # Building with MXMLC can be quite slow. If you'd like
53
+ # to measure your build times in fractions of a second
54
+ # rather than minutes, you can use the Flex Compiler
55
+ # SHell (FCSH).
56
+ #
57
+ # Sprouts makes it incredibly easy to
58
+ # use FCSH, following are some simple instructions:
59
+ #
60
+ # Open up a new terminal, cd into your project
61
+ # directory and run:
62
+ #
63
+ # rake fcsh:start
64
+ #
65
+ # Open up a new terminal, cd into your project
66
+ # directory and run whatever Rake task depends
67
+ # on at least one MXMLC task, and call the
68
+ # +fcsh+ task first. This can be done on the
69
+ # terminal like this:
70
+ #
71
+ # rake fcsh test
72
+ #
73
+ # More information about FCSH can be found on the {Project Sprouts Blog}[http://projectsprouts.org/2011/01/18/using-fcsh.html].
74
+ #
75
+ # == Flex Debugger (FDB)
76
+ #
77
+ # Like FCSH, the Flex Debugger can be initiated
78
+ # by calling (or depending on) the +fdb+ Rake task.
79
+ #
80
+ # rake fdb test
81
+ #
82
+ # This will drop you into the Flex Debugger shell
83
+ # environment, you can type +help+ at anytime to
84
+ # learn more about what commands are available.
85
+ #
86
+ # You can also type +quit+ or hit CTRL+C to exit
87
+ # FDB.
88
+ #
89
+ # @see FlashSDK::CompilerBase
90
+ # @see Sprout::Executable
91
+ #
92
+ class MXMLC < CompilerBase
93
+
94
+ ##
95
+ # Main source file to send compiler.
96
+ # This must be the last item in this list
97
+ add_param :input, File, { :required => true, :hidden_name => true }
98
+
99
+ ##
100
+ # Specifies the resource bundles to include when compiling a locale SWF. All resource bundles specified with this option must be in the compiler's source path. You specify this using the source-path compiler option.
101
+ #
102
+ # For more information on using resource bundles, see Localizing Flex Applications (http://livedocs.adobe.com/flex/201/html/l10n_076_1.html#129288) in Flex 2 Developer's Guide.
103
+ #
104
+ add_param :include_resource_bundles, Files
105
+
106
+ ##
107
+ # The default prefix for shell params.
108
+ set :default_prefix, '-'
109
+
110
+ ##
111
+ # The the Ruby file that will load the expected
112
+ # Sprout::Specification.
113
+ #
114
+ # Default value is 'flex4'
115
+ #
116
+ set :pkg_name, 'flex4'
117
+
118
+ ##
119
+ # The default pkg version
120
+ #
121
+ set :pkg_version, ">= #{FlashSDK::VERSION}"
122
+
123
+ ##
124
+ # The default executable target.
125
+ #
126
+ set :executable, :mxmlc
127
+
128
+ def execute
129
+ duration = Benchmark.measure { super }
130
+ Sprout.stdout.puts "[MXMLC] Compilation complete in #{duration.real} seconds." unless use_fcsh?
131
+ end
132
+
133
+ def use_fcsh?
134
+ # Check as string b/c this is
135
+ # how the boolean value comes
136
+ # accross the command line input.
137
+ ENV['USE_FCSH'].to_s == 'true'
138
+ end
139
+
140
+ end
141
+ end
142
+
143
+ ##
144
+ # Create a new Rake::File task that will execute {FlashSDK::MXMLC}.
145
+ #
146
+ # @return [FlashSDK::MXMLC]
147
+ #
148
+ # @example The following is a simple MXMLC task:
149
+ #
150
+ # desc "Compile the project"
151
+ # mxmlc 'bin/SomeProject.swf' do |t|
152
+ # t.input = 'src/SomeProject.as'
153
+ # end
154
+ #
155
+ def mxmlc args, &block
156
+ exe = FlashSDK::MXMLC.new
157
+ exe.to_rake args, &block
158
+ exe
159
+ end
160
+
data/lib/flashsdk.rb ADDED
@@ -0,0 +1,24 @@
1
+ require 'sprout'
2
+
3
+ lib = File.expand_path File.dirname(__FILE__)
4
+ $:.unshift lib unless $:.include?(lib)
5
+
6
+ require 'benchmark'
7
+ require 'flashsdk/module'
8
+ require 'flashsdk/generators/flash_helper'
9
+ require 'flashsdk/generators/class_generator'
10
+ require 'flashsdk/generators/project_generator'
11
+ require 'flashsdk/generators/flex_project_generator'
12
+ require 'flashsdk/fcsh'
13
+ require 'flashsdk/fcsh_socket'
14
+ require 'flashsdk/compiler_base'
15
+ require 'flashsdk/asdoc'
16
+ require 'flashsdk/mxmlc'
17
+ require 'flashsdk/compc'
18
+ require 'flashsdk/acompc'
19
+ require 'flashsdk/amxmlc'
20
+ require 'flashsdk/adt'
21
+ require 'flashsdk/adl'
22
+ require 'flashsdk/fdb'
23
+ require 'flashplayer'
24
+
data/lib/flex3.rb ADDED
@@ -0,0 +1,54 @@
1
+
2
+ Sprout::Specification.new do |s|
3
+ # This is the Specification that loads the Flex 3 SDK,
4
+ # To use the Flex 3 SDK from your build tasks, you can
5
+ # simply update the pkg_name parameter of your build
6
+ # task as follows:
7
+ #
8
+ # mxmlc 'bin/SomeProject.swf' do |t|
9
+ # t.input = 'src/SomeProject.as'
10
+ # t.pkg_name = 'flex3'
11
+ # end
12
+ #
13
+ s.name = 'flex3'
14
+ s.version = FlashSDK::VERSION
15
+
16
+ s.add_remote_file_target do |t|
17
+ t.platform = :universal
18
+ t.archive_type = :zip
19
+ t.url = "http://fpdownload.adobe.com/pub/flex/sdk/builds/flex3/flex_sdk_3.4.0.9271_mpl.zip"
20
+ t.md5 = "ba0df5a5b7a9c901540bedaf8a4fec9e"
21
+
22
+ # Executables: (add .exe suffix if it was passed in)
23
+ t.add_executable :aasdoc, "bin/aasdoc"
24
+ t.add_executable :acompc, "bin/acompc"
25
+ t.add_executable :adl, "bin/adl"
26
+ t.add_executable :adt, "bin/adt"
27
+ t.add_executable :amxmlc, "bin/amxmlc"
28
+ t.add_executable :asdoc, "bin/asdoc"
29
+ t.add_executable :compc, "bin/compc"
30
+ t.add_executable :copylocale, "bin/compc"
31
+ t.add_executable :digest, "bin/digest"
32
+ t.add_executable :fcsh, "bin/fcsh"
33
+ t.add_executable :fdb, "bin/fdb"
34
+ t.add_executable :mxmlc, "bin/mxmlc"
35
+ t.add_executable :optimizer, "bin/optimizer"
36
+
37
+ # Flex framework SWCs:
38
+ t.add_library :flex, "frameworks/libs/flex.swc"
39
+ t.add_library :framework, "frameworks/libs/framework.swc"
40
+ t.add_library :rpc, "frameworks/libs/rpc.swc"
41
+ t.add_library :utilities, "frameworks/libs/utilities.swc"
42
+ t.add_library :playerglobal_9, "frameworks/libs/player/9/playerglobal.swc"
43
+ t.add_library :playerglobal_10, "frameworks/libs/player/10/playerglobal.swc"
44
+
45
+ # AsDoc templates:
46
+ t.add_library :asdoc_templates, "asdoc/templates"
47
+
48
+ # Locale-Specific Flex SWCs:
49
+ t.add_library :airframework_en_US, "frameworks/locale/en_US/airframework_rb.swc"
50
+ t.add_library :framework_en_US, "frameworks/locale/en_US/framework_rb.swc"
51
+ t.add_library :rpc_en_US, "frameworks/locale/en_US/rpc_rb.swc"
52
+ end
53
+ end
54
+
data/lib/flex4.rb ADDED
@@ -0,0 +1,115 @@
1
+
2
+ Sprout::Specification.new do |s|
3
+ # This is the Specification that loads the Flex 4 SDK,
4
+ # To use the Flex 4 SDK from your build tasks, you can
5
+ # simply update the pkg_name parameter of your build
6
+ # task as follows:
7
+ #
8
+ # mxmlc 'bin/SomeProject.swf' do |t|
9
+ # t.input = 'src/SomeProject.as'
10
+ # t.pkg_name = 'flex4'
11
+ # end
12
+ #
13
+ # If you'd like to consume any of the libraries that
14
+ # are included with the Flex SDK, you can embed them
15
+ # from your Rakefile as follows:
16
+ #
17
+ # library :f_textlayout
18
+ #
19
+ # mxmlc 'bin/SomeProject.swf' => :f_textlayout do |t|
20
+ # t.input = 'src/SomeProject.as'
21
+ # end
22
+ #
23
+ # If you'd like to consume one of the localized frameworks
24
+ # you can set that up as follows:
25
+ #
26
+ # library 'flex_4_es_ES'
27
+ #
28
+ # mxmlc 'bin/SomeProject.swf' => 'flex_4_es_ES' do |t|
29
+ # t.input = 'src/SomeProject.as'
30
+ # end
31
+ #
32
+ s.name = 'flex4'
33
+ s.version = '4.6.0.23201'
34
+
35
+ s.add_remote_file_target do |t|
36
+ t.platform = :universal
37
+ t.archive_type = :zip
38
+ t.url = "http://download.macromedia.com/pub/flex/sdk/flex_sdk_4.6.zip"
39
+ t.md5 = "202bca98ee7b8db9cda3af01e99c688e"
40
+
41
+ # Executables: (add .exe suffix if it was passed in)
42
+ t.add_executable :aasdoc, "bin/aasdoc"
43
+ t.add_executable :acompc, "bin/acompc"
44
+ t.add_executable :adl, "bin/adl"
45
+ t.add_executable :adt, "bin/adt"
46
+ t.add_executable :amxmlc, "bin/amxmlc"
47
+ t.add_executable :asdoc, "bin/asdoc"
48
+ t.add_executable :compc, "bin/compc"
49
+ t.add_executable :copylocale, "bin/copylocale"
50
+ t.add_executable :digest, "bin/digest"
51
+ t.add_executable :fcsh, "bin/fcsh"
52
+ t.add_executable :fdb, "bin/fdb"
53
+ t.add_executable :mxmlc, "bin/mxmlc"
54
+ t.add_executable :optimizer, "bin/optimizer"
55
+
56
+ # Flex framework SWCs:
57
+ t.add_library :advancedgrids, "frameworks/libs/advancedgrids.swc"
58
+ t.add_library :aircore, "frameworks/libs/air/aircore.swc"
59
+ t.add_library :airframework, "frameworks/libs/air/airframework.swc"
60
+ t.add_library :airglobal, "frameworks/libs/air/airglobal.swc"
61
+ t.add_library :airspark, "frameworks/libs/air/airspark.swc"
62
+ t.add_library :applicationupdater, "frameworks/libs/air/applicationupdater.swc"
63
+ t.add_library :applicationupdater_ui, "frameworks/libs/air/applicationupdater_ui.swc"
64
+ t.add_library :automation, "frameworks/libs/automation/automation.swc"
65
+ t.add_library :automation_agent, "frameworks/libs/automation/automation_agent.swc"
66
+ t.add_library :automation_air, "frameworks/libs/automation/automation_air.swc"
67
+ t.add_library :automation_airspark, "frameworks/libs/automation/automation_airspark.swc"
68
+ t.add_library :automation_dmv, "frameworks/libs/automation/automation_dmv.swc"
69
+ t.add_library :automation_flashflexkit, "frameworks/libs/automation/automation_flashflexkit.swc"
70
+ t.add_library :automation_spark, "frameworks/libs/automation/automation_spark.swc"
71
+ t.add_library :qtp, "frameworks/libs/automation/qtp.swc"
72
+ t.add_library :qtp_air, "frameworks/libs/automation/qtp_air.swc"
73
+ t.add_library :servicemonitor, "frameworks/libs/air/servicemonitor.swc"
74
+ t.add_library :authoringsupport, "frameworks/libs/authoringsupport.swc"
75
+ t.add_library :charts, "frameworks/libs/charts.swc"
76
+ t.add_library :core, "frameworks/libs/core.swc"
77
+ t.add_library :flash_integration, "frameworks/libs/flash-integration.swc"
78
+ t.add_library :framework, "frameworks/libs/framework.swc"
79
+ t.add_library :mobilecomponents, "frameworks/libs/mobile/mobilecomponents.swc"
80
+ t.add_library :mx, "frameworks/libs/mx/mx.swc"
81
+ t.add_library :osmf, "frameworks/libs/osmf.swc"
82
+ t.add_library :playerglobal_11, "frameworks/libs/player/11.1/playerglobal.swc"
83
+ t.add_library :rpc, "frameworks/libs/rpc.swc"
84
+ t.add_library :spark, "frameworks/libs/spark.swc"
85
+ t.add_library :spark_dmv, "frameworks/libs/spark_dmv.swc"
86
+ t.add_library :sparkskins, "frameworks/libs/sparkskins.swc"
87
+ t.add_library :textLayout, "frameworks/libs/textLayout.swc"
88
+
89
+ # AsDoc templates:
90
+ t.add_library :asdoc_templates, "asdoc/templates"
91
+
92
+ # Locale-Specific Flex SWCs:
93
+ [
94
+ 'da_DK', 'de_DE', 'en_US', 'es_ES', 'fi_FL', 'fr_FR', 'it_IT', 'ja_JP',
95
+ 'ko_KR', 'nb_NO', 'nl_NL', 'pt_BR', 'ru_RU', 'sv_SE', 'zh_CN', 'zh_TW'
96
+ ].each do |locale|
97
+ t.add_library "advancedgrids_#{locale}".to_sym, "frameworks/locale/#{locale}/advancedgrids_rb.swc"
98
+ t.add_library "airframework_#{locale}".to_sym, "frameworks/locale/#{locale}/airframework_rb.swc"
99
+ t.add_library "airspark_#{locale}".to_sym, "frameworks/locale/#{locale}/airspark_rb.swc"
100
+ t.add_library "automation_agent_#{locale}".to_sym, "frameworks/locale/#{locale}/automation_agent_rb.swc"
101
+ t.add_library "automation_#{locale}".to_sym, "frameworks/locale/#{locale}/automation_rb.swc"
102
+ t.add_library "charts_#{locale}".to_sym, "frameworks/locale/#{locale}/charts_rb.swc"
103
+ t.add_library "flash_integration_#{locale}".to_sym, "frameworks/locale/#{locale}/flash-integration_rb.swc"
104
+ t.add_library "framework_#{locale}".to_sym, "frameworks/locale/#{locale}/framework_rb.swc"
105
+ t.add_library "mobilecomponents_#{locale}".to_sym, "frameworks/locale/#{locale}/mobilecomponents_rb.swc"
106
+ t.add_library "mx_#{locale}".to_sym, "frameworks/locale/#{locale}/mx_rb.swc"
107
+ t.add_library "osmf_#{locale}".to_sym, "frameworks/locale/#{locale}/osmf_rb.swc"
108
+ t.add_library "playerglobal_#{locale}".to_sym, "frameworks/locale/#{locale}/playerglobal_rb.swc"
109
+ t.add_library "qtp_air_#{locale}".to_sym, "frameworks/locale/#{locale}/qtp_air_rb.swc"
110
+ t.add_library "rpc_#{locale}".to_sym, "frameworks/locale/#{locale}/rpc_rb.swc"
111
+ t.add_library "spark_#{locale}".to_sym, "frameworks/locale/#{locale}/spark_rb.swc"
112
+ t.add_library "textLayout_#{locale}".to_sym, "frameworks/locale/#{locale}/textLayout_rb.swc"
113
+ end
114
+ end
115
+ end
data/rakefile.rb ADDED
@@ -0,0 +1,42 @@
1
+ $:.unshift File.expand_path("../lib", __FILE__)
2
+
3
+ require 'rubygems'
4
+ require "bundler/gem_tasks"
5
+
6
+ test_package = File.join(File.dirname(__FILE__), 'test', 'unit')
7
+ $: << test_package unless $:.include? test_package
8
+
9
+ Bundler.require
10
+
11
+ require 'rake/clean'
12
+ require 'rake/testtask'
13
+
14
+ #require File.join(File.dirname(__FILE__), 'lib', 'flashsdk', 'module')
15
+
16
+ namespace :test do
17
+ Rake::TestTask.new(:units) do |t|
18
+ t.libs << "test/unit"
19
+ t.test_files = FileList["test/unit/*_test.rb"]
20
+ t.verbose = true
21
+ end
22
+ end
23
+
24
+ desc "Run the test harness"
25
+ task :test => 'test:units'
26
+
27
+ file 'pkg' do
28
+ FileUtils.makedirs 'pkg'
29
+ end
30
+
31
+ gem_package = "h4oflashsdk-#{FlashSDK::VERSION}.gem"
32
+
33
+ file "pkg/#{gem_package}" => [:clean, 'pkg'] do
34
+ sh "gem build flashsdk.gemspec"
35
+ FileUtils.mv gem_package, "pkg/#{gem_package}"
36
+ end
37
+
38
+ desc "Create the gem package"
39
+ task :package => "pkg/#{gem_package}"
40
+
41
+ CLEAN.add gem_package
42
+ CLEAN.add 'pkg'
@@ -0,0 +1,11 @@
1
+ package {
2
+ import flash.display.Sprite;
3
+
4
+ public class SomeAirFile extends Sprite {
5
+
6
+ public function SomeAirFile() {
7
+ trace(">> SomeFile instantiated");
8
+ }
9
+ }
10
+ }
11
+
@@ -0,0 +1 @@
1
+ #dummy
@@ -0,0 +1,11 @@
1
+ package {
2
+ import mx.core.WindowedApplication;
3
+
4
+ public class SomeProject extends WindowedApplication {
5
+
6
+ public function SomeProject() {
7
+ trace(">> SomeProject Instantiated");
8
+ }
9
+ }
10
+ }
11
+
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <mx:WindowedApplication
3
+ xmlns:mx="http://www.adobe.com/2006/mxml"
4
+ layout="absolute"
5
+ title="Hello World"
6
+ >
7
+ <mx:Label text="Hello AIR" horizontalCenter="0" verticalCenter="0" />
8
+ </mx:WindowedApplication>
9
+
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <application xmlns="http://ns.adobe.com/air/application/2.0">
3
+ <id>sprouts.ADTTest</id>
4
+ <version>0.1</version>
5
+ <filename>SomeProject</filename>
6
+ <initialWindow>
7
+ <content>test/fixtures/air/simple/SomeProject.swf</content>
8
+ <visible>true</visible>
9
+ <width>400</width>
10
+ <height>200</height>
11
+ </initialWindow>
12
+ </application>
13
+
@@ -0,0 +1,17 @@
1
+ package {
2
+ import flash.display.Sprite;
3
+
4
+ /**
5
+ * Hello Documentation!
6
+ */
7
+ public class OtherFile extends Sprite {
8
+
9
+ /**
10
+ * This is the constructor!
11
+ */
12
+ public function OtherFile() {
13
+ trace(">> OtherFile instantiated");
14
+ }
15
+ }
16
+ }
17
+
@@ -0,0 +1,11 @@
1
+ package {
2
+ import flash.display.Sprite;
3
+
4
+ public class SomeFile extends Sprite {
5
+
6
+ public function SomeFile() {
7
+ trace(">> SomeFile instantiated");
8
+ }
9
+ }
10
+ }
11
+
@@ -0,0 +1,11 @@
1
+ package {
2
+ import flash.display.Sprite;
3
+
4
+ public class SomeFile extends Sprite {
5
+
6
+ public function SomeFile() {
7
+ trace(">> SomeFile instantiated");
8
+ }
9
+ }
10
+ }
11
+
@@ -0,0 +1,10 @@
1
+ package {
2
+ import flash.display.Sprite;
3
+
4
+ public class SomeFile extends Sprite {
5
+
6
+ public function SomeFile() {
7
+ trace(">> SomeFile
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,11 @@
1
+ package {
2
+ import flash.display.Sprite;
3
+
4
+ public class SomeFile extends Sprite {
5
+
6
+ public function SomeFile() {
7
+ trace(">> SomeFile instantiated");
8
+ }
9
+ }
10
+ }
11
+