|
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
2 |
|
|
3 |
<!--Converted with LaTeX2HTML 2002-2-1 (1.70)
|
|
4 |
original version by: Nikos Drakos, CBLU, University of Leeds
|
|
5 |
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
|
|
6 |
* with significant contributions from:
|
|
7 |
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
|
|
8 |
<HTML>
|
|
9 |
<HEAD>
|
|
10 |
<TITLE>Writing Installation XML Files</TITLE>
|
|
11 |
<META NAME="description" CONTENT="Writing Installation XML Files">
|
|
12 |
<META NAME="keywords" CONTENT="izpack-doc">
|
|
13 |
<META NAME="resource-type" CONTENT="document">
|
|
14 |
<META NAME="distribution" CONTENT="global">
|
|
15 |
|
|
16 |
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
|
|
17 |
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
|
18 |
|
|
19 |
<LINK REL="STYLESHEET" HREF="izpack-doc.css">
|
|
20 |
|
|
21 |
<LINK REL="next" HREF="node5.html">
|
|
22 |
<LINK REL="previous" HREF="node3.html">
|
|
23 |
<LINK REL="up" HREF="izpack-doc.html">
|
|
24 |
<LINK REL="next" HREF="node5.html">
|
|
25 |
</HEAD>
|
|
26 |
|
|
27 |
<BODY >
|
|
28 |
|
|
29 |
<DIV CLASS="navigation"><!--Navigation Panel-->
|
|
30 |
<A NAME="tex2html351"
|
|
31 |
HREF="node5.html">
|
|
32 |
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
|
|
33 |
<A NAME="tex2html347"
|
|
34 |
HREF="izpack-doc.html">
|
|
35 |
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
|
|
36 |
<A NAME="tex2html341"
|
|
37 |
HREF="node3.html">
|
|
38 |
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
|
|
39 |
<A NAME="tex2html349"
|
|
40 |
HREF="node1.html">
|
|
41 |
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
|
|
42 |
<BR>
|
|
43 |
<B> Next:</B> <A NAME="tex2html352"
|
|
44 |
HREF="node5.html">Advanced Features</A>
|
|
45 |
<B> Up:</B> <A NAME="tex2html348"
|
|
46 |
HREF="izpack-doc.html">izpack-doc</A>
|
|
47 |
<B> Previous:</B> <A NAME="tex2html342"
|
|
48 |
HREF="node3.html">Getting started</A>
|
|
49 |
<B> <A NAME="tex2html350"
|
|
50 |
HREF="node1.html">Contents</A></B>
|
|
51 |
<BR>
|
|
52 |
<BR></DIV>
|
|
53 |
<!--End of Navigation Panel-->
|
|
54 |
<!--Table of Child-Links-->
|
|
55 |
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
|
|
56 |
|
|
57 |
<UL CLASS="ChildLinks">
|
|
58 |
<LI><A NAME="tex2html353"
|
|
59 |
HREF="node4.html#SECTION00410000000000000000">What You Need</A>
|
|
60 |
<UL>
|
|
61 |
<LI><A NAME="tex2html354"
|
|
62 |
HREF="node4.html#SECTION00411000000000000000">Your editor</A>
|
|
63 |
<LI><A NAME="tex2html355"
|
|
64 |
HREF="node4.html#SECTION00412000000000000000">Writing XML</A>
|
|
65 |
</UL>
|
|
66 |
<BR>
|
|
67 |
<LI><A NAME="tex2html356"
|
|
68 |
HREF="node4.html#SECTION00420000000000000000">Variable Substitution</A>
|
|
69 |
<UL>
|
|
70 |
<LI><A NAME="tex2html357"
|
|
71 |
HREF="node4.html#SECTION00421000000000000000">The Built-In Variables</A>
|
|
72 |
<LI><A NAME="tex2html358"
|
|
73 |
HREF="node4.html#SECTION00422000000000000000">Environment Variables</A>
|
|
74 |
<LI><A NAME="tex2html359"
|
|
75 |
HREF="node4.html#SECTION00423000000000000000">Parse Types</A>
|
|
76 |
</UL>
|
|
77 |
<BR>
|
|
78 |
<LI><A NAME="tex2html360"
|
|
79 |
HREF="node4.html#SECTION00430000000000000000">The I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> Elements</A>
|
|
80 |
<UL>
|
|
81 |
<LI><A NAME="tex2html361"
|
|
82 |
HREF="node4.html#SECTION00431000000000000000">The Root Element <TT><installation></TT></A>
|
|
83 |
<LI><A NAME="tex2html362"
|
|
84 |
HREF="node4.html#SECTION00432000000000000000">The Information Element <TT><info></TT></A>
|
|
85 |
<LI><A NAME="tex2html363"
|
|
86 |
HREF="node4.html#SECTION00433000000000000000">The Variables Element <TT><variables></TT></A>
|
|
87 |
<LI><A NAME="tex2html364"
|
|
88 |
HREF="node4.html#SECTION00434000000000000000">The GUI Preferences Element <TT><guiprefs></TT></A>
|
|
89 |
<LI><A NAME="tex2html365"
|
|
90 |
HREF="node4.html#SECTION00435000000000000000">The Localization Element <TT><locale></TT></A>
|
|
91 |
<LI><A NAME="tex2html366"
|
|
92 |
HREF="node4.html#SECTION00436000000000000000">The Resources Element <TT><resources></TT></A>
|
|
93 |
<LI><A NAME="tex2html367"
|
|
94 |
HREF="node4.html#SECTION00437000000000000000">The Panels Element <TT><panels></TT></A>
|
|
95 |
<LI><A NAME="tex2html368"
|
|
96 |
HREF="node4.html#SECTION00438000000000000000">The Packs Element <TT><packs></TT></A>
|
|
97 |
<UL>
|
|
98 |
<LI><A NAME="tex2html369"
|
|
99 |
HREF="node4.html#SECTION00438100000000000000">Internationalization of the PacksPanel</A>
|
|
100 |
<LI><A NAME="tex2html370"
|
|
101 |
HREF="node4.html#SECTION00438200000000000000"><TT><description></TT> - pack description</A>
|
|
102 |
<LI><A NAME="tex2html371"
|
|
103 |
HREF="node4.html#SECTION00438300000000000000"><TT><depends></TT> - pack dependencies</A>
|
|
104 |
<LI><A NAME="tex2html372"
|
|
105 |
HREF="node4.html#SECTION00438400000000000000"><TT><os></TT> - OS restrictions</A>
|
|
106 |
<LI><A NAME="tex2html373"
|
|
107 |
HREF="node4.html#SECTION00438500000000000000"><TT><updatecheck></TT></A>
|
|
108 |
<LI><A NAME="tex2html374"
|
|
109 |
HREF="node4.html#SECTION00438600000000000000"><TT><file></TT> - add files or directories</A>
|
|
110 |
<UL>
|
|
111 |
<LI><A NAME="tex2html375"
|
|
112 |
HREF="node4.html#SECTION00438610000000000000"><TT><additionaldata></TT></A>
|
|
113 |
</UL>
|
|
114 |
<LI><A NAME="tex2html376"
|
|
115 |
HREF="node4.html#SECTION00438700000000000000"><TT><singlefile></TT> - add a single file</A>
|
|
116 |
<LI><A NAME="tex2html377"
|
|
117 |
HREF="node4.html#SECTION00438800000000000000"><TT><fileset></TT>: add a fileset</A>
|
|
118 |
<LI><A NAME="tex2html378"
|
|
119 |
HREF="node4.html#SECTION00438900000000000000"><TT><parsable></TT> - parse a file after installation</A>
|
|
120 |
<LI><A NAME="tex2html379"
|
|
121 |
HREF="node4.html#SECTION004381000000000000000"><TT><executable></TT> - mark file executable or execute it</A>
|
|
122 |
<LI><A NAME="tex2html380"
|
|
123 |
HREF="node4.html#SECTION004381100000000000000"><TT><os></TT> - make a file OS-dependent</A>
|
|
124 |
</UL>
|
|
125 |
<LI><A NAME="tex2html381"
|
|
126 |
HREF="node4.html#SECTION00439000000000000000">The Native Element <TT><native></TT></A>
|
|
127 |
<UL>
|
|
128 |
<LI><A NAME="tex2html382"
|
|
129 |
HREF="node4.html#SECTION00439100000000000000"><TT><os></TT> - make a library OS-dependent</A>
|
|
130 |
</UL>
|
|
131 |
<LI><A NAME="tex2html383"
|
|
132 |
HREF="node4.html#SECTION004310000000000000000">The Jar Merging Element <TT><jar></TT></A>
|
|
133 |
</UL>
|
|
134 |
<BR>
|
|
135 |
<LI><A NAME="tex2html384"
|
|
136 |
HREF="node4.html#SECTION00440000000000000000">The Available Panels</A>
|
|
137 |
<UL>
|
|
138 |
<LI><A NAME="tex2html385"
|
|
139 |
HREF="node4.html#SECTION00441000000000000000">HelloPanel</A>
|
|
140 |
<LI><A NAME="tex2html386"
|
|
141 |
HREF="node4.html#SECTION00442000000000000000">InfoPanel and HTMLInfoPanel</A>
|
|
142 |
<LI><A NAME="tex2html387"
|
|
143 |
HREF="node4.html#SECTION00443000000000000000">LicencePanel and HTMLLicencePanel</A>
|
|
144 |
<LI><A NAME="tex2html388"
|
|
145 |
HREF="node4.html#SECTION00444000000000000000">PacksPanel</A>
|
|
146 |
<LI><A NAME="tex2html389"
|
|
147 |
HREF="node4.html#SECTION00445000000000000000">ImgPacksPanel</A>
|
|
148 |
<LI><A NAME="tex2html390"
|
|
149 |
HREF="node4.html#SECTION00446000000000000000">TargetPanel</A>
|
|
150 |
<LI><A NAME="tex2html391"
|
|
151 |
HREF="node4.html#SECTION00447000000000000000">InstallPanel</A>
|
|
152 |
<LI><A NAME="tex2html392"
|
|
153 |
HREF="node4.html#SECTION00448000000000000000">XInfoPanel</A>
|
|
154 |
<LI><A NAME="tex2html393"
|
|
155 |
HREF="node4.html#SECTION00449000000000000000">FinishPanel</A>
|
|
156 |
<LI><A NAME="tex2html394"
|
|
157 |
HREF="node4.html#SECTION004410000000000000000">SimpleFinishPanel</A>
|
|
158 |
<LI><A NAME="tex2html395"
|
|
159 |
HREF="node4.html#SECTION004411000000000000000">ShortcutPanel</A>
|
|
160 |
<LI><A NAME="tex2html396"
|
|
161 |
HREF="node4.html#SECTION004412000000000000000">UserInputPanel</A>
|
|
162 |
<LI><A NAME="tex2html397"
|
|
163 |
HREF="node4.html#SECTION004413000000000000000">CompilePanel</A>
|
|
164 |
<LI><A NAME="tex2html398"
|
|
165 |
HREF="node4.html#SECTION004414000000000000000">ProcessPanel</A>
|
|
166 |
<LI><A NAME="tex2html399"
|
|
167 |
HREF="node4.html#SECTION004415000000000000000">JDKPathPanel</A>
|
|
168 |
</UL></UL>
|
|
169 |
<!--End of Table of Child-Links-->
|
|
170 |
<HR>
|
|
171 |
|
|
172 |
<H1><A NAME="SECTION00400000000000000000">
|
|
173 |
Writing Installation XML Files</A>
|
|
174 |
</H1>
|
|
175 |
|
|
176 |
<P>
|
|
177 |
|
|
178 |
<H1><A NAME="SECTION00410000000000000000">
|
|
179 |
What You Need</A>
|
|
180 |
</H1>
|
|
181 |
|
|
182 |
<P>
|
|
183 |
|
|
184 |
<H2><A NAME="SECTION00411000000000000000">
|
|
185 |
Your editor</A>
|
|
186 |
</H2>
|
|
187 |
|
|
188 |
<P>
|
|
189 |
In order to write your XML installation files, you just need a plain
|
|
190 |
text editor. Of course it's always easier to work with color coded text,
|
|
191 |
so you might rather want to work with a text editor having such a
|
|
192 |
feature. Here is a list of free editors that work well :
|
|
193 |
|
|
194 |
<UL>
|
|
195 |
<LI>Jext : <TT><A NAME="tex2html19"
|
|
196 |
HREF="http://www.jext.org/">http://www.jext.org/</A></TT>
|
|
197 |
</LI>
|
|
198 |
<LI>JEdit : <TT><A NAME="tex2html20"
|
|
199 |
HREF="http://www.jedit.org/">http://www.jedit.org/</A></TT>
|
|
200 |
</LI>
|
|
201 |
<LI>classics like Vim and (X)Emacs.
|
|
202 |
</LI>
|
|
203 |
</UL>
|
|
204 |
<P>
|
|
205 |
|
|
206 |
<H2><A NAME="SECTION00412000000000000000">
|
|
207 |
Writing XML</A>
|
|
208 |
</H2>
|
|
209 |
|
|
210 |
<P>
|
|
211 |
Though you might not know much about XML, you have certainly heard about
|
|
212 |
it. If you know XML you can skip this subsection as we will briefly
|
|
213 |
present how to use XML.
|
|
214 |
<BR>
|
|
215 |
<P>
|
|
216 |
XML is a markup language, really close to HTML. If you've ever worked
|
|
217 |
with HTML the transition will be fast. However there are a few little
|
|
218 |
things to know. The markups used in XML have the following form :
|
|
219 |
<TT><markup></TT>. Each markup has to be closed somewhere with its
|
|
220 |
ending tag : <TT></markup></TT>. Each tag can contain text and other
|
|
221 |
markups. If a markup does not contain anything, it is just reported once
|
|
222 |
: <TT><markup/></TT>. A markup can contain attributes like :
|
|
223 |
<TT><markup attr1="123" attr2="hello !"/></TT>. Here is a sample of a
|
|
224 |
valid XML structure :
|
|
225 |
<PRE>
|
|
226 |
<chapter title="Chapter 1">
|
|
227 |
<section name="Introduction">
|
|
228 |
<paragraph>
|
|
229 |
This is the text of the paragraph number 1. It is available for the very low
|
|
230 |
price of <price currency="dollar">1 000 000</price>.
|
|
231 |
</paragraph>
|
|
232 |
</section>
|
|
233 |
<section name="xxx">
|
|
234 |
xxx
|
|
235 |
</section>
|
|
236 |
</chapter>
|
|
237 |
</PRE>
|
|
238 |
<P>
|
|
239 |
You should be aware of the following common mistakes :
|
|
240 |
|
|
241 |
<UL>
|
|
242 |
<LI>markups <SPAN CLASS="textbf">are</SPAN> case sensitive : <TT><markup></TT> is different
|
|
243 |
from <TT><Markup></TT>.
|
|
244 |
|
|
245 |
<P>
|
|
246 |
</LI>
|
|
247 |
<LI>you <SPAN CLASS="textbf">must</SPAN> close the markups in the same order as you create them
|
|
248 |
: <TT><m1><m2>(...)</m2></m1></TT> is right but
|
|
249 |
<TT><m1><m2>(...)</m1></m2></TT> is not.
|
|
250 |
|
|
251 |
<P>
|
|
252 |
</LI>
|
|
253 |
</UL>
|
|
254 |
|
|
255 |
<P>
|
|
256 |
Also, an XML file must start with the following header :
|
|
257 |
<BR><TT><?xml version="1.0" encoding="iso-8859-1 standalone="yes" ?></TT>. The only
|
|
258 |
thing you should modify is the encoding (put here the one your text editor saves
|
|
259 |
your files to). The <TT>standalone</TT> attribute is not very important for
|
|
260 |
us.
|
|
261 |
<BR>
|
|
262 |
<P>
|
|
263 |
This (brief !) introduction to XML was just meant to enable you to write
|
|
264 |
your installation specification. For a better introduction there are
|
|
265 |
plenty of books and articles/tutorials dealing with XML on the Internet,
|
|
266 |
in book stores, in magazines and so on.
|
|
267 |
<BR>
|
|
268 |
<P>
|
|
269 |
|
|
270 |
<H1><A NAME="SECTION00420000000000000000">
|
|
271 |
Variable Substitution</A>
|
|
272 |
</H1>
|
|
273 |
|
|
274 |
<P>
|
|
275 |
During the installation process IzPack can substitute variables in
|
|
276 |
various places with real values. Obvious targets for variable
|
|
277 |
substitution are resource files and launch scripts, however you will
|
|
278 |
notice many more places where it is more powerful to use variables
|
|
279 |
rather then hard coded values. Wherever variables can be used it will
|
|
280 |
be explained in the documentation.
|
|
281 |
<BR>
|
|
282 |
<P>
|
|
283 |
There are three types of variables:
|
|
284 |
|
|
285 |
<UL>
|
|
286 |
<LI>Built-In variables. These are implemented in IzPack and are
|
|
287 |
all dynamic in nature. This means that the value of each
|
|
288 |
variable depends on local conditions on the target system.
|
|
289 |
</LI>
|
|
290 |
<LI>Environment variables. These are provided by the operating system the
|
|
291 |
installer is run on.
|
|
292 |
</LI>
|
|
293 |
<LI>Variables that you can define. You also define the value,
|
|
294 |
which is fixed for a given installation file.
|
|
295 |
</LI>
|
|
296 |
</UL>
|
|
297 |
|
|
298 |
<P>
|
|
299 |
You define your own variables in the installation XML file with the
|
|
300 |
<TT><variable></TT> tag. How to do this is explained in detail later in
|
|
301 |
this chapter.
|
|
302 |
<BR>
|
|
303 |
<P>
|
|
304 |
<SPAN CLASS="textbf">Please note</SPAN> that when using variables they must always appear
|
|
305 |
with a '<TT>$</TT>' sign as the first character, even though they are
|
|
306 |
not defined this way.
|
|
307 |
<BR>
|
|
308 |
<P>
|
|
309 |
|
|
310 |
<H2><A NAME="SECTION00421000000000000000">
|
|
311 |
The Built-In Variables</A>
|
|
312 |
</H2>
|
|
313 |
The following variables are built-in :
|
|
314 |
|
|
315 |
<UL>
|
|
316 |
<LI><TT>$INSTALL_PATH</TT> : the installation path on the
|
|
317 |
target system, as chosen by the user
|
|
318 |
</LI>
|
|
319 |
<LI><TT>$JAVA_HOME</TT> : the Java<SUP><SMALL>TM</SMALL></SUP> virtual machine home path
|
|
320 |
</LI>
|
|
321 |
<LI><TT>$USER_HOME</TT> : the user's home directory path
|
|
322 |
</LI>
|
|
323 |
<LI><TT>$USER_NAME</TT> : the user name
|
|
324 |
</LI>
|
|
325 |
<LI><TT>$APP_NAME</TT> : the application name
|
|
326 |
</LI>
|
|
327 |
<LI><TT>$APP_URL</TT> : the application URL
|
|
328 |
</LI>
|
|
329 |
<LI><TT>$APP_VER</TT> : the application version
|
|
330 |
</LI>
|
|
331 |
<LI><TT>$ISO3_LANG</TT> : the ISO3 language code of the selected langpack.
|
|
332 |
</LI>
|
|
333 |
<LI><TT>$FILE_SEPARATOR</TT> : the file separator on the installation system
|
|
334 |
</LI>
|
|
335 |
</UL>
|
|
336 |
<P>
|
|
337 |
|
|
338 |
<H2><A NAME="SECTION00422000000000000000">
|
|
339 |
Environment Variables</A>
|
|
340 |
</H2>
|
|
341 |
Environment variables can be accessed via the syntax <TT>${ENV[variable]}</TT>.
|
|
342 |
The curly braces are mandatory.
|
|
343 |
Note that variable names are case-sensitive and usually in UPPER CASE.
|
|
344 |
|
|
345 |
<P>
|
|
346 |
Example: To get the value of the OS environment variable "CATALINA_HOME", use <TT>${ENV[CATALINA_HOME]}</TT>.
|
|
347 |
|
|
348 |
<P>
|
|
349 |
|
|
350 |
<H2><A NAME="SECTION00423000000000000000">
|
|
351 |
Parse Types</A>
|
|
352 |
</H2>
|
|
353 |
Parse types apply only when replacing variables in text files. At places
|
|
354 |
where it might be necessary to specify a parse type, the documentation
|
|
355 |
will mention this. Depending on the parse type, IzPack will handle
|
|
356 |
special cases -such as escaping control characters- correctly. The
|
|
357 |
following parse types are available:
|
|
358 |
|
|
359 |
<UL>
|
|
360 |
<LI><TT>plain</TT> - use this type for plain text files, where no
|
|
361 |
special substitution rules apply. All variables will be
|
|
362 |
replaced with their respective values as is.
|
|
363 |
</LI>
|
|
364 |
<LI><TT>javaprop</TT> - use this type if the substitution happens
|
|
365 |
in a Java properties file. Individual variables might be
|
|
366 |
modified to function properly within the context of Java
|
|
367 |
property files.
|
|
368 |
</LI>
|
|
369 |
<LI><TT>xml</TT> - use this type if the substitution happens in
|
|
370 |
a XML file. Individual variables might be modified to function
|
|
371 |
properly within the context of XML files.
|
|
372 |
</LI>
|
|
373 |
<LI><TT>shell</TT> - use this type if the substitution happens in
|
|
374 |
a shell script. Because shell scripts use <TT>$variable</TT>
|
|
375 |
themselves, an alternative variable marker is used:
|
|
376 |
<TT>%variable</TT> or <TT>%{variable}</TT>.
|
|
377 |
</LI>
|
|
378 |
</UL>
|
|
379 |
|
|
380 |
<P>
|
|
381 |
|
|
382 |
<H1><A NAME="SECTION00430000000000000000">
|
|
383 |
The I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> Elements</A>
|
|
384 |
</H1>
|
|
385 |
|
|
386 |
<P>
|
|
387 |
|
|
388 |
<SPAN CLASS="textit">When writing your installer XML files, it's a good idea to have a look
|
|
389 |
at the I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> installation DTD</SPAN>.
|
|
390 |
<BR>
|
|
391 |
<P>
|
|
392 |
|
|
393 |
<H2><A NAME="SECTION00431000000000000000"></A>
|
|
394 |
<A NAME="root-element"></A>
|
|
395 |
<BR>
|
|
396 |
The Root Element <TT><installation></TT>
|
|
397 |
</H2>
|
|
398 |
|
|
399 |
<P>
|
|
400 |
The root element of an installation is <TT><installation></TT>. It takes
|
|
401 |
one required attribute : <TT>version</TT>. The attribute defines the
|
|
402 |
version of the XML file layout and is used by the compiler to identify
|
|
403 |
if it is compatible with the XML file. This should be set to <SPAN CLASS="MATH"><IMG
|
|
404 |
WIDTH="29" HEIGHT="16" ALIGN="BOTTOM" BORDER="0"
|
|
405 |
SRC="img4.png"
|
|
406 |
ALT="$1.0$"></SPAN> for
|
|
407 |
the moment.
|
|
408 |
<BR>
|
|
409 |
<P>
|
|
410 |
|
|
411 |
<H2><A NAME="SECTION00432000000000000000"></A>
|
|
412 |
<A NAME="info-element"></A>
|
|
413 |
<BR>
|
|
414 |
The Information Element <TT><info></TT>
|
|
415 |
</H2>
|
|
416 |
|
|
417 |
<P>
|
|
418 |
This element is used to specify some general information for the installer. It
|
|
419 |
contains the following elements :
|
|
420 |
|
|
421 |
<UL>
|
|
422 |
<LI><TT><appname></TT> : the application name
|
|
423 |
</LI>
|
|
424 |
<LI><TT><appversion></TT> : the application version
|
|
425 |
</LI>
|
|
426 |
<LI><TT><appsubpath></TT> : the subpath for the default of the installation path.
|
|
427 |
A variable substitution and a maskable slash-backslash conversion will be done. If this
|
|
428 |
tag is not defined, the application name will be used instead.
|
|
429 |
</LI>
|
|
430 |
<LI><TT><url></TT> : the application official website url
|
|
431 |
</LI>
|
|
432 |
<LI><TT><authors></TT> : specifies the author(s) of the application. It must contain
|
|
433 |
at least one <TT><author></TT> element whose attributes are :
|
|
434 |
|
|
435 |
<UL>
|
|
436 |
<LI><TT>name</TT> : the author's name
|
|
437 |
</LI>
|
|
438 |
<LI><TT>email</TT> : the author's email
|
|
439 |
|
|
440 |
</LI>
|
|
441 |
</UL>
|
|
442 |
</LI>
|
|
443 |
<LI><TT><uninstaller></TT> : specifies whether to create an uninstaller after installation, it has only the <TT>write</TT> attribute, with default value <TT>yes</TT>. If this tag is not specified, the uninstaller will still be written.
|
|
444 |
</LI>
|
|
445 |
<LI><TT><javaversion></TT> : specifies the minimum version of Java required to install your program. Values can be <TT>1.2</TT>, <TT>1.2.2</TT>, <TT>1.4</TT>, etc. The test is a lexical comparison against the <TT>java.version</TT> System property on the install machine.
|
|
446 |
</LI>
|
|
447 |
<LI><TT><webdir></TT> : Causes a ``web installer'' to be created, and specifies the URL packages are retrieved from at install time. The content of the tag must be a properly formed URL. See section <A HREF="node5.html#webinstaller">3.6</A> for more details.
|
|
448 |
|
|
449 |
<P>
|
|
450 |
</LI>
|
|
451 |
</UL>
|
|
452 |
<P>
|
|
453 |
Here is an example of a typical <TT><info></TT> section :
|
|
454 |
<BR><PRE>
|
|
455 |
<info>
|
|
456 |
<appname>Super extractor</appname>
|
|
457 |
<appversion>2.1 beta 6</appversion>
|
|
458 |
<appsubpath>myCompany/SExtractor</appsubpath>
|
|
459 |
<url>http://www.superextractor.com/</url>
|
|
460 |
<authors>
|
|
461 |
<author name="John John Doo" email="jjd@jjd-mail.com"/>
|
|
462 |
<author name="El Goyo" email="goyoman@mymail.org"/>
|
|
463 |
</authors>
|
|
464 |
<javaversion>1.2</javaversion>
|
|
465 |
</info>
|
|
466 |
</PRE>
|
|
467 |
<P>
|
|
468 |
|
|
469 |
<H2><A NAME="SECTION00433000000000000000"></A>
|
|
470 |
<A NAME="variables-element"></A>
|
|
471 |
<BR>
|
|
472 |
The Variables Element <TT><variables></TT>
|
|
473 |
</H2>
|
|
474 |
|
|
475 |
<P>
|
|
476 |
This element allows you to define variables for the variables
|
|
477 |
substitution system. Some variables are built-in, such as
|
|
478 |
<TT>$INSTALL_PATH</TT> (which is the installation path chosen by the
|
|
479 |
user). When you define a set of variables, you just have to place as
|
|
480 |
many <TT><variable></TT> tags in the file as needed. If you define a
|
|
481 |
variable named <TT>VERSION</TT> you need to type $VERSION in the files
|
|
482 |
to parse. The variable substitutor will then replace it with the correct
|
|
483 |
value. One <TT><variable></TT> tag take the following attributes :
|
|
484 |
|
|
485 |
<UL>
|
|
486 |
<LI><TT>name</TT> : the variable name
|
|
487 |
</LI>
|
|
488 |
<LI><TT>value</TT> : the variable value
|
|
489 |
|
|
490 |
<P>
|
|
491 |
</LI>
|
|
492 |
</UL>
|
|
493 |
<P>
|
|
494 |
Here's a sample <TT><variables></TT> section :
|
|
495 |
<BR><PRE>
|
|
496 |
<variables>
|
|
497 |
<variable name="app-version" value="1.4"/>
|
|
498 |
<variable name="released-on" value="08/03/2002"/>
|
|
499 |
</variables>
|
|
500 |
</PRE>
|
|
501 |
<P>
|
|
502 |
|
|
503 |
<H2><A NAME="SECTION00434000000000000000"></A>
|
|
504 |
<A NAME="guiprefs-element"></A>
|
|
505 |
<BR>
|
|
506 |
The GUI Preferences Element <TT><guiprefs></TT>
|
|
507 |
</H2>
|
|
508 |
|
|
509 |
<P>
|
|
510 |
This element allows you to set the behavior of your installer GUI. This
|
|
511 |
information will not have any effect on the command-line installers that will be
|
|
512 |
available in future versions of I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> . The arguments to specify are :
|
|
513 |
|
|
514 |
<UL>
|
|
515 |
<LI><TT>resizable</TT> : takes <TT>yes</TT> or <TT>no</TT> and indicates
|
|
516 |
whether the window size can be changed or not.
|
|
517 |
</LI>
|
|
518 |
<LI><TT>width</TT> : sets the initial window width
|
|
519 |
</LI>
|
|
520 |
<LI><TT>height</TT> : sets the initial window height.
|
|
521 |
|
|
522 |
<P>
|
|
523 |
</LI>
|
|
524 |
</UL>
|
|
525 |
<P>
|
|
526 |
Here's a sample :
|
|
527 |
<PRE>
|
|
528 |
<guiprefs resizable="no" width="800" height="600"/>
|
|
529 |
</PRE>
|
|
530 |
<P>
|
|
531 |
Starting from IzPack 3.6, the look and feel can be specified in this section on
|
|
532 |
a per-OS basis. For instance you can use the native look and feels on Win32 and
|
|
533 |
OS X but use a third-party one on Unix-like platforms. To do that, you have to
|
|
534 |
add some children to the <TT>guiprefs</TT> tag:
|
|
535 |
|
|
536 |
<UL>
|
|
537 |
<LI><TT>laf</TT>: the tag that specifies a look and feel. It has a
|
|
538 |
<TT>name</TT> parameter that defines the look and feel name.
|
|
539 |
</LI>
|
|
540 |
<LI>Each <TT>laf</TT> element needs at least one <TT>os</TT> tag, specified
|
|
541 |
like in the other parts of the specification that support this tag.
|
|
542 |
</LI>
|
|
543 |
<LI>Like you can add <TT>os</TT> elements, you can add any number of
|
|
544 |
<TT>param</TT> elements to customize a look and feel. A <TT>param</TT>
|
|
545 |
elements has two attribues: <TT>name</TT> and <TT>value</TT>.
|
|
546 |
|
|
547 |
<P>
|
|
548 |
</LI>
|
|
549 |
</UL>
|
|
550 |
<P>
|
|
551 |
The available look and feels are:
|
|
552 |
|
|
553 |
<UL>
|
|
554 |
<LI>Kunststoff: <TT>kunststoff</TT>
|
|
555 |
</LI>
|
|
556 |
<LI>Liquid: <TT>liquid</TT>
|
|
557 |
</LI>
|
|
558 |
<LI>Metouia: <TT>metouia</TT>
|
|
559 |
</LI>
|
|
560 |
<LI>JGoodies Looks: <TT>looks</TT>
|
|
561 |
|
|
562 |
<P>
|
|
563 |
</LI>
|
|
564 |
</UL>
|
|
565 |
<P>
|
|
566 |
If you don't specify a look and feel for a particular operating system, then the
|
|
567 |
default native one will be used: Windows on Windows, Aqua on Mac OS X and Metal
|
|
568 |
on the Unix-like variants.
|
|
569 |
<BR>
|
|
570 |
<P>
|
|
571 |
The <SPAN CLASS="textit">Liquid Look and Feel</SPAN> supports the following parameters:
|
|
572 |
|
|
573 |
<UL>
|
|
574 |
<LI><TT>decorate.frames</TT>: <TT>yes</TT> means that it will render the
|
|
575 |
frames in Liquid style
|
|
576 |
</LI>
|
|
577 |
<LI><TT>decorate.dialogs</TT>: <TT>yes</TT> means that it will render the
|
|
578 |
dialogs in Liquid style
|
|
579 |
|
|
580 |
<P>
|
|
581 |
</LI>
|
|
582 |
</UL>
|
|
583 |
<P>
|
|
584 |
The <SPAN CLASS="textit">JGoodies Looks</SPAN> look and feel can be specified by using the
|
|
585 |
<TT>variant</TT> parameters. The values can be one of:
|
|
586 |
|
|
587 |
<UL>
|
|
588 |
<LI><TT>extwin</TT>: use the Windows Extension look
|
|
589 |
</LI>
|
|
590 |
<LI><TT>plastic</TT>: use the basic Plastic look
|
|
591 |
</LI>
|
|
592 |
<LI><TT>plastic3D</TT>: use the Plastic 3D look
|
|
593 |
</LI>
|
|
594 |
<LI><TT>plasticXP</TT>: use the Plastic XP look (default).
|
|
595 |
|
|
596 |
<P>
|
|
597 |
</LI>
|
|
598 |
</UL>
|
|
599 |
<P>
|
|
600 |
Here is a small sample:
|
|
601 |
<PRE>
|
|
602 |
<guiprefs height="600" resizable="yes" width="800">
|
|
603 |
<laf name="metouia">
|
|
604 |
<os family="unix" />
|
|
605 |
</laf>
|
|
606 |
<laf name="looks">
|
|
607 |
<os family="windows" />
|
|
608 |
<param name="variant" value="extwin" />
|
|
609 |
</laf>
|
|
610 |
</guiprefs>
|
|
611 |
</PRE>
|
|
612 |
|
|
613 |
<P>
|
|
614 |
Starting from IzPack 3.7, some characteristics can be customized with the
|
|
615 |
<TT><modifier></TT> tag which contains following attributes:
|
|
616 |
|
|
617 |
<UL>
|
|
618 |
<LI><TT>key</TT>: a well defined key of the characteristic which should
|
|
619 |
be changed.
|
|
620 |
</LI>
|
|
621 |
<LI><TT>value</TT> the value for the key.
|
|
622 |
</LI>
|
|
623 |
</UL> Following key value pairs are defined:
|
|
624 |
|
|
625 |
<UL>
|
|
626 |
<LI><TT>useButtonIcons</TT>: possible are "yes" or "no". Default is "yes".
|
|
627 |
If it is set to "no", all buttons which are created via the ButtonFactory
|
|
628 |
contains no icon also a icon id was submitted. Directly created buttons are
|
|
629 |
not affected.
|
|
630 |
</LI>
|
|
631 |
<LI><TT>useLabelIcons</TT>: possible are "yes" or "no". Default is "yes".
|
|
632 |
If it is set to "no", all labels which are created via the LabelFactory
|
|
633 |
contains no icon also a icon id was submitted. Directly created labels are
|
|
634 |
not affected.
|
|
635 |
</LI>
|
|
636 |
</UL>
|
|
637 |
<P>
|
|
638 |
|
|
639 |
<H2><A NAME="SECTION00435000000000000000"></A>
|
|
640 |
<A NAME="localization-element"></A>
|
|
641 |
<BR>
|
|
642 |
The Localization Element <TT><locale></TT>
|
|
643 |
</H2>
|
|
644 |
|
|
645 |
<P>
|
|
646 |
This element is used to specify the language packs (langpacks) that you want to
|
|
647 |
use for your installer. You must set one <TT><langpack></TT> markup per
|
|
648 |
language. This markup takes the <TT>iso3</TT> parameter which specifies the iso3
|
|
649 |
language code.
|
|
650 |
<BR>
|
|
651 |
<P>
|
|
652 |
Here's a sample :
|
|
653 |
<BR><PRE>
|
|
654 |
<locale>
|
|
655 |
<langpack iso3="eng"/>
|
|
656 |
<langpack iso3="fra"/>
|
|
657 |
<langpack iso3="spa"/>
|
|
658 |
</locale>
|
|
659 |
</PRE><SMALL CLASS="FOOTNOTESIZE"> </SMALL>
|
|
660 |
<P>
|
|
661 |
The supported ISO3 codes are :
|
|
662 |
<DIV ALIGN="CENTER">
|
|
663 |
<TABLE CELLPADDING=3 BORDER="1">
|
|
664 |
<TR><TH ALIGN="LEFT"><SPAN CLASS="textit">ISO3 code</SPAN></TH>
|
|
665 |
<TH ALIGN="LEFT"><SPAN CLASS="textit">Language</SPAN></TH>
|
|
666 |
</TR>
|
|
667 |
<TR><TD ALIGN="LEFT">cat</TD>
|
|
668 |
<TD ALIGN="LEFT">Catalunyan</TD>
|
|
669 |
</TR>
|
|
670 |
<TR><TD ALIGN="LEFT">chn</TD>
|
|
671 |
<TD ALIGN="LEFT">Chinese</TD>
|
|
672 |
</TR>
|
|
673 |
<TR><TD ALIGN="LEFT">cze</TD>
|
|
674 |
<TD ALIGN="LEFT">Czech</TD>
|
|
675 |
</TR>
|
|
676 |
<TR><TD ALIGN="LEFT">dan</TD>
|
|
677 |
<TD ALIGN="LEFT">Danish</TD>
|
|
678 |
</TR>
|
|
679 |
<TR><TD ALIGN="LEFT">deu</TD>
|
|
680 |
<TD ALIGN="LEFT">German</TD>
|
|
681 |
</TR>
|
|
682 |
<TR><TD ALIGN="LEFT">eng</TD>
|
|
683 |
<TD ALIGN="LEFT">English</TD>
|
|
684 |
</TR>
|
|
685 |
<TR><TD ALIGN="LEFT">fin</TD>
|
|
686 |
<TD ALIGN="LEFT">Finnish</TD>
|
|
687 |
</TR>
|
|
688 |
<TR><TD ALIGN="LEFT">fra</TD>
|
|
689 |
<TD ALIGN="LEFT">French</TD>
|
|
690 |
</TR>
|
|
691 |
<TR><TD ALIGN="LEFT">hun</TD>
|
|
692 |
<TD ALIGN="LEFT">Hungarian</TD>
|
|
693 |
</TR>
|
|
694 |
<TR><TD ALIGN="LEFT">ita</TD>
|
|
695 |
<TD ALIGN="LEFT">Italian</TD>
|
|
696 |
</TR>
|
|
697 |
<TR><TD ALIGN="LEFT">jpn</TD>
|
|
698 |
<TD ALIGN="LEFT">Japanese</TD>
|
|
699 |
</TR>
|
|
700 |
<TR><TD ALIGN="LEFT">mys</TD>
|
|
701 |
<TD ALIGN="LEFT">Malaysian</TD>
|
|
702 |
</TR>
|
|
703 |
<TR><TD ALIGN="LEFT">ned</TD>
|
|
704 |
<TD ALIGN="LEFT">Nederlands</TD>
|
|
705 |
</TR>
|
|
706 |
<TR><TD ALIGN="LEFT">nor</TD>
|
|
707 |
<TD ALIGN="LEFT">Norwegian</TD>
|
|
708 |
</TR>
|
|
709 |
<TR><TD ALIGN="LEFT">pol</TD>
|
|
710 |
<TD ALIGN="LEFT">Polnish</TD>
|
|
711 |
</TR>
|
|
712 |
<TR><TD ALIGN="LEFT">por</TD>
|
|
713 |
<TD ALIGN="LEFT">Portuguese (Brazilian)</TD>
|
|
714 |
</TR>
|
|
715 |
<TR><TD ALIGN="LEFT">rom</TD>
|
|
716 |
<TD ALIGN="LEFT">Romanian</TD>
|
|
717 |
</TR>
|
|
718 |
<TR><TD ALIGN="LEFT">rus</TD>
|
|
719 |
<TD ALIGN="LEFT">Russian</TD>
|
|
720 |
</TR>
|
|
721 |
<TR><TD ALIGN="LEFT">scg</TD>
|
|
722 |
<TD ALIGN="LEFT">Serbian</TD>
|
|
723 |
</TR>
|
|
724 |
<TR><TD ALIGN="LEFT">spa</TD>
|
|
725 |
<TD ALIGN="LEFT">Spanish</TD>
|
|
726 |
</TR>
|
|
727 |
<TR><TD ALIGN="LEFT">svk</TD>
|
|
728 |
<TD ALIGN="LEFT">Slovakian</TD>
|
|
729 |
</TR>
|
|
730 |
<TR><TD ALIGN="LEFT">swe</TD>
|
|
731 |
<TD ALIGN="LEFT">Swedish</TD>
|
|
732 |
</TR>
|
|
733 |
<TR><TD ALIGN="LEFT">ukr</TD>
|
|
734 |
<TD ALIGN="LEFT">Ukrainian</TD>
|
|
735 |
</TR>
|
|
736 |
</TABLE>
|
|
737 |
</DIV>
|
|
738 |
|
|
739 |
<P>
|
|
740 |
|
|
741 |
<H2><A NAME="SECTION00436000000000000000"></A>
|
|
742 |
<A NAME="resources-element"></A>
|
|
743 |
<BR>
|
|
744 |
The Resources Element <TT><resources></TT>
|
|
745 |
</H2>
|
|
746 |
|
|
747 |
<P>
|
|
748 |
Several panels, such as the license panel and the shortcut panel,
|
|
749 |
require additional data to perform their task. This data is supplied
|
|
750 |
in the form of resources. This section describes how to specify
|
|
751 |
them. Take a look at each panel description to see if it might need
|
|
752 |
any resources. Currently, no checks are made to ensure resources
|
|
753 |
needed by any panel have been included. The <TT><resources></TT>
|
|
754 |
element is not required, and no <TT><res></TT> elements are required
|
|
755 |
within.
|
|
756 |
<BR>
|
|
757 |
<P>
|
|
758 |
You have to set one <TT><res></TT> markup for each resource. Here are
|
|
759 |
the attributes to specify :
|
|
760 |
|
|
761 |
<UL>
|
|
762 |
<LI><TT>src</TT> : the path to the resource file which can be named freely
|
|
763 |
of course (for instance <TT>my-picture.jpg</TT>).
|
|
764 |
</LI>
|
|
765 |
<LI><TT>id</TT> : the resource id, depending on the needs of a particular panel
|
|
766 |
</LI>
|
|
767 |
<LI><TT>parse</TT> : takes <TT>yes</TT> or <TT>no</TT> (default is
|
|
768 |
<TT>no</TT>) - used to specify whether the resource must be parsed at the
|
|
769 |
installer compilation time. For instance you could set the application version
|
|
770 |
in a readme file used by <TT>InfoPanel</TT>.
|
|
771 |
</LI>
|
|
772 |
<LI><TT>type</TT> : specifies the parse type. This makes sense only for a text
|
|
773 |
resource - the default is <TT>plain</TT>, other values are <TT>javaprop,
|
|
774 |
xml</TT> (Java properties file and XML files)
|
|
775 |
</LI>
|
|
776 |
<LI><TT>encoding</TT> : specifies the resource encoding if the receiver needs
|
|
777 |
to know. This makes sense only for a text resource.
|
|
778 |
|
|
779 |
<P>
|
|
780 |
</LI>
|
|
781 |
</UL>
|
|
782 |
<P>
|
|
783 |
Here's a sample :
|
|
784 |
<PRE>
|
|
785 |
<resources>
|
|
786 |
<res id="InfoPanel.info" src="doc/readme.txt" parse="yes"/>
|
|
787 |
<res id="LicencePanel.licence" src="legal/License.txt"/>
|
|
788 |
</resources>
|
|
789 |
</PRE>
|
|
790 |
<P>
|
|
791 |
|
|
792 |
<H2><A NAME="SECTION00437000000000000000"></A>
|
|
793 |
<A NAME="panels-element"></A>
|
|
794 |
<BR>
|
|
795 |
The Panels Element <TT><panels></TT>
|
|
796 |
</H2>
|
|
797 |
|
|
798 |
<P>
|
|
799 |
Here you tell the compiler which panels you want to use. They will
|
|
800 |
appear in the installer in the order in which they are listed in your
|
|
801 |
XML installation file. Take a look at the different panels in order to
|
|
802 |
find the ones you need. The <TT><panel></TT> markup takes a single
|
|
803 |
attribute <TT>classname</TT> which is the classname of the panel.
|
|
804 |
<BR>
|
|
805 |
<P>
|
|
806 |
Here's a sample :
|
|
807 |
<PRE>
|
|
808 |
<panels>
|
|
809 |
<panel classname="HelloPanel"/>
|
|
810 |
<panel classname="LicencePanel"/>
|
|
811 |
<panel classname="TargetPanel"/>
|
|
812 |
<panel classname="InstallPanel"/>
|
|
813 |
<panel classname="FinishPanel"/>
|
|
814 |
</panels>
|
|
815 |
</PRE>
|
|
816 |
<P>
|
|
817 |
|
|
818 |
<H2><A NAME="SECTION00438000000000000000"></A>
|
|
819 |
<A NAME="packs-element"></A>
|
|
820 |
<BR>
|
|
821 |
The Packs Element <TT><packs></TT>
|
|
822 |
</H2>
|
|
823 |
|
|
824 |
<P>
|
|
825 |
This is a crucial section as it is used to specify the files that need
|
|
826 |
to be installed. The <TT><packs></TT> section consists of several
|
|
827 |
<TT><pack></TT> tags.
|
|
828 |
|
|
829 |
<P>
|
|
830 |
The <TT><pack></TT> takes the following attributes :
|
|
831 |
|
|
832 |
<UL>
|
|
833 |
<LI><TT>name</TT>: the pack name
|
|
834 |
</LI>
|
|
835 |
<LI><TT>required</TT>: takes <TT>yes</TT> or <TT>no</TT> and specifies
|
|
836 |
whether the pack is optional or not.
|
|
837 |
</LI>
|
|
838 |
<LI><TT>os</TT>: optional attribute that lets you make the pack targeted
|
|
839 |
to a specific <SPAN CLASS="textsl">operating system</SPAN>, for instance <TT>unix</TT>,
|
|
840 |
<TT>mac</TT> and so on.
|
|
841 |
</LI>
|
|
842 |
<LI><TT>preselected</TT>: optional attribute that lets you choose whether
|
|
843 |
the pack is by default selected for installation or not. Possible values
|
|
844 |
are <TT>yes</TT> and <TT>no</TT>. A pack which is not preselected needs to
|
|
845 |
be explicitly selected by the user during installation to get installed.
|
|
846 |
</LI>
|
|
847 |
<LI><TT>loose</TT>: can be used so that the files are not located in the
|
|
848 |
installer Jar. The possible values are <TT>true</TT> or <TT>false</TT>, the
|
|
849 |
default beeing <TT>false</TT>. The author of this feature needed to put his
|
|
850 |
application on a CD so that the users could run it directly from this media.
|
|
851 |
However, he also wanted to offer them the possibility to install the
|
|
852 |
software localy. Enabling this feature will make IzPack take the files on
|
|
853 |
disk instead of from the installer. <SPAN CLASS="textit">Please make sure that your relative
|
|
854 |
files paths are correct !</SPAN>
|
|
855 |
</LI>
|
|
856 |
<LI><TT>id</TT>: this attribute is used to give a unique id to the pack to
|
|
857 |
be used for internationalization.
|
|
858 |
|
|
859 |
</LI>
|
|
860 |
</UL>
|
|
861 |
|
|
862 |
<P>
|
|
863 |
|
|
864 |
<H3><A NAME="SECTION00438100000000000000">
|
|
865 |
Internationalization of the PacksPanel</A>
|
|
866 |
</H3>
|
|
867 |
In order to provide internationalization for the PacksPanel, so that your users can
|
|
868 |
be presented with a different name and description for each language you support,
|
|
869 |
you have to create a file named <TT>packsLang.xml_xyz</TT> where <TT>xyz</TT>
|
|
870 |
is the ISO3 code of the language in lowercase. Please be aware that case is significant.
|
|
871 |
This file has to be inserted in the resources section of <TT>install.xml</TT> with the
|
|
872 |
<TT>id</TT> and <TT>src</TT> attributes set at the name of the file. The format of
|
|
873 |
these files is identical with the distribution langpack files located at
|
|
874 |
<TT>$IZPACK_HOME/install/langpacks/installer</TT>. For the name of the panel you just
|
|
875 |
use the pack <TT>id</TT> as the txt <TT>id</TT>. For the description you use the pack
|
|
876 |
<TT>id</TT> suffixed with <TT>'.description'</TT>.
|
|
877 |
|
|
878 |
<P>
|
|
879 |
The following sections describe the tags available for a <TT><pack></TT> section.
|
|
880 |
|
|
881 |
<P>
|
|
882 |
|
|
883 |
<H3><A NAME="SECTION00438200000000000000">
|
|
884 |
<TT><description></TT> - pack description</A>
|
|
885 |
</H3>
|
|
886 |
|
|
887 |
<P>
|
|
888 |
The contents of the <TT><description></TT> tag describe the pack contents.
|
|
889 |
This description is displayed if the user highlights the pack during
|
|
890 |
installation.
|
|
891 |
|
|
892 |
<P>
|
|
893 |
|
|
894 |
<H3><A NAME="SECTION00438300000000000000">
|
|
895 |
<TT><depends></TT> - pack dependencies</A>
|
|
896 |
</H3>
|
|
897 |
This can be used to make this pack selectable only to be installed only if some other is
|
|
898 |
selected to be installed. The pack can depend on more than one by specifying more than one
|
|
899 |
<TT><depends></TT> elements.
|
|
900 |
<BR>
|
|
901 |
Circular depedencies are not supported and the compiler reports an error if one occurs.
|
|
902 |
|
|
903 |
<P>
|
|
904 |
This tag takes the following attribute:
|
|
905 |
|
|
906 |
<UL>
|
|
907 |
<LI><TT>packname</TT>: The name of the pack that it depends on
|
|
908 |
</LI>
|
|
909 |
</UL>
|
|
910 |
|
|
911 |
<P>
|
|
912 |
|
|
913 |
<H3><A NAME="SECTION00438400000000000000">
|
|
914 |
<TT><os></TT> - OS restrictions</A>
|
|
915 |
</H3>
|
|
916 |
|
|
917 |
<P>
|
|
918 |
It is possible to restrict a panel to a certain list of operating systems. This
|
|
919 |
tag takes the following attributes:
|
|
920 |
|
|
921 |
<UL>
|
|
922 |
<LI><TT>family</TT>: unix, windows or mac
|
|
923 |
</LI>
|
|
924 |
<LI><TT>name</TT>: the exact OS name (ie Windows, Linux, ...)
|
|
925 |
</LI>
|
|
926 |
<LI><TT>version</TT>: the exact OS version (see the JVM <TT>os.version</TT> property)
|
|
927 |
</LI>
|
|
928 |
<LI><TT>arch</TT>: the machine architecture (see the JVM <TT>os.arch</TT> property).
|
|
929 |
</LI>
|
|
930 |
</UL>
|
|
931 |
|
|
932 |
<P>
|
|
933 |
|
|
934 |
<H3><A NAME="SECTION00438500000000000000">
|
|
935 |
<TT><updatecheck></TT></A>
|
|
936 |
</H3>
|
|
937 |
|
|
938 |
<P>
|
|
939 |
This feature can update an already installed package, therefore removing
|
|
940 |
superfluous files after installation. Here's how this feature author (Tino Schwarze)
|
|
941 |
described it on the IzPack development mailing-list:
|
|
942 |
<BLOCKQUOTE>
|
|
943 |
Each pack can now
|
|
944 |
specify an <TT><updatecheck></TT> tag. It supports a subset of ant fileset
|
|
945 |
syntax, e.g.:
|
|
946 |
</BLOCKQUOTE><PRE>
|
|
947 |
<updatecheck>
|
|
948 |
<include name="lib/**" />
|
|
949 |
<exclude name="config/local/** />
|
|
950 |
</updatecheck>
|
|
951 |
</PRE>
|
|
952 |
<P>
|
|
953 |
<BLOCKQUOTE>If the paths are relative, they will be matched relative to
|
|
954 |
<TT>$INSTALL_PATH</TT>. Update checks are only enabled if at least one
|
|
955 |
<TT><include></TT> is specified. See
|
|
956 |
<TT>com.izforge.izpack.installer.Unpacker</TT> for details.
|
|
957 |
|
|
958 |
</BLOCKQUOTE>
|
|
959 |
|
|
960 |
<P>
|
|
961 |
|
|
962 |
<H3><A NAME="SECTION00438600000000000000"></A><A NAME="tag:file"></A>
|
|
963 |
<BR>
|
|
964 |
<TT><file></TT> - add files or directories
|
|
965 |
</H3>
|
|
966 |
|
|
967 |
<P>
|
|
968 |
The <TT><file></TT> tag specifies a file (a directory is a file too) to
|
|
969 |
include into the pack. It takes the following attributes:
|
|
970 |
|
|
971 |
<P>
|
|
972 |
|
|
973 |
<UL>
|
|
974 |
<LI><TT>src</TT>: the file location (relative path) - if this is a
|
|
975 |
directory its content will be added recursively
|
|
976 |
|
|
977 |
<P>
|
|
978 |
</LI>
|
|
979 |
<LI><TT>targetdir</TT>: the destination directory, could be something like
|
|
980 |
<TT>$INSTALL_PATH/subdirX</TT>
|
|
981 |
|
|
982 |
<P>
|
|
983 |
</LI>
|
|
984 |
<LI><TT>os</TT>: can optionally specify a target operating system
|
|
985 |
(<TT>unix, windows, mac</TT>) - this means that the file will only be
|
|
986 |
installed on its target operating system
|
|
987 |
|
|
988 |
<P>
|
|
989 |
</LI>
|
|
990 |
<LI><TT>override</TT>: if <TT>true</TT> then if the file is already
|
|
991 |
installed, it will be overwritten. Alternative values: <TT>asktrue</TT> and
|
|
992 |
<TT>askfalse</TT> - ask the user what to do and supply default value for
|
|
993 |
non-interactive use. Another possible values is <TT>update</TT>. It means
|
|
994 |
that the new file is only installed if it's modification time is newer than
|
|
995 |
the modification time of the already existing file (note that this is not a
|
|
996 |
reliable mechanism for updates - you cannot detect whether a file was
|
|
997 |
altered after installation this way.) By default it is set to <TT>update</TT>.
|
|
998 |
|
|
999 |
<P>
|
|
1000 |
</LI>
|
|
1001 |
</UL>
|
|
1002 |
<H4><A NAME="SECTION00438610000000000000"></A><A NAME="tag:additionaldata"></A>
|
|
1003 |
<BR>
|
|
1004 |
<TT><additionaldata></TT>
|
|
1005 |
</H4>
|
|
1006 |
|
|
1007 |
<P>
|
|
1008 |
This tag can also be specified in order to pass additional data
|
|
1009 |
related to a file tag for customizing.
|
|
1010 |
|
|
1011 |
<P>
|
|
1012 |
|
|
1013 |
<UL>
|
|
1014 |
<LI><TT><key></TT>: key to identify the data
|
|
1015 |
</LI>
|
|
1016 |
<LI><TT><value></TT>: value which can be used by a custom
|
|
1017 |
action
|
|
1018 |
|
|
1019 |
<P>
|
|
1020 |
</LI>
|
|
1021 |
</UL>
|
|
1022 |
|
|
1023 |
<P>
|
|
1024 |
|
|
1025 |
<H3><A NAME="SECTION00438700000000000000"></A><A NAME="tag:singlefile"></A>
|
|
1026 |
<BR>
|
|
1027 |
<TT><singlefile></TT> - add a single file
|
|
1028 |
</H3>
|
|
1029 |
|
|
1030 |
<P>
|
|
1031 |
Specifies a single file to include. The difference to <TT><file></TT> is that
|
|
1032 |
this tag allows the file to be renamed, therefore it has a
|
|
1033 |
<TT>target</TT> attribute instead of <TT>targetdir</TT>.
|
|
1034 |
|
|
1035 |
<P>
|
|
1036 |
|
|
1037 |
<UL>
|
|
1038 |
<LI><TT>src</TT>: the file location (relative path)
|
|
1039 |
|
|
1040 |
<P>
|
|
1041 |
</LI>
|
|
1042 |
<LI><TT>target</TT>: the destination file name, could be something
|
|
1043 |
like <TT>$INSTALL_PATH/subdirX/fileY</TT>
|
|
1044 |
|
|
1045 |
<P>
|
|
1046 |
</LI>
|
|
1047 |
<LI><TT>os</TT>: can optionally specify a target operating system
|
|
1048 |
(<TT>unix, windows, mac</TT>) - this means that the file will only be
|
|
1049 |
installed on its target operating system
|
|
1050 |
|
|
1051 |
<P>
|
|
1052 |
</LI>
|
|
1053 |
<LI><TT>override</TT>: see <TT><file></TT> (<A HREF="#tag:file">2.3.8</A>) for description
|
|
1054 |
|
|
1055 |
<P>
|
|
1056 |
</LI>
|
|
1057 |
</UL>
|
|
1058 |
A <TT><additionaldata></TT> (<A HREF="#tag:additionaldata">2.3.8</A>) tag can
|
|
1059 |
also be specified for customizing.
|
|
1060 |
|
|
1061 |
<P>
|
|
1062 |
|
|
1063 |
<H3><A NAME="SECTION00438800000000000000"></A><A NAME="tag:fileset"></A>
|
|
1064 |
<BR>
|
|
1065 |
<TT><fileset></TT>: add a fileset
|
|
1066 |
</H3>
|
|
1067 |
|
|
1068 |
<P>
|
|
1069 |
The <TT><fileset></TT> tag allows files to be specified using the powerful
|
|
1070 |
Jakarta Ant set syntax. It takes the following parameters:
|
|
1071 |
|
|
1072 |
<P>
|
|
1073 |
|
|
1074 |
<UL>
|
|
1075 |
<LI><TT>dir</TT>: the base directory for the fileset (relative path)
|
|
1076 |
|
|
1077 |
<P>
|
|
1078 |
</LI>
|
|
1079 |
<LI><TT>targetdir</TT>: the destination path, works like for
|
|
1080 |
<TT><file></TT>
|
|
1081 |
|
|
1082 |
<P>
|
|
1083 |
</LI>
|
|
1084 |
<LI><TT>casesensitive</TT>: optionally lets you specify if the names
|
|
1085 |
are case-sensitive or not - takes <TT>yes</TT> or <TT>no</TT>
|
|
1086 |
|
|
1087 |
<P>
|
|
1088 |
</LI>
|
|
1089 |
<LI><TT>defaultexcludes</TT>: optionally lets you specify if the default
|
|
1090 |
excludes will be used - takes <TT>yes</TT> or <TT>no</TT>.
|
|
1091 |
|
|
1092 |
<P>
|
|
1093 |
</LI>
|
|
1094 |
<LI><TT>os</TT>: specifies the operating system, works like for
|
|
1095 |
<TT><file></TT>
|
|
1096 |
|
|
1097 |
<P>
|
|
1098 |
</LI>
|
|
1099 |
<LI><TT>override</TT>: see <TT><file></TT> for description
|
|
1100 |
|
|
1101 |
<P>
|
|
1102 |
</LI>
|
|
1103 |
<LI><TT>includes</TT>: comma- or space-separated list of patterns of
|
|
1104 |
files that must be included; all files are included when omitted.
|
|
1105 |
This is an alternative for multiple include tags.
|
|
1106 |
|
|
1107 |
<P>
|
|
1108 |
</LI>
|
|
1109 |
<LI><TT>excludes</TT>: comma- or space-separated list of patterns of
|
|
1110 |
files that must be excluded; no files (except default excludes) are
|
|
1111 |
excluded when omitted. This is an alternative for multiple exclude tags.
|
|
1112 |
|
|
1113 |
<P>
|
|
1114 |
</LI>
|
|
1115 |
</UL>
|
|
1116 |
|
|
1117 |
<P>
|
|
1118 |
You specify the files with <TT><include></TT> and <TT><exclude></TT> tags
|
|
1119 |
that take the <TT>name</TT> parameter to specify the Ant-like pattern :
|
|
1120 |
|
|
1121 |
<UL>
|
|
1122 |
<LI><TT>**</TT> : means any subdirectory
|
|
1123 |
</LI>
|
|
1124 |
<LI><TT>*</TT> : used as a wildcard.
|
|
1125 |
</LI>
|
|
1126 |
</UL>
|
|
1127 |
Here are some examples of Ant patterns :
|
|
1128 |
|
|
1129 |
<UL>
|
|
1130 |
<LI><TT><include name="lib"/></TT> : will include <TT>lib</TT> and the
|
|
1131 |
subdirectories of <TT>lib</TT>
|
|
1132 |
|
|
1133 |
<P>
|
|
1134 |
</LI>
|
|
1135 |
<LI><TT><exclude name="**/*.java"/></TT> : will exclude any file in any
|
|
1136 |
directory starting from the base path ending by <TT>.java</TT>
|
|
1137 |
|
|
1138 |
<P>
|
|
1139 |
</LI>
|
|
1140 |
<LI><TT><include name="lib/*.jar"/></TT> : will include all the files
|
|
1141 |
ending by <TT>.jar</TT> in <TT>lib</TT>
|