| 1 |
<?xml version="1.0"?> |
| 2 |
|
| 3 |
<!-- |
| 4 |
|
| 5 |
Licensed to the Apache Software Foundation (ASF) under one or more |
| 6 |
contributor license agreements. See the NOTICE file distributed with |
| 7 |
this work for additional information regarding copyright ownership. |
| 8 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
| 9 |
(the "License"); you may not use this file except in compliance with |
| 10 |
the License. You may obtain a copy of the License at |
| 11 |
|
| 12 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 13 |
|
| 14 |
Unless required by applicable law or agreed to in writing, software |
| 15 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 16 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 |
See the License for the specific language governing permissions and |
| 18 |
limitations under the License. |
| 19 |
|
| 20 |
--> |
| 21 |
|
| 22 |
<!-- ====================================================================== --> |
| 23 |
<!-- version $Id$ --> |
| 24 |
<!-- ====================================================================== --> |
| 25 |
|
| 26 |
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd"> |
| 27 |
<document> |
| 28 |
<header> |
| 29 |
<title>Installing Batik</title> |
| 30 |
</header> |
| 31 |
|
| 32 |
<body> |
| 33 |
<section id="systemRequirements"> |
| 34 |
<title>System requirements</title> |
| 35 |
|
| 36 |
<p> |
| 37 |
Batik requires the following to be already installed in your system: |
| 38 |
</p> |
| 39 |
<dl> |
| 40 |
<dt>Java Runtime Environment</dt> |
| 41 |
<dd> |
| 42 |
<p> |
| 43 |
A Java 1.4 or above compatible runtime environment must be present. |
| 44 |
</p> |
| 45 |
</dd> |
| 46 |
</dl> |
| 47 |
</section> |
| 48 |
|
| 49 |
<section id="distributions"> |
| 50 |
<title>Choosing a distribution to download</title> |
| 51 |
|
| 52 |
<p> |
| 53 |
To install Batik, you will need to go to the |
| 54 |
<a href="site:download">download page</a> and download one or more ZIP |
| 55 |
file containing the distribution of your choice. It is good practice to |
| 56 |
<a href="#verify">verify the integrity</a> of the distribution files, |
| 57 |
especially if you are using one of our mirror sites. Here are the |
| 58 |
various components you will find in the download area and their intended |
| 59 |
use: |
| 60 |
</p> |
| 61 |
<ul> |
| 62 |
<li> |
| 63 |
<p> |
| 64 |
<strong>batik-</strong><em>version</em><strong>.zip</strong> (e.g., |
| 65 |
<code>batik-1.6.zip</code>) |
| 66 |
</p> |
| 67 |
<p> |
| 68 |
The <em>binary distribution</em> contains compiled executable JAR |
| 69 |
files that let you get started with Batik easily. This is the |
| 70 |
recommended distribution if you want to look at Batik’s features, |
| 71 |
or you want to experiment with SVG and see the fun things you can |
| 72 |
do with Batik. The binary distribution comes with a set of sample |
| 73 |
SVG files. |
| 74 |
</p> |
| 75 |
</li> |
| 76 |
|
| 77 |
<li> |
| 78 |
<p> |
| 79 |
<strong>batik-src-</strong><em>version</em><strong>.zip</strong> |
| 80 |
(e.g., <code>batik-src-1.6.zip</code>) |
| 81 |
</p> |
| 82 |
<p> |
| 83 |
The <em>source distribution</em> contains a complete snapshot of the |
| 84 |
Batik source code, documentation, regression tools and utilities as |
| 85 |
well as the script for building Batik. That distribution is a |
| 86 |
snapshot of the SVN repository. This is the recommended distribution |
| 87 |
for developers who want to dive into the code and understand how |
| 88 |
Batik can be integrated in their applications or how Batik can be |
| 89 |
extended. |
| 90 |
</p> |
| 91 |
</li> |
| 92 |
|
| 93 |
<li> |
| 94 |
<p> |
| 95 |
<strong>batik-docs-</strong><em>version</em><strong>.zip</strong> |
| 96 |
(e.g., <code>batik-docs-1.6.zip</code>) |
| 97 |
</p> |
| 98 |
<p> |
| 99 |
The <em>documentation bundle</em> contains a copy of |
| 100 |
the Javadoc for the Batik source code. |
| 101 |
</p> |
| 102 |
</li> |
| 103 |
</ul> |
| 104 |
|
| 105 |
<p> |
| 106 |
We make nightly copies of the source tree available from the |
| 107 |
<a href="http://svn.apache.org/builds/xml-batik">Apache |
| 108 |
build</a> server. These builds represent the current state of |
| 109 |
development and may or may not be as stable as releases. |
| 110 |
There are two types of distributions provided: |
| 111 |
</p> |
| 112 |
<ul> |
| 113 |
<li> |
| 114 |
<p> |
| 115 |
<strong>batik-svn-</strong><em>date</em><strong>.zip</strong> |
| 116 |
(e.g., <code>batik-svn-06-03-29.zip</code>) |
| 117 |
</p> |
| 118 |
<p> |
| 119 |
This contains a complete copy of the Subversion repository trunk, |
| 120 |
including support for running <a href="site:test">regard</a>, |
| 121 |
Batik’s regression testing utility. In particular this includes all |
| 122 |
the reference images for testing. Developers are encouraged to get |
| 123 |
these or better use <a href="download.html#svn">Subversion</a> |
| 124 |
directly. |
| 125 |
</p> |
| 126 |
</li> |
| 127 |
<li> |
| 128 |
<p> |
| 129 |
<strong>batik-src-</strong><em>date</em><strong>.zip</strong> |
| 130 |
(e.g., <code>batik-src-06-03-29.zip</code>) |
| 131 |
</p> |
| 132 |
<p> |
| 133 |
This contains all the source code and libraries needed to |
| 134 |
build and run Batik from source, but does not include the |
| 135 |
testing facilities. |
| 136 |
</p> |
| 137 |
</li> |
| 138 |
</ul> |
| 139 |
|
| 140 |
<!--p> |
| 141 |
<a href="http://arc.mcc.id.au/batik-nightly/">Unofficial nightly |
| 142 |
builds</a> of the latest code from the Subversion repository trunk |
| 143 |
are also available. |
| 144 |
</p--> |
| 145 |
|
| 146 |
<p> |
| 147 |
Older releases are available from the |
| 148 |
<a href="http://archive.apache.org/dist/xmlgraphics/batik">Apache archives</a>. |
| 149 |
However, we strongly recommend using the current release of Batik. |
| 150 |
</p> |
| 151 |
|
| 152 |
<p>In all cases, the user should:</p> |
| 153 |
|
| 154 |
<ul> |
| 155 |
<li> |
| 156 |
Make sure a Java Development Kit (JDK) is installed on the computer |
| 157 |
where Batik will be installed. See the |
| 158 |
<a href="#systemRequirements">system requirements</a>. Make sure |
| 159 |
that the <code>java</code> runtime is in the <code>PATH</code> |
| 160 |
environment variable. |
| 161 |
</li> |
| 162 |
<li> |
| 163 |
Select the directory where he/she wants to download the distribution. |
| 164 |
</li> |
| 165 |
<li> |
| 166 |
Download the desired distribution from the |
| 167 |
<a href="site:download">download page</a>. |
| 168 |
</li> |
| 169 |
<li> |
| 170 |
Download the associated PGP signature (.asc) and KEYS file |
| 171 |
(preferable) or MD5 hash (.md5). This must be done directly from the |
| 172 |
<a href="http://www.apache.org/dist/xmlgraphics/batik">Apache |
| 173 |
download</a> area to mean anything. |
| 174 |
</li> |
| 175 |
<li> |
| 176 |
Open a console and go to the directory where the distribution was |
| 177 |
downloaded. |
| 178 |
</li> |
| 179 |
<li> |
| 180 |
<a href="#verify">Verify the integrity</a> of the distribution. |
| 181 |
</li> |
| 182 |
<li> |
| 183 |
<p> |
| 184 |
Unpack the distribution with Java’s JAR utility: |
| 185 |
</p> |
| 186 |
<source>jar xvf <distribution></source> |
| 187 |
<p> |
| 188 |
For example, if you have downloaded batik-1.6.zip into |
| 189 |
/home/IamHere, type the following at the command prompt: |
| 190 |
</p> |
| 191 |
<source>cd /home/IamHere |
| 192 |
jar xvf batik-1.6.zip</source> |
| 193 |
<p> |
| 194 |
<strong>IMPORTANT:</strong> UNIX users, do not use the |
| 195 |
<code>unzip</code> utility to unpack the various Batik zip files, |
| 196 |
as this would not set the directories access rights properly. |
| 197 |
</p> |
| 198 |
</li> |
| 199 |
<li> |
| 200 |
<p> |
| 201 |
If you are using Mac OS X, you can now generate an application |
| 202 |
bundle for Squiggle, Batik's SVG browser: |
| 203 |
</p> |
| 204 |
<source>sh lib/make-squiggle-app.sh</source> |
| 205 |
<p> |
| 206 |
After running this script, a Finder window will be opened where |
| 207 |
you can find the generated Squiggle application bundle. Drag |
| 208 |
this to your Applications folder to install it. |
| 209 |
</p> |
| 210 |
</li> |
| 211 |
<li> |
| 212 |
Now you can follow the instructions specific to the application you |
| 213 |
want to use. For example, see the <a href="site:browser">SVG |
| 214 |
Browser</a> page or the <a href="site:rasterizer">SVG |
| 215 |
Rasterizer</a> page for an explanation on how to use these tools. |
| 216 |
</li> |
| 217 |
</ul> |
| 218 |
</section> |
| 219 |
|
| 220 |
<section id="optionalComponents"> |
| 221 |
<title>Optional components</title> |
| 222 |
|
| 223 |
<p> |
| 224 |
By default, the Batik source distribution comes with the |
| 225 |
<a href="http://www.mozilla.org/rhino/">Mozilla Rhino</a> JavaScript |
| 226 |
Engine (<code>js.jar</code>). |
| 227 |
</p> |
| 228 |
<p> |
| 229 |
To enable other scripting languages support, you will only need to |
| 230 |
install the correct jar files in <code>lib</code> directory of Batik and |
| 231 |
recompile your distribution. |
| 232 |
</p> |
| 233 |
<ul> |
| 234 |
<li> |
| 235 |
For Python, you need to download Jython distribution at |
| 236 |
<a href="http://www.jython.org/">http://www.jython.org/</a>. Then |
| 237 |
you put the <code>jython.jar</code> file in the Batik <code>lib</code> |
| 238 |
directory. |
| 239 |
</li> |
| 240 |
<li> |
| 241 |
For Tcl, you need to download Jacl & TclBlend distribution at |
| 242 |
<a href="http://dev.scriptics.com/software/java/">http://dev.scriptics.com/software/java/</a>. |
| 243 |
Then you put the <code>jacl.jar</code> and <code>tcljava.jar</code> |
| 244 |
files in the Batik <code>lib</code> directory. |
| 245 |
</li> |
| 246 |
</ul> |
| 247 |
<p> |
| 248 |
Conversely, you can remove the <code>js.jar</code> of the Batik |
| 249 |
<code>lib</code> directory to remove JavaScript support and have a |
| 250 |
smaller distribution. |
| 251 |
</p> |
| 252 |
</section> |
| 253 |
|
| 254 |
<section id="dependencyGraph"> |
| 255 |
<title>Jar file dependency graph</title> |
| 256 |
|
| 257 |
<warning label="Out of date"> |
| 258 |
<p> |
| 259 |
Note that the dependency graph in this section is out of date, |
| 260 |
and needs to be updated. |
| 261 |
</p> |
| 262 |
</warning> |
| 263 |
|
| 264 |
<p> |
| 265 |
The Batik distribution comes with many jar files. Not all of them are |
| 266 |
needed in every case (although the provided applications tend to use |
| 267 |
most of them). The following is a diagram showing the dependencies |
| 268 |
between the various jar files in the Batik binary distribution (it also |
| 269 |
shows the major package interdependencies for source developers). |
| 270 |
</p> |
| 271 |
<p> |
| 272 |
Jar files in white boxes are library jar files that Batik includes from |
| 273 |
external sources. The light blue boxes correspond to library jar files |
| 274 |
(those found in the <code>lib</code> directory of a binary distribution) |
| 275 |
built from Batik source code. The dark blue boxes represent the |
| 276 |
application jar files. |
| 277 |
</p> |
| 278 |
<p> |
| 279 |
When boxes touch, the box on top depends on the box below it (there is |
| 280 |
no horizontal touching). Arrows also indicate dependencies (the source |
| 281 |
of the arrow depends on the destination). In some cases a thick |
| 282 |
underline with an arrow is used to indicate that a large number of jar |
| 283 |
files share a common dependency, this however does not indicate any |
| 284 |
dependency between the jar files underlined. |
| 285 |
</p> |
| 286 |
<div class="figure"><img src="jarDependImg.png" |
| 287 |
alt="Batik jar file dependency graph"/></div> |
| 288 |
<note> |
| 289 |
Some jar file names are shortened for clarity. All <code>batik</code> |
| 290 |
package references are short for <code>org.apache.batik</code>. |
| 291 |
</note> |
| 292 |
<p> |
| 293 |
It is worth pointing out that a determined/clever programmer may be able |
| 294 |
to pare down some of these dependencies. For example the |
| 295 |
<code>batik-dom.jar</code> depends on <code>xerces.jar</code> because of |
| 296 |
the <code>SAXDocumentFactory</code> class in |
| 297 |
<code>org.apache.batik.dom.util</code>. If you didn’t need to parse XML |
| 298 |
it would be possible to ignore or break this dependency and still use |
| 299 |
the <code>batik-dom.jar</code> file for its DOM implementation. |
| 300 |
</p> |
| 301 |
</section> |
| 302 |
|
| 303 |
<section id="verify"> |
| 304 |
<title>Verify releases</title> |
| 305 |
<p> |
| 306 |
It is essential that you verify the integrity of the downloaded files |
| 307 |
using the PGP or MD5 signatures. |
| 308 |
</p> |
| 309 |
<p> |
| 310 |
The PGP signatures can be verified using PGP or GPG. First download the |
| 311 |
<a href="http://www.apache.org/dist/xmlgraphics/batik/KEYS">KEYS</a> as well as |
| 312 |
the <code>asc</code> signature file for the particular distribution you |
| 313 |
choose. Make sure you get these files from the |
| 314 |
<a href="http://www.apache.org/dist/xmlgraphics/batik/">main distribution |
| 315 |
directory</a>, rather than from a mirror. Then verify the signatures |
| 316 |
using: |
| 317 |
</p> |
| 318 |
<source>pgpk -a KEYS |
| 319 |
pgpv batik-1.6.zip.asc</source> |
| 320 |
<p><em>or</em></p> |
| 321 |
<source>pgp -ka KEYS |
| 322 |
pgp batik-1.6.zip.asc</source> |
| 323 |
<em>or</em><br/> |
| 324 |
<source>gpg --import KEYS |
| 325 |
pgp batik-1.6.zip.asc</source> |
| 326 |
<p><em>or</em></p> |
| 327 |
<source>gpg --import KEYS |
| 328 |
gpg --verify batik-1.6.zip.asc</source> |
| 329 |
<p> |
| 330 |
Alternatively, you can verify the MD5 signature on the files. A UNIX |
| 331 |
program called <code>md5</code> or <code>md5sum</code> is included in |
| 332 |
many UNIX distributions. It is also available as part of |
| 333 |
<a href="http://www.gnu.org/software/textutils/textutils.html">GNU |
| 334 |
Textutils</a>. Windows users can get binary md5 programs |
| 335 |
from <a href="http://www.fourmilab.ch/md5/">here</a>, |
| 336 |
<a href="http://www.pc-tools.net/win32/freeware/console/">here</a>, |
| 337 |
or <a href="http://www.slavasoft.com/fsum/">here</a>. |
| 338 |
</p> |
| 339 |
<p> |
| 340 |
We recommend using PGP signatures as they can provide a much higher |
| 341 |
level of assurance compared with MD5. |
| 342 |
</p> |
| 343 |
</section> |
| 344 |
</body> |
| 345 |
</document> |