Compiling an Apollo component or library with the acompc compiler
Back to: Apollo Documentation home page
Use the component compiler, acompc, to compile Apollo libraries and independent components. The component compiler behaves like the amxmlc compiler, with the following exceptions:
- You must specify which classes within the code base to include in the library or component.
- acompc does not look for a local configuration file automatically. To use a project configuration file, you must use the –load-config option.
acompc is identical to compc, except that it loads configuration options from the apollo_config.xml file instead of the flex_config.xml file.
Component Compiler Configuration File
You can use a compiler configuration file with the acompc compiler by specifying the path to a local config file with the -load-config option. By adding the path to the source files and specify the classes to include within the configuration file you avoid having to type them on the command line.
The following example illustrates a configuration for building a library with two classes, ParticleManager and Particle, both in the ActionScript package, com.adobe.samples.particles, and located in the source/com/adobe/samples/particles folder (relative to the working directory when the compiler is run).
<flex-config>
<compiler>
<source-path>
<path-element>source</path-element>
</source-path>
</compiler>
<include-classes>
<class>com.adobe.samples.particles.ParticleManager</class>
<class>com.adobe.samples.particles.Particle</class>
</include-classes>
</flex-config>
To enter the same command entirely on the command line, type:
compc -source-path source -include-classes com.adobe.samples.particles.Particle com.adobe.samples.particles.ParticleManager
(Type the entire command on one line, or use the line continuation character for your command shell.)
Examples
These examples assume you are using a configuration file.
Compile an Apollo component or library:
acompc -load-config myLib-config.xml -output lib/myLib.swc
Compile a runtime-shared library:
acompc -load-config myLib-config.xml -directory -output lib
(Note, the folder lib must exist and be empty before running the command.)
Reference a runtime-shared library:
acompc -load-config myLib-config.xml -output lib/myLib.swc
Back to: Apollo Documentation home page