Set up instructions for Flex SDK users
Back to: Apollo Documentation home page
Most of the command-line tools you use to create Apollo applications are the same tools used to build Flex 2 applications. The Flex tools and their command-line options are fully described in the Building and Deploying Flex 2 Applications book in the Flex 2 documentation library. The Flex tools are only described here at a basic level to help you get started and to point out any differences or extra steps required when building an Apollo application. For examples in using the tools for Apollo, see Creating an Apollo application using the command line tools.
The Apollo command-line tools require Java to be installed your machine. You can use the Java virtual machine from either the JRE or the JDK (version 1.4.2 or newer). This is installed on Mac OS X, and it is installed with Flex Builder 2.0. The Java JRE is available at http://java.sun.com/j2se/1.4.2/download.html. The Java JDK is available at http://java.sun.com/javase/downloads/index.jsp.
If you add Xerces.jar to your class path, the ADT application can fully validate the schema of an application descriptor (application.xml) file that you are including in an AIR file. Xerces is included with JDK version 1.5 or later. Xerces is available at http://xerces.apache.org/xerces-j/.
Note: Java is not required for end users to run Apollo applications in the Apollo runtime.
| Contents |
|---|
Installing and configuring the Apollo SDK
The Apollo SDK provides you with Apollo API and command line tools that you use to package your Apollo applications as AIR files. The Apollo SDK is used in conjunction with the Flex SDK, which provides the compiling and debugging command line tools.
To use the Flex 2.0.1 SDK in Windows:
- If you haven't already done so, download the Flex 2.0.1 SDK, which is available here: http://www.adobe.com/devnet/flex/?tab:downloads=1 Install and configure the SDK as instructed.
- Download the Apollo SDK installation file (apollo_sdk_alpha1.zip) from Adobe Labs (http://www.adobe.com/go/getapollo).
- The Apollo SDK is distributed as a standard file archive. To install Apollo, extract the contents of the SDK into the Flex 2 SDK folder on your file system, overlaying the contents on top of the existing files.
- When prompted whether or not to replace the Version.as and mxmlc.jar files, respond Yes.
To use the Flex 2.0.1 SDK on the Mac:
- If you haven't already done so, download the Flex 2.0.1 SDK, which is available here: http://www.adobe.com/devnet/flex/?tab:downloads=1
- Download the Apollo SDK installation file (apollo_sdk_alpha1.zip) from Adobe Labs (http://www.adobe.com/go/getapollo) into the same folder where you downloaded the Flex 2.0.1 SDK.
- In the Terminal window, navigate to where you downloaded the Flex SDK and apollo_sdk_alpha1.zip file.
- Type the following command in the Terminal, %unzip flex_sdk_2.zip.
- Next type in the following command, %unzip apollo_sdk_alpha1.zip.
- When prompted to replace the Version.as file, type Y for yes.
- When prompted to replace the mxmlc.jar file, type Y for yes.
- Go to the runtime folder that was unzipped in step 5, double click Adobe Apollo.dmg. Then copy the contents (Adobe Apollo.framework folder) into the runtime folder.
- Add the path to the bin folder to your PATH environment variable.
Now you can compile using amxmlc on the command line.
Compiler setup
There are two compilers included with the Flex SDK. The mxmlc compiler creates SWF files out of MXML and ActionScript code. The compc compiler creates SWC files for components and libraries. Both compilers can be run from the command line as either native or Java programs. (The native executables call the Java programs.) If you plan to use the native versions, you may wish to add the Flex 2 SDK\bin directory to your system path. If you plan to use the Java versions directly, you may wish to add mxmlc.jar and compc.jar to your environment variable. See Adding the Apollo tools to your class path.
Compiler configuration files
You typically specify compilation options both on the command line and through one or more configuration files. The global Flex SDK configuration file contains default values that are used whenever the compilers are run. You can edit this file to suit your own development environment. The global configuration file, apollo_config.xml, is located in the frameworks directory of your Apollo SDK installation.
Note: The apollo_config.xml is used instead of flex_config.xml when the amxmlc command is used to invoke the compiler.
The default configuration values are suitable for discovering how Flex and Apollo work, but you should examine the available options more closely when you embark on a full-scale project. You can supply project-specific values for the compiler options in a local configuration file that will take precedence over the global values for a given project. Refer to the About configuration files in the Flex 2 documentation library for a full list of the compilation options and for the syntax of the configuration files.
Note: There are no compilation options used specifically for Apollo applications, but you will need to reference the Apollo libraries when compiling an Apollo application. Typically, these libraries will be referenced in a project-level configuration file, in a tool for a build tool such as Ant, or directly on the command line. See Creating an Apollo application using the command line tools for information on compiling Apollo applications, components, and libraries.
Debugger setup
The Apollo runtime supports debugging directly, so you do not need a debug version of the runtime (as you would with the Flash player). To conduct command-line debugging you use the Flash Debugger and, optionally, the Apollo Debug Launcher. The only setup required is to set your path or environment variables so that you can conveniently launch these programs. See Adding the Apollo tools to your class path.
The Flash Debugger is distributed in the Flex 2 SDK directory. The native versions, for example fdb.exe on Windows, can be found in the bin subdirectory. The Java version can be found in the lib subdirectory. The Apollo Debug Launcher, adl.exe or ADL, is in the bin directory of your Apollo SDK installation (there is no separate Java version).
Note that you cannot start an Apollo application directly with FDB, since FDB will attempt to launch it with the Flash player. Instead, you must let the Apollo application connect to a running FDB session. See Debugging using the Apollo Debug Launcher for more information.
Application packager setup
The Apollo Developer Tool (ADT), which packages your application into an installable AIR file, is a Java program. To run ADT, Java must be installed and your system path set so that you can run Java from the command line.
The SDK includes a script file for executing ADT. To run the ADT script from the command-line, add the bin directory of the Apollo SDK to your system path.
You can also run ADT as a java program, which may be convenient when using build tools such as Apache Ant. In this case, you may wish to add the adt.jar file to your system path or environment variable. See Adding the Apollo tools to your class path.
For more information about using the ADT, see Packaging an Apollo application using the Apollo Developer Tool (ADT).
Disabling mms.cfg settings
Finally, if you have modified the mms.cfg file (a security settings file used by Flash Player), please remove it while testing Apollo. In the M2 release of Apollo, some of the settings in this configuration file may restrict Apollo functionality.
- On Mac OS, the file is located at /Library/Application Support/Macromedia/mms.cfg.
- On Microsoft Windows, the file is located in the Macromedia Flash Player folder within the system directory (for example, C:\winnt\system32\macromed\flash\mms.cfg on a default Windows XP installation).
Back to: Apollo Documentation home page