Flex 4 + Apache Ant, Cannot Load FlashPunk Libraries
Posted
by
SquareCrow
on Game Development
See other posts from Game Development
or by SquareCrow
Published on 2011-06-26T15:34:54Z
Indexed on
2011/06/26
16:31 UTC
Read the original article
Hit count: 504
I have been searching google, Apache Docs*, and FlashPunk forums looking for an answer to this: I cannot get Ant/Flex to find and compile the FlashPunk libraries.
Here is my build.xml.
[code]
<!-- Fetch the JAR full of Flex tasks if it is not already in the source directory -->
<copy file="${FLEX_HOME}/ant/lib/flexTasks.jar" todir="${SOURCE_PATH}"/>
<!-- Add flextasks to the project -->
<taskdef resource="flexTasks.tasks" classpath="${SOURCE_PATH}/flexTasks.jar"></taskdef>
<!-- Release build Flash Player 10.1 -->
<target name="build">
<!-- Build the FlashPunk library -->
<echo message="building swc..." />
<compc output="FlashPunk.swc" keep-generated-actionscript="false"
incremental="false" optimize="false" debug="true" use-network="false">
<include-sources dir="${FLASHPUNK_PATH}/net"
includes="**/* flashpunk/utils/* flashpunk/masks/*"
excludes="**/*.TTF **/*.png"/>
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
</compc>
<echo message="building swf..." />
<mxmlc
file="${SOURCE_PATH}/epOne.as"
output="${OUTPUT_PATH}/epOne.swf"
debug="false"
incremental="false"
strict="true"
accessible="false"
link-report="link_report.xml"
static-link-runtime-shared-libraries="true">
<optimize>true</optimize>
</mxmlc>
</target>
[/code]
Results in many errors of the type "Definition net.flashpunk.masks:Grid could not be found" even though when I open the directories I can see the *.AS files right there.
Sorry if this is very basic. I am piecing together knowledge of Ant from docs and tutorials.
*I decided to use Ant because neither FlashDevelop for Windows nor Eclipse for Linux seemto work for me.
© Game Development or respective owner