OSDN Git Service

Add Document from TortoiseSVN 15285
[tortoisegit/TortoiseGitJp.git] / doc / doc.build.include
diff --git a/doc/doc.build.include b/doc/doc.build.include
new file mode 100644 (file)
index 0000000..7fe81d2
--- /dev/null
@@ -0,0 +1,291 @@
+<?xml version="1.0"?>\r
+<!--\r
+============================================================ \r
+ $Date: 2008-12-16 22:51:06 +0800 (Tue, 16 Dec 2008) $\r
+ $Author: luebbe $\r
+ $Rev: 14867 $\r
+============================================================ \r
+\r
+Customization layer for build files.\r
+\r
+You can override these settings by defining them on the command line or by\r
+defining them in doc.build.user which is included here if it exists.\r
+\r
+Example content of doc.build.user:\r
+<property name="applications" value="TortoiseSVN" />\r
+<property name="docformats" value="chm" />\r
+<property name="languages" value="en" />\r
+\r
+This will only build the english HTML help file for TortoiseSVN\r
+\r
+-->\r
+\r
+<project name="customize">\r
+       <description>Customization layer for build file</description>\r
+\r
+       <include buildfile="doc.build.user" if="${file::exists('doc.build.user')}"/>\r
+\r
+       <!-- ============================================================ -->\r
+       <!-- List of applications, languages and output formats in which  -->\r
+       <!-- the documentation will be created by default                 -->\r
+\r
+       <property name="applications" \r
+               value="TortoiseSVN,TortoiseMerge" \r
+               unless="${property::exists('applications')}"\r
+       />\r
+       <property name="docformats" \r
+               value="pdf,chm,html,htmlsingle" \r
+               unless="${property::exists('docformats')}"\r
+       />\r
+       <property name="languages" \r
+               value="en,de,es,fa,fi,fr,hr,id,ja,nl,ru,sl,sk,sr_spc,sr_spl,zh_CN" \r
+               unless="${property::exists('languages')}"\r
+       />\r
+\r
+       <!-- ============================================================ -->\r
+       <!-- Define property so that doc.build alone doesn't fail         -->\r
+\r
+       <property name="devrelease"\r
+               value="" \r
+               unless="${property::exists('devrelease')}"\r
+       />\r
+\r
+       <property name="critical" value="${devrelease!='-dev'}" />\r
+\r
+       <!-- ============================================================ -->\r
+       <!-- Settings for the translation                                 -->\r
+       \r
+       <!-- Base language. All other documents are created using this    -->\r
+       <!-- documents structure                                          -->\r
+       <property name="lang.base"\r
+               value="en"\r
+               unless="${property::exists('lang.base')}"\r
+       />\r
+       \r
+       <!-- ============================================================ -->\r
+       <!-- Settings for the CHM Help creation                           -->\r
+       <!-- Attention, this is implemented as a target, because I could  -->\r
+       <!-- not find a better way to create the property depending on    -->\r
+       <!-- the app name                                                 -->\r
+       \r
+       <target name="help.prepare.TortoiseSVN">\r
+       <echo message="help.prepare.TortoiseSVN"/>\r
+               <property name="help.resource.TortoiseSVN"\r
+                 value="../src/TortoiseProc/resource.h"\r
+                       unless="${property::exists('help.resource.TortoiseSVN')}"\r
+               />\r
+               <property name="help.resource" value="${help.resource.TortoiseSVN}" />\r
+       </target>\r
+       <target name="help.prepare.TortoiseMerge">\r
+       <echo message="help.prepare.TortoiseMerge"/>\r
+               <property name="help.resource.TortoiseMerge"\r
+               value="../src/TortoiseMerge/resource.h"\r
+                       unless="${property::exists('help.resource.TortoiseMerge')}"\r
+               />\r
+               <property name="help.resource" value="${help.resource.TortoiseMerge}" />\r
+       </target>\r
+       \r
+       <!-- Fileset to exclude from translation and .pot creation        -->\r
+       <!-- Duplicate these files in the "sourcefiles" fileset           -->\r
+<!--\r
+       <fileset id="files.exclude">\r
+               <include name="source/${lang.base}/**/version.xml"/>\r
+               <include name="source/${lang.base}/**/pubdate.xml"/>\r
+       </fileset>\r
+       \r
+       <fileset id="files.filtered">\r
+               <include name="source/${lang.base}/TortoiseSVN/**/*.xml"/>\r
+               <include name="source/${lang.base}/**/wishlist.xml"/>\r
+               <exclude name="source/${lang.base}/**/version.xml"/>\r
+               <exclude name="source/${lang.base}/**/pubdate.xml"/>\r
+       </fileset>\r
+-->\r
+\r
+       <!-- Name of the po template file to create. Can also be a list   -->\r
+       <!-- of applications if you want to create a template for each    -->\r
+       <property name="potemplates" value="${applications}" />\r
+\r
+       <!-- ============================================================ -->\r
+       <!-- Paths to the binaries                                        -->\r
+       <property name="path.bin" \r
+               value="${path::get-full-path('../Tools')}"\r
+               unless="${property::exists('path.bin')}"\r
+       />\r
+       <property name="path.fop" \r
+               value="${path::get-full-path('../Tools/fop')}"\r
+               unless="${property::exists('path.fop')}"\r
+       />\r
+       <property name="path.xsl" \r
+               value="${string::replace(path::get-full-path('../Tools/xsl'), '\', '/')}"\r
+               unless="${property::exists('path.xsl')}"\r
+       />\r
+       <property name="path.gettext" \r
+               value="${path::get-full-path('../Tools')}"\r
+               unless="${property::exists('path.gettext')}"\r
+       />\r
+\r
+       <!-- Choose between 32/64 Bit executable of SubWCRev -->\r
+       <property name="bindirextension" \r
+         value=""\r
+               unless="${property::exists('bindirextension')}"\r
+       />\r
+       <property name="path.subwcrev" \r
+               value="../bin/release${bindirextension}/bin/"\r
+               unless="${property::exists('path.subwcrev')}"\r
+       />\r
+\r
+       <!-- ============================================================ -->\r
+       <!-- Settings for XSLTPROC                                        -->\r
+\r
+       <!-- Paths where the xsl and css files are found                  -->\r
+       <property name="path.user.xsl" value="./xsl"/>\r
+       <property name="path.user.css" value="./source"/>\r
+\r
+       <!-- stylesheets and stringparams                                 -->\r
+       <property name="xsl.pdf.params" value="--nonet --xinclude"/>\r
+       <property name="xsl.pdf.file" value="pdfdoc.xsl"/>\r
+       <property name="xsl.chm.params" value="--nonet --xinclude --stringparam html.stylesheet styles_chm.css --stringparam use.id.as.filename 1"/>\r
+       <property name="xsl.chm.file" value="htmlhelp.xsl"/>\r
+       <property name="xsl.html.params" value="--nonet --xinclude --stringparam html.stylesheet styles_html.css --stringparam use.id.as.filename 1"/>\r
+       <property name="xsl.html.file" value="htmlsingle.xsl"/>\r
+       <property name="xsl.htmlsingle.params" value="--nonet --xinclude --stringparam html.stylesheet styles_html.css --stringparam use.id.as.filename 1"/>\r
+       <property name="xsl.htmlsingle.file" value="htmlchunk.xsl"/>\r
+       <property name="xsl.profile.params" value="--nonet --xinclude --stringparam profile.condition &quot;exclude&quot;"/>\r
+       <property name="xsl.profile.file" value="profile.xsl"/>\r
+\r
+<!-- ====================================================================== -->\r
+<!-- Custom target to prepare the build                                     -->\r
+<!-- ====================================================================== -->\r
+\r
+       <target name="prepare.custom" \r
+               description="Prepare XSL files, create help context file"\r
+               depends="PrepareVersionInfo">\r
+\r
+               <exec program="SubWCRev.exe"\r
+                       commandline="source/${lang.base} source/pubdate.tmpl source/${lang.base}/pubdate.xml"\r
+                       basedir="${path.subwcrev}"\r
+                       failonerror="false"\r
+                       resultproperty="result.subwcrev"\r
+                       verbose="false"\r
+               />\r
+               <copy file="source/Pubdate.none" tofile="source/${lang.base}/pubdate.xml" overwrite="true" unless="${result.subwcrev=='0'}"/>\r
+\r
+               <!-- Delete CHM help context files to force re-creation -->\r
+               <delete file="source/TortoiseSVN.h" if="${file::exists('source/TortoiseSVN.h')}"/>\r
+               <delete file="source/TortoiseMerge.h" if="${file::exists('source/TortoiseMerge.h')}"/>\r
+\r
+               <!-- Store path to docbook stylesheets in helper stylesheets -->\r
+               <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
+               <echo message="&lt;xsl:import href=&quot;${path.xsl}/fo/docbook.xsl&quot;/&gt;" file="${path.user.xsl}/db_pdfdoc.xsl" append="true"/>\r
+               <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_pdfdoc.xsl" append="true"/>\r
+\r
+               <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
+               <echo message="&lt;xsl:import href=&quot;${path.xsl}/htmlhelp/htmlhelp.xsl&quot;/&gt;" file="${path.user.xsl}/db_htmlhelp.xsl" append="true"/>\r
+               <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_htmlhelp.xsl" append="true"/>\r
+\r
+               <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
+               <echo message="&lt;xsl:import href=&quot;${path.xsl}/html/docbook.xsl&quot;/&gt;" file="${path.user.xsl}/db_htmlsingle.xsl" append="true"/>\r
+               <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_htmlsingle.xsl" append="true"/>\r
+\r
+               <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
+               <echo message="&lt;xsl:import href=&quot;${path.xsl}/html/chunk.xsl&quot;/&gt;" file="${path.user.xsl}/db_htmlchunk.xsl" append="true"/>\r
+               <echo message="&lt;/xsl:stylesheet&gt;" file="${path.user.xsl}/db_htmlchunk.xsl" append="true"/>\r
+\r
+       </target>\r
+\r
+<!-- ====================================================================== -->\r
+<!-- Prepare version info for version file and output filenames             -->\r
+<!-- ====================================================================== -->\r
+\r
+       <target name="PrepareVersionInfo" description="Prepares version info for version file and output filenames">\r
+\r
+               <if test="${not environment::variable-exists('MajorVersion')}">\r
+\r
+                       <if test="${file::exists('../versioninfo.build')}">\r
+                               <!-- try to get version info even if full build environment is not available -->\r
+                               <property name="SubWCRevFileName" value="${path.subwcrev}/subwcrev.exe" unless="${property::exists('configuration')}"/>\r
+                                       <nant target="versioninfo">\r
+                                               <buildfiles>\r
+                                                       <include name="../versioninfo.build" />\r
+                                               </buildfiles>\r
+                                       </nant>\r
+<!--                           <echo>Note: version information set!</echo> -->\r
+                       </if>\r
+                       <if test="${not file::exists('../versioninfo.build')}">\r
+                               <echo>Version information set to dummy values</echo>\r
+                               <setenv>\r
+                                       <variable name="MajorVersion" value="ver" />\r
+                                       <variable name="MinorVersion" value="x" />\r
+                                       <variable name="MicroVersion" value="x" />\r
+                               </setenv>\r
+                       </if>                                            \r
+               </if>\r
+\r
+               <property name="docverstring" value="${environment::get-variable('MajorVersion')}.${environment::get-variable('MinorVersion')}.${environment::get-variable('MicroVersion')}"/>\r
+\r
+       </target>\r
+\r
+<!-- ====================================================================== -->\r
+<!-- Prepare help context file                                              -->\r
+<!-- ====================================================================== -->\r
+\r
+       <target name="help.prepare" description="Create CHM help context">\r
+               <call target="help.prepare.${app}" />\r
+<!--           if="${target::exists('help.prepare.${app}')}"/>-->\r
+\r
+               <property name="help.context" value="source/${app}.h"/>\r
+               <if test="${not file::exists(help.context)}">\r
+\r
+                       <property name="headerfile" value="source/${app}_ASCII.h"/>\r
+                       <loadfile file="${help.resource}" property="header" />\r
+                       <echo file="${headerfile}" message="${header}" />\r
+                       <echo message="header file ${help.resource}" />\r
+                       \r
+                       <echo message="// Generated Help Map file." file="${help.context}" />\r
+                       <echo message="" file="${help.context}" append="true"/>\r
+                       <echo message="// Commands (ID_* and IDM_*)" file="${help.context}" append="true"/>\r
+                       <exec program="makehm"\r
+                                               commandline="/h ID_,HID_,0x10000 IDM_,HIDM_,0x10000 ${headerfile}"\r
+                                               output="${help.context}"\r
+                                               append="true"\r
+                                               verbose="false" />\r
+\r
+                       <echo message="" file="${help.context}" append="true"/>\r
+                       <echo message="echo // Prompts (IDP_*)" file="${help.context}" append="true"/>\r
+                       <exec program="makehm"\r
+                                               commandline="/h IDP_,HIDP_,0x30000 ${headerfile}"\r
+                                               output="${help.context}"\r
+                                               append="true"\r
+                                               verbose="false" />\r
+\r
+                       <echo message="" file="${help.context}" append="true"/>\r
+                       <echo message="echo // Resources (IDR_*)" file="${help.context}" append="true"/>\r
+                       <exec program="makehm"\r
+                                               commandline="/h IDR_,HIDR_,0x20000 ${headerfile}"\r
+                                               output="${help.context}"\r
+                                               append="true"\r
+                                               verbose="false" />\r
+\r
+                       <echo message="" file="${help.context}" append="true"/>\r
+                       <echo message="echo // Dialogs (IDD_*)" file="${help.context}" append="true"/>\r
+                       <exec program="makehm"\r
+                                               commandline="/h IDD_,HIDD_,0x20000 ${headerfile}"\r
+                                               output="${help.context}"\r
+                                               append="true"\r
+                                               verbose="false" />\r
+\r
+                       <echo message="" file="${help.context}" append="true"/>\r
+                       <echo message="// Frame Controls xyxzy(IDW_*)" file="${help.context}" append="true"/>\r
+                       <exec program="makehm"\r
+                                               commandline="/h /a afxhh.h IDW_,HIDW_,0x50000 ${headerfile}"\r
+                                               output="${help.context}"\r
+                                               append="true"\r
+                                               verbose="false" />\r
+               </if>\r
+\r
+               <!-- Copy help context to target location -->\r
+               <copy file="${help.context}" tofile="${doc.target.work}/context.h" overwrite="true"/>\r
+\r
+       </target>\r
+\r
+</project>\r