Flex AsDoc 文档API生成工具(方法2)

前面写过一篇,大家来看第二种方法:

在工程中建三个文件,内容分别如下:

1、asdoc.cmd

ant -buildfile asdoc.xml

2、asdoc.properties

# compc.exe的位置 compc.exe = C:/Program Files/Adobe/Flex Builder 3/sdks/3.2.0/bin/asdoc.exe FLEX_HOME = C:/Program Files/Adobe/Flex Builder 3/sdks/3.2.0 # 源文件的位置 src = ./src # 输出的位置 output.dir = ../ # 输出的文件名 output.folder = FlexDoc source-path = . player10-library-path = D:/work/flexWorkFolder/player10 external-library-path = D:/work/flexWorkFolder/FXFDG/libs main.title = HTFlexLib API window.title = FX 类库 (HTFlexLib) API 参考文档 footer = HT © 版权所有 作者 : 陈景远

3、asdoc.xml

<?xml version="1.0" encoding="utf-8"?> <project name="Compc build" default="main"> <!-- defines all values for the Compc compiler --> <property file="asdoc.properties" /> <!-- main target: cleans and compiles ASDocs --> <target name="main" depends="clean, log, compc" /> <!-- deletes and recreates the compc directory --> <target name="clean"> <delete dir="${output.dir}/${output.folder}" failοnerrοr="true"/> <delete file="${output.dir}/compc-log.log" failοnerrοr="true"/> <mkdir dir="${output.dir}/${output.folder}"/> </target> <!-- runs the compc.exe compiler on the source --> <target name="compc"> <exec executable="${compc.exe}" failοnerrοr="true"> <!--arg line="-include-sources '${src}'" /> <arg line="-output '${output.dir}/${output.folder}'" /> <arg line="-external-library-path '${external-library-path}'" /--> <arg line="-source-path '${src}'"/> <arg line="-doc-sources '${src}'"/> <arg line="-main-title '${main.title}'"/> <arg line="-window-title '${window.title}'"/> <arg line="-footer '${footer}'"/> <arg line="-output '${output.dir}/${output.folder}'"/> <arg line="-library-path '${FLEX_HOME}/frameworks/libs'"/> <arg line="-library-path '${player10-library-path}'"/> <arg line="-library-path '${external-library-path}'"/> </exec> </target> <!-- writes compc output to log file: compc-log.log --> <target name="log"> <record name="${output.dir}/compc-log.log" action="start" append="true" /> </target> </project>

最后需要下一个“apache-ant-1.7.1”,

并且在操作系统的环境变量中添加ANT_HOME = D:/apache-ant-1.7.1

在操作系统的环境变量PATH中添加;%ANT_HOME%/bin;

注:注意输入输出路径要配置正确,SDK的路径要配置正确,ANT的路径、环境变量要配置正确,flash player版本要配置正确

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值