OSDN Git Service

Success Send patch body but attachment have been problem
[tortoisegit/TortoiseGitJp.git] / doc / doc.build.include
1 <?xml version="1.0"?>\r
2 <!--\r
3 ============================================================ \r
4  $Date: 2008-12-16 22:51:06 +0800 (Tue, 16 Dec 2008) $\r
5  $Author: luebbe $\r
6  $Rev: 14867 $\r
7 ============================================================ \r
8 \r
9 Customization layer for build files.\r
10 \r
11 You can override these settings by defining them on the command line or by\r
12 defining them in doc.build.user which is included here if it exists.\r
13 \r
14 Example content of doc.build.user:\r
15 <property name="applications" value="TortoiseGit" />\r
16 <property name="docformats" value="chm" />\r
17 <property name="languages" value="en" />\r
18 \r
19 This will only build the english HTML help file for TortoiseGit\r
20 \r
21 -->\r
22 \r
23 <project name="customize">\r
24         <description>Customization layer for build file</description>\r
25 \r
26         <include buildfile="doc.build.user" if="${file::exists('doc.build.user')}"/>\r
27 \r
28         <!-- ============================================================ -->\r
29         <!-- List of applications, languages and output formats in which  -->\r
30         <!-- the documentation will be created by default                 -->\r
31 \r
32         <property name="applications" \r
33                 value="TortoiseGit" \r
34                 unless="${property::exists('applications')}"\r
35         />\r
36         \r
37         <!-- pdf,chm,html,htmlsingle -->\r
38         <property name="docformats" \r
39                 value="chm" \r
40                 unless="${property::exists('docformats')}"\r
41         />\r
42         \r
43         <!--,de,es,fa,fi,fr,hr,id,ja,nl,ru,sl,sk,sr_spc,sr_spl,zh_CN" -->\r
44         <property name="languages" \r
45                 value="en"\r
46                 unless="${property::exists('languages')}"\r
47         />\r
48 \r
49         <!-- ============================================================ -->\r
50         <!-- Define property so that doc.build alone doesn't fail         -->\r
51 \r
52         <property name="devrelease"\r
53                 value="" \r
54                 unless="${property::exists('devrelease')}"\r
55         />\r
56 \r
57         <property name="critical" value="${devrelease!='-dev'}" />\r
58 \r
59         <!-- ============================================================ -->\r
60         <!-- Settings for the translation                                 -->\r
61         \r
62         <!-- Base language. All other documents are created using this    -->\r
63         <!-- documents structure                                          -->\r
64         <property name="lang.base"\r
65                 value="en"\r
66                 unless="${property::exists('lang.base')}"\r
67         />\r
68         \r
69         <!-- ============================================================ -->\r
70         <!-- Settings for the CHM Help creation                           -->\r
71         <!-- Attention, this is implemented as a target, because I could  -->\r
72         <!-- not find a better way to create the property depending on    -->\r
73         <!-- the app name                                                 -->\r
74         \r
75         <target name="help.prepare.TortoiseGit">\r
76         <echo message="help.prepare.TortoiseGit"/>\r
77                 <property name="help.resource.TortoiseGit"\r
78                   value="../src/TortoiseProc/resource.h"\r
79                         unless="${property::exists('help.resource.TortoiseGit')}"\r
80                 />\r
81                 <property name="help.resource" value="${help.resource.TortoiseGit}" />\r
82         </target>\r
83         <target name="help.prepare.TortoiseMerge">\r
84         <echo message="help.prepare.TortoiseMerge"/>\r
85                 <property name="help.resource.TortoiseMerge"\r
86                 value="../src/TortoiseMerge/resource.h"\r
87                         unless="${property::exists('help.resource.TortoiseMerge')}"\r
88                 />\r
89                 <property name="help.resource" value="${help.resource.TortoiseMerge}" />\r
90         </target>\r
91         <target name="help.prepare.Git">\r
92         <echo message="help.prepare.Git"/>\r
93                 <property name="help.resource.TortoiseGit"\r
94                   value="../src/TortoiseProc/resource.h"\r
95                         unless="${property::exists('help.resource.TortoiseGit')}"\r
96                 />\r
97                 <property name="help.resource" value="${help.resource.TortoiseGit}" />\r
98         </target>\r
99         <!-- Fileset to exclude from translation and .pot creation        -->\r
100         <!-- Duplicate these files in the "sourcefiles" fileset           -->\r
101 <!--\r
102         <fileset id="files.exclude">\r
103                 <include name="source/${lang.base}/**/version.xml"/>\r
104                 <include name="source/${lang.base}/**/pubdate.xml"/>\r
105         </fileset>\r
106         \r
107         <fileset id="files.filtered">\r
108                 <include name="source/${lang.base}/TortoiseGit/**/*.xml"/>\r
109                 <include name="source/${lang.base}/**/wishlist.xml"/>\r
110                 <exclude name="source/${lang.base}/**/version.xml"/>\r
111                 <exclude name="source/${lang.base}/**/pubdate.xml"/>\r
112         </fileset>\r
113 -->\r
114 \r
115         <!-- Name of the po template file to create. Can also be a list   -->\r
116         <!-- of applications if you want to create a template for each    -->\r
117         <property name="potemplates" value="${applications}" />\r
118 \r
119         <!-- ============================================================ -->\r
120         <!-- Paths to the binaries                                        -->\r
121         <property name="path.bin" \r
122                 value="${path::get-full-path('../Tools')}"\r
123                 unless="${property::exists('path.bin')}"\r
124         />\r
125         <property name="path.fop" \r
126                 value="${path::get-full-path('../Tools/fop')}"\r
127                 unless="${property::exists('path.fop')}"\r
128         />\r
129         <property name="path.xsl" \r
130                 value="${string::replace(path::get-full-path('../Tools/xsl'), '\', '/')}"\r
131                 unless="${property::exists('path.xsl')}"\r
132         />\r
133         <property name="path.gettext" \r
134                 value="${path::get-full-path('../Tools')}"\r
135                 unless="${property::exists('path.gettext')}"\r
136         />\r
137 \r
138         <!-- Choose between 32/64 Bit executable of SubWCRev -->\r
139         <property name="bindirextension" \r
140           value=""\r
141                 unless="${property::exists('bindirextension')}"\r
142         />\r
143         <property name="path.subwcrev" \r
144                 value="../bin/release${bindirextension}/bin/"\r
145                 unless="${property::exists('path.subwcrev')}"\r
146         />\r
147 \r
148         <!-- ============================================================ -->\r
149         <!-- Settings for XSLTPROC                                        -->\r
150 \r
151         <!-- Paths where the xsl and css files are found                  -->\r
152         <property name="path.user.xsl" value="./xsl"/>\r
153         <property name="path.user.css" value="./source"/>\r
154 \r
155         <!-- stylesheets and stringparams                                 -->\r
156         <property name="xsl.pdf.params" value="--nonet --xinclude"/>\r
157         <property name="xsl.pdf.file" value="pdfdoc.xsl"/>\r
158         <property name="xsl.chm.params" value="--nonet --xinclude --stringparam html.stylesheet styles_chm.css --stringparam use.id.as.filename 1"/>\r
159         <property name="xsl.chm.file" value="htmlhelp.xsl"/>\r
160         <property name="xsl.html.params" value="--nonet --xinclude --stringparam html.stylesheet styles_html.css --stringparam use.id.as.filename 1"/>\r
161         <property name="xsl.html.file" value="htmlsingle.xsl"/>\r
162         <property name="xsl.htmlsingle.params" value="--nonet --xinclude --stringparam html.stylesheet styles_html.css --stringparam use.id.as.filename 1"/>\r
163         <property name="xsl.htmlsingle.file" value="htmlchunk.xsl"/>\r
164         <property name="xsl.profile.params" value="--nonet --xinclude --stringparam profile.condition &quot;exclude&quot;"/>\r
165         <property name="xsl.profile.file" value="profile.xsl"/>\r
166 \r
167 <!-- ====================================================================== -->\r
168 <!-- Custom target to prepare the build                                     -->\r
169 <!-- ====================================================================== -->\r
170 \r
171         <target name="prepare.custom" \r
172                 description="Prepare XSL files, create help context file"\r
173                 depends="PrepareVersionInfo">\r
174 \r
175                 <exec program="SubWCRev.exe"\r
176                         commandline="source/${lang.base} source/pubdate.tmpl source/${lang.base}/pubdate.xml"\r
177                         basedir="${path.subwcrev}"\r
178                         failonerror="false"\r
179                         resultproperty="result.subwcrev"\r
180                         verbose="false"\r
181                 />\r
182                 <copy file="source/Pubdate.none" tofile="source/${lang.base}/pubdate.xml" overwrite="true" unless="${result.subwcrev=='0'}"/>\r
183 \r
184                 <!-- Delete CHM help context files to force re-creation -->\r
185                 <delete file="source/TortoiseGit.h" if="${file::exists('source/TortoiseGit.h')}"/>\r
186                 <delete file="source/TortoiseMerge.h" if="${file::exists('source/TortoiseMerge.h')}"/>\r
187 \r
188                 <!-- Store path to docbook stylesheets in helper stylesheets -->\r
189                 <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"/>\r
190                 <echo message="&lt;xsl:import href=&quot;${path.xsl}/fo/docbook.xsl&quot;/&gt;" file="${path.user.xsl}/db_pdfdoc.xsl" append="true"/>\r
191                 <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_pdfdoc.xsl" append="true"/>\r
192 \r
193                 <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"/>\r
194                 <echo message="&lt;xsl:import href=&quot;${path.xsl}/htmlhelp/htmlhelp.xsl&quot;/&gt;" file="${path.user.xsl}/db_htmlhelp.xsl" append="true"/>\r
195                 <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_htmlhelp.xsl" append="true"/>\r
196 \r
197                 <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"/>\r
198                 <echo message="&lt;xsl:import href=&quot;${path.xsl}/html/docbook.xsl&quot;/&gt;" file="${path.user.xsl}/db_htmlsingle.xsl" append="true"/>\r
199                 <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_htmlsingle.xsl" append="true"/>\r
200 \r
201                 <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"/>\r
202                 <echo message="&lt;xsl:import href=&quot;${path.xsl}/html/chunk.xsl&quot;/&gt;" file="${path.user.xsl}/db_htmlchunk.xsl" append="true"/>\r
203                 <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_htmlchunk.xsl" append="true"/>\r
204 \r
205         </target>\r
206 \r
207 <!-- ====================================================================== -->\r
208 <!-- Prepare version info for version file and output filenames             -->\r
209 <!-- ====================================================================== -->\r
210 \r
211         <target name="PrepareVersionInfo" description="Prepares version info for version file and output filenames">\r
212 \r
213                 <if test="${not environment::variable-exists('MajorVersion')}">\r
214 \r
215                         <if test="${file::exists('../versioninfo.build')}">\r
216                                 <!-- try to get version info even if full build environment is not available -->\r
217                                 <property name="SubWCRevFileName" value="${path.subwcrev}/subwcrev.exe" unless="${property::exists('configuration')}"/>\r
218                                         <nant target="versioninfo">\r
219                                                 <buildfiles>\r
220                                                         <include name="../versioninfo.build" />\r
221                                                 </buildfiles>\r
222                                         </nant>\r
223 <!--                            <echo>Note: version information set!</echo> -->\r
224                         </if>\r
225                         <if test="${not file::exists('../versioninfo.build')}">\r
226                                 <echo>Version information set to dummy values</echo>\r
227                                 <setenv>\r
228                                         <variable name="MajorVersion" value="ver" />\r
229                                         <variable name="MinorVersion" value="x" />\r
230                                         <variable name="MicroVersion" value="x" />\r
231                                 </setenv>\r
232                         </if>                                            \r
233                 </if>\r
234 \r
235                 <property name="docverstring" value="${environment::get-variable('MajorVersion')}.${environment::get-variable('MinorVersion')}.${environment::get-variable('MicroVersion')}"/>\r
236 \r
237         </target>\r
238 \r
239 <!-- ====================================================================== -->\r
240 <!-- Prepare help context file                                              -->\r
241 <!-- ====================================================================== -->\r
242 \r
243         <target name="help.prepare" description="Create CHM help context">\r
244                 <call target="help.prepare.${app}" />\r
245 <!--            if="${target::exists('help.prepare.${app}')}"/>-->\r
246 \r
247                 <property name="help.context" value="source/${app}.h"/>\r
248                 <if test="${not file::exists(help.context)}">\r
249 \r
250                         <property name="headerfile" value="source/${app}_ASCII.h"/>\r
251                         <loadfile file="${help.resource}" property="header" />\r
252                         <echo file="${headerfile}" message="${header}" />\r
253                         <echo message="header file ${help.resource}" />\r
254                         \r
255                         <echo message="// Generated Help Map file." file="${help.context}" />\r
256                         <echo message="" file="${help.context}" append="true"/>\r
257                         <echo message="// Commands (ID_* and IDM_*)" file="${help.context}" append="true"/>\r
258                         <exec program="makehm"\r
259                                                 commandline="/h ID_,HID_,0x10000 IDM_,HIDM_,0x10000 ${headerfile}"\r
260                                                 output="${help.context}"\r
261                                                 append="true"\r
262                                                 verbose="false" />\r
263 \r
264                         <echo message="" file="${help.context}" append="true"/>\r
265                         <echo message="echo // Prompts (IDP_*)" file="${help.context}" append="true"/>\r
266                         <exec program="makehm"\r
267                                                 commandline="/h IDP_,HIDP_,0x30000 ${headerfile}"\r
268                                                 output="${help.context}"\r
269                                                 append="true"\r
270                                                 verbose="false" />\r
271 \r
272                         <echo message="" file="${help.context}" append="true"/>\r
273                         <echo message="echo // Resources (IDR_*)" file="${help.context}" append="true"/>\r
274                         <exec program="makehm"\r
275                                                 commandline="/h IDR_,HIDR_,0x20000 ${headerfile}"\r
276                                                 output="${help.context}"\r
277                                                 append="true"\r
278                                                 verbose="false" />\r
279 \r
280                         <echo message="" file="${help.context}" append="true"/>\r
281                         <echo message="echo // Dialogs (IDD_*)" file="${help.context}" append="true"/>\r
282                         <exec program="makehm"\r
283                                                 commandline="/h IDD_,HIDD_,0x20000 ${headerfile}"\r
284                                                 output="${help.context}"\r
285                                                 append="true"\r
286                                                 verbose="false" />\r
287 \r
288                         <echo message="" file="${help.context}" append="true"/>\r
289                         <echo message="// Frame Controls xyxzy(IDW_*)" file="${help.context}" append="true"/>\r
290                         <exec program="makehm"\r
291                                                 commandline="/h /a afxhh.h IDW_,HIDW_,0x50000 ${headerfile}"\r
292                                                 output="${help.context}"\r
293                                                 append="true"\r
294                                                 verbose="false" />\r
295                 </if>\r
296 \r
297                 <!-- Copy help context to target location -->\r
298                 <copy file="${help.context}" tofile="${doc.target.work}/context.h" overwrite="true"/>\r
299 \r
300         </target>\r
301 \r
302 </project>\r