-
Notifications
You must be signed in to change notification settings - Fork 8
/
common.xml
150 lines (130 loc) · 8.12 KB
/
common.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?xml version="1.0" encoding="utf-8"?>
<project name="Cuyahoga" xmlns="http://nant.sf.net/release/0.85/nant.xsd">
<!--
Path to the folder that contain the external assemblies. For net-2.0 the values will
be lib, lib/net, and lib/net/2.0 respectively.
-->
<property name="lib.dir" value="lib" dynamic="true" />
<property name="lib.family.dir" value="${path::combine(lib.dir, framework::get-family(framework::get-target-framework()))}" dynamic="true" />
<property name="lib.framework.dir" value="${path::combine(lib.family.dir, version::to-string(framework::get-version(framework::get-target-framework())))}" dynamic="true" />
<!-- path to nuget lib dirs -->
<property name="lib.nuget.dir" value="packages" />
<property name="lib.nuget.dir.log4net" value="${path::combine(lib.nuget.dir, 'log4net.1.2.10/lib/2.0')}" dynamic="true" />
<property name="lib.nuget.dir.castle.core" value="${path::combine(lib.nuget.dir, 'Castle.Core.3.2.0/lib/net40-client')}" dynamic="true" />
<property name="lib.nuget.dir.castle.windsor" value="${path::combine(lib.nuget.dir, 'Castle.Windsor.3.2.1/lib/net40')}" dynamic="true" />
<property name="lib.nuget.dir.iesi.collections" value="${path::combine(lib.nuget.dir, 'Iesi.Collections.3.2.0.1001/lib/Net35')}" dynamic="true" />
<property name="lib.nuget.dir.nhibernate" value="${path::combine(lib.nuget.dir, 'NHibernate.3.3.3.4001/lib/Net35')}" dynamic="true" />
<!-- Versioning -->
<property name="project.version" value="1.7.0.0" overwrite="false" />
<property name="project.major" value="${version::get-major(version::parse(project.version))}" dynamic="true" />
<property name="project.minor" value="${version::get-minor(version::parse(project.version))}" dynamic="true" />
<property name="project.build" value="${version::get-build(version::parse(project.version))}" dynamic="true" />
<property name="project.revision" value="${version::get-revision(version::parse(project.version))}" dynamic="true" />
<property name="assembly.major" value="${version::get-major(version::parse(assembly.version))}" dynamic="true" />
<property name="assembly.minor" value="${version::get-minor(version::parse(assembly.version))}" dynamic="true" />
<property name="assembly.build" value="${version::get-build(version::parse(assembly.version))}" dynamic="true" />
<property name="assembly.revision" value="${version::get-revision(version::parse(assembly.version))}" dynamic="true" />
<property name="svn.revision" value="0" overwrite="false" />
<!--
These are used to set the correct attributes in AssemblyInfo.cs.
-->
<property name="project.company" value="Cuyahoga Project" />
<property name="project.productname" value="Cuyahoga" />
<!-- Default build defines -->
<property name="build.defines" value="TRACE" />
<!-- platform specific properties. These are the defaults -->
<property name="current.build.defines" value="${build.defines}" />
<!-- platform specific properties. These are the defaults -->
<property name="current.build.defines" value="${build.defines}" />
<!-- named project configurations -->
<target name="set-debug-project-configuration" description="Perform a 'debug' build">
<property name="build.debug" value="true" />
<property name="build.optimize" value="false" overwrite="false" />
</target>
<target name="set-release-project-configuration" description="Perform a 'release' build">
<property name="build.debug" value="false" />
<property name="build.optimize" value="true" overwrite="false" />
</target>
<target name="set-project-configuration">
<property name="project.config" value="debug" overwrite="false" />
<if test="${not(target::exists('set-' + project.config + '-project-configuration'))}">
<fail message="Unknown configuration: '${project.config}'" />
</if>
<call target="set-${project.config}-project-configuration" />
<property name="src.dir" value="${path::get-full-path(project::get-base-directory())}" />
<property name="build.base.dir" value="${root.dir}/build" />
<property name="build.family.dir" value="${build.base.dir}/${nant.settings.currentframework}" />
<property name="build.dir" value="${path::get-full-path(path::combine(build.family.dir,project.config))}" dynamic="true" />
<property name="build.bin.dir" value="${path::get-full-path(path::combine(build.family.dir,project.config))}/bin" dynamic="true" />
<property name="build.rebuild" value="false" overwrite="false" />
</target>
<target name="set-framework-configuration">
<if test="${not(target::exists('set-'+framework::get-target-framework()+'-framework-configuration'))}">
<fail message="The '${framework::get-target-framework()}' framework is not supported by this version of Cuyahoga." />
</if>
<call target="set-${framework::get-target-framework()}-framework-configuration" />
</target>
<target name="set-net-2.0-framework-configuration">
<property name="nant.settings.currentframework" value="net-2.0" />
<property name="current.build.defines" value="${build.defines},NET,DOTNET2" />
<property name="link.sdkdoc.version" value="SDK_v2_0" />
</target>
<target name="set-net-4.0-framework-configuration">
<property name="nant.settings.currentframework" value="net-4.0" />
<property name="current.build.defines" value="${build.defines},NET,DOTNET4" />
<property name="link.sdkdoc.version" value="SDK_v4_0" />
</target>
<target name="set-mono-2.0-framework-configuration">
<property name="nant.settings.currentframework" value="mono-2.0" />
<property name="current.build.defines" value="${build.defines},MONO,MONO2" />
<property name="link.sdkdoc.version" value="MsdnOnline" />
</target>
<target name="display-current-runtime">
<echo message="" />
<echo message="----------------------------------------------------------" />
<echo message=" ${framework::get-description(framework::get-target-framework())}" />
<echo message="----------------------------------------------------------" />
<echo message="" />
<echo message="framework : ${framework::get-target-framework()}" />
<echo message="description : ${framework::get-description(framework::get-target-framework())}" />
<echo message="sdk directory : ${framework::get-sdk-directory(framework::get-target-framework())}" />
<echo message="framework directory : ${framework::get-framework-directory(framework::get-target-framework())}" />
<echo message="assembly directory : ${framework::get-assembly-directory(framework::get-target-framework())}" />
<echo message="runtime engine : ${framework::get-runtime-engine(framework::get-target-framework())}" />
<echo message="" />
</target>
<target name="common.init"
depends="set-framework-configuration set-project-configuration"
description="Initializes build properties">
<fileset id="project.sources" failonempty="true">
<include name="${src.dir}/**/*.cs" />
</fileset>
<!--
Include the .resx files as embedded resource by default. Override in the project when incuding other files
such as NHibernate mapping files.
Only include Strings.resx when building on Mono because the Mono al.exe is not able to handle satellite
assemblies.
-->
<resourcefileset id="project.resources" basedir="${project::get-base-directory()}" prefix="${project::get-name()}" dynamicprefix="true">
<include name="${src.dir}/**/*.resx" if="${framework::get-family(framework::get-target-framework()) != 'mono'}" />
<include name="${src.dir}/**/Strings.resx" if="${framework::get-family(framework::get-target-framework()) != 'mono'}" />
</resourcefileset>
</target>
<target name="common.find-svninfo">
<!-- For adding SVN revision to builds -->
<property name="svn.revision" value="0" overwrite="false" />
<!-- try to update the revision -->
<exec
program="svn"
commandline='info "${project::get-base-directory()}" --xml'
output="_revision.xml"
failonerror="false"/>
<xmlpeek
file="_revision.xml"
xpath="/info/entry/commit/@revision"
property="svn.revision"
failonerror="false"/>
<delete file="_revision.xml" failonerror="false" />
<echo message="INFO: Using Subversion revision number: ${svn.revision}"/>
</target>
</project>