1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!-- This file is part of the DITA Open Toolkit project hosted on
|
---|
3 | Sourceforge.net. See the accompanying license.txt file for
|
---|
4 | applicable licenses.-->
|
---|
5 | <!-- (c) Copyright IBM Corp. 2006 All Rights Reserved. -->
|
---|
6 | <project name="dita2javahelp">
|
---|
7 |
|
---|
8 | <target name="dita2javahelp"
|
---|
9 | unless="noMap"
|
---|
10 | depends="build-init, preprocess, copy-css,
|
---|
11 | dita.topics.html, dita.inner.topics.html, dita.outer.topics.html">
|
---|
12 | <antcall target="dita.map.javahelp"></antcall>
|
---|
13 | <antcall target="compile.Java.Help"></antcall>
|
---|
14 | </target>
|
---|
15 |
|
---|
16 | <target name="dita.map.javahelp"
|
---|
17 | depends="dita.map.javahelp.init, dita.map.javahelp.toc,
|
---|
18 | dita.map.javahelp.map, dita.map.javahelp.set, dita.map.javahelp.index,
|
---|
19 | dita.out.map.javahelp.toc, dita.out.map.javahelp.map,
|
---|
20 | dita.out.map.javahelp.set, dita.out.map.javahelp.index">
|
---|
21 | </target>
|
---|
22 |
|
---|
23 | <target name="dita.map.javahelp.init"
|
---|
24 | description="Init properties for JavaHelp">
|
---|
25 | <basename property="dita.map.toc.root"
|
---|
26 | file="${dita.input.filename}"
|
---|
27 | suffix=".ditamap" />
|
---|
28 | <condition property="args.javahelp.toc" value="${dita.map.toc.root}">
|
---|
29 | <not>
|
---|
30 | <isset property="args.javahelp.toc" />
|
---|
31 | </not>
|
---|
32 | </condition>
|
---|
33 | <condition property="out.ext" value=".html">
|
---|
34 | <not>
|
---|
35 | <isset property="out.ext" />
|
---|
36 | </not>
|
---|
37 | </condition>
|
---|
38 | <condition property="args.javahelp.map" value="${dita.map.toc.root}">
|
---|
39 | <not>
|
---|
40 | <isset property="args.javahelp.map" />
|
---|
41 | </not>
|
---|
42 | </condition>
|
---|
43 | </target>
|
---|
44 |
|
---|
45 | <target name="dita.map.javahelp.toc"
|
---|
46 | depends="dita.map.javahelp.init" if="old.transform"
|
---|
47 | description="Build JavaHelp TOC file">
|
---|
48 | <xslt
|
---|
49 | basedir="${dita.temp.dir}"
|
---|
50 | destdir="${output.dir}"
|
---|
51 | includesfile="${dita.temp.dir}${file.separator}${user.input.file.listfile}"
|
---|
52 | classpathref="dost.class.path"
|
---|
53 | style="${dita.plugin.org.dita.javahelp.dir}/xsl/map2javahelptoc.xsl">
|
---|
54 | <excludesfile name="${dita.temp.dir}${file.separator}${resourceonlyfile}" if="resourceonlyfile"/>
|
---|
55 | <param name="DITAEXT" expression="${dita.ext}" if="dita.ext" />
|
---|
56 | <param name="OUTEXT" expression="${out.ext}" if="out.ext" />
|
---|
57 | <mapper type="glob"
|
---|
58 | from="*${dita.input.filename}"
|
---|
59 | to="*${args.javahelp.toc}.xml" />
|
---|
60 | <xmlcatalog refid="dita.catalog"/>
|
---|
61 | </xslt>
|
---|
62 | </target>
|
---|
63 |
|
---|
64 | <target name="dita.out.map.javahelp.toc"
|
---|
65 | depends="dita.map.javahelp.init" if="inner.transform"
|
---|
66 | description="Build JavaHelp TOC file">
|
---|
67 | <xslt
|
---|
68 | basedir="${dita.temp.dir}"
|
---|
69 | destdir="${output.dir}"
|
---|
70 | includesfile="${dita.temp.dir}${file.separator}${user.input.file.listfile}"
|
---|
71 | classpathref="dost.class.path"
|
---|
72 | style="${dita.plugin.org.dita.javahelp.dir}/xsl/map2javahelptoc.xsl">
|
---|
73 | <excludesfile name="${dita.temp.dir}${file.separator}${resourceonlyfile}" if="resourceonlyfile"/>
|
---|
74 | <param name="DITAEXT" expression="${dita.ext}" if="dita.ext" />
|
---|
75 | <param name="OUTEXT" expression="${out.ext}" if="out.ext" />
|
---|
76 | <mapper type="glob"
|
---|
77 | from="${user.input.file}"
|
---|
78 | to="${args.javahelp.toc}.xml" />
|
---|
79 | <xmlcatalog refid="dita.catalog"/>
|
---|
80 | </xslt>
|
---|
81 | </target>
|
---|
82 |
|
---|
83 | <target name="dita.map.javahelp.map"
|
---|
84 | depends="dita.map.javahelp.init" if="old.transform"
|
---|
85 | description="Build JavaHelp Map file">
|
---|
86 | <xslt
|
---|
87 | basedir="${dita.temp.dir}"
|
---|
88 | destdir="${output.dir}"
|
---|
89 | includesfile="${dita.temp.dir}${file.separator}${user.input.file.listfile}"
|
---|
90 | classpathref="dost.class.path"
|
---|
91 | style="${dita.plugin.org.dita.javahelp.dir}/xsl/map2javahelpmap.xsl">
|
---|
92 | <excludesfile name="${dita.temp.dir}${file.separator}${resourceonlyfile}" if="resourceonlyfile"/>
|
---|
93 | <param name="DITAEXT" expression="${dita.ext}" if="dita.ext" />
|
---|
94 | <param name="OUTEXT" expression="${out.ext}" if="out.ext" />
|
---|
95 | <mapper type="glob"
|
---|
96 | from="*${dita.input.filename}"
|
---|
97 | to="*${args.javahelp.map}.jhm" />
|
---|
98 | <xmlcatalog refid="dita.catalog"/>
|
---|
99 | </xslt>
|
---|
100 | </target>
|
---|
101 |
|
---|
102 | <target name="dita.out.map.javahelp.map"
|
---|
103 | depends="dita.map.javahelp.init" if="inner.transform"
|
---|
104 | description="Build JavaHelp Map file">
|
---|
105 | <xslt
|
---|
106 | basedir="${dita.temp.dir}"
|
---|
107 | destdir="${output.dir}"
|
---|
108 | includesfile="${dita.temp.dir}${file.separator}${user.input.file.listfile}"
|
---|
109 | classpathref="dost.class.path"
|
---|
110 | style="${dita.plugin.org.dita.javahelp.dir}/xsl/map2javahelpmap.xsl">
|
---|
111 | <excludesfile name="${dita.temp.dir}${file.separator}${resourceonlyfile}" if="resourceonlyfile"/>
|
---|
112 | <param name="DITAEXT" expression="${dita.ext}" if="dita.ext" />
|
---|
113 | <param name="OUTEXT" expression="${out.ext}" if="out.ext" />
|
---|
114 | <mapper type="glob"
|
---|
115 | from="${user.input.file}"
|
---|
116 | to="${args.javahelp.map}.jhm" />
|
---|
117 | <xmlcatalog refid="dita.catalog"/>
|
---|
118 | </xslt>
|
---|
119 | </target>
|
---|
120 |
|
---|
121 | <target name="dita.map.javahelp.set"
|
---|
122 | depends="dita.map.javahelp.init, dita.map.javahelp.map" if="old.transform"
|
---|
123 | description="Build JavaHelp Set file">
|
---|
124 | <xslt
|
---|
125 | basedir="${dita.temp.dir}"
|
---|
126 | destdir="${output.dir}"
|
---|
127 | includesfile="${dita.temp.dir}${file.separator}${user.input.file.listfile}"
|
---|
128 | classpathref="dost.class.path"
|
---|
129 | style="${dita.plugin.org.dita.javahelp.dir}/xsl/map2javahelpset.xsl">
|
---|
130 | <excludesfile name="${dita.temp.dir}${file.separator}${resourceonlyfile}" if="resourceonlyfile"/>
|
---|
131 | <param name="javahelpmap" expression="${args.javahelp.map}" />
|
---|
132 | <param name="javahelptoc" expression="${args.javahelp.toc}" />
|
---|
133 | <param name="basedir" expression="${basedir}"/>
|
---|
134 | <param name="outputdir" expression="${output.dir}"/>
|
---|
135 | <!--param name="outputdir" expression="${dita.dir}${file.separator}${output.dir}${file.separator}" /-->
|
---|
136 | <mapper type="glob"
|
---|
137 | from="*${dita.input.filename}"
|
---|
138 | to="*${dita.map.toc.root}_helpset.hs" />
|
---|
139 | <xmlcatalog refid="dita.catalog"/>
|
---|
140 | </xslt>
|
---|
141 | </target>
|
---|
142 |
|
---|
143 | <target name="dita.out.map.javahelp.set"
|
---|
144 | depends="dita.map.javahelp.init, dita.out.map.javahelp.map" if="inner.transform"
|
---|
145 | description="Build JavaHelp Set file">
|
---|
146 | <xslt
|
---|
147 | basedir="${dita.temp.dir}"
|
---|
148 | destdir="${output.dir}"
|
---|
149 | includesfile="${dita.temp.dir}${file.separator}${user.input.file.listfile}"
|
---|
150 | classpathref="dost.class.path"
|
---|
151 | style="${dita.plugin.org.dita.javahelp.dir}/xsl/map2javahelpset.xsl">
|
---|
152 | <excludesfile name="${dita.temp.dir}${file.separator}${resourceonlyfile}" if="resourceonlyfile"/>
|
---|
153 | <param name="javahelpmap" expression="${args.javahelp.map}" />
|
---|
154 | <param name="javahelptoc" expression="${args.javahelp.toc}" />
|
---|
155 | <param name="basedir" expression="${basedir}"/>
|
---|
156 | <param name="outputdir" expression="${output.dir}"/>
|
---|
157 | <!--param name="outputdir" expression="${dita.dir}${file.separator}${output.dir}${file.separator}" /-->
|
---|
158 | <mapper type="glob"
|
---|
159 | from="${user.input.file}"
|
---|
160 | to="${dita.map.toc.root}_helpset.hs" />
|
---|
161 | <xmlcatalog refid="dita.catalog"/>
|
---|
162 | </xslt>
|
---|
163 | </target>
|
---|
164 |
|
---|
165 | <target name="dita.map.javahelp.index" if="old.transform"
|
---|
166 | description="Build JavaHelp Index file">
|
---|
167 | <pipeline message="Extract index term."
|
---|
168 | tempdir="${dita.temp.dir}"
|
---|
169 | inputmap="${user.input.file}">
|
---|
170 | <module class="org.dita.dost.module.IndexTermExtractModule">
|
---|
171 | <param name="output" location="${output.dir}${file.separator}${user.input.file}"/>
|
---|
172 | <param name="targetext" value=".html"/>
|
---|
173 | <param name="indextype" value="javahelp"/>
|
---|
174 | <param name="encoding" value="${args.dita.locale}" if="args.dita.locale"/>
|
---|
175 | </module>
|
---|
176 | </pipeline>
|
---|
177 | </target>
|
---|
178 |
|
---|
179 | <target name="dita.out.map.javahelp.index" if="inner.transform"
|
---|
180 | description="Build JavaHelp Index file">
|
---|
181 | <pipeline message="Extract index term."
|
---|
182 | tempdir="${dita.temp.dir}"
|
---|
183 | inputmap="${user.input.file}">
|
---|
184 | <module class="org.dita.dost.module.IndexTermExtractModule">
|
---|
185 | <param name="output" location="${output.dir}${file.separator}${dita.map.filename.root}.xml"/>
|
---|
186 | <param name="targetext" value=".html"/>
|
---|
187 | <param name="indextype" value="javahelp"/>
|
---|
188 | <param name="encoding" value="${args.dita.locale}" if="args.dita.locale"/>
|
---|
189 | </module>
|
---|
190 | </pipeline>
|
---|
191 | </target>
|
---|
192 |
|
---|
193 | <target name="compile.Java.Help"
|
---|
194 | if="env.JHHOME"
|
---|
195 | description="Compile Java Help output">
|
---|
196 | <!-- delete 'JavaHelpSearch' directory before compiling. -->
|
---|
197 | <condition property="compile.dir" value="${dita.map.output.dir}">
|
---|
198 | <isset property="old.transform"/>
|
---|
199 | </condition>
|
---|
200 | <condition property="compile.dir" value="${output.dir}">
|
---|
201 | <isset property="inner.transform"/>
|
---|
202 | </condition>
|
---|
203 | <delete dir="${compile.dir}${file.separator}JavaHelpSearch" />
|
---|
204 | <java jar="${env.JHHOME}${file.separator}javahelp${file.separator}bin${file.separator}jhindexer.jar"
|
---|
205 | fork="true"
|
---|
206 | dir="${compile.dir}">
|
---|
207 | <arg value="." />
|
---|
208 | </java>
|
---|
209 | </target>
|
---|
210 |
|
---|
211 | <!-- depecrated: keep for back-compatibility, will be remvoed in a later release -->
|
---|
212 | <target name="dita.topics.javahelp" depends="dita.topics.html" />
|
---|
213 |
|
---|
214 | </project>
|
---|