forked from TortoiseGit/tortoisesvn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathversioninfo.build
62 lines (56 loc) · 2.39 KB
/
versioninfo.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
<?xml version="1.0"?>
<project name="VersionInfo" default="versioninfo">
<property name="solutionname" value="TortoiseSVN.sln" />
<target name="versioninfo">
<!-- You can specify the path to SubWCRev.exe in SubWCRevFileName property to avoid
setting a bunch of build properties and/or building SubWCRev.exe from scratch.
This feature is intended mainly for translators and doc maintainers who doesn't
want to setup full build environment to get version information only -->
<if test="${not property::exists('SubWCRevFileName')}">
<!-- When cross-compiling, we need to use the current platform's (win32) native build -->
<property name="SubWCRevFileName" value="bin\${configuration}${bindirextension}\bin\SubWCRev.exe" />
<property name="SubWCRevFileName" value="bin\${configuration}\bin\SubWCRev.exe" if="${crosscompile == 'yes'}" />
<if test="${not file::exists(SubWCRevFileName)}">
<copy
file="src\version.none"
tofile="src\version.h"
overwrite="true"
/>
<exec program="msbuild.exe" workingdir="src" failonerror="false">
<arg value="${solutionname}" />
<arg value="/t:Utilities\SubWCRev:Rebuild" />
<arg value="/p:Configuration=${configuration}" />
<arg value="/p:Platform=${platform}" />
<arg value="/verbosity:minimal" />
<arg value="/maxcpucount" />
</exec>
</if>
</if>
<!-- Debug only builds might not have all the libs required to build
SubWCRev! So only use it if it exists and replace the WCREV with
0 if it doesn't -->
<if test="${file::exists(SubWCRevFileName)}">
<exec program="${SubWCRevFileName}">
<arg value="." />
<arg value="version.build.in" />
<arg value="version.build" />
<arg value="-f" />
</exec>
</if>
<if test="${not file::exists(SubWCRevFileName)}">
<copy file="version.build.in" tofile="version.build">
<filterchain>
<replacetokens begintoken="$" endtoken="$">
<token key="WCREV" value="0" />
</replacetokens>
</filterchain>
</copy>
<echo message="Warning: SubWCRev does not exist! Using 0 as the WC-revision" />
</if>
<nant target="setversioninfo">
<buildfiles>
<include name="version.build" />
</buildfiles>
</nant>
</target>
</project>