当前位置: 首页 > 工具软件 > LuntBuild > 使用案例 >

luntbuild使用自定义标签的方法

郭建华
2023-12-01
luntbuild使用自定义标签的方法

引入另外一个文件

<import file="./base.xml"/>


使用自定义标签

<VC9 sln="${proj.path}/proj.sln" project="proj_name"></VC9>


base文件内容

<?xml version="1.0"?>
<project basedir=".">
<property name="publishDir" value="." />
<property name="workingDir" value="" />
<property name="artifactsDir" value="." />
<property name="buildVersion" value="9.9.9.9" />

<target name="base-init">
<property name="vc.path" value="C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin" />
<property name="vc9.path" value="D:\Microsoft Visual Studio 9.0\Common7\IDE\devenv.com" />
<property name="protoc.path" value="D:\bin\protoc.exe" />
<property name="nsis.path" value="d:\nsis\makensis.exe" />
</target>

<macrodef name="SetVer">
<attribute name="rc" />
<sequential>
<exec executable="c:\python25\python.exe" failonerror="true">
<arg line=' d:\bin\setver_rc.py @{rc} ${buildVersion} ' />
</exec>
</sequential>
</macrodef>

<macrodef name="VC9">
<attribute name="sln" />
<attribute name="build" default="release"/>
<attribute name="project" />
<sequential>
<exec executable="${vc9.path}" failonerror="true">
<arg line='@{sln} /BUILD @{build} /project @{project}' />
</exec>
</sequential>
</macrodef>

</project>
 类似资料: