Prepare release and bump version numbers to 2.13.0
[TortoiseGit.git] / doc / doc.build.include
blob84b85be4c559d35ddcf93d8c08d6de0f9cf9732b
1 <?xml version="1.0"?>
2 <!--
3 Customization layer for build files.
5 You can override these settings by defining them on the command line or by
6 defining them in doc.build.user which is included here if it exists.
8 Example content of doc.build.user:
9 <property name="applications" value="TortoiseGit, TortoiseMerge" />
10 <property name="docformats" value="chm" />
11 <property name="languages" value="en" />
13 This will only build the english HTML help file for TortoiseGit
15 -->
17 <project name="customize">
18 <description>Customization layer for build file</description>
20 <include buildfile="doc.build.user" if="${file::exists('doc.build.user')}"/>
22 <!-- ============================================================ -->
23 <!-- List of applications, languages and output formats in which -->
24 <!-- the documentation will be created by default -->
26 <property name="applications"
27 value="TortoiseGit,TortoiseMerge"
28 unless="${property::exists('applications')}"
31 <!-- pdf,chm,html,htmlsingle -->
32 <property name="docformats"
33 value="chm"
34 unless="${property::exists('docformats')}"
37 <!--,de,es,fa,fi,fr,hr,id,ja,nl,ru,sl,sk,sr_spc,sr_spl,zh_CN" -->
38 <property name="languages"
39 value="en"
40 unless="${property::exists('languages')}"
43 <!-- ============================================================ -->
44 <!-- Define property so that doc.build alone doesn't fail -->
46 <property name="devrelease"
47 value=""
48 unless="${property::exists('devrelease')}"
51 <property name="critical" value="${devrelease!='-dev'}" />
53 <!-- ============================================================ -->
54 <!-- Settings for the translation -->
56 <!-- Base language. All other documents are created using this -->
57 <!-- documents structure -->
58 <property name="lang.base"
59 value="en"
60 unless="${property::exists('lang.base')}"
63 <!-- ============================================================ -->
64 <!-- Settings for the CHM Help creation -->
65 <!-- Attention, this is implemented as a target, because I could -->
66 <!-- not find a better way to create the property depending on -->
67 <!-- the app name -->
69 <target name="help.prepare.TortoiseGit">
70 <echo message="help.prepare.TortoiseGit"/>
71 <property name="help.resource.TortoiseGit"
72 value="../src/TortoiseProc/resource.h"
73 unless="${property::exists('help.resource.TortoiseGit')}"
75 <property name="help.resource" value="${help.resource.TortoiseGit}" />
76 </target>
77 <target name="help.prepare.TortoiseMerge">
78 <echo message="help.prepare.TortoiseMerge"/>
79 <property name="help.resource.TortoiseMerge"
80 value="../src/TortoiseMerge/resource.h"
81 unless="${property::exists('help.resource.TortoiseMerge')}"
83 <property name="help.resource" value="${help.resource.TortoiseMerge}" />
84 </target>
86 <!-- Fileset to exclude from translation and .pot creation -->
87 <!-- Duplicate these files in the "sourcefiles" fileset -->
88 <!--
89 <fileset id="files.exclude">
90 <include name="source/${lang.base}/**/version.xml"/>
91 </fileset>
93 <fileset id="files.filtered">
94 <include name="source/${lang.base}/TortoiseGit/**/*.xml"/>
95 <include name="source/${lang.base}/**/wishlist.xml"/>
96 <exclude name="source/${lang.base}/**/version.xml"/>
97 </fileset>
98 -->
100 <!-- Name of the po template file to create. Can also be a list -->
101 <!-- of applications if you want to create a template for each -->
102 <property name="potemplates" value="${applications}" />
104 <!-- ============================================================ -->
105 <!-- Paths to the binaries -->
106 <property name="path.bin"
107 value="${path::get-full-path('../Tools')}"
108 unless="${property::exists('path.bin')}"
110 <property name="path.fop"
111 value="${path::get-full-path('../Tools/fop')}"
112 unless="${property::exists('path.fop')}"
114 <property name="name.fop"
115 value="fop.bat"
116 unless="${property::exists('name.fop')}"
118 <property name="path.xsl"
119 value="${string::replace(path::get-full-path('../Tools/xsl'), '\', '/')}"
120 unless="${property::exists('path.xsl')}"
122 <property name="path.gettext"
123 value="${path::get-full-path('../Tools')}"
124 unless="${property::exists('path.gettext')}"
127 <!-- ============================================================ -->
128 <!-- Settings for XSLTPROC -->
130 <!-- Paths where the xsl and css files are found -->
131 <property name="path.user.xsl" value="./xsl"/>
132 <property name="path.user.css" value="./source"/>
134 <!-- stylesheets and stringparams -->
135 <property name="xsl.pdf.params" value="--nonet --xinclude"/>
136 <property name="xsl.pdf.file" value="pdfdoc.xsl"/>
137 <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"/>
138 <property name="xsl.chm.file" value="htmlhelp.xsl"/>
139 <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"/>
140 <property name="xsl.html.file" value="htmlsingle.xsl"/>
141 <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"/>
142 <property name="xsl.htmlsingle.file" value="htmlchunk.xsl"/>
143 <property name="xsl.profile.params" value="--nonet --xinclude --stringparam profile.condition &quot;exclude&quot;"/>
144 <property name="xsl.profile.file" value="profile.xsl"/>
146 <!-- ====================================================================== -->
147 <!-- Custom target to prepare the build -->
148 <!-- ====================================================================== -->
150 <target name="prepare.custom"
151 description="Prepare XSL files, create help context file"
152 depends="PrepareVersionInfo">
154 <!-- Delete CHM help context files to force re-creation -->
155 <delete file="source/TortoiseGit.h" if="${file::exists('source/TortoiseGit.h')}"/>
156 <delete file="source/TortoiseMerge.h" if="${file::exists('source/TortoiseMerge.h')}"/>
158 <!-- Store path to docbook stylesheets in helper stylesheets -->
159 <echo message="&lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; version=&quot;1.0&quot;&gt;" file="${path.user.xsl}/db_pdfdoc.xsl"/>
160 <echo message="&lt;xsl:import href=&quot;${path.xsl}/fo/docbook.xsl&quot;/&gt;" file="${path.user.xsl}/db_pdfdoc.xsl" append="true"/>
161 <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_pdfdoc.xsl" append="true"/>
163 <echo message="&lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; version=&quot;1.0&quot;&gt;" file="${path.user.xsl}/db_htmlhelp.xsl"/>
164 <echo message="&lt;xsl:import href=&quot;${path.xsl}/htmlhelp/htmlhelp.xsl&quot;/&gt;" file="${path.user.xsl}/db_htmlhelp.xsl" append="true"/>
165 <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_htmlhelp.xsl" append="true"/>
167 <echo message="&lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; version=&quot;1.0&quot;&gt;" file="${path.user.xsl}/db_htmlsingle.xsl"/>
168 <echo message="&lt;xsl:import href=&quot;${path.xsl}/html/docbook.xsl&quot;/&gt;" file="${path.user.xsl}/db_htmlsingle.xsl" append="true"/>
169 <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_htmlsingle.xsl" append="true"/>
171 <echo message="&lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; version=&quot;1.0&quot;&gt;" file="${path.user.xsl}/db_htmlchunk.xsl"/>
172 <echo message="&lt;xsl:import href=&quot;${path.xsl}/html/chunk.xsl&quot;/&gt;" file="${path.user.xsl}/db_htmlchunk.xsl" append="true"/>
173 <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_htmlchunk.xsl" append="true"/>
175 </target>
177 <!-- ====================================================================== -->
178 <!-- Prepare version info for version file and output filenames -->
179 <!-- ====================================================================== -->
181 <target name="PrepareVersionInfo" description="Prepares version info for version file and output filenames">
183 <if test="${not environment::variable-exists('MajorVersion')}">
185 <if test="${file::exists('../versioninfo.build')}">
186 <!-- <echo>Note: version information set!</echo> -->
187 </if>
188 <if test="${not file::exists('../versioninfo.build')}">
189 <echo>Version information set to dummy values</echo>
190 <setenv>
191 <variable name="MajorVersion" value="2" />
192 <variable name="MinorVersion" value="13" />
193 <variable name="MicroVersion" value="0" />
194 </setenv>
195 </if>
196 </if>
198 <property name="docverstring" value="${environment::get-variable('MajorVersion')}.${environment::get-variable('MinorVersion')}.${environment::get-variable('MicroVersion')}"/>
200 </target>
202 <!-- ====================================================================== -->
203 <!-- Prepare help context file -->
204 <!-- ====================================================================== -->
206 <target name="help.prepare" description="Create CHM help context">
207 <call target="help.prepare.${app}" />
208 <!-- if="${target::exists('help.prepare.${app}')}"/>-->
210 <property name="help.context" value="source/${app}.h"/>
211 <if test="${not file::exists(help.context)}">
213 <property name="headerfile" value="source/${app}_ASCII.h"/>
214 <loadfile file="${help.resource}" property="header" />
215 <echo file="${headerfile}" message="${header}" />
216 <echo message="header file ${help.resource}" />
218 <echo message="// Generated Help Map file.&#13;&#10;" file="${help.context}" />
219 <echo message="" file="${help.context}" append="true"/>
220 <echo message="// Commands (ID_* and IDM_*)&#13;&#10;" file="${help.context}" append="true"/>
221 <exec program="makehm"
222 commandline="/h ID_,HID_,0x10000 IDM_,HIDM_,0x10000 ${headerfile}"
223 output="${help.context}"
224 append="true"
225 verbose="false" />
227 <echo message="" file="${help.context}" append="true"/>
228 <echo message="// Prompts (IDP_*)&#13;&#10;" file="${help.context}" append="true"/>
229 <exec program="makehm"
230 commandline="/h IDP_,HIDP_,0x30000 ${headerfile}"
231 output="${help.context}"
232 append="true"
233 verbose="false" />
235 <echo message="" file="${help.context}" append="true"/>
236 <echo message="// Resources (IDR_*)&#13;&#10;" file="${help.context}" append="true"/>
237 <exec program="makehm"
238 commandline="/h IDR_,HIDR_,0x20000 ${headerfile}"
239 output="${help.context}"
240 append="true"
241 verbose="false" />
243 <echo message="" file="${help.context}" append="true"/>
244 <echo message="// Dialogs (IDD_*)&#13;&#10;" file="${help.context}" append="true"/>
245 <exec program="makehm"
246 commandline="/h IDD_,HIDD_,0x20000 ${headerfile}"
247 output="${help.context}"
248 append="true"
249 verbose="false" />
251 <!--
252 <echo message="" file="${help.context}" append="true"/>
253 <echo message="// Frame Controls xyxzy(IDW_*)&#13;&#10;" file="${help.context}" append="true"/>
254 <exec program="makehm"
255 commandline="/h /a afxhh.h IDW_,HIDW_,0x50000 ${headerfile}"
256 output="${help.context}"
257 append="true"
258 verbose="false" />
260 </if>
262 <!-- Copy help context to target location -->
263 <copy file="${help.context}" tofile="${doc.target.work}/context.h" overwrite="true"/>
265 </target>
267 </project>