-
Notifications
You must be signed in to change notification settings - Fork 72
/
Copy pathdefault.build
155 lines (145 loc) · 5.55 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
<?xml version="1.0"?>
<project name="CryptSync" default="setup">
<include buildfile="default.build.user" />
<property name="signtool" value="signtool.exe" />
<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="CryptSync.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="CryptSync.sln" />
<arg value="/t:Clean" />
<arg value="/p:Configuration=${configuration}" />
<arg value="/p:Platform=x64" />
<arg value="/verbosity:quiet" />
<arg value="/maxcpucount" />
</exec>
<exec program="msbuild.exe" >
<arg value="CryptSync.sln" />
<arg value="/t:Clean" />
<arg value="/p:Configuration=${configuration}" />
<arg value="/p:Platform=ARM64" />
<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}" />
<!-- now write the version.txt file -->
<property name="verstring" value="${environment::get-variable('MajorVersion')}.${environment::get-variable('MinorVersion')}.${environment::get-variable('MicroVersion')}" />
<property name="verstringfull" value="${verstring}.${environment::get-variable('WCREV')}" />
<echo file="version.txt">${verstringfull}</echo>
</target>
<target name="CryptSync" depends="VersionInfo">
<description>
Builds CryptSync.
</description>
<exec program="msbuild.exe" >
<arg value="CryptSync.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="CryptSync.sln" />
<arg value="/t:rebuild" />
<arg value="/p:Configuration=${configuration}" />
<arg value="/p:Platform=x64" />
<arg value="/verbosity:minimal" />
<arg value="/maxcpucount" />
</exec>
<exec program="msbuild.exe" >
<arg value="CryptSync.sln" />
<arg value="/t:rebuild" />
<arg value="/p:Configuration=${configuration}" />
<arg value="/p:Platform=ARM64" />
<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\CryptSync.exe" />
</exec>
<exec program="${signtool}">
<arg value="sign" />
<arg value="${signinfo}" />
<arg value="bin\${configuration}\x64\CryptSync64.exe" />
</exec>
<exec program="${signtool}">
<arg value="sign" />
<arg value="${signinfo}" />
<arg value="bin\${configuration}\ARM64\CryptSyncARM64.exe" />
</exec>
</if>
</target>
<target name="setup" depends="CryptSync">
<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>
</project>