forked from TortoiseGit/TortoiseGit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.build.include
269 lines (218 loc) · 11.9 KB
/
doc.build.include
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<?xml version="1.0"?>
<!--
============================================================
$Date: 2008-12-16 22:51:06 +0800 (Tue, 16 Dec 2008) $
$Author: luebbe $
$Rev: 14867 $
============================================================
Customization layer for build files.
You can override these settings by defining them on the command line or by
defining them in doc.build.user which is included here if it exists.
Example content of doc.build.user:
<property name="applications" value="TortoiseGit, TortoiseMerge" />
<property name="docformats" value="chm" />
<property name="languages" value="en" />
This will only build the english HTML help file for TortoiseGit
-->
<project name="customize">
<description>Customization layer for build file</description>
<include buildfile="doc.build.user" if="${file::exists('doc.build.user')}"/>
<!-- ============================================================ -->
<!-- List of applications, languages and output formats in which -->
<!-- the documentation will be created by default -->
<property name="applications"
value="TortoiseGit,TortoiseMerge"
unless="${property::exists('applications')}"
/>
<!-- pdf,chm,html,htmlsingle -->
<property name="docformats"
value="chm"
unless="${property::exists('docformats')}"
/>
<!--,de,es,fa,fi,fr,hr,id,ja,nl,ru,sl,sk,sr_spc,sr_spl,zh_CN" -->
<property name="languages"
value="en"
unless="${property::exists('languages')}"
/>
<!-- ============================================================ -->
<!-- Define property so that doc.build alone doesn't fail -->
<property name="devrelease"
value=""
unless="${property::exists('devrelease')}"
/>
<property name="critical" value="${devrelease!='-dev'}" />
<!-- ============================================================ -->
<!-- Settings for the translation -->
<!-- Base language. All other documents are created using this -->
<!-- documents structure -->
<property name="lang.base"
value="en"
unless="${property::exists('lang.base')}"
/>
<!-- ============================================================ -->
<!-- Settings for the CHM Help creation -->
<!-- Attention, this is implemented as a target, because I could -->
<!-- not find a better way to create the property depending on -->
<!-- the app name -->
<target name="help.prepare.TortoiseGit">
<echo message="help.prepare.TortoiseGit"/>
<property name="help.resource.TortoiseGit"
value="../src/TortoiseProc/resource.h"
unless="${property::exists('help.resource.TortoiseGit')}"
/>
<property name="help.resource" value="${help.resource.TortoiseGit}" />
</target>
<target name="help.prepare.TortoiseMerge">
<echo message="help.prepare.TortoiseMerge"/>
<property name="help.resource.TortoiseMerge"
value="../src/TortoiseMerge/resource.h"
unless="${property::exists('help.resource.TortoiseMerge')}"
/>
<property name="help.resource" value="${help.resource.TortoiseMerge}" />
</target>
<!-- Fileset to exclude from translation and .pot creation -->
<!-- Duplicate these files in the "sourcefiles" fileset -->
<!--
<fileset id="files.exclude">
<include name="source/${lang.base}/**/version.xml"/>
</fileset>
<fileset id="files.filtered">
<include name="source/${lang.base}/TortoiseGit/**/*.xml"/>
<include name="source/${lang.base}/**/wishlist.xml"/>
<exclude name="source/${lang.base}/**/version.xml"/>
</fileset>
-->
<!-- Name of the po template file to create. Can also be a list -->
<!-- of applications if you want to create a template for each -->
<property name="potemplates" value="${applications}" />
<!-- ============================================================ -->
<!-- Paths to the binaries -->
<property name="path.bin"
value="${path::get-full-path('../Tools')}"
unless="${property::exists('path.bin')}"
/>
<property name="path.fop"
value="${path::get-full-path('../Tools/fop')}"
unless="${property::exists('path.fop')}"
/>
<property name="path.xsl"
value="${string::replace(path::get-full-path('../Tools/xsl'), '\', '/')}"
unless="${property::exists('path.xsl')}"
/>
<property name="path.gettext"
value="${path::get-full-path('../Tools')}"
unless="${property::exists('path.gettext')}"
/>
<!-- ============================================================ -->
<!-- Settings for XSLTPROC -->
<!-- Paths where the xsl and css files are found -->
<property name="path.user.xsl" value="./xsl"/>
<property name="path.user.css" value="./source"/>
<!-- stylesheets and stringparams -->
<property name="xsl.pdf.params" value="--nonet --xinclude"/>
<property name="xsl.pdf.file" value="pdfdoc.xsl"/>
<property name="xsl.chm.params" value="--nonet --xinclude --stringparam chunker.output.encoding UTF-8 --stringparam html.stylesheet styles_chm.css --stringparam use.id.as.filename 1"/>
<property name="xsl.chm.file" value="htmlhelp.xsl"/>
<property name="xsl.html.params" value="--nonet --xinclude --stringparam chunker.output.encoding UTF-8 --stringparam html.stylesheet styles_html.css --stringparam use.id.as.filename 1"/>
<property name="xsl.html.file" value="htmlsingle.xsl"/>
<property name="xsl.htmlsingle.params" value="--nonet --xinclude --stringparam chunker.output.encoding UTF-8 --stringparam html.stylesheet styles_html.css --stringparam use.id.as.filename 1"/>
<property name="xsl.htmlsingle.file" value="htmlchunk.xsl"/>
<property name="xsl.profile.params" value="--nonet --xinclude --stringparam profile.condition "exclude""/>
<property name="xsl.profile.file" value="profile.xsl"/>
<!-- ====================================================================== -->
<!-- Custom target to prepare the build -->
<!-- ====================================================================== -->
<target name="prepare.custom"
description="Prepare XSL files, create help context file"
depends="PrepareVersionInfo">
<!-- Delete CHM help context files to force re-creation -->
<delete file="source/TortoiseGit.h" if="${file::exists('source/TortoiseGit.h')}"/>
<delete file="source/TortoiseMerge.h" if="${file::exists('source/TortoiseMerge.h')}"/>
<!-- Store path to docbook stylesheets in helper stylesheets -->
<echo message="<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">" file="${path.user.xsl}/db_pdfdoc.xsl"/>
<echo message="<xsl:import href="${path.xsl}/fo/docbook.xsl"/>" file="${path.user.xsl}/db_pdfdoc.xsl" append="true"/>
<echo message="</xsl:stylesheet>" file="${path.user.xsl}/db_pdfdoc.xsl" append="true"/>
<echo message="<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">" file="${path.user.xsl}/db_htmlhelp.xsl"/>
<echo message="<xsl:import href="${path.xsl}/htmlhelp/htmlhelp.xsl"/>" file="${path.user.xsl}/db_htmlhelp.xsl" append="true"/>
<echo message="</xsl:stylesheet>" file="${path.user.xsl}/db_htmlhelp.xsl" append="true"/>
<echo message="<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">" file="${path.user.xsl}/db_htmlsingle.xsl"/>
<echo message="<xsl:import href="${path.xsl}/html/docbook.xsl"/>" file="${path.user.xsl}/db_htmlsingle.xsl" append="true"/>
<echo message="</xsl:stylesheet>" file="${path.user.xsl}/db_htmlsingle.xsl" append="true"/>
<echo message="<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">" file="${path.user.xsl}/db_htmlchunk.xsl"/>
<echo message="<xsl:import href="${path.xsl}/html/chunk.xsl"/>" file="${path.user.xsl}/db_htmlchunk.xsl" append="true"/>
<echo message="</xsl:stylesheet>" file="${path.user.xsl}/db_htmlchunk.xsl" append="true"/>
</target>
<!-- ====================================================================== -->
<!-- Prepare version info for version file and output filenames -->
<!-- ====================================================================== -->
<target name="PrepareVersionInfo" description="Prepares version info for version file and output filenames">
<if test="${not environment::variable-exists('MajorVersion')}">
<if test="${file::exists('../versioninfo.build')}">
<!-- <echo>Note: version information set!</echo> -->
</if>
<if test="${not file::exists('../versioninfo.build')}">
<echo>Version information set to dummy values</echo>
<setenv>
<variable name="MajorVersion" value="2" />
<variable name="MinorVersion" value="7" />
<variable name="MicroVersion" value="0" />
</setenv>
</if>
</if>
<property name="docverstring" value="${environment::get-variable('MajorVersion')}.${environment::get-variable('MinorVersion')}.${environment::get-variable('MicroVersion')}"/>
</target>
<!-- ====================================================================== -->
<!-- Prepare help context file -->
<!-- ====================================================================== -->
<target name="help.prepare" description="Create CHM help context">
<call target="help.prepare.${app}" />
<!-- if="${target::exists('help.prepare.${app}')}"/>-->
<property name="help.context" value="source/${app}.h"/>
<if test="${not file::exists(help.context)}">
<property name="headerfile" value="source/${app}_ASCII.h"/>
<loadfile file="${help.resource}" property="header" />
<echo file="${headerfile}" message="${header}" />
<echo message="header file ${help.resource}" />
<echo message="// Generated Help Map file. " file="${help.context}" />
<echo message="" file="${help.context}" append="true"/>
<echo message="// Commands (ID_* and IDM_*) " file="${help.context}" append="true"/>
<exec program="makehm"
commandline="/h ID_,HID_,0x10000 IDM_,HIDM_,0x10000 ${headerfile}"
output="${help.context}"
append="true"
verbose="false" />
<echo message="" file="${help.context}" append="true"/>
<echo message="// Prompts (IDP_*) " file="${help.context}" append="true"/>
<exec program="makehm"
commandline="/h IDP_,HIDP_,0x30000 ${headerfile}"
output="${help.context}"
append="true"
verbose="false" />
<echo message="" file="${help.context}" append="true"/>
<echo message="// Resources (IDR_*) " file="${help.context}" append="true"/>
<exec program="makehm"
commandline="/h IDR_,HIDR_,0x20000 ${headerfile}"
output="${help.context}"
append="true"
verbose="false" />
<echo message="" file="${help.context}" append="true"/>
<echo message="// Dialogs (IDD_*) " file="${help.context}" append="true"/>
<exec program="makehm"
commandline="/h IDD_,HIDD_,0x20000 ${headerfile}"
output="${help.context}"
append="true"
verbose="false" />
<!--
<echo message="" file="${help.context}" append="true"/>
<echo message="// Frame Controls xyxzy(IDW_*) " file="${help.context}" append="true"/>
<exec program="makehm"
commandline="/h /a afxhh.h IDW_,HIDW_,0x50000 ${headerfile}"
output="${help.context}"
append="true"
verbose="false" />
-->
</if>
<!-- Copy help context to target location -->
<copy file="${help.context}" tofile="${doc.target.work}/context.h" overwrite="true"/>
</target>
</project>