最近在学习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
配置文件如下:
-
<projectname="testcommonprj"basedir="."default="compile">
-
<propertyname="src.dir"value="${basedir}/src"/>
-
<propertyname="test.dir"value="${basedir}/test"/>
-
<propertyname="deploy.dir"value="${basedir}/deploy"/>
-
<propertyname="dcu.dir"value="${basedir}/scratch/dcu"/>
-
<propertyname="delphi"value="D:/ProgramFiles/Borland/Delphi7"/>
-
<propertyname="components"value="E:/Source/Delphi/Component"/>
-
<propertyname="test.app"value="testcommonprjstructTests"/>
-
<propertyname="main.app"value="testcommonprjstruct"/>
-
<propertyname="mainexe.name"value="${deploy}/${main.app}.exe"/>
-
<propertyname="maintestexe.name"value="${deploy}/${test.app}.exe"/>
-
<patternsetid="componentsdir">
-
<includename="${components}/dunit_v9.2.0/src"/>
- </patternset>
-
<patternsetid="main.src">
-
<includename="${src.dir}/view"/>
-
<includename="${src.dir}/common"/>
- </patternset>
-
<patternsetid="test.src"refid="main.src">
-
<includename="${test.dir}/**"/>
- </patternset>
-
<targetname="clean">
-
<echomessage="deletedcu"/>
-
<deletedir="${dcu.dir}">
-
<includename="**"/>
- </delete>
-
<echomessage="deleteexe"/>
-
<deletedir="${deploy.dir}">
-
<includename="*.exe"/>
- </delete>
- </target>
-
<targetname="prepare">
-
<mkdirdir="${dcu.dir}"></mkdir>
-
<mkdirdir="${deploy.dir}"></mkdir>
- </target>
-
<targetname="compile"depends="clean,compiletest,compileapp">
- </target>
-
<targetname="compileapp">
-
<echomessage="build${main.app}"/>
-
<dccbasedir="${src.dir}"source="${main.app}.dpr">
-
<buildvalue="True"/>
-
<exeoutputpath="${deploy.dir}"/>
-
<dcuoutputpath="${dcu.dir}"/>
-
<warningsvalue="True"/>
-
<mapvalue="none"/>
-
<consolevalue="False"/>
-
<unitPathrefid="main.src"/>
-
<resourcePathrefid="main.src"/>
- </dcc>
- </target>
-
<targetname="compiletest">
-
<echomessage="build${test.app}"/>
-
<dccbasedir="${test.dir}"source="${test.app}.dpr">
-
<buildvalue="True"/>
-
<exeoutputpath="${deploy.dir}"/>
-
<dcuoutputpath="${dcu.dir}"/>
-
<warningsvalue="True"/>
-
<mapvalue="none"/>
-
<consolevalue="True"/>
-
<unitPathrefid="test.src"/>
-
<includepathrefid="componentsdir"/>
-
<resourcePathrefid="test.src"/>
- </dcc>
- </target>
-
<targetname="runtest"depends="clean,compiletest">
-
<echomessage="runtest${maintestexe.name}"/>
-
<execexecutable="${maintestexe.name}"/>
- </target>
-
<targetname="runmain"depends="clean,compileapp">
-
<echomessage="runtest${mainexe.name}"/>
-
<execexecutable="${mainexe.name}"/>
- </target>
- </project>
分享到:
相关推荐
delphi7编译大程序时会出现编译死机的情况,用xe的dll 替换delphi7的bin目录下的dll 文件即可解决,亲测有效
Delphi dcu文件 反编译工具 Decompile dcu file to pas support Delphi2~Delphi7
在dephi比软高级的版本里写的程序,拿到dephi7下面编译,总是会出错,直接把delphi2006下的bolndmm.dll与rlink32.dll拷贝至delphi7下的bin目录中 直接把delphi2010下的bolndmm.dll与rlink32.dll拷贝至delphi7下的bin...
delphi反编译,很好用,对于加壳的需要自己脱壳,才能反编译,反编译后是汇编代码.
Delphi Decompiler v1.1.211b Delphi反编译工具 三、 DeDe 3.5原版 反Delphi、 C++ bulid。(DeDe3.2004源码下载) DeDe3.50.04 Fix加强版 DEDE 3.50.4的修改版(超强版:P) by DarkNess0ut 01.修改了Title和...
Delphi写的EXE反编译工具,软件名称:反编译 WebCompiler,含有完整源码,本次版本修正了一处 bug, 修正了文件压缩与否的判别方式, 也稍稍增强了用户界面. 前段时间在做一个文档时需要得到一个 WebCompiler 生成...
NULL 博文链接:https://lvbuwei.iteye.com/blog/727198
功能:解决Delphi7编辑较大工程出现内存错误的问题 使用说明:将两个dll文件替换Delphi7\Bin 下的同名文件。 不过最好将原来的文件做好备份
本源码演示在Delphi中使用xml配置...源码在Delphi7环境下可直接编译运行,运行效果图如截图所示,以一个设置线程参数的功能,将配置参数写入XML文件中,在Delphi程序运行时,将自动加载这个XML文件,并读取配置参数。
使用的环境是delphi 2007 使用方法见文章http://blog.csdn.net/sushengmiyan/article/details/10309117 使用的时候编译产生了乱码,原因是delphi2007安装目录下的这几个dll是旧的,我找了D7的这几个文件,然后编译,...
delphi反编译工具 IDR (Interactive Delphi Reconstructor)
delphi反编译文件(带可执行程序DEDE)
Delphi Decompiler can analyze executables compiled with Delphi 2 to 7 giving you; all DFM files of the target, commented ASM code with references to strings, imported function calls, classes methods ...
The current version of the program can process files (GUI and console applications), compiled by Delphi compilers of versions Delphi2 – Delphi XE3. Final project goal is development of the program ...
该工具主要用来反编译DELPHI的DLL、OCX控件源码
防止delphi被人反编译 加壳后发布-delphi软件保护器 辛苦做的delphi软件被人解密了,是多么可惜的事情 有了这个软件,可以防范这些,充分保护你的软件 非常好的一个保护工具
本人收集到了最好用的delphi反编译工具,很人性化。
delphi反编译工具 dede3.99,可提取源代码 支持win7 win8 win10 32-64位系统
delphi exe/dcu/bpl反编译 exe/bpl 支持到xe5 dcu支持到xe2
用于控制窗体内的可视控件显示 Delphi7编写,学习控件编写可以参考