Check for missing Tortoise.pot values
[TortoiseGit.git] / doc / doc.build.include
blob3b595bca80fe8727fdc5bdb50731c35e24edfc1b
1 <?xml version="1.0"?>
2 <!--
3 ============================================================
4 $Date: 2008-12-16 22:51:06 +0800 (Tue, 16 Dec 2008) $
5 $Author: luebbe $
6 $Rev: 14867 $
7 ============================================================
9 Customization layer for build files.
11 You can override these settings by defining them on the command line or by
12 defining them in doc.build.user which is included here if it exists.
14 Example content of doc.build.user:
15 <property name="applications" value="TortoiseGit, TortoiseMerge" />
16 <property name="docformats" value="chm" />
17 <property name="languages" value="en" />
19 This will only build the english HTML help file for TortoiseGit
21 -->
23 <project name="customize">
24 <description>Customization layer for build file</description>
26 <include buildfile="doc.build.user" if="${file::exists('doc.build.user')}"/>
28 <!-- ============================================================ -->
29 <!-- List of applications, languages and output formats in which -->
30 <!-- the documentation will be created by default -->
32 <property name="applications"
33 value="TortoiseGit,TortoiseMerge"
34 unless="${property::exists('applications')}"
37 <!-- pdf,chm,html,htmlsingle -->
38 <property name="docformats"
39 value="chm"
40 unless="${property::exists('docformats')}"
43 <!--,de,es,fa,fi,fr,hr,id,ja,nl,ru,sl,sk,sr_spc,sr_spl,zh_CN" -->
44 <property name="languages"
45 value="en"
46 unless="${property::exists('languages')}"
49 <!-- ============================================================ -->
50 <!-- Define property so that doc.build alone doesn't fail -->
52 <property name="devrelease"
53 value=""
54 unless="${property::exists('devrelease')}"
57 <property name="critical" value="${devrelease!='-dev'}" />
59 <!-- ============================================================ -->
60 <!-- Settings for the translation -->
62 <!-- Base language. All other documents are created using this -->
63 <!-- documents structure -->
64 <property name="lang.base"
65 value="en"
66 unless="${property::exists('lang.base')}"
69 <!-- ============================================================ -->
70 <!-- Settings for the CHM Help creation -->
71 <!-- Attention, this is implemented as a target, because I could -->
72 <!-- not find a better way to create the property depending on -->
73 <!-- the app name -->
75 <target name="help.prepare.TortoiseGit">
76 <echo message="help.prepare.TortoiseGit"/>
77 <property name="help.resource.TortoiseGit"
78 value="../src/TortoiseProc/resource.h"
79 unless="${property::exists('help.resource.TortoiseGit')}"
81 <property name="help.resource" value="${help.resource.TortoiseGit}" />
82 </target>
83 <target name="help.prepare.TortoiseMerge">
84 <echo message="help.prepare.TortoiseMerge"/>
85 <property name="help.resource.TortoiseMerge"
86 value="../src/TortoiseMerge/resource.h"
87 unless="${property::exists('help.resource.TortoiseMerge')}"
89 <property name="help.resource" value="${help.resource.TortoiseMerge}" />
90 </target>
92 <!-- Fileset to exclude from translation and .pot creation -->
93 <!-- Duplicate these files in the "sourcefiles" fileset -->
94 <!--
95 <fileset id="files.exclude">
96 <include name="source/${lang.base}/**/version.xml"/>
97 </fileset>
99 <fileset id="files.filtered">
100 <include name="source/${lang.base}/TortoiseGit/**/*.xml"/>
101 <include name="source/${lang.base}/**/wishlist.xml"/>
102 <exclude name="source/${lang.base}/**/version.xml"/>
103 </fileset>
106 <!-- Name of the po template file to create. Can also be a list -->
107 <!-- of applications if you want to create a template for each -->
108 <property name="potemplates" value="${applications}" />
110 <!-- ============================================================ -->
111 <!-- Paths to the binaries -->
112 <property name="path.bin"
113 value="${path::get-full-path('../Tools')}"
114 unless="${property::exists('path.bin')}"
116 <property name="path.fop"
117 value="${path::get-full-path('../Tools/fop')}"
118 unless="${property::exists('path.fop')}"
120 <property name="name.fop"
121 value="fop.bat"
122 unless="${property::exists('name.fop')}"
124 <property name="path.xsl"
125 value="${string::replace(path::get-full-path('../Tools/xsl'), '\', '/')}"
126 unless="${property::exists('path.xsl')}"
128 <property name="path.gettext"
129 value="${path::get-full-path('../Tools')}"
130 unless="${property::exists('path.gettext')}"
133 <!-- ============================================================ -->
134 <!-- Settings for XSLTPROC -->
136 <!-- Paths where the xsl and css files are found -->
137 <property name="path.user.xsl" value="./xsl"/>
138 <property name="path.user.css" value="./source"/>
140 <!-- stylesheets and stringparams -->
141 <property name="xsl.pdf.params" value="--nonet --xinclude"/>
142 <property name="xsl.pdf.file" value="pdfdoc.xsl"/>
143 <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"/>
144 <property name="xsl.chm.file" value="htmlhelp.xsl"/>
145 <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"/>
146 <property name="xsl.html.file" value="htmlsingle.xsl"/>
147 <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"/>
148 <property name="xsl.htmlsingle.file" value="htmlchunk.xsl"/>
149 <property name="xsl.profile.params" value="--nonet --xinclude --stringparam profile.condition &quot;exclude&quot;"/>
150 <property name="xsl.profile.file" value="profile.xsl"/>
152 <!-- ====================================================================== -->
153 <!-- Custom target to prepare the build -->
154 <!-- ====================================================================== -->
156 <target name="prepare.custom"
157 description="Prepare XSL files, create help context file"
158 depends="PrepareVersionInfo">
160 <!-- Delete CHM help context files to force re-creation -->
161 <delete file="source/TortoiseGit.h" if="${file::exists('source/TortoiseGit.h')}"/>
162 <delete file="source/TortoiseMerge.h" if="${file::exists('source/TortoiseMerge.h')}"/>
164 <!-- Store path to docbook stylesheets in helper stylesheets -->
165 <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"/>
166 <echo message="&lt;xsl:import href=&quot;${path.xsl}/fo/docbook.xsl&quot;/&gt;" file="${path.user.xsl}/db_pdfdoc.xsl" append="true"/>
167 <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_pdfdoc.xsl" append="true"/>
169 <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"/>
170 <echo message="&lt;xsl:import href=&quot;${path.xsl}/htmlhelp/htmlhelp.xsl&quot;/&gt;" file="${path.user.xsl}/db_htmlhelp.xsl" append="true"/>
171 <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_htmlhelp.xsl" append="true"/>
173 <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"/>
174 <echo message="&lt;xsl:import href=&quot;${path.xsl}/html/docbook.xsl&quot;/&gt;" file="${path.user.xsl}/db_htmlsingle.xsl" append="true"/>
175 <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_htmlsingle.xsl" append="true"/>
177 <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"/>
178 <echo message="&lt;xsl:import href=&quot;${path.xsl}/html/chunk.xsl&quot;/&gt;" file="${path.user.xsl}/db_htmlchunk.xsl" append="true"/>
179 <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_htmlchunk.xsl" append="true"/>
181 </target>
183 <!-- ====================================================================== -->
184 <!-- Prepare version info for version file and output filenames -->
185 <!-- ====================================================================== -->
187 <target name="PrepareVersionInfo" description="Prepares version info for version file and output filenames">
189 <if test="${not environment::variable-exists('MajorVersion')}">
191 <if test="${file::exists('../versioninfo.build')}">
192 <!-- <echo>Note: version information set!</echo> -->
193 </if>
194 <if test="${not file::exists('../versioninfo.build')}">
195 <echo>Version information set to dummy values</echo>
196 <setenv>
197 <variable name="MajorVersion" value="2" />
198 <variable name="MinorVersion" value="11" />
199 <variable name="MicroVersion" value="0" />
200 </setenv>
201 </if>
202 </if>
204 <property name="docverstring" value="${environment::get-variable('MajorVersion')}.${environment::get-variable('MinorVersion')}.${environment::get-variable('MicroVersion')}"/>
206 </target>
208 <!-- ====================================================================== -->
209 <!-- Prepare help context file -->
210 <!-- ====================================================================== -->
212 <target name="help.prepare" description="Create CHM help context">
213 <call target="help.prepare.${app}" />
214 <!-- if="${target::exists('help.prepare.${app}')}"/>-->
216 <property name="help.context" value="source/${app}.h"/>
217 <if test="${not file::exists(help.context)}">
219 <property name="headerfile" value="source/${app}_ASCII.h"/>
220 <loadfile file="${help.resource}" property="header" />
221 <echo file="${headerfile}" message="${header}" />
222 <echo message="header file ${help.resource}" />
224 <echo message="// Generated Help Map file.&#13;&#10;" file="${help.context}" />
225 <echo message="" file="${help.context}" append="true"/>
226 <echo message="// Commands (ID_* and IDM_*)&#13;&#10;" file="${help.context}" append="true"/>
227 <exec program="makehm"
228 commandline="/h ID_,HID_,0x10000 IDM_,HIDM_,0x10000 ${headerfile}"
229 output="${help.context}"
230 append="true"
231 verbose="false" />
233 <echo message="" file="${help.context}" append="true"/>
234 <echo message="// Prompts (IDP_*)&#13;&#10;" file="${help.context}" append="true"/>
235 <exec program="makehm"
236 commandline="/h IDP_,HIDP_,0x30000 ${headerfile}"
237 output="${help.context}"
238 append="true"
239 verbose="false" />
241 <echo message="" file="${help.context}" append="true"/>
242 <echo message="// Resources (IDR_*)&#13;&#10;" file="${help.context}" append="true"/>
243 <exec program="makehm"
244 commandline="/h IDR_,HIDR_,0x20000 ${headerfile}"
245 output="${help.context}"
246 append="true"
247 verbose="false" />
249 <echo message="" file="${help.context}" append="true"/>
250 <echo message="// Dialogs (IDD_*)&#13;&#10;" file="${help.context}" append="true"/>
251 <exec program="makehm"
252 commandline="/h IDD_,HIDD_,0x20000 ${headerfile}"
253 output="${help.context}"
254 append="true"
255 verbose="false" />
257 <!--
258 <echo message="" file="${help.context}" append="true"/>
259 <echo message="// Frame Controls xyxzy(IDW_*)&#13;&#10;" file="${help.context}" append="true"/>
260 <exec program="makehm"
261 commandline="/h /a afxhh.h IDW_,HIDW_,0x50000 ${headerfile}"
262 output="${help.context}"
263 append="true"
264 verbose="false" />
266 </if>
268 <!-- Copy help context to target location -->
269 <copy file="${help.context}" tofile="${doc.target.work}/context.h" overwrite="true"/>
271 </target>
273 </project>