You configure the web-tier compiler primarily with the following configuration files:
This file uses the following syntax:
option_name=value
For example:
template=default.html
You can add a comment to this file by using the pound (#) sign at the beginning of the line that you want to comment out.
If you make changes to this file, you must restart your web server for the changes to take effect. For more information on editing the default web-tier compiler's wrapper, see Customizing the template.
For more information about the flex-config.xml file, see Using the Flex Compilers.
If a configuration file exists in the same folder as the MXML file, with a name that matches the app_name-config.xml format, the web-tier compiler uses that configuration file. This configuration file has the same precedence as a local configuration file, as described in About configuration files.
You cannot instruct the web-tier compiler to compile files that have extensions other than *.mxml or *.mxml.swf. Therefore, although you can change the file extension that triggers the compiler (for example, by adding an additional AddHandler entry in your Apache httpd.conf file), anything that is passed to the web-tier compiler other than a *.mxml or *.mxml.swf file generates a compiler error.
The following table describes the options that you can set in the compiler.conf file:
|
Option |
Description |
|---|---|
| flex_config |
The location of the flex-config.xml file that is used by the web-tier compiler. This file contains all available compiler settings, and the compiler relies on it for default settings. If you installed the web-tier compiler with the Flex framework, the default value on Windows is C:\Program Files\FlexModule\frameworks\flex-config.xml. On MacOS, it is /Applications/FlexModule/frameworks. On Linux, it is /user_home/FlexModule/frameworks. Otherwise, the default value is the location of your framework's flex-config.xml file. For more information on the flex-config.xml file, see Using the Flex Compilers |
| cache_folder |
The location of a cache file used by the MXML compiler. This is used for incremental compilation. On Windows XP, the default value is C:\Documents and Settings\username\Local Settings\Temp\. On Windows Vista, it is /Users/user_name/Local Settings/temp. On Linux and MacOS, it is /tmp. |
| flex_lib |
The location of the frameworks directory that contains SWC files used by the compiler. If you installed the web-tier compiler with the Flex framework, the default value on Windows XP is C:\Program Files\FlexModule\frameworks. |
| height |
The height of the application. The value can be either a number (the number of pixels) or a percentage value. The default value is 100%, which the browser interprets as 100% of the available space. If the height property is explicitly set on the <mx:Application> tag in the source MXML file, then the value in the compiler.conf file is ignored. If this value is not set in the MXML file or in the compiler.conf file, Adobe® Flash® Player makes a best guess to determine the height of the application. |
| width |
The width of the application. The value can be either a number (the number of pixels) or a percentage value. The default value is 100%, which the browser interprets as 100% of the available space. If the width property is explicitly set on the <mx:Application> tag in the source MXML file, then the value in the compiler.conf file is ignored. If this value is not set in the MXML file or in the compiler.conf file, Adobe Flash Player makes a best guess to determine the width of the application. |
| template |
The name of the HTML template that is used to embed the compiled SWF file. This file is returned by the web server when the web-tier compiler is invoked. The Flex module replaces tokens (indicated by the ${token} syntax) before the web server can return the file. At a minimum, this file must contain the ${swf} token. The default value is default.html. The file must be in the module_install_dir/templates directory. You can view a generated template by requesting an MXML file from the web-tier compiler. Then, in your browser, select View Source. The source for the page is the generated HTML wrapper. If you make changes to this file, you do not have to restart the server or recompile your Flex application for the changes to take effect. For more information on customizing the HTML template, see Customizing the template. |
| lines_in_context |
The number of lines above and below the source of an error or warning that are shown in the browser when the compiler returns an error warning. For example, if you set the value of this property to 10, when you request an MXML file with an error in it, the browser displays the 10 lines of code in the MXML file before and the 10 lines after the source line of the error. You set this value when you run the Flex module installer. The default value is 1. |
The following is an example of a compiler.conf file:
flex_config=C:\Program Files\FlexModule\frameworks\flex-config.xml flex_lib=C:\Program Files\FlexModule\frameworks cache_folder=C:\Documents and Settings\knizia\Local Settings\Temp\ width=100% height=100% template=default.html # increase number of lines to 10: lines_in_context=10