昨天配置WANT配置了半天

本文介绍了一种使用Delphi进行自动化构建的过程,并实现了版本控制功能。通过配置特定的目标和任务,例如编译源代码、处理资源文件、清理输出目录及更新版本信息等,简化了开发流程并提高了效率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

配置文件配置了半天才弄明白  :(  读代码是件比较累的活。。。有的时候享受,有的时候 诶。。。。

以下是配置文件 没有加打包功能 只加了一个版本控制功能和编译和清除功能


<project name = "compilecode" basedir = "." default = "buildbin" >

  <property name="want.master" value="%{want_master}" />

  <property name="old.version"    value="?{release.ini:releases:current}" />
  <regexp   property="old.build"  text="${old.version}" pattern="^.*/.*/.([0-9]+)$" subst ="/1" />
 
  <property name="build" value="={1 + ${old.build}}" />
 
  <regexp property="version" text="${old.version}" pattern="/.[0-9]*$" subst=".${build}" />
  <regexp property="comma.version" pattern="/." subst="," text="${version}" />

 
  <tstamp>
    <format property="when"      pattern="yyyy,mm,dd,HH,nn,ss" />
    <format property="date.tag"  pattern="yyyy-mm-dd" />
  </tstamp>
 
  <property name="bin" value="${basedir}/bin" />
  <property name="dcu" value="${basedir}/out" />
 
 
 <patternset id = "sources" >
  <include name = "Class/Common"  />
  <include name = "Class/Jedi"  />
  <include name = "Class/Indy"  />
  <include name = "../thirdParty/bsf" />
 </patternset>
 
 <target name = "compile" depends="resources" >
  <dcc basedir = "." source = "bikkyclient.dpr" >
   <build value = "True"  />
   <exeoutput path = "Bin"  />
   <dcuoutput path = "Out"  />
   <DefinitionInfo value = "False"  />
   <warnings value = "True"  />
   
   <map value = "none"  />
   <console value = "False"  />
   <unitPath refid = "sources"  />
   <includePath refid = "sources"  />
   <resourcePath refid = "sources"  />
  </dcc>
 </target>
 
 <target name="resources" depends="prepare,versioninfo" >
    <brcc file="BikkyClient.rc" output="BikkyClient.res" />
  </target>


  <target name="clean" >
    <delete dir="${dcu}/*.dcu" />
  </target>
 
 
  <target name="prepare" >
    <echo  message="version=${version}" />
    <echo  message="build=${build}" />
  </target>
 
  <target name="versioninfo" >
    <echo message="version=${version}" />
    <echo input="BikkyClient.template.rc" file="BikkyClient.rc" />
  </target>
 
  <target name="buildbin" depends="clean,compile">
    <ini file="release.ini">
      <write section="releases" key="current" value="${version}" />
      <write section="releases" key="last_date" value="${date.tag}" />
    </ini>
  </target>
 
</project>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值