sprout-as3-bundle 0.1.27
Sign up to get free protection for your applications and to get access to all the features.
- data/README +48 -0
- data/lib/sprout/as3.rb +5 -0
- data/lib/sprout/as3/version.rb +12 -0
- data/lib/sprout/as3_tasks.rb +7 -0
- data/lib/sprout/generators/class/USAGE +42 -0
- data/lib/sprout/generators/class/class_generator.rb +20 -0
- data/lib/sprout/generators/class/templates/Class.as +8 -0
- data/lib/sprout/generators/class/templates/Component.mxml +8 -0
- data/lib/sprout/generators/class/templates/TestCase.as +30 -0
- data/lib/sprout/generators/class/templates/TestSuite.as +18 -0
- data/lib/sprout/generators/project/project_generator.rb +26 -0
- data/lib/sprout/generators/project/templates/DefaultSkin.as +7 -0
- data/lib/sprout/generators/project/templates/MainClass.as +12 -0
- data/lib/sprout/generators/project/templates/ProjectSprouts.jpg +0 -0
- data/lib/sprout/generators/project/templates/README.txt +56 -0
- data/lib/sprout/generators/project/templates/TestRunner.as +15 -0
- data/lib/sprout/generators/project/templates/generate +21 -0
- data/lib/sprout/generators/project/templates/rakefile.rb +91 -0
- data/lib/sprout/generators/suite/USAGE +0 -0
- data/lib/sprout/generators/suite/suite_generator.rb +17 -0
- data/lib/sprout/generators/suite/templates/TestSuite.as +18 -0
- data/lib/sprout/generators/test/USAGE +37 -0
- data/lib/sprout/generators/test/templates/TestCase.as +30 -0
- data/lib/sprout/generators/test/templates/TestSuite.as +18 -0
- data/lib/sprout/generators/test/test_generator.rb +20 -0
- data/lib/sprout/tasks/asdoc_task.rb +39 -0
- data/lib/sprout/tasks/asunit_task.rb +44 -0
- data/lib/sprout/tasks/compc_doc.rb +508 -0
- data/lib/sprout/tasks/compc_task.rb +100 -0
- data/lib/sprout/tasks/fcsh_task.rb +13 -0
- data/lib/sprout/tasks/fdb_task.rb +0 -0
- data/lib/sprout/tasks/mxmlc_doc.rb +484 -0
- data/lib/sprout/tasks/mxmlc_task.rb +657 -0
- data/rakefile.rb +66 -0
- metadata +128 -0
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
# Generate a new ActionScript 3.0 test suite
|
3
|
+
# This generator can be executed as follows:
|
4
|
+
#
|
5
|
+
# sprout -n as3 SomeProject
|
6
|
+
# cd SomeProject
|
7
|
+
# script/generator suite
|
8
|
+
#
|
9
|
+
class SuiteGenerator < Sprout::Generator::NamedBase # :nodoc:
|
10
|
+
|
11
|
+
def manifest
|
12
|
+
record do |m|
|
13
|
+
m.template 'TestSuite.as', File.join(test_dir, 'AllTests.as')
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
package {
|
2
|
+
/**
|
3
|
+
* This file has been automatically created using
|
4
|
+
* #!/usr/bin/ruby script/generate suite
|
5
|
+
* If you modify it and run this script, your
|
6
|
+
* modifications will be lost!
|
7
|
+
*/
|
8
|
+
|
9
|
+
import asunit.framework.TestSuite;<% test_case_classes.each do |test_case| %>
|
10
|
+
import <%= test_case %>;<% end %>
|
11
|
+
|
12
|
+
public class AllTests extends TestSuite {
|
13
|
+
|
14
|
+
public function AllTests() {<% test_case_classes.each do |test_case| %>
|
15
|
+
addTest(new <%= test_case %>());<% end %>
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Description:
|
2
|
+
Stubs out a new ActionScript test case that depends on the AsUnit framework.
|
3
|
+
|
4
|
+
This command uses the Sprout::Generator::NamedBase class which will search
|
5
|
+
for configuration parameters as follows:
|
6
|
+
|
7
|
+
1) Command line parameters will supercede any of the following.
|
8
|
+
2) Search the current working directory and all parent directories
|
9
|
+
for a valid Rakefile.
|
10
|
+
3) If a Rakefile is not found, classes will be created directly from the
|
11
|
+
current working directory.
|
12
|
+
4) If a Rakefile is found, it will be loaded. If the rakefile instantiates
|
13
|
+
a Sprout::ProjectModel, that configuration will be used for source and test
|
14
|
+
paths, language preferences, and other values.
|
15
|
+
5) If no ProjectModel is instantiated in your Rakefile, the Rakefile itself
|
16
|
+
will be treated as the project root, and classes will be created from that
|
17
|
+
directory.
|
18
|
+
|
19
|
+
You can edit the erb templates that this command uses in a variety of ways.
|
20
|
+
If you would like to edit the templates for all projects on your system,
|
21
|
+
simply copy the directory at: File.dirname(__FILE__) into:
|
22
|
+
|
23
|
+
#{SPROUT_HOME}/sprout/generators/
|
24
|
+
|
25
|
+
To edit templates for a single project, copy the directory to:
|
26
|
+
|
27
|
+
#{PROJECT_HOME}/script/generators/
|
28
|
+
|
29
|
+
Once you have the contents of this package copied, simply edit the files found
|
30
|
+
in the templates/ folder to your satisfaction.
|
31
|
+
|
32
|
+
Example:
|
33
|
+
`./script/generate class utils.MathUtil`
|
34
|
+
|
35
|
+
Will create the follow files:
|
36
|
+
|
37
|
+
Test Case: test/utils/MathUtilTest.as
|
@@ -0,0 +1,30 @@
|
|
1
|
+
package <%= package_name %> {
|
2
|
+
|
3
|
+
import asunit.framework.TestCase;
|
4
|
+
|
5
|
+
public class <%= test_case_name %> extends TestCase {
|
6
|
+
private var <%= instance_name %>:<%= class_name %>;
|
7
|
+
|
8
|
+
public function <%= test_case_name %>(methodName:String=null) {
|
9
|
+
super(methodName)
|
10
|
+
}
|
11
|
+
|
12
|
+
override protected function setUp():void {
|
13
|
+
super.setUp();
|
14
|
+
<%= instance_name %> = new <%= class_name %>();
|
15
|
+
}
|
16
|
+
|
17
|
+
override protected function tearDown():void {
|
18
|
+
super.tearDown();
|
19
|
+
<%= instance_name %> = null;
|
20
|
+
}
|
21
|
+
|
22
|
+
public function testInstantiated():void {
|
23
|
+
assertTrue("<%= instance_name %> is <%= class_name %>", <%= instance_name %> is <%= class_name %>);
|
24
|
+
}
|
25
|
+
|
26
|
+
public function testFailure():void {
|
27
|
+
assertTrue("Failing test", false);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
package {
|
2
|
+
/**
|
3
|
+
* This file has been automatically created using
|
4
|
+
* #!/usr/bin/ruby script/generate suite
|
5
|
+
* If you modify it and run this script, your
|
6
|
+
* modifications will be lost!
|
7
|
+
*/
|
8
|
+
|
9
|
+
import asunit.framework.TestSuite;<% test_case_classes.each do |test_case| %>
|
10
|
+
import <%= test_case %>;<% end %>
|
11
|
+
|
12
|
+
public class AllTests extends TestSuite {
|
13
|
+
|
14
|
+
public function AllTests() {<% test_case_classes.each do |test_case| %>
|
15
|
+
addTest(new <%= test_case %>());<% end %>
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
# Generate a new ActionScript 3.0 TestCase and rebuild the test suites.
|
3
|
+
# This generator can be executed as follows:
|
4
|
+
#
|
5
|
+
# sprout -n as3 SomeProject
|
6
|
+
# cd SomeProject
|
7
|
+
# script/generator test utils.MathUtilTest
|
8
|
+
#
|
9
|
+
class TestGenerator < Sprout::Generator::NamedBase # :nodoc:
|
10
|
+
|
11
|
+
def manifest
|
12
|
+
record do |m|
|
13
|
+
m.directory full_test_dir
|
14
|
+
m.template "TestCase.as", full_test_case_path
|
15
|
+
|
16
|
+
m.template 'TestSuite.as', File.join(test_dir, 'AllTests.as')
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
module Sprout
|
4
|
+
#
|
5
|
+
# *NOTE:* The AsDoc task has not yet been built, please let us know[http://groups.google.com/group/projectsprouts] if you're interested in contributing!
|
6
|
+
# http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=asdoc_127_9.html#142061
|
7
|
+
#
|
8
|
+
# The AsDoc Task will provide Rake support for the asdoc documentation engine.
|
9
|
+
# The main idea behind this task is that one would simply name it after
|
10
|
+
# the documentation directory, and set an Sprout::MXMLCTask as a prerequisite.
|
11
|
+
# Then AsDoc should grab all of the compiler settings from the MXMLCTask and
|
12
|
+
# generate the documentation as expected. Of course any parameters set directly
|
13
|
+
# would override what is found from the compiler task.
|
14
|
+
#
|
15
|
+
# This configuration might look something like this:
|
16
|
+
#
|
17
|
+
# # Create a remote library dependency on the corelib swc.
|
18
|
+
# library :corelib
|
19
|
+
#
|
20
|
+
# # Alias the compilation task with one that is easier to type
|
21
|
+
# # task :compile => 'SomeProject.swf'
|
22
|
+
#
|
23
|
+
# # Create an MXMLCTask named for the output file that it creates. This task depends on the
|
24
|
+
# # corelib library and will automatically add the corelib.swc to it's library_path
|
25
|
+
# mxmlc 'bin/SomeProject.swf' => :corelib do |t|
|
26
|
+
# t.input = 'src/SomeProject.as'
|
27
|
+
# t.default_size = '800 600'
|
28
|
+
# t.default_background_color = "#FFFFFF"
|
29
|
+
# end
|
30
|
+
#
|
31
|
+
# desc "Generate documentation"
|
32
|
+
# asdoc 'doc' => 'bin/SomeProject.swf'
|
33
|
+
#
|
34
|
+
# This would then generate documentation in the relative path, 'doc', but only if
|
35
|
+
# The contents of the documentation directory werer older than the sources referenced by the compiler.
|
36
|
+
#
|
37
|
+
class AsDocTask < MXMLCTask
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright (c) 2007 Pattern Park
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
a copy of this software and associated documentation files (the
|
6
|
+
"Software"), to deal in the Software without restriction, including
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
=end
|
23
|
+
|
24
|
+
module Sprout
|
25
|
+
class AsUnitError < StandardError # :nodoc:
|
26
|
+
end
|
27
|
+
class ExecutionError < StandardError # :nodoc:
|
28
|
+
end
|
29
|
+
|
30
|
+
# The AsUnitTask provides a shortcut to compiling a test harness
|
31
|
+
# directly from a related MXMLCTask. The first prerequisite
|
32
|
+
# that is an MXMLCTask or MTASCTask will be copied and modified
|
33
|
+
# to generate a test swf using ProjectModel.instance.test_dir
|
34
|
+
# and the AsUnit library gem.
|
35
|
+
#
|
36
|
+
# mxmlc 'bin/SomeProject.swf' => :corelib do |t|
|
37
|
+
# t.input = 'src/SomeProject.as'
|
38
|
+
# end
|
39
|
+
#
|
40
|
+
# asunit :test => 'bin/SomeProject.swf'
|
41
|
+
#
|
42
|
+
class AsUnitTask < ToolTask
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,508 @@
|
|
1
|
+
module Sprout
|
2
|
+
class COMPCTask < ToolTask
|
3
|
+
# Enables accessibility features when compiling the Flex application or SWC file. The default value is false.
|
4
|
+
def accessible=(boolean)
|
5
|
+
@accessible = boolean
|
6
|
+
end
|
7
|
+
|
8
|
+
# Sets the file encoding for ActionScript files. For more information see: http://livedocs.adobe.com/flex/2/docs/00001503.html#149244
|
9
|
+
def actionscript_file_encoding=(string)
|
10
|
+
@actionscript_file_encoding = string
|
11
|
+
end
|
12
|
+
|
13
|
+
# Checks if a source-path entry is a subdirectory of another source-path entry. It helps make the package names of MXML components unambiguous. This is an advanced option.
|
14
|
+
def allow_source_path_overlap=(boolean)
|
15
|
+
@allow_source_path_overlap = boolean
|
16
|
+
end
|
17
|
+
|
18
|
+
# Use the ActionScript 3.0 class-based object model for greater performance and better error reporting. In the class-based object model, most built-in functions are implemented as fixed methods of classes.
|
19
|
+
#
|
20
|
+
# The default value is true. If you set this value to false, you must set the es option to true.
|
21
|
+
#
|
22
|
+
# This is an advanced option.
|
23
|
+
def as3=(boolean)
|
24
|
+
@as3 = boolean
|
25
|
+
end
|
26
|
+
|
27
|
+
# Prints detailed compile times to the standard output. The default value is true.
|
28
|
+
def benchmark=(boolean)
|
29
|
+
@benchmark = boolean
|
30
|
+
end
|
31
|
+
|
32
|
+
# 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.
|
33
|
+
#
|
34
|
+
# For more information on using the {context.root} token, see http://livedocs.adobe.com/flex/2/docs/00001446.html#205687.
|
35
|
+
def context_root=(path)
|
36
|
+
@context_root = path
|
37
|
+
end
|
38
|
+
|
39
|
+
# 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).
|
40
|
+
def contributor=(string)
|
41
|
+
@contributor = string
|
42
|
+
end
|
43
|
+
|
44
|
+
# 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)
|
45
|
+
def creator=(string)
|
46
|
+
@creator = string
|
47
|
+
end
|
48
|
+
|
49
|
+
# 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)
|
50
|
+
def date=(string)
|
51
|
+
@date = string
|
52
|
+
end
|
53
|
+
|
54
|
+
# Generates a debug SWF file. This file includes line numbers and filenames of all the source files. When a run-time error occurs, the stacktrace shows these line numbers and filenames. This information is also used by the command-line debugger and the Flex Builder debugger. Enabling the debug option generates larger SWF files.
|
55
|
+
#
|
56
|
+
# For the mxmlc compiler, the default value is false. For the compc compiler, the default value is true.
|
57
|
+
#
|
58
|
+
# For SWC files generated with the compc compiler, set this value to true, unless the target SWC file is an RSL. In that case, set the debug option to false.
|
59
|
+
#
|
60
|
+
# For information about the command-line debugger, see Using the Command-Line Debugger (http://livedocs.adobe.com/flex/2/docs/00001540.html#181846).
|
61
|
+
#
|
62
|
+
# Flex also uses the verbose-stacktraces setting to determine whether line numbers are added to the stacktrace.
|
63
|
+
def debug=(boolean)
|
64
|
+
@debug = boolean
|
65
|
+
end
|
66
|
+
|
67
|
+
# Lets you engage in remote debugging sessions with the Flash IDE. This is an advanced option.
|
68
|
+
def debug_password=(string)
|
69
|
+
@debug_password = string
|
70
|
+
end
|
71
|
+
|
72
|
+
# Sets the application's background color. You use the 0x notation to set the color, as the following example shows:
|
73
|
+
#
|
74
|
+
# -default-background-color=0xCCCCFF
|
75
|
+
#
|
76
|
+
# 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).
|
77
|
+
#
|
78
|
+
# This is an advanced option.
|
79
|
+
def default_background_color=(string)
|
80
|
+
@default_background_color = string
|
81
|
+
end
|
82
|
+
|
83
|
+
# Sets the application's frame rate. The default value is 24. This is an advanced option.
|
84
|
+
def default_frame_rate=(number)
|
85
|
+
@default_frame_rate = number
|
86
|
+
end
|
87
|
+
|
88
|
+
# Defines the default application size, in pixels for example: default_size = '800 600'. This is an advanced option.
|
89
|
+
def default_size=(string)
|
90
|
+
@default_size = string
|
91
|
+
end
|
92
|
+
|
93
|
+
# 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.
|
94
|
+
#
|
95
|
+
# 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.
|
96
|
+
#
|
97
|
+
# This is an advanced option.
|
98
|
+
def default_css_url=(url)
|
99
|
+
@default_css_url = url
|
100
|
+
end
|
101
|
+
|
102
|
+
# 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).
|
103
|
+
def description=(string)
|
104
|
+
@description = string
|
105
|
+
end
|
106
|
+
|
107
|
+
# Outputs the compiler options in the flex-config.xml file to the target path; for example:
|
108
|
+
#
|
109
|
+
# mxmlc -dump-config myapp-config.xml
|
110
|
+
#
|
111
|
+
# This is an advanced option.
|
112
|
+
def dump_config=(file)
|
113
|
+
@dump_config = file
|
114
|
+
end
|
115
|
+
|
116
|
+
# Use the ECMAScript edition 3 prototype-based object model to allow dynamic overriding of prototype properties. In the prototype-based object model, built-in functions are implemented as dynamic properties of prototype objects.
|
117
|
+
#
|
118
|
+
# You can set the strict option to true when you use this model, but it might result in compiler errors for references to dynamic properties.
|
119
|
+
#
|
120
|
+
# The default value is false. If you set this option to true, you must set the es3 option to false.
|
121
|
+
#
|
122
|
+
# This is an advanced option.
|
123
|
+
def es=(boolean)
|
124
|
+
@es = boolean
|
125
|
+
end
|
126
|
+
|
127
|
+
# Sets a list of symbols to exclude from linking when compiling a SWF file.
|
128
|
+
#
|
129
|
+
# This option provides compile-time link checking for external references that are dynamically linked.
|
130
|
+
#
|
131
|
+
# For more information about dynamic linking, see About linking (http://livedocs.adobe.com/flex/2/docs/00001521.html#205852).
|
132
|
+
#
|
133
|
+
# This is an advanced option.
|
134
|
+
def externs=(symbols)
|
135
|
+
@externs = symbols
|
136
|
+
end
|
137
|
+
|
138
|
+
# 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.
|
139
|
+
#
|
140
|
+
# For more information about dynamic linking, see About linking (http://livedocs.adobe.com/flex/2/docs/00001521.html#205852).
|
141
|
+
#
|
142
|
+
# You can use the += operator to append the new SWC file to the list of external libraries.
|
143
|
+
#
|
144
|
+
# This parameter has been aliased as +el+.
|
145
|
+
def external_library_path=(files)
|
146
|
+
@external_library_path = files
|
147
|
+
end
|
148
|
+
|
149
|
+
# Specifies source files to compile. This is the default option for the mxmlc compiler.
|
150
|
+
def file_specs=(files)
|
151
|
+
@file_specs = files
|
152
|
+
end
|
153
|
+
|
154
|
+
# 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.
|
155
|
+
#
|
156
|
+
# This is an advanced option.
|
157
|
+
def fonts_languages_language_range=(string)
|
158
|
+
@fonts_languages_language_range = string
|
159
|
+
end
|
160
|
+
|
161
|
+
# 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).
|
162
|
+
#
|
163
|
+
# This is an advanced option.
|
164
|
+
def fonts_managers=(symbols)
|
165
|
+
@fonts_managers = symbols
|
166
|
+
end
|
167
|
+
|
168
|
+
# 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).
|
169
|
+
#
|
170
|
+
# This is an advanced option.
|
171
|
+
def fonts_max_cached_fonts=(number)
|
172
|
+
@fonts_max_cached_fonts = number
|
173
|
+
end
|
174
|
+
|
175
|
+
# 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).
|
176
|
+
#
|
177
|
+
# This is an advanced option.
|
178
|
+
def fonts_max_glyphs_per_face=(number)
|
179
|
+
@fonts_max_glyphs_per_face = number
|
180
|
+
end
|
181
|
+
|
182
|
+
# Specifies a SWF file frame label with a sequence of class names that are linked onto the frame.
|
183
|
+
#
|
184
|
+
# For example: frames_frame = 'someLabel MyProject OtherProject FoodProject'
|
185
|
+
#
|
186
|
+
# This is an advanced option.
|
187
|
+
def frames_frame=(string)
|
188
|
+
@frames_frame = string
|
189
|
+
end
|
190
|
+
|
191
|
+
# Toggles the generation of an IFlexBootstrap-derived loader class.
|
192
|
+
#
|
193
|
+
# This is an advanced option.
|
194
|
+
def generate_frame_loader=(boolean)
|
195
|
+
@generate_frame_loader = boolean
|
196
|
+
end
|
197
|
+
|
198
|
+
# Enables the headless implementation of the Flex compiler. This sets the following:
|
199
|
+
#
|
200
|
+
# System.setProperty('java.awt.headless', 'true')
|
201
|
+
#
|
202
|
+
# The headless setting (java.awt.headless=true) is required to use fonts and SVG on UNIX systems without X Windows.
|
203
|
+
#
|
204
|
+
# This is an advanced option.
|
205
|
+
def headless_server=(boolean)
|
206
|
+
@headless_server = boolean
|
207
|
+
end
|
208
|
+
|
209
|
+
# Links all classes inside a SWC file to the resulting application SWF file, regardless of whether or not they are used.
|
210
|
+
#
|
211
|
+
# Contrast this option with the library-path option that includes only those classes that are referenced at compile time.
|
212
|
+
#
|
213
|
+
# To link one or more classes whether or not they are used and not an entire SWC file, use the includes option.
|
214
|
+
#
|
215
|
+
# This option is commonly used to specify resource bundles.
|
216
|
+
def include_libraries=(files)
|
217
|
+
@include_libraries = files
|
218
|
+
end
|
219
|
+
|
220
|
+
# Links one or more classes to the resulting application SWF file, whether or not those classes are required at compile time.
|
221
|
+
#
|
222
|
+
# To link an entire SWC file rather than individual classes, use the include-libraries option.
|
223
|
+
def includes=(symbols)
|
224
|
+
@includes = symbols
|
225
|
+
end
|
226
|
+
|
227
|
+
# Enables incremental compilation. For more information, see About incremental compilation (http://livedocs.adobe.com/flex/2/docs/00001506.html#153980).
|
228
|
+
#
|
229
|
+
# 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.
|
230
|
+
def incremental=(boolean)
|
231
|
+
@incremental = boolean
|
232
|
+
end
|
233
|
+
|
234
|
+
# Determines whether to keep the generated ActionScript class files.
|
235
|
+
#
|
236
|
+
# The generated class files include stubs and classes that are generated by the compiler and used to build the SWF file.
|
237
|
+
#
|
238
|
+
# The default location of the files is the /generated subdirectory, which is directly below the target MXML file. If the /generated directory does not exist, the compiler creates one.
|
239
|
+
#
|
240
|
+
# The default names of the primary generated class files are filename-generated.as and filename-interface.as.
|
241
|
+
#
|
242
|
+
# The default value is false.
|
243
|
+
# This is an advanced option.
|
244
|
+
def keep_generated_actionscript=(boolean)
|
245
|
+
@keep_generated_actionscript = boolean
|
246
|
+
end
|
247
|
+
|
248
|
+
# 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).
|
249
|
+
def language=(string)
|
250
|
+
@language = string
|
251
|
+
end
|
252
|
+
|
253
|
+
# Enables ABC bytecode lazy initialization.
|
254
|
+
#
|
255
|
+
# The default value is false.
|
256
|
+
#
|
257
|
+
# This is an advanced option.
|
258
|
+
def lazy_init=(boolean)
|
259
|
+
@lazy_init = boolean
|
260
|
+
end
|
261
|
+
|
262
|
+
# Links SWC files to the resulting application SWF file. The compiler only links in those classes for the SWC file that are required.
|
263
|
+
#
|
264
|
+
# The default value of the library-path option includes all SWC files in the libs directory and the current locale. These are required.
|
265
|
+
#
|
266
|
+
# To point to individual classes or packages rather than entire SWC files, use the source-path option.
|
267
|
+
#
|
268
|
+
# If you set the value of the library-path as an option of the command-line compiler, you must also explicitly add the framework.swc and locale SWC files. Your new entry is not appended to the library-path but replaces it.
|
269
|
+
#
|
270
|
+
# You can use the += operator to append the new argument to the list of existing SWC files.
|
271
|
+
#
|
272
|
+
# In a configuration file, you can set the append attribute of the library-path tag to true to indicate that the values should be appended to the library path rather than replace it.
|
273
|
+
def library_path=(files)
|
274
|
+
@library_path = files
|
275
|
+
end
|
276
|
+
|
277
|
+
# Prints linking information to the specified output file. This file is an XML file that contains <def>, <pre>, and <ext> symbols showing linker dependencies in the final SWF file.
|
278
|
+
#
|
279
|
+
# The file format output by this command can be used to write a file for input to the load-externs option.
|
280
|
+
#
|
281
|
+
# For more information on the report, see Examining linker dependencies (http://livedocs.adobe.com/flex/2/docs/00001394.html#211202).
|
282
|
+
#
|
283
|
+
# This is an advanced option.
|
284
|
+
def link_report=(file)
|
285
|
+
@link_report = file
|
286
|
+
end
|
287
|
+
|
288
|
+
# Specifies the location of the configuration file that defines compiler options.
|
289
|
+
#
|
290
|
+
# If you specify a configuration file, you can override individual options by setting them on the command line.
|
291
|
+
#
|
292
|
+
# All relative paths in the configuration file are relative to the location of the configuration file itself.
|
293
|
+
#
|
294
|
+
# Use the += operator to chain this configuration file to other configuration files.
|
295
|
+
#
|
296
|
+
# 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).
|
297
|
+
def load_config=(file)
|
298
|
+
@load_config = file
|
299
|
+
end
|
300
|
+
|
301
|
+
# Specifies the location of an XML file that contains <def>, <pre>, and <ext> symbols to omit from linking when compiling a SWF file. The XML file uses the same syntax as the one produced by the link-report option. For more information on the report, see Examining linker dependencies (http://livedocs.adobe.com/flex/2/docs/00001394.html#211202).
|
302
|
+
#
|
303
|
+
# This option provides compile-time link checking for external components that are dynamically linked.
|
304
|
+
#
|
305
|
+
# For more information about dynamic linking, see About linking (http://livedocs.adobe.com/flex/2/docs/00001521.html#205852).
|
306
|
+
#
|
307
|
+
# This is an advanced option.
|
308
|
+
def load_externs=(file)
|
309
|
+
@load_externs = file
|
310
|
+
end
|
311
|
+
|
312
|
+
# Specifies the locale that should be packaged in the SWF file (for example, en_EN). You run the mxmlc compiler multiple times to create SWF files for more than one locale, with only the locale option changing.
|
313
|
+
#
|
314
|
+
# You must also include the parent directory of the individual locale directories, plus the token {locale}, in the source-path; for example:
|
315
|
+
#
|
316
|
+
# mxmlc -locale en_EN -source-path locale/{locale} -file-specs MainApp.mxml
|
317
|
+
#
|
318
|
+
# For more information, see Localizing Flex Applicationsin (http://livedocs.adobe.com/flex/2/docs/00000898.html#129288) Flex 2 Developer's Guide.
|
319
|
+
def locale=(string)
|
320
|
+
@locale = string
|
321
|
+
end
|
322
|
+
|
323
|
+
# 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).
|
324
|
+
def localized_description=(string)
|
325
|
+
@localized_description = string
|
326
|
+
end
|
327
|
+
|
328
|
+
# 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).
|
329
|
+
def localized_title=(string)
|
330
|
+
@localized_title = string
|
331
|
+
end
|
332
|
+
|
333
|
+
# 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.
|
334
|
+
#
|
335
|
+
# For more information about manifest files, see About manifest files (http://livedocs.adobe.com/flex/2/docs/00001519.html#134676).
|
336
|
+
def namespaces_namespace=(string)
|
337
|
+
@namespaces_namespace = string
|
338
|
+
end
|
339
|
+
|
340
|
+
# Enables the ActionScript optimizer. This optimizer reduces file size and increases performance by optimizing the SWF file's bytecode.
|
341
|
+
#
|
342
|
+
# The default value is false.
|
343
|
+
def optimize=(boolean)
|
344
|
+
@optimize = boolean
|
345
|
+
end
|
346
|
+
|
347
|
+
# Specifies the output path and filename for the resulting file. If you omit this option, the compiler saves the SWF file to the directory where the target file is located.
|
348
|
+
#
|
349
|
+
# The default SWF filename matches the target filename, but with a SWF file extension.
|
350
|
+
#
|
351
|
+
# If you use a relative path to define the filename, it is always relative to the current working directory, not the target MXML application root.
|
352
|
+
#
|
353
|
+
# The compiler creates extra directories based on the specified filename if those directories are not present.
|
354
|
+
#
|
355
|
+
# When using this option with the component compiler, the output is a SWC file rather than a SWF file.
|
356
|
+
def output=(file)
|
357
|
+
@output = file
|
358
|
+
end
|
359
|
+
|
360
|
+
# 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).
|
361
|
+
def publisher=(string)
|
362
|
+
@publisher = string
|
363
|
+
end
|
364
|
+
|
365
|
+
# 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.
|
366
|
+
#
|
367
|
+
# For more information, see Localizing Flex Applications (http://livedocs.adobe.com/flex/2/docs/00000898.html#129288) in Flex 2 Developer's Guide.
|
368
|
+
def resource_bundle_list=(file)
|
369
|
+
@resource_bundle_list = file
|
370
|
+
end
|
371
|
+
|
372
|
+
# Specifies a list of run-time shared libraries (RSLs) to use for this application. RSLs are dynamically-linked at run time.
|
373
|
+
#
|
374
|
+
# 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.
|
375
|
+
#
|
376
|
+
# For more information about RSLs, see Using Runtime Shared Libraries. (http://livedocs.adobe.com/flex/2/docs/00001520.html#168690)
|
377
|
+
def runtime_shared_libraries=(urls)
|
378
|
+
@runtime_shared_libraries = urls
|
379
|
+
end
|
380
|
+
|
381
|
+
# Specifies the location of the services-config.xml file. This file is used by Flex Data Services.
|
382
|
+
def services=(file)
|
383
|
+
@services = file
|
384
|
+
end
|
385
|
+
|
386
|
+
# Shows a warning when Flash Player cannot detect changes to a bound property.
|
387
|
+
#
|
388
|
+
# The default value is true.
|
389
|
+
#
|
390
|
+
# For more information about compiler warnings, see Using SWC files (http://livedocs.adobe.com/flex/2/docs/00001505.html#158337).
|
391
|
+
def show_binding_warnings=(boolean)
|
392
|
+
@show_binding_warnings = boolean
|
393
|
+
end
|
394
|
+
|
395
|
+
# Shows warnings for ActionScript classes.
|
396
|
+
#
|
397
|
+
# The default value is true.
|
398
|
+
#
|
399
|
+
# For more information about viewing warnings and errors, see Viewing warnings and errors (http://livedocs.adobe.com/flex/2/docs/00001517.html#182413).
|
400
|
+
def show_actionscript_warnings=(boolean)
|
401
|
+
@show_actionscript_warnings = boolean
|
402
|
+
end
|
403
|
+
|
404
|
+
# Shows deprecation warnings for Flex components. To see warnings for ActionScript classes, use the show-actionscript-warnings option.
|
405
|
+
#
|
406
|
+
# The default value is true.
|
407
|
+
#
|
408
|
+
# For more information about viewing warnings and errors, see Viewing warnings and errors.
|
409
|
+
def show_deprecation_warnings=(boolean)
|
410
|
+
@show_deprecation_warnings = boolean
|
411
|
+
end
|
412
|
+
|
413
|
+
# Adds directories or files to the source path. The Flex compiler searches directories in the source path for MXML or AS source files that are used in your Flex applications and includes those that are required at compile time.
|
414
|
+
#
|
415
|
+
# You can use wildcards to include all files and subdirectories of a directory.
|
416
|
+
#
|
417
|
+
# To link an entire library SWC file and not individual classes or directories, use the library-path option.
|
418
|
+
#
|
419
|
+
# The source path is also used as the search path for the component compiler's include-classes and include-resource-bundles options.
|
420
|
+
#
|
421
|
+
# You can also use the += operator to append the new argument to the list of existing source path entries.
|
422
|
+
def source_path=(paths)
|
423
|
+
@source_path = paths
|
424
|
+
end
|
425
|
+
|
426
|
+
# Prints undefined property and function calls; also performs compile-time type checking on assignments and options supplied to method calls.
|
427
|
+
#
|
428
|
+
# The default value is true.
|
429
|
+
#
|
430
|
+
# For more information about viewing warnings and errors, see Viewing warnings and errors (http://livedocs.adobe.com/flex/2/docs/00001517.html#182413).
|
431
|
+
def strict=(boolean)
|
432
|
+
@strict = boolean
|
433
|
+
end
|
434
|
+
|
435
|
+
# Specifies a list of theme files to use with this application. Theme files can be SWC files with CSS files inside them or CSS files.
|
436
|
+
#
|
437
|
+
# For information on compiling a SWC theme file, see Using Styles and Themes (http://livedocs.adobe.com/flex/2/docs/00000751.html#241755) in Flex 2 Developer's Guide.
|
438
|
+
def theme=(files)
|
439
|
+
@theme = files
|
440
|
+
end
|
441
|
+
|
442
|
+
# 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).
|
443
|
+
def title=(string)
|
444
|
+
@title = string
|
445
|
+
end
|
446
|
+
|
447
|
+
# Specifies that the current application uses network services.
|
448
|
+
#
|
449
|
+
# The default value is true.
|
450
|
+
#
|
451
|
+
# 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.
|
452
|
+
#
|
453
|
+
# For more information about the use-network property, see Applying Flex Security (http://livedocs.adobe.com/flex/2/docs/00001328.html#137544).
|
454
|
+
def use_network=(boolean)
|
455
|
+
@use_network = boolean
|
456
|
+
end
|
457
|
+
|
458
|
+
# Generates source code that includes line numbers. When a run-time error occurs, the stacktrace shows these line numbers.
|
459
|
+
#
|
460
|
+
# Enabling this option generates larger SWF files.
|
461
|
+
# The default value is false.
|
462
|
+
def verbose_stacktraces=(boolean)
|
463
|
+
@verbose_stacktraces = boolean
|
464
|
+
end
|
465
|
+
|
466
|
+
# Enables specified warnings. For more information, see Viewing warnings and errors (http://livedocs.adobe.com/flex/2/docs/00001517.html#182413).
|
467
|
+
def warn_warning_type=(boolean)
|
468
|
+
@warn_warning_type = boolean
|
469
|
+
end
|
470
|
+
|
471
|
+
# Enables all warnings. Set to false to disable all warnings. This option overrides the warn-warning_type options.
|
472
|
+
#
|
473
|
+
# The default value is true.
|
474
|
+
def warnings=(boolean)
|
475
|
+
@warnings = boolean
|
476
|
+
end
|
477
|
+
|
478
|
+
# Main source file to send compiler
|
479
|
+
def input=(file)
|
480
|
+
@input = file
|
481
|
+
end
|
482
|
+
|
483
|
+
def include_classes=(symbols)
|
484
|
+
@include_classes = symbols
|
485
|
+
end
|
486
|
+
|
487
|
+
def include_file=(file)
|
488
|
+
@include_file = file
|
489
|
+
end
|
490
|
+
|
491
|
+
def include_lookup_only=(boolean)
|
492
|
+
@include_lookup_only = boolean
|
493
|
+
end
|
494
|
+
|
495
|
+
def include_namespaces=(urls)
|
496
|
+
@include_namespaces = urls
|
497
|
+
end
|
498
|
+
|
499
|
+
def include_resource_bundles=(files)
|
500
|
+
@include_resource_bundles = files
|
501
|
+
end
|
502
|
+
|
503
|
+
def include_sources=(paths)
|
504
|
+
@include_sources = paths
|
505
|
+
end
|
506
|
+
|
507
|
+
end
|
508
|
+
end
|