Created
May 6, 2011 10:02
-
-
Save zrong/958715 to your computer and use it in GitHub Desktop.
使用Fcsh Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 设置FLEX SDK的路径 | |
FLEX_HOME=D:/flex_sdks/4.1.0 | |
# 设置源文件路径 | |
# {$basedir} 就是本文件所在的目录 | |
SRC_DIR =${basedir}/src | |
# libs目录,一般用来放swc文件 | |
LIBS_DIR =${basedir}/libs | |
# 这个就是Flash Builder建立的bin-debug | |
DEPLOY_DIR = ${basedir}/bin-debug | |
#自定义的几个类库源码 | |
LIBS_DUDU = e:/works/duduw_as3lib/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project name="runtest" default="build"> | |
<property file="build.properties" /> | |
<!-- 取环境变量 --> | |
<property environment="env"/> | |
<!-- 设定一个默认的主文件,默认编译的是RunTest.as。 | |
若需要编译其他文件,可以调用ant -Dmain=Other,不需要扩展名 --> | |
<property name="main" value="RunTest" /> | |
<!-- fcsh的编译地址 --> | |
<taskdef name="fcsh" classname="fcsh" classpath="${env.FCSHServer}/fcsh.jar" /> | |
<target name="build" depends="init,compile,fdb" /> | |
<!-- 清理目录,复制没有嵌入的文件 --> | |
<target name="init"> | |
<delete dir="${DEPLOY_DIR}/test_${main}.swf" /> | |
<delete dir="${DEPLOY_DIR}/assets" /> | |
<mkdir dir="${DEPLOY_DIR}/assets" /> | |
<copy todir="${DEPLOY_DIR}/assets"> | |
<fileset dir="${SRC_DIR}/assets" excludes="**/source/" /> | |
</copy> | |
</target> | |
<!-- 编译 --> | |
<target name="compile"> | |
<fcsh consoleencoding="UTF8"> | |
<arg value="mxmlc ${SRC_DIR}/${main}.as"/> | |
<arg value="-output=${DEPLOY_DIR}/test_${main}.swf"/> | |
<!-- 这个参数其实可要可不要,因为编译的时候,默认会调用这个xml文件。--> | |
<arg value="-load-config=${FLEX_HOME}/frameworks/flex-config.xml"/> | |
<arg value="-source-path=${LIBS_DUDU}" /> | |
<arg value="-debug=true" /> | |
<arg value="-static-link-runtime-shared-libraries=true"/> | |
</fcsh> | |
</target> | |
<!-- 打开调试器进行调试 --> | |
<target name="fdb"> | |
<exec executable="cmd" spawn="true" osfamily="windows"> | |
<arg line="/K start fdb ${DEPLOY_DIR}/test_${main}.swf" /> | |
</exec> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment