forked from stefankueng/grepWin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.build
163 lines (151 loc) · 5.71 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
<?xml version="1.0"?>
<project name="grepWin" default="grepWin">
<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" />
<property name="solutionname" value="grepWin.sln"/>
<!-- ====================================================================== -->
<!-- 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="${solutionname}" />
<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="${solutionname}" />
<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="pot">
<description>
Generates the template pot file used for translations
</description>
<exec program="tools\restext.exe" >
<arg value="extract" />
<arg value="bin\release\grepWin.exe" />
<arg value="translations\English.lang" />
</exec>
<exec program="tools\restext.exe" >
<arg value="extract" />
<arg value="bin\release\grepWin.exe" />
<arg value="translations\Deutsch.lang" />
</exec>
<exec program="tools\restext.exe" >
<arg value="extract" />
<arg value="bin\release\grepWin.exe" />
<arg value="translations\Chinese.lang" />
</exec>
<exec program="tools\restext.exe" >
<arg value="extract" />
<arg value="bin\release\grepWin.exe" />
<arg value="translations\Nederlands.lang" />
</exec>
<exec program="tools\restext.exe" >
<arg value="extract" />
<arg value="bin\release\grepWin.exe" />
<arg value="translations\Polski.lang" />
</exec>
<exec program="tools\restext.exe" >
<arg value="extract" />
<arg value="bin\release\grepWin.exe" />
<arg value="translations\Spanish.lang" />
</exec>
<exec program="tools\restext.exe" >
<arg value="extract" />
<arg value="bin\release\grepWin.exe" />
<arg value="translations\Italiano.lang" />
</exec>
</target>
<target name="grepWin" depends="VersionInfo">
<description>
Builds grepWin.
</description>
<exec program="msbuild.exe" >
<arg value="${solutionname}" />
<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="${solutionname}" />
<arg value="/t:rebuild" />
<arg value="/p:Configuration=${configuration}" />
<arg value="/p:Platform=x64" />
<arg value="/verbosity:minimal" />
<arg value="/maxcpucount" />
</exec>
</target>
<target name="setup" depends="grepWin">
<description>
Uses WiX to create an msi installer file.
</description>
<nant target="setup">
<buildfiles>
<include name="src\Setup\setup.build" />
</buildfiles>
</nant>
<property name="verstring" value="${environment::get-variable('MajorVersion')}.${environment::get-variable('MinorVersion')}.${environment::get-variable('MicroVersion')}" />
<copy file="bin\Release\grepWin.exe" tofile="bin\grepWin-${verstring}_portable.exe" />
<copy file="bin\Release64\grepWin.exe" tofile="bin\grepWin-x64-${verstring}_portable.exe" />
</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>