Specifications
201ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
The options on the command line can also be represented by settings in the flex-config.xml file, as the following
example shows:
<?xml version="1.0">
<flex-config>
<compiler>
<source-path>
<path-element>../mycomponents/components/local</path-element>
</source-path>
</compiler>
<output>../libraries/CustomCellRenderer</output>
<directory>true</directory>
<debug>false</false>
<include-classes>
<class>CustomCellRendererComponent</class>
</include-classes>
</flex-config>
All classes and components must be statically linked into the resulting library. When you use the compc compiler
to create the library, do not use the
include-file option to add files to the library, because this option does not
statically link files into the library.
Optimizing libraries
Optimizing libraries means to remove debugging and other code from the library prior to deployment. For
normal libraries that you are not using as RSLs, you do not need to optimize. This is because you will likely want
to debug against the library during development, so you will need the debug code inside the library. And, when
you compile the release version of your Flex application, the compiler will exclude debug information as it links
the classes from the library.
When you compile a library for production use as an RSL, however, you can set the
debug compiler option to
false. The default value is true for compc, which means that the compiler, by default, includes extra information
in the SWC file to make it debuggable. You should avoid creating a debuggable library that you intend to use in
production so that the RSLās files are as small as possible. If you set the value of the
debug option to false,
however, you will not be able to debug against the RSL for testing.
If you do include debugging information, you can still optimize the RSL after compiling it, which removes the
debugging information as well as unnecessary metadata. For more information, see āOptimizing RSL SWF filesā
on page 212.
Before you deploy an RSL, you extract the SWF file that is inside the library SWC file and optimize it. The default
name of this SWF file is library.swf. After you extract it from the SWC file, you can rename it to anything you want.
When you deploy the RSL, you deploy the SWF file so that the application can load it at run time.










