commitmonitor Code
Monitor your SVN repositories and notifies you on new commits
Brought to you by:
steveking
<?xml version="1.0"?>
<project name="CommitMonitor" default="help">
<!-- default configuration is release -->
<property name="configuration" value="release" />
<!-- default builds are dev builds -->
<property name="devrelease" value="-dev" unless="${property::exists('devrelease')}"/>
<!-- default build for win32 platform -->
<property name="platform" value="win32" />
<!-- default build tool is VS.NET2005 -->
<property name="buildtool" value="devenv.com" />
<include buildfile="default.build.user" />
<!-- ====================================================================== -->
<!-- Configuration targets -->
<!-- ====================================================================== -->
<target name="debug">
<description>
Sets the environment up to build the debug versions.
</description>
<property name="configuration" value="debug" />
</target>
<target name="release">
<description>
Sets the environment up to build an official release version,
without the '-dev' markers.
</description>
<property name="devrelease" value="" />
</target>
<!-- ====================================================================== -->
<!-- Project targets -->
<!-- ====================================================================== -->
<target name="clean" depends="VSNET">
<description>
Cleans every subproject.
</description>
<nant target="clean">
<buildfiles>
<include name="ext/build/OpenSSL.build" />
<include name="ext/build/default.build" />
</buildfiles>
</nant>
<exec program="devenv.com" >
<arg value="CommitMonitor.sln" />
<arg value="/clean" />
<arg value="${configuration}|${platform}" />
</exec>
</target>
<target name="VersionInfo" depends="VSNET,env">
<description>
Sets the version information as properties, env variables
and sets up the different version specific files.
</description>
<nant target="versioninfo">
<buildfiles>
<include name="versioninfo.build" />
</buildfiles>
</nant>
<loadfile file="src\version.in" property="versionheaderfile">
<filterchain>
<replacetokens begintoken="$" endtoken="$">
<token key="MajorVersion" value="${environment::get-variable('MajorVersion')}" />
<token key="MinorVersion" value="${environment::get-variable('MinorVersion')}" />
<token key="MicroVersion" value="${environment::get-variable('Microversion')}" />
<token key="WCREV" value="${environment::get-variable('WCREV')}" />
<token key="WCDATE" value="${environment::get-variable('WCDATE')}" />
<token key="DEVBUILD" value="${devrelease}" />
</replacetokens>
</filterchain>
</loadfile>
<echo file="src\version.h" message="${versionheaderfile}" />
</target>
<target name="Subversion" depends="VSNET,env">
<description>
Builds all the libraries CommitMonitor depends on:
Subversion, apr, OpenSSL, ...
</description>
<nant target="OpenSSL">
<buildfiles>
<include name="ext\build\OpenSSL.build" />
</buildfiles>
</nant>
<nant target="build">
<buildfiles>
<include name="ext\build\default.build" />
</buildfiles>
</nant>
</target>
<target name="CommitMonitor" depends="VSNET,env,VersionInfo">
<description>
Builds CommitMonitor. The libraries must have been built
before.
</description>
<exec program="devenv.com" >
<arg value="CommitMonitor.sln" />
<arg value="/rebuild" />
<arg value="${configuration}|${platform}" />
</exec>
</target>
<target name="setup" depends="Subversion,CommitMonitor">
<description>
Uses WiX to create an msi installer file.
</description>
<nant target="setup">
<buildfiles>
<include name="src\Setup\setup.build" />
</buildfiles>
</nant>
</target>
<target name="msi" depends="VSNET,env">
<description>
Builds the msi installer from already built binaries.
</description>
<nant target="setup">
<buildfiles>
<include name="src\Setup\setup.build" />
</buildfiles>
</nant>
</target>
<!-- ====================================================================== -->
<!-- Help target -->
<!-- ====================================================================== -->
<target name="help">
<echo message="You must specify a target to tell us what you want to build!" />
<echo />
<echo message="The following targets are available:" />
<echo message="clean : this will clean up previous builds and force a" />
<echo message=" complete rebuild later" />
<echo message="Subversion : builds the Subversion libraries, including its" />
<echo message=" dependencies" />
<echo message="CommitMonitor: builds CommitMonitor. You must have build the" />
<echo message=" Subversion libraries before, or this will fail" />
<echo message="setup : creates an msi installer for CommitMonitor" />
<echo message="msi : creates the msi, but doesn't build the libs first" />
<echo />
<echo message="The following targets can be used to tweak the builds:" />
<echo message="debug : if this target is called before other build targets," />
<echo message=" those targets are built with debug support" />
<echo message="release : call this if you want to create official releases." />
<echo message=" It removes the '-dev' string from some builds" />
<echo />
<echo message="Please specify the configuration targets BEFORE the main target." />
<echo message="Examples:" />
<echo />
<echo message="nant release setup" />
<echo />
</target>
</project>