There is a couple of steps required to get this working.

Firstly you need to build up the list of files in the directory (plus
subdirectories), and then feed this into the compc task.

This is from one of our build files, I hope you're using ant!

 

<!--Gets the class names of files -->

<pathconvert property="project.src.dir.path" pathsep=" "
refid="project.src.dir.fileset">

      <compositemapper>

            <chainedmapper>

                  <globmapper from="${project.src.dir}/*" to="*"
handledirsep="true" />

                  <mapper type="package" from="*.as" to="*" />

            </chainedmapper>

            <chainedmapper>

                  <globmapper from="${project.src.dir}/*" to="*"
handledirsep="true" />

                  <mapper type="package" from="*.mxml" to="*" />

            </chainedmapper>

      </compositemapper>

</pathconvert> 

 

<!--Feed this class list into the compc task -->

<compc link-report="${build.dir}/${ant.project.name}.link-report"
debug="${flex.compiler.debug.mode}" output="${build.rsl.dir}"
include-classes="${project.src.dir.path}" directory="true">

      <runtime-shared-libraries url="rsl/foo/cairngorm/library.swf" />

      <runtime-shared-libraries url="rsl/foo/vo/library.swf" />

      <external-library-path dir="${parentproject.build.swc.dir}"
append="true">

            <include name="cairngorm.swc" />

            <include name="vo.swc" />

      </external-library-path>

      <source-path path-element="${project.src.dir}" />

</compc>

 

 

It isn't well documented, but this is incredibly useful!

 

Gk.

 

 

 

Can someone point me to a good example of compc command line usage?

I saw a few but the examples always require a manifest file that list
out the files included in the SWC. Is it possible to do it without a
manifest file, i.e. I just point to the folder where the classes are?

In the middle of development, I expect to be adding classes to the SWC
regularly so I don't want to keep updating a manifest file every time.



 

Gregor Kiddie
Senior Developer
INPS

Tel:       01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
<blocked::http://www.inps.co.uk/> 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact [EMAIL PROTECTED]

________________________________

Reply via email to