Delphi7 Want编译配置文件编写
来源:互联网 发布:淘宝vr购物是什么意思 编辑:程序博客网 时间:2024/05/21 01:28
最近在学习TDD开发,一直用Delphi7开发程序(各位大侠不要笑话我),配合DUNIT开发(推荐用DUNITWizard插件,支持生成test程序在Console和GUI下运行),通过网上查找内容,发现这篇网页和PDF文档介绍的内容比较适用我,下载Want(下载0.3.3,最新2.02支持的脚本xml,是一种Script语言),WANT是像ant的构建工具,基本上语法与ant一致,但是增加了dcc,dunit几个与delphi有关的命令。自己研究下,编写了一个支持我项目中的配置文件build.xml。我的目录结构和上面网页的类似,不过约有调整。
Project
— |–src(应用程序源码)
|–test(测试程序源码)
|–scratch(中间文件)
|–dcu(生成的编译文件)
|–deploy(执行代码和构建文件build.xml)
|–doc(文档)
|–lib(开发库)
|–want
配置文件如下:
<project name="testcommonprj" basedir="." default="compile" > <property name="src.dir" value="${basedir}/src" /> <property name="test.dir" value="${basedir}/test" /> <property name="deploy.dir" value="${basedir}/deploy" /> <property name="dcu.dir" value="${basedir}/scratch/dcu" /> <property name="delphi" value="D:/Program Files/Borland/Delphi7" /> <property name="components" value="E:/Source/Delphi/Component"/> <property name="test.app" value="testcommonprjstructTests" /> <property name="main.app" value="testcommonprjstruct" /> <property name="mainexe.name" value="${deploy}/${main.app}.exe"/> <property name="maintestexe.name" value="${deploy}/${test.app}.exe"/> <patternset id="componentsdir"> <include name = "${components}/dunit_v9.2.0/src" /> </patternset> <patternset id="main.src"> <include name="${src.dir}/view" /> <include name="${src.dir}/common" /> </patternset> <patternset id="test.src" refid="main.src"> <include name="${test.dir}/**" /> </patternset> <target name="clean"> <echo message="delete dcu" /> <delete dir="${dcu.dir}" > <include name="**" /> </delete> <echo message="delete exe" /> <delete dir="${deploy.dir}"> <include name="*.exe" /> </delete> </target> <target name="prepare"> <mkdir dir="${dcu.dir}"></mkdir> <mkdir dir="${deploy.dir}"></mkdir> </target> <target name="compile" depends="clean,compiletest,compileapp"> </target> <target name="compileapp"> <echo message="build ${main.app}" /> <dcc basedir="${src.dir}" source="${main.app}.dpr"> <build value="True" /> <exeoutput path="${deploy.dir}" /> <dcuoutput path="${dcu.dir}" /> <warnings value="True" /> <map value="none" /> <console value="False" /> <unitPath refid="main.src" /> <resourcePath refid="main.src"/> </dcc> </target> <target name="compiletest"> <echo message="build ${test.app}" /> <dcc basedir="${test.dir}" source="${test.app}.dpr"> <build value="True" /> <exeoutput path="${deploy.dir}" /> <dcuoutput path="${dcu.dir}" /> <warnings value="True" /> <map value="none" /> <console value="True" /> <unitPath refid="test.src" /> <includepath refid="componentsdir" /> <resourcePath refid="test.src"/> </dcc> </target> <target name="runtest" depends="clean,compiletest"> <echo message="run test ${maintestexe.name}" /> <exec executable="${maintestexe.name}"/> </target> <target name="runmain" depends="clean,compileapp"> <echo message="run test ${mainexe.name}" /> <exec executable="${mainexe.name}"/> </target> </project>
- Delphi7 Want编译配置文件编写
- 编译WAnt
- QQ尾巴的源代码(Delphi7编写)
- 用delphi7编写windows服务程序总结
- delphi7莫名奇妙编译出现的问题
- 如何用Delphi7编写WinXP界面的程序
- 编写一个单独的Web Service for Delphi7(步骤)
- 编写一个单独的Web Service for Delphi7(步骤)
- delphi编写与调用DLL(delphi7下测试通过)
- 编写自己的配置文件
- ant配置文件的编写
- 编写smarty配置文件
- mybatis配置文件编写
- springMVC配置文件的编写
- ant配置文件的编写
- Spring配置文件编写
- Spring MVC配置文件编写
- 编写Hibernate配置文件
- 排序3
- 视图中实现树形目录结构
- CEGUI界面编程的一点心得
- Platform Builder实践之配置文件(by fllsoft)
- Gridview中的内容导出到Excel
- Delphi7 Want编译配置文件编写
- c++笔试题汇总【2】
- Linux系统下的多线程编程入门
- 用递归实现排列组合
- 排序4
- 创建和使用分区的表
- Windows CE5.0 BSP移植(转)
- Struts2入门-类型转换补充
- MP4被偷了