Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL
Help

Chapter 8: Using the Flex Compilers > About configuration files - Pg. 130

134 CHAPTER 8 You pass all other options as you would when you open the command-line compilers. The following example sets the locale and source path when compiling MyApp: java -jar ../lib/mxmlc.jar +flexlib c:/flex_3_sdk/frameworks -locale en_US -source-path locale/{locale} c:/flex3/MyApp.mxml About configuration files Configuration files can be used by the command-line utilities and Flex Builder compilers. Flex includes a default configuration file named flex-config.xml. This configuration file contains most of the default compiler settings for the application and component compilers. You can customize this file or create your own custom configuration file. Flex SDK includes the flex-config.xml file in the flex_install_dir/frameworks directory. The Flex Builder compilers do not use a flex-config.xml file by default. The default settings are stored internally. You can, however, create a custom configuration file and pass it to the Flex Builder compilers by using the load- config option. Flex Builder includes a copy of the flex-config.xml file that you can use as a template for your custom configuration file. This file located in the flex_builder_install_dir/sdks/sdk_version/frameworks directory. You can generate a configuration file with the current settings by using the dump-config option, as the following example shows: mxmlc -dump-config myapp-config.xml Locating configuration files You can specify the location of a configuration file by using the load-config option. The target configuration file can be the default flex-config.xml file, or it can be a custom configuration file. The following example loads a custom configuration file: compc -load-config=myconfig.xml If you specify the filename with the += operator, your loaded configuration file is used in addition to and not instead of the flex-config.xml file: compc -load-config+=myconfig.xml With the mxmlc compiler, you can also use a local configuration file. A local configuration file does not require you to point to it on the command line. Rather, Flex examines the same directory as the target MXML file for a configuration file with the same name (one that matches the filename-config.xml filename). If it finds a file, it uses it in conjunction with the flex-config.xml file. You can also specify a configuration file by using the load-config option with the += operator.