用Ant创建ASDoc既方便又高效。
首先,在Eclipse的一个Project里,新建一个如下的asdoc.properties:([*]替换成你的实际内容)
#asdoc.properties
asdoc.exe =[asdoc.exe的地址]
src =[源码的地址]
main.title =[主标题]
window.title =[窗口标题]
output.dir =[输出的地址]
再新建一个如下的asdoc.xml:
<!-asdoc.xml---> <project name="ASDoc build" default="main"> <!-- 定义ASDoc的变量 --> <property file="asdoc.properties" /> <!-- main target:删除并编译Doc --> <target name="main" depends="clean, log, create-docs" /> <!-- 删除以前的Doc --> <target name="clean"> <delete dir="${output.dir}" /> <mkdir dir="${output.dir}" /> </target> <!-- 编译Doc --> <target name="create-docs"> <exec executable="${asdoc.exe}" failonerror="true"> <arg line="-doc-sources '${src}'" /> <arg line="-main-title '${main.title}'" /> <arg line="-window-title '${window.title}'" /> <arg line="-output '${output.dir}'" /> </exec> </target> <!-- 写历史(log)文件 --> <target name="log"> <record name="${output.dir}/asdoc-log.log" action="start" append="true" /> </target> </project>
最后在用Ant编译asdoc.xml。
出来了吗?
![[Google]](http://www.google.com/logos/Logo_25wht.gif)
![[Synchronous Space]](http://weihe924stephen.googlepages.com/syncspace-banner.jpg)
![[Creative Commons License]](http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png)
![[Add to Google]](http://buttons.googlesyndication.com/fusion/add.gif)
![[Aggregated by MXNA]](http://weblogs.macromedia.com/mxna/images/mxna88x31.gif)
![[Flex.org]](http://www.flex.org/images/flexorg.gif)
![Validate my Atom 1.0 feed [Valid Atom 1.0]](http://validator.w3.org/feed/images/valid-atom.png)
![Validate my RSS feed [Valid RSS]](http://resource.googlecode.com/files/valid-rss.png)
![[I heart FeedBurner]](http://www.feedburner.com/fb/images/pub/i_heart_fb.gif)
没有评论:
发表评论