flashsdk_sqe 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -0
- data/Gemfile.lock +41 -0
- data/POSTINSTALL.rdoc +81 -0
- data/README.textile +79 -0
- data/VERSION +1 -0
- data/bin/flashlog +8 -0
- data/bin/flashplayer +9 -0
- data/bin/sprout-as3 +9 -0
- data/bin/sprout-flex +8 -0
- data/ext/CloseFlashPlayerForDumbassOSX.scpt +6 -0
- data/ext/OpenFlashPlayerForDumbassOSX.scpt +12 -0
- data/flashsdk_sqe.gemspec +25 -0
- data/lib/flashplayer.rb +9 -0
- data/lib/flashplayer/errors.rb +12 -0
- data/lib/flashplayer/executable.rb +142 -0
- data/lib/flashplayer/log_file.rb +100 -0
- data/lib/flashplayer/mm_config.rb +96 -0
- data/lib/flashplayer/module.rb +51 -0
- data/lib/flashplayer/specification.rb +45 -0
- data/lib/flashplayer/system_mixins.rb +98 -0
- data/lib/flashplayer/task.legacy.rb +293 -0
- data/lib/flashplayer/task.rb +62 -0
- data/lib/flashplayer/trust.rb +45 -0
- data/lib/flashsdk.rb +24 -0
- data/lib/flashsdk/acompc.rb +29 -0
- data/lib/flashsdk/adl.rb +83 -0
- data/lib/flashsdk/adt.rb +276 -0
- data/lib/flashsdk/amxmlc.rb +28 -0
- data/lib/flashsdk/asdoc.rb +164 -0
- data/lib/flashsdk/compc.rb +124 -0
- data/lib/flashsdk/compiler_base.rb +1131 -0
- data/lib/flashsdk/fcsh.rb +173 -0
- data/lib/flashsdk/fcsh_socket.rb +167 -0
- data/lib/flashsdk/fdb.rb +833 -0
- data/lib/flashsdk/generators/class_generator.rb +87 -0
- data/lib/flashsdk/generators/flash_helper.rb +234 -0
- data/lib/flashsdk/generators/flex_project_generator.rb +30 -0
- data/lib/flashsdk/generators/project_generator.rb +31 -0
- data/lib/flashsdk/generators/templates/ActionScript3Class.as +9 -0
- data/lib/flashsdk/generators/templates/ActionScript3MainClass.as +11 -0
- data/lib/flashsdk/generators/templates/ActionScript3RunnerClass.as +19 -0
- data/lib/flashsdk/generators/templates/DefaultProjectImage.png +0 -0
- data/lib/flashsdk/generators/templates/Flex4Application.mxml +45 -0
- data/lib/flashsdk/generators/templates/Flex4Main.css +7 -0
- data/lib/flashsdk/generators/templates/Flex4Rakefile.rb +34 -0
- data/lib/flashsdk/generators/templates/Flex4RunnerClass.mxml +29 -0
- data/lib/flashsdk/generators/templates/FlexTestRunner.mxml +0 -0
- data/lib/flashsdk/generators/templates/Gemfile +5 -0
- data/lib/flashsdk/generators/templates/rakefile.rb +79 -0
- data/lib/flashsdk/module.rb +107 -0
- data/lib/flashsdk/mxmlc.rb +160 -0
- data/lib/flex3.rb +54 -0
- data/lib/flex4.rb +115 -0
- data/pkg/flashsdk_sqe-0.0.1.gem +0 -0
- data/rakefile.rb +42 -0
- data/test/fixtures/acompc/simple/SomeAirFile.as +11 -0
- data/test/fixtures/air/simple/SomeProject.apk +1 -0
- data/test/fixtures/air/simple/SomeProject.as +11 -0
- data/test/fixtures/air/simple/SomeProject.mxml +9 -0
- data/test/fixtures/air/simple/SomeProject.pfx +0 -0
- data/test/fixtures/air/simple/SomeProject.swf +0 -0
- data/test/fixtures/air/simple/SomeProject.xml +13 -0
- data/test/fixtures/asdoc/lib/OtherFile.as +17 -0
- data/test/fixtures/asdoc/src/SomeFile.as +11 -0
- data/test/fixtures/compc/simple/SomeFile.as +11 -0
- data/test/fixtures/flashplayer/AsUnit Runner.swf +0 -0
- data/test/fixtures/mxmlc/broken/SomeFile.as +10 -0
- data/test/fixtures/mxmlc/simple/SomeFile.as +11 -0
- data/test/fixtures/sdk/fdb +90 -0
- data/test/fixtures/sdk/mxmlc +56 -0
- data/test/unit/acompc_test.rb +37 -0
- data/test/unit/adl_test.rb +32 -0
- data/test/unit/adt_test.rb +185 -0
- data/test/unit/amxmlc_test.rb +55 -0
- data/test/unit/asdoc_test.rb +45 -0
- data/test/unit/class_generator_test.rb +56 -0
- data/test/unit/compc_test.rb +37 -0
- data/test/unit/fake_flashplayer_system.rb +11 -0
- data/test/unit/fcsh_socket_test.rb +53 -0
- data/test/unit/fcsh_test.rb +55 -0
- data/test/unit/fdb_test.rb +54 -0
- data/test/unit/flash_helper_test.rb +43 -0
- data/test/unit/flashplayer_executable_test.rb +69 -0
- data/test/unit/flashplayer_log_file_test.rb +47 -0
- data/test/unit/flashplayer_mm_config_test.rb +74 -0
- data/test/unit/flashplayer_module_test.rb +56 -0
- data/test/unit/flashplayer_task_test.rb +91 -0
- data/test/unit/flashplayer_trust_test.rb +30 -0
- data/test/unit/flex_compiler_options_test.rb +213 -0
- data/test/unit/flex_generator_test.rb +37 -0
- data/test/unit/mxmlc_test.rb +65 -0
- data/test/unit/project_generator_test.rb +57 -0
- data/test/unit/test_helper.rb +18 -0
- metadata +200 -0
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
Bundler.require
|
4
|
+
|
5
|
+
##############################
|
6
|
+
# Debug
|
7
|
+
|
8
|
+
# Compile the debug swf
|
9
|
+
mxmlc "<%= bin %>/<%= debug_swf_name %>" do |t|
|
10
|
+
t.input = "<%= src %>/<%= class_name %>.mxml"
|
11
|
+
t.debug = true
|
12
|
+
end
|
13
|
+
|
14
|
+
desc "Compile and run the debug swf"
|
15
|
+
flashplayer :debug => "<%= bin %>/<%= debug_swf_name %>"
|
16
|
+
|
17
|
+
##############################
|
18
|
+
# Test
|
19
|
+
|
20
|
+
library :asunit4
|
21
|
+
|
22
|
+
# Compile the test swf
|
23
|
+
mxmlc "<%= bin %>/<%= test_swf_name %>" => :asunit4 do |t|
|
24
|
+
t.input = "<%= src %>/<%= test_runner_name %>.mxml"
|
25
|
+
t.source_path << "test"
|
26
|
+
t.default_size = "900,550"
|
27
|
+
t.debug = true
|
28
|
+
end
|
29
|
+
|
30
|
+
desc "Compile and run the test swf"
|
31
|
+
flashplayer :test => "<%= bin %>/<%= test_swf_name %>"
|
32
|
+
|
33
|
+
task :default => :debug
|
34
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
|
3
|
+
xmlns:s="library://ns.adobe.com/flex/spark"
|
4
|
+
xmlns:mx="library://ns.adobe.com/flex/mx"
|
5
|
+
creationComplete="creationCompleteHandler(event)">
|
6
|
+
|
7
|
+
<fx:Script>
|
8
|
+
|
9
|
+
<![CDATA[
|
10
|
+
import asunit.core.TextCore;
|
11
|
+
import mx.core.UIComponent;
|
12
|
+
|
13
|
+
private var core:TextCore;
|
14
|
+
|
15
|
+
private function creationCompleteHandler(event:Event):void
|
16
|
+
{
|
17
|
+
// Flex 4 complains when we use UICompenent from MXML... Boo.
|
18
|
+
var visualContext:UIComponent = new UIComponent();
|
19
|
+
addElement(visualContext);
|
20
|
+
|
21
|
+
core = new TextCore();
|
22
|
+
core.start(AllTests, null, visualContext);
|
23
|
+
}
|
24
|
+
]]>
|
25
|
+
|
26
|
+
</fx:Script>
|
27
|
+
|
28
|
+
</s:Application>
|
29
|
+
|
File without changes
|
@@ -0,0 +1,79 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
require 'bundler/setup'
|
4
|
+
|
5
|
+
require 'rake/clean'
|
6
|
+
require 'flashsdk'
|
7
|
+
require 'asunit4'
|
8
|
+
|
9
|
+
##
|
10
|
+
# Set USE_FCSH to true in order to use FCSH for all compile tasks.
|
11
|
+
#
|
12
|
+
# You can also set this value by calling the :fcsh task
|
13
|
+
# manually like:
|
14
|
+
#
|
15
|
+
# rake fcsh run
|
16
|
+
#
|
17
|
+
# These values can also be sent from the command line like:
|
18
|
+
#
|
19
|
+
# rake run FCSH_PKG_NAME=flex3
|
20
|
+
#
|
21
|
+
# ENV['USE_FCSH'] = true
|
22
|
+
# ENV['FCSH_PKG_NAME'] = 'flex4'
|
23
|
+
# ENV['FCSH_PKG_VERSION'] = '1.0.14.pre'
|
24
|
+
# ENV['FCSH_PORT'] = 12321
|
25
|
+
|
26
|
+
##############################
|
27
|
+
# Debug
|
28
|
+
|
29
|
+
# Compile the debug swf
|
30
|
+
mxmlc "<%= bin %>/<%= debug_swf_name %>" do |t|
|
31
|
+
t.input = "<%= src %>/<%= class_name %>.as"
|
32
|
+
t.static_link_runtime_shared_libraries = true
|
33
|
+
t.debug = true
|
34
|
+
end
|
35
|
+
|
36
|
+
desc "Compile and run the debug swf"
|
37
|
+
flashplayer :run => "<%= bin %>/<%= debug_swf_name %>"
|
38
|
+
|
39
|
+
##############################
|
40
|
+
# Test
|
41
|
+
|
42
|
+
library :asunit4
|
43
|
+
|
44
|
+
# Compile the test swf
|
45
|
+
mxmlc "<%= bin %>/<%= test_swf_name %>" => :asunit4 do |t|
|
46
|
+
t.input = "<%= src %>/<%= test_runner_name %>.as"
|
47
|
+
t.static_link_runtime_shared_libraries = true
|
48
|
+
t.source_path << 'test'
|
49
|
+
t.debug = true
|
50
|
+
end
|
51
|
+
|
52
|
+
desc "Compile and run the test swf"
|
53
|
+
flashplayer :test => "<%= bin %>/<%= test_swf_name %>"
|
54
|
+
|
55
|
+
##############################
|
56
|
+
# SWC
|
57
|
+
|
58
|
+
compc "<%= bin %>/<%= class_name %>.swc" do |t|
|
59
|
+
t.input_class = "<%= class_name %>"
|
60
|
+
t.static_link_runtime_shared_libraries = true
|
61
|
+
t.source_path << 'src'
|
62
|
+
end
|
63
|
+
|
64
|
+
desc "Compile the SWC file"
|
65
|
+
task :swc => '<%= bin %>/<%= class_name %>.swc'
|
66
|
+
|
67
|
+
##############################
|
68
|
+
# DOC
|
69
|
+
|
70
|
+
desc "Generate documentation at <%= doc %>/"
|
71
|
+
asdoc '<%= doc %>' do |t|
|
72
|
+
t.doc_sources << "<%= src %>"
|
73
|
+
t.exclude_sources << "<%= src %>/<%= test_runner_name %>.as"
|
74
|
+
end
|
75
|
+
|
76
|
+
##############################
|
77
|
+
# DEFAULT
|
78
|
+
task :default => :run
|
79
|
+
|
@@ -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/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
|
+
|