forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreference.build
218 lines (183 loc) · 6.68 KB
/
reference.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<?xml version="1.0" ?>
<project
name="doc"
default="build"
xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd"
>
<property name="root.dir" value="../.." />
<include buildfile="${root.dir}/build-common/common.xml" />
<target name="init" depends="common.init set-doc-version">
<property name="lang" value="en" />
<property name="output.dir" value="${build.dir}/doc" />
<property name="output.html.basename" value="NHibernate.Reference" />
<property name="output.help2.dir" value="${output.dir}/help2" />
<property name="build.html.dir" value="${output.dir}" />
<property name="build.single.dir" value="${build.html.dir}/html_single" />
<property name="build.chunk.dir" value="${build.html.dir}/html" />
<property name="build.shared.dir" value="${build.html.dir}/shared" />
<property name="build.chm.dir" value="${output.dir}/tmp-chm" />
<property name="build.help2.dir" value="${output.dir}/tmp-help2" />
<property name="build.pdf.dir" value="${output.dir}/tmp-pdf" />
<property name="hhc.exe" value="${environment::get-folder-path('ProgramFiles')}\HTML Help Workshop\hhc" />
<path id="saxon.classpath" >
<pathelement file="support/lib/avalon-framework-cvs-20020806.jar" />
<pathelement file="support/lib/batik.jar" />
<pathelement file="support/lib/fop-0.20.5-RFC3066-patched.jar" />
<pathelement file="support/lib/jai_codec.jar" />
<pathelement file="support/lib/jai_core.jar" />
<pathelement file="support/lib/rowan-0.1.jar" />
<pathelement file="support/lib/saxon.jar" />
<pathelement file="support/lib/saxon-dbxsl-extensions.jar" />
</path>
</target>
<target name="clean" depends="init" description="Cleans any previous builds">
<delete dir="${build.html.dir}" failonerror="false" />
</target>
<target name="build" depends="init"
description="Generates the documentation in multiple formats from the Docbook files.">
<call target="build-html" />
<call target="build-chm" />
<call target="build-help2" />
<call target="build-pdf" />
</target>
<target name="build-html.make-directories" depends="init">
<mkdir dir="${build.single.dir}" failonerror="false" />
<mkdir dir="${build.chunk.dir}" failonerror="false" />
</target>
<target name="build-html.generate" depends="init build-html.make-directories">
<exec program="java" workingdir="${build.chunk.dir}">
<arg value="-classpath" />
<arg>
<path refid="saxon.classpath"/>
</arg>
<arg value="com.icl.saxon.StyleSheet" />
<arg file="master.xml"/>
<arg file="styles/html_chunk.xsl"/>
</exec>
<exec program="java" workingdir="${build.single.dir}">
<arg value="-classpath" />
<arg>
<path refid="saxon.classpath"/>
</arg>
<arg value="com.icl.saxon.StyleSheet" />
<arg file="master.xml"/>
<arg file="styles/html.xsl"/>
</exec>
</target>
<target name="build-html.copy-misc-files" depends="init">
<!-- Copy the images and the stylesheet -->
<copy todir="${build.shared.dir}/images" overwrite="true" >
<fileset basedir="images">
<include name="**/*.gif" />
<include name="**/*.png" />
</fileset>
</copy>
<copy todir="${build.shared.dir}/css" overwrite="true" >
<fileset basedir="styles">
<include name="**/*.css" />
</fileset>
</copy>
</target>
<target name="build-html"
depends="build-html.generate build-html.copy-misc-files"
description="Generates html from docbook files." />
<target name="build-chm" depends="init" description="Generates chm file from docbook files.">
<mkdir dir="${build.chm.dir}" failonerror="false" />
<exec program="java" workingdir="${build.chm.dir}">
<arg value="-classpath" />
<arg>
<path refid="saxon.classpath"/>
</arg>
<arg value="com.icl.saxon.StyleSheet" />
<arg file="master.xml"/>
<arg file="styles/chm_help.xsl"/>
</exec>
<!-- Copy the images and the stylesheet -->
<copy todir="${build.chm.dir}/shared/images" overwrite="true" >
<fileset basedir="images">
<include name="**/*.gif" />
<include name="**/*.png" />
</fileset>
</copy>
<copy todir="${build.chm.dir}/shared/css" overwrite="true" >
<fileset basedir="styles">
<include name="**/*.css" />
</fileset>
</copy>
<!-- hhc.exe returns an inverted error code, so failonerror is set to false -->
<exec program="${hhc.exe}" failonerror="false">
<arg file="${build.chm.dir}/htmlhelp.hhp" />
</exec>
<copy file="${build.chm.dir}/htmlhelp.chm" tofile="${output.dir}/${output.html.basename}.chm" />
<delete dir="${build.chm.dir}" />
</target>
<target name="build-help2" if="${vshik.installed}" depends="build-chm" description="Generates HtmlHelp2 file from CHM file.">
<!-- convert the chm into the HxC -->
<exec program="HxConv.exe" basedir="${vshik.path}">
<arg path="${output.dir}/${output.html.basename}.chm" />
<arg value="-o" />
<arg path="${build.help2.dir}" />
<arg value="-y" />
</exec>
<mkdir dir="${output.help2.dir}" />
<!--
Compile the HxC into an HxS that can be included
in a Help2 collection
-->
<exec program="HxComp.exe" basedir="${vshik.path}">
<arg value="-p" />
<arg path="${build.help2.dir}/${output.html.basename}.HxC" />
<arg value="-o" />
<arg path="${output.help2.dir}/${output.html.basename}.HxS" />
</exec>
<!--
copying the Help2 files from cvs that describe the
Help collection, not the files generated by the build
that contain the content
-->
<copy todir="${output.help2.dir}">
<fileset basedir="support/help2/">
<include name="**/*" />
</fileset>
</copy>
<delete dir="${build.help2.dir}" />
</target>
<target name="build-pdf-prepare" depends="init">
<!-- Copy all the images to the output location, will be removed later. -->
<copy todir="${build.pdf.dir}/images">
<fileset basedir="images">
<include name="**/*.png"/>
<include name="**/*.svg"/>
<include name="**/*.gif"/>
</fileset>
</copy>
<!-- Create the XSL/FO temporary file. -->
<exec program="java">
<arg value="-classpath" />
<arg>
<path refid="saxon.classpath"/>
</arg>
<arg value="com.icl.saxon.StyleSheet" />
<arg value="-o"/>
<arg file="${build.pdf.dir}/docbook_fop.tmp"/>
<arg file="master.xml"/>
<arg file="styles/fopdf.xsl"/>
</exec>
</target>
<target name="build-pdf-normal" depends="build-pdf-prepare">
<!-- Create a PDF from the XSL/FO. -->
<exec program="java">
<arg value="-classpath" />
<arg>
<path refid="saxon.classpath"/>
</arg>
<arg value="org.apache.fop.apps.Fop" />
<arg value="${build.pdf.dir}/docbook_fop.tmp"/>
<arg value="${output.dir}/nhibernate_reference.pdf"/>
</exec>
</target>
<target name="build-pdf" depends="build-pdf-normal">
<!-- House keeping, delete temporary files. -->
<delete dir="${build.pdf.dir}" />
</target>
</project>