-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathdefault.build
120 lines (110 loc) · 4.44 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
<?xml version="1.0"?>
<project name="SendMessage" default="SendMessage">
<include buildfile="default.build.user" />
<property name="configuration" value="release" />
<!-- 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>
<!-- ====================================================================== -->
<!-- Project targets -->
<!-- ====================================================================== -->
<target name="clean" depends="VSNET">
<description>
Cleans every subproject.
</description>
<exec program="msbuild.exe" >
<arg value="SendMessage.sln" />
<arg value="/t:Clean" />
<arg value="/p:Configuration=${configuration}" />
<arg value="/p:Platform=Win32" />
<arg value="/verbosity:quiet" />
<arg value="/maxcpucount" />
</exec>
<exec program="msbuild.exe" >
<arg value="SendMessage.sln" />
<arg value="/t:Clean" />
<arg value="/p:Configuration=${configuration}" />
<arg value="/p:Platform=x64" />
<arg value="/verbosity:quiet" />
<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')}" />
</replacetokens>
</filterchain>
</loadfile>
<echo file="src\version.h" message="${versionheaderfile}" />
</target>
<target name="SendMessage" depends="VersionInfo">
<description>
Builds SendMessage.
</description>
<exec program="msbuild.exe" >
<arg value="SendMessage.sln" />
<arg value="/t:rebuild" />
<arg value="/p:Configuration=${configuration}" />
<arg value="/p:Platform=Win32" />
<arg value="/verbosity:minimal" />
<arg value="/maxcpucount" />
</exec>
<exec program="msbuild.exe" >
<arg value="SendMessage.sln" />
<arg value="/t:rebuild" />
<arg value="/p:Configuration=${configuration}" />
<arg value="/p:Platform=x64" />
<arg value="/verbosity:minimal" />
<arg value="/maxcpucount" />
</exec>
<if test="${file::exists('signinfo.txt')}">
<exec program="signtool">
<arg value="sign" />
<arg value="${signinfo}" />
<arg value="bin\${configuration}\Win32\SendMessage.exe" />
</exec>
<exec program="signtool">
<arg value="sign" />
<arg value="${signinfo}" />
<arg value="bin\${configuration}\x64\SendMessage64.exe" />
</exec>
</if>
<property name="verstring" value="${environment::get-variable('MajorVersion')}.${environment::get-variable('MinorVersion')}.${environment::get-variable('MicroVersion')}" />
<zip zipfile="bin\SendMessage-${verstring}.zip" ziplevel="9">
<fileset basedir="bin\${configuration}\Win32">
<include name="SendMessage.exe" />
</fileset>
</zip>
<zip zipfile="bin\SendMessage64-${verstring}.zip" ziplevel="9">
<fileset basedir="bin\${configuration}\x64">
<include name="SendMessage64.exe" />
</fileset>
</zip>
</target>
</project>