-
Notifications
You must be signed in to change notification settings - Fork 1
/
default.build
236 lines (217 loc) · 8.89 KB
/
default.build
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<?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: don't add a platform specific extension
to the bin folders 'release' / 'debug' -->
<property name="bindirextension" value="" />
<!-- default: we don't cross-compile -->
<property name="crosscompile" value="" />
<!-- default: we don't clean first -->
<property name="cleanup" value="" />
<!-- default: we build in a user session -->
<property name="solutionname" value="CommitMonitor.sln" />
<!-- the ${subsystem} to use -->
<property name="subsystem" value="/SUBSYSTEM:WINDOWS" />
<include buildfile="default.build.user" />
<!-- the signinfo.txt file has to contain one line with parameters for signtool.exe,
for example:
/t "url/to/timestamp/server" /q
-->
<loadfile file="signinfo.txt" property="signinfo" failonerror="false" if="${file::exists('signinfo.txt')}" />
<!-- ====================================================================== -->
<!-- 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>
<target name="x64">
<description>
Compiles everything for the win64 platform.
</description>
<property name="platform" value="x64" />
<property name="bindirextension" value="64" />
<property name="subsystem" value="/SUBSYSTEM:WINDOWS" />
</target>
<target name="cross" depends="x64">
<description>
Cross-compiles on win32 for a different platform.
</description>
<property name="crosscompile" value="yes" if="${platform == 'x64'}" />
<echo message="ignore cross-compiling (only supported for x64)" level="Warning" if="${platform != 'x64'}" />
</target>
<!-- ====================================================================== -->
<!-- Project targets -->
<!-- ====================================================================== -->
<target name="clean" depends="VSNET">
<description>
Cleans before building the target
</description>
<property name="cleanup" value="yes" />
</target>
<target name="cleanall" depends="VSNET">
<description>
Cleans every subproject.
</description>
<property name="cleanup" value="yes" />
<nant target="clean">
<buildfiles>
<include name="ext/build/OpenSSL.build" />
<include name="ext/build/default.build" />
</buildfiles>
</nant>
<exec program="msbuild.exe" >
<arg value="${solutionname}" />
<arg value="/t:clean" />
<arg value="/p:Configuration=${configuration}" />
<arg value="/p:Platform=${platform}" />
<arg value="/verbosity:minimal" />
<arg value="/maxcpucount" />
</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,VersionInfo">
<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="SubversionOnly" depends="VSNET,env">
<description>
Builds all the libraries CommitMonitor depends on:
Subversion, apr, ...
</description>
<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="msbuild.exe" >
<arg value="${solutionname}" />
<arg value="/t:rebuild" />
<arg value="/p:Configuration=${configuration}" />
<arg value="/p:Platform=${platform}" />
<arg value="/verbosity:minimal" />
<arg value="/maxcpucount" />
</exec>
<exec program="Tools\upx.exe">
<arg value="-q" />
<arg value="bin\${configuration}_${platform}\CommitMonitor.exe" />
</exec>
</target>
<target name="binaries" depends="Subversion,CommitMonitor">
<description>
Builds all binaries
</description>
</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="VersionInfo">
<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">
<!-- note: use spaces in the help text below! Otherwise the output won't be aligned in the console. -->
<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="cleanall : clean every subproject" />
<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="clean : clean those targets which are built next" />
<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 message="x64 : call this if you want to create native 64 bit builds." />
<echo message=" (AMD64/EM64T only -- will not work on Itanium systems.)" />
<echo message="cross : cross-compile on win32 for the given target platform." />
<echo message=" (currently only available with x64.)" />
<echo />
<echo message="Please specify the configuration targets BEFORE the main target." />
<echo message="Examples:" />
<echo />
<echo message="nant release setup" />
<echo message="nant -v x64 debug" />
<echo message="nant cross x64 setup" />
<echo />
</target>
</project>