views:

371

answers:

0

We are having an issue with embedded images when using the compc command-line compiler to generate an .swc for a bunch of library classes. Our directory structure is like this:

(some directory structure)/flexprojects/MyLib/src/ (flex packages and classes here) (some other directory structure)/myapp.war/image/ (image files here)

When we use Flex Builder to build the .swc file, it is able to reference them properly because a link is set to the second directory, but with the command-line version it's no go - the compiler cannot find the images. Setting the source-path does not seem to have any effect.

I tried as an experiment to copy the entire image/ directory into the MyLib/src directory and compiling, and it worked. It looks like there should be some compc option or argument that would allow me to let compc know about the location of the image files, but the closest I could find was include-file which is too limiting (I would have to include over 300 image files, and if a new file is added we would have to manually update the list of images).

Is there a way to duplicate the link setting of Flex Builder for the command-line compilers? Note that we are using Ant for the build process, and it needs to be useable from both Windows and linux environments.