root / trunk / install / IzPack / doc / izpack / html / node4.html @ 11445
History | View | Annotate | Download (56.4 KB)
1 | 5819 | cesar | <!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> |
||
1142 | |||
1143 | <P>
|
||
1144 | </LI>
|
||
1145 | <LI><TT><exclude name="lib/**/*FOO*"/></TT> : will exclude any file in |
||
1146 | any subdirectory starting from <TT>lib</TT> whose name contains |
||
1147 | <TT>FOO</TT>. |
||
1148 | |||
1149 | <P>
|
||
1150 | </LI>
|
||
1151 | </UL>
|
||
1152 | |||
1153 | <P>
|
||
1154 | There area set of definitions that are excluded by default file-sets, |
||
1155 | just as in Ant. IzPack defaults to the Ant list of default |
||
1156 | excludes. There is currently no equivalent to the <defaultexcludes> |
||
1157 | task. Default excludes are: |
||
1158 | <PRE>
|
||
1159 | **/*\~{} |
||
1160 | **/\#*\# |
||
1161 | **/.\#* |
||
1162 | **/%*% |
||
1163 | **/.\_* |
||
1164 | **/CVS |
||
1165 | **/CVS/** |
||
1166 | **/.cvsignore |
||
1167 | **/SCCS |
||
1168 | **/SCCS/** |
||
1169 | **/vssver.scc |
||
1170 | **/.svn |
||
1171 | **/.svn/** |
||
1172 | **/.DS\_Store |
||
1173 | </PRE>A <TT><additionaldata></TT> (<A HREF="#tag:additionaldata">2.3.8</A>) |
||
1174 | tag can also be specified for customizing. |
||
1175 | |||
1176 | <P>
|
||
1177 | |||
1178 | <H3><A NAME="SECTION00438900000000000000"> |
||
1179 | <TT><parsable></TT> - parse a file after installation</A> |
||
1180 | </H3>
|
||
1181 | |||
1182 | <P>
|
||
1183 | Files specified by <TT><parsable></TT> are parsed after installation and may |
||
1184 | have variables substituted. |
||
1185 | |||
1186 | <P>
|
||
1187 | |||
1188 | <UL>
|
||
1189 | <LI><TT>targetfile</TT> : the file to parse, could be something like |
||
1190 | <BR> <TT>$INSTALL_PATH/bin/launch-script.sh</TT> |
||
1191 | <BR> <A NAME="tag:slashMasking"></A>A slash will be changed to the system dependant path separator (e.g. to |
||
1192 | a backslash on Windows) only if no backslash masks the slash. |
||
1193 | |||
1194 | <P>
|
||
1195 | </LI>
|
||
1196 | <LI><TT>type</TT> : specifies the type (same as for the resources) - |
||
1197 | the default is <TT>plain</TT> |
||
1198 | |||
1199 | <P>
|
||
1200 | </LI>
|
||
1201 | <LI><TT>encoding</TT> : specifies the file encoding |
||
1202 | |||
1203 | <P>
|
||
1204 | </LI>
|
||
1205 | <LI><TT>os</TT>: specifies the operating system, works like for |
||
1206 | <TT><file></TT> |
||
1207 | |||
1208 | <P>
|
||
1209 | </LI>
|
||
1210 | </UL>
|
||
1211 | <P>
|
||
1212 | |||
1213 | <H3><A NAME="SECTION004381000000000000000"> |
||
1214 | <TT><executable></TT> - mark file executable or execute it</A> |
||
1215 | </H3>
|
||
1216 | |||
1217 | <P>
|
||
1218 | The <TT><executable></TT> tag is a very useful thing if you need to execute |
||
1219 | something during the installation process. It can also be used to set the |
||
1220 | executable flag on Unix-like systems. Here are the attributes : |
||
1221 | |||
1222 | <P>
|
||
1223 | |||
1224 | <UL>
|
||
1225 | <LI><TT>targetfile</TT> : the file to run, could be something like |
||
1226 | <BR> <TT>$INSTALL_PATH/bin/launch-script.sh</TT> |
||
1227 | <BR>
|
||
1228 | Slashes are handled special (see attribute |
||
1229 | <TT>targetfile</TT> of tag <TT><parsable></TT><A HREF="#tag:slashMasking">2.3.8</A>). |
||
1230 | |||
1231 | <P>
|
||
1232 | </LI>
|
||
1233 | <LI><TT>class</TT> : If the executable is a jar file, this is the |
||
1234 | class to run for a Java<SUP><SMALL>TM</SMALL></SUP> program |
||
1235 | |||
1236 | <P>
|
||
1237 | </LI>
|
||
1238 | <LI><TT>type</TT> : <TT>bin</TT> or <TT>jar</TT> (the default is |
||
1239 | <TT>bin</TT>) |
||
1240 | |||
1241 | <P>
|
||
1242 | </LI>
|
||
1243 | <LI><TT>stage</TT> : specifies when to launch : <TT>postinstall</TT> |
||
1244 | is just after the installation is done and the default value, |
||
1245 | <TT>never</TT> will never launch it (useful to set the +x flag on Unix). |
||
1246 | <TT>uninstall</TT> will launch the executable when the application |
||
1247 | is uninstalled. The executable is executed before any files are deleted. |
||
1248 | |||
1249 | <P>
|
||
1250 | </LI>
|
||
1251 | <LI><TT>failure</TT> : specifies what to do when an error occurs : |
||
1252 | <TT>abort</TT> will abort the installation process, <TT>ask</TT> (default) |
||
1253 | will ask the user what to do and <TT>warn</TT> will just tell the user |
||
1254 | that something is wrong |
||
1255 | |||
1256 | <P>
|
||
1257 | </LI>
|
||
1258 | <LI><TT>os</TT>: specifies the operating system, works like for |
||
1259 | <TT><file></TT> |
||
1260 | |||
1261 | <P>
|
||
1262 | </LI>
|
||
1263 | <LI><TT>keep</TT> : specifies whether the file will be kept after |
||
1264 | execution. The default is to delete the file after is has been executed. |
||
1265 | This can be changed by specifying <TT>keep="true"</TT>. |
||
1266 | |||
1267 | <P>
|
||
1268 | </LI>
|
||
1269 | </UL>
|
||
1270 | A <TT><args></TT> tag can also be specified in order to pass |
||
1271 | arguments to the executable: |
||
1272 | |||
1273 | <UL>
|
||
1274 | <LI><TT><arg></TT>: passes the argument specified in the |
||
1275 | <TT>value</TT> attribute. Slashes are handled special (see attribute |
||
1276 | <TT>targetfile</TT> of tag <TT><parsable></TT><A HREF="#tag:slashMasking">2.3.8</A>). |
||
1277 | |||
1278 | <P>
|
||
1279 | </LI>
|
||
1280 | </UL>
|
||
1281 | |||
1282 | <P>
|
||
1283 | |||
1284 | <H3><A NAME="SECTION004381100000000000000"></A><A NAME="tag:os"></A> |
||
1285 | <BR>
|
||
1286 | <TT><os></TT> - make a file OS-dependent |
||
1287 | </H3>
|
||
1288 | |||
1289 | <P>
|
||
1290 | The <TT><os></TT> tag can be used inside the <TT><file></TT>, |
||
1291 | <TT><fileset></TT>, <TT><singlefile></TT>, <TT><parsable></TT>, |
||
1292 | <TT><executable></TT> tags to restrict it's effect to a specific |
||
1293 | operating system family, architecture or version: |
||
1294 | |||
1295 | <P>
|
||
1296 | |||
1297 | <UL>
|
||
1298 | <LI><TT>family</TT>: <TT>unix, windows, mac</TT> to specify the |
||
1299 | operating system family |
||
1300 | </LI>
|
||
1301 | <LI><TT>name</TT>: the operating system name |
||
1302 | </LI>
|
||
1303 | <LI><TT>version</TT>: the operating system version |
||
1304 | </LI>
|
||
1305 | <LI><TT>arch</TT>: the operating system architecture (for instance the |
||
1306 | Linux kernel can run on i386, sparc, and so on) |
||
1307 | |||
1308 | <P>
|
||
1309 | </LI>
|
||
1310 | </UL>
|
||
1311 | |||
1312 | <P>
|
||
1313 | Here's an example installation file : |
||
1314 | <PRE>
|
||
1315 | <packs> |
||
1316 | <!-- The core files --> |
||
1317 | <pack name="Core" required="yes"> |
||
1318 | <description>The IzPack core files.</description> |
||
1319 | <file targetdir="$INSTALL_PATH" src="bin"/> |
||
1320 | <file targetdir="$INSTALL_PATH" src="lib"/> |
||
1321 | <file targetdir="$INSTALL_PATH" src="legal"/> |
||
1322 | <file targetdir="$INSTALL_PATH" src="Readme.txt"/> |
||
1323 | <file targetdir="$INSTALL_PATH" src="Versions.txt"/> |
||
1324 | <file targetdir="$INSTALL_PATH" src="Thanks.txt"/> |
||
1325 | <parsable targetfile="$INSTALL_PATH/bin/izpack-fe"/> |
||
1326 | <parsable targetfile="$INSTALL_PATH/bin/izpack-fe.bat"/> |
||
1327 | <parsable targetfile="$INSTALL_PATH/bin/compile"/> |
||
1328 | <parsable targetfile="$INSTALL_PATH/bin/compile.bat"/> |
||
1329 | <executable targetfile="$INSTALL_PATH/bin/compile" stage="never"/> |
||
1330 | <executable targetfile="$INSTALL_PATH/bin/izpack-fe" stage="never"/> |
||
1331 | </pack> |
||
1332 | |||
1333 | <!-- The documentation (1 directory) --> |
||
1334 | <pack name="Documentation" required="no"> |
||
1335 | <description>The IzPack documentation (HTML and PDF).</description> |
||
1336 | <file targetdir="$INSTALL_PATH" src="doc"/> |
||
1337 | </pack> |
||
1338 | </packs> |
||
1339 | </PRE>
|
||
1340 | <P>
|
||
1341 | |||
1342 | <H2><A NAME="SECTION00439000000000000000"></A> |
||
1343 | <A NAME="native-element"></A> |
||
1344 | <BR>
|
||
1345 | The Native Element <TT><native></TT> |
||
1346 | </H2>
|
||
1347 | |||
1348 | <P>
|
||
1349 | Use this if you want to use a feature that requires a native library. |
||
1350 | The native libraries are placed under <TT>bin/native/..</TT>. There are 2 |
||
1351 | kinds of native libraries : the I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> libraries and the third-party |
||
1352 | ones. The IzPack libraries are located at <TT>bin/native/izpack</TT>, |
||
1353 | you can place your own libraries at <TT>bin/native/3rdparty</TT>. |
||
1354 | It is possible to place a native library also into the uninstaller. |
||
1355 | It is useable from CustomActions (<A HREF="node9.html#cha:customactions">7</A>). If one or |
||
1356 | more are referenced for it, the needed support classes are automatically |
||
1357 | placed into the uninstaller. To place it only on operating systems |
||
1358 | for which they are build, it is possible to define an OS |
||
1359 | restriction. This restriction will only be performed for the |
||
1360 | uninstaller. The markup takes the following attributes : |
||
1361 | <UL>
|
||
1362 | <LI><TT>type</TT> : <TT>izpack</TT> or <TT>3rdparty</TT> |
||
1363 | </LI>
|
||
1364 | <LI><TT>name</TT> : the library filename |
||
1365 | </LI>
|
||
1366 | <LI><TT>stage</TT>: stage where to use the library |
||
1367 | (install|uninstall|both) |
||
1368 | |||
1369 | <P>
|
||
1370 | </LI>
|
||
1371 | </UL>
|
||
1372 | <H3><A NAME="SECTION00439100000000000000"> |
||
1373 | <TT><os></TT> - make a library OS-dependent</A> |
||
1374 | </H3>
|
||
1375 | |||
1376 | <P>
|
||
1377 | The <TT><os></TT> tag can be used to restrict the inclusion into |
||
1378 | the uninstaller to a specific operating system family, |
||
1379 | architecture or version. The inclusion into the installer will be |
||
1380 | always done. For more information see <A HREF="#tag:os">2.3.8</A>. |
||
1381 | |||
1382 | <P>
|
||
1383 | Here's a sample : |
||
1384 | <PRE>
|
||
1385 | <native type="izpack" name="ShellLink.dll"/> |
||
1386 | </PRE>
|
||
1387 | <P>
|
||
1388 | |||
1389 | <H2><A NAME="SECTION004310000000000000000"></A> |
||
1390 | <A NAME="jar-element"></A> |
||
1391 | <BR>
|
||
1392 | The Jar Merging Element <TT><jar></TT> |
||
1393 | </H2>
|
||
1394 | |||
1395 | <P>
|
||
1396 | If you adapt I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> for your own needs, you might need to merge the |
||
1397 | content of another jar file into the jar installer. For instance, this |
||
1398 | could be a library that you need to merge. The <TT><jar></TT> markup |
||
1399 | allows you to merge the raw content of another jar file into the |
||
1400 | installer and the uninstaller. It is necessary that the paths in the |
||
1401 | jars are unique because only the contained files of the jar are added |
||
1402 | to the installer jar, not the jar file self. |
||
1403 | The attributes are: |
||
1404 | <UL>
|
||
1405 | <LI><TT>src</TT> : the path at compile time |
||
1406 | </LI>
|
||
1407 | <LI><TT>stage</TT>: stage where to use the contents of the additional jar file |
||
1408 | (install|uninstall|both) |
||
1409 | |||
1410 | <P>
|
||
1411 | </LI>
|
||
1412 | </UL>
|
||
1413 | <P>
|
||
1414 | A sample : |
||
1415 | <PRE>
|
||
1416 | <jar src="../nicelibrary.jar"/> |
||
1417 | </PRE>
|
||
1418 | <P>
|
||
1419 | |||
1420 | <H1><A NAME="SECTION00440000000000000000"> |
||
1421 | The Available Panels</A>
|
||
1422 | </H1>
|
||
1423 | |||
1424 | <P>
|
||
1425 | In this section I will introduce the various panels available in IzPack. |
||
1426 | The usage for most is pretty simple and described right here. The more |
||
1427 | elaborate ones are explained in more detail in the <SPAN CLASS="textit">Advanced |
||
1428 | Features</SPAN> chapter or in their own chapter. The panels are listed by
|
||
1429 | their class name. This is the name that must be used with the |
||
1430 | <TT>classname</TT> attribute (case-sensitive). |
||
1431 | <BR>
|
||
1432 | <P>
|
||
1433 | |||
1434 | <H2><A NAME="SECTION00441000000000000000"> |
||
1435 | HelloPanel</A>
|
||
1436 | </H2>
|
||
1437 | |||
1438 | <P>
|
||
1439 | This panel welcomes the user by displaying the project name, the |
||
1440 | version, the URL as well as the authors. |
||
1441 | <BR>
|
||
1442 | <P>
|
||
1443 | |||
1444 | <H2><A NAME="SECTION00442000000000000000"> |
||
1445 | InfoPanel and HTMLInfoPanel</A>
|
||
1446 | </H2>
|
||
1447 | |||
1448 | <P>
|
||
1449 | This is a kind of 'README' panel. It presents text of any length. The |
||
1450 | text is specified by the <TT>(HTML)InfoPanel.info</TT> resource. Starting from |
||
1451 | IzPack 3.7.0, variables substitution is allowed. |
||
1452 | <BR>
|
||
1453 | <P>
|
||
1454 | |||
1455 | <H2><A NAME="SECTION00443000000000000000"> |
||
1456 | LicencePanel and HTMLLicencePanel</A>
|
||
1457 | </H2>
|
||
1458 | |||
1459 | <P>
|
||
1460 | |||
1461 | <SPAN CLASS="textit"><SPAN ID="txt818">Note :</SPAN> there is a mistake in the name - it should be |
||
1462 | LicensePanel. In France the word is Licence ... and one of my diploma is a |
||
1463 | 'Licence' so ...</SPAN> :-)
|
||
1464 | <BR>
|
||
1465 | <P>
|
||
1466 | These panels can prompt the user to acknowledge a license agreement. They block |
||
1467 | unless the user selects the 'agree' option. To specify the license agreement |
||
1468 | text you have to use the <TT>(HTML)LicencePanel.licence</TT> resource. |
||
1469 | <BR>
|
||
1470 | <P>
|
||
1471 | |||
1472 | <H2><A NAME="SECTION00444000000000000000"> |
||
1473 | PacksPanel</A>
|
||
1474 | </H2>
|
||
1475 | |||
1476 | <P>
|
||
1477 | Allows the user to select the packs he wants to install. |
||
1478 | <BR>
|
||
1479 | <P>
|
||
1480 | |||
1481 | <H2><A NAME="SECTION00445000000000000000"> |
||
1482 | ImgPacksPanel</A>
|
||
1483 | </H2>
|
||
1484 | |||
1485 | <P>
|
||
1486 | This is the same as above, but for each panel a different picture is |
||
1487 | shown to the user. The pictures are specified with the resources |
||
1488 | <TT>ImgPacksPanel.img.x</TT> where x stands for the pack number, the |
||
1489 | numbers start from 0. Of course it's up to you to specify as many images |
||
1490 | as needed and with correct numbers. For instance if you have 2 packs |
||
1491 | <TT>core</TT> and <TT>documentation</TT> (in this order), then the resource for |
||
1492 | <TT>core</TT> will be <TT>ImgPacksPanel.img.0</TT> and the resource for |
||
1493 | <TT>doc</TT> will be <TT>ImgPacksPanel.img.1</TT>. The supported image formats |
||
1494 | depend on what you JVM supports, but starting from J2SE 1.3, <SPAN CLASS="textsl">GIF</SPAN>, |
||
1495 | <SPAN CLASS="textsl">JPEG</SPAN> and <SPAN CLASS="textsl">PNG</SPAN> are supported. |
||
1496 | <BR>
|
||
1497 | <P>
|
||
1498 | |||
1499 | <H2><A NAME="SECTION00446000000000000000"> |
||
1500 | TargetPanel</A>
|
||
1501 | </H2>
|
||
1502 | |||
1503 | <P>
|
||
1504 | This panel allows the user to select the installation path. It can be customized with |
||
1505 | the following resources (they are text files containing the path) : |
||
1506 | |||
1507 | <UL>
|
||
1508 | <LI><TT>TargetPanel.dir.f</TT> where f stands for the family (<TT>mac, |
||
1509 | macosx, windows, unix</TT>)
|
||
1510 | </LI>
|
||
1511 | <LI><TT>TargetPanel.dir</TT> : the directory name, instead of the software |
||
1512 | to install name |
||
1513 | </LI>
|
||
1514 | <LI><TT>TargetPanel.dir.d</TT> where d is a "dynamic" name, as returned by |
||
1515 | the Java<SUP><SMALL>TM</SMALL></SUP> virtual machine. You should write the name in lowercase and replace the |
||
1516 | spaces with underscores. For instance, you might want a different setting for |
||
1517 | Solaris and GNU/Linux which are both Unix-like systems. The resources would be |
||
1518 | <TT>TargetPanel.dir.sunos, TargetPanel.dir.linux</TT>. You should have a |
||
1519 | Unix-resource in case it wouldn't work though. |
||
1520 | |||
1521 | <P>
|
||
1522 | </LI>
|
||
1523 | </UL>
|
||
1524 | <P>
|
||
1525 | |||
1526 | <H2><A NAME="SECTION00447000000000000000"> |
||
1527 | InstallPanel</A>
|
||
1528 | </H2>
|
||
1529 | |||
1530 | <P>
|
||
1531 | You should always have this one as it launches the installation process ! |
||
1532 | <BR>
|
||
1533 | <P>
|
||
1534 | |||
1535 | <H2><A NAME="SECTION00448000000000000000"> |
||
1536 | XInfoPanel</A>
|
||
1537 | </H2>
|
||
1538 | |||
1539 | <P>
|
||
1540 | A panel showing text parsed by the variable substitutor. The text can be |
||
1541 | specified through the <TT>XInfoPanel.info</TT> resource. This panel can |
||
1542 | be useful when you have to show information after the installation |
||
1543 | process is completed (for instance if the text contains the target |
||
1544 | path). |
||
1545 | <BR>
|
||
1546 | <P>
|
||
1547 | |||
1548 | <H2><A NAME="SECTION00449000000000000000"> |
||
1549 | FinishPanel</A>
|
||
1550 | </H2>
|
||
1551 | |||
1552 | <P>
|
||
1553 | A ending panel, able to write automated installer information. For |
||
1554 | details see the chapter on 'Advanced Features'. |
||
1555 | <BR>
|
||
1556 | <P>
|
||
1557 | |||
1558 | <H2><A NAME="SECTION004410000000000000000"> |
||
1559 | SimpleFinishPanel</A>
|
||
1560 | </H2>
|
||
1561 | |||
1562 | <P>
|
||
1563 | Same as <TT>FinishPanel</TT>, but without the automated installer features. It |
||
1564 | is aimed at making the life easier for end-users who will never encounter the |
||
1565 | automated installer extra feature. |
||
1566 | <BR>
|
||
1567 | <P>
|
||
1568 | |||
1569 | <H2><A NAME="SECTION004411000000000000000"> |
||
1570 | ShortcutPanel</A>
|
||
1571 | </H2>
|
||
1572 | |||
1573 | <P>
|
||
1574 | This panel is used to create desktop shortcuts. For details on using the |
||
1575 | ShortcutPanel see the chapter 'Desktop Shortcuts'. |
||
1576 | |||
1577 | <P>
|
||
1578 | |||
1579 | <H2><A NAME="SECTION004412000000000000000"> |
||
1580 | UserInputPanel</A>
|
||
1581 | </H2>
|
||
1582 | |||
1583 | <P>
|
||
1584 | This panel allows you to prompt the user for data. What the user is prompted |
||
1585 | for is specified using an XML file which is included as a resource to the |
||
1586 | installer. See chapter <A HREF="node8.html#chap:userinput">6</A> on page <A HREF="node8.html#chap:userinput"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]" SRC="crossref.png"></A> |
||
1587 | for a detailed explanation. |
||
1588 | |||
1589 | <P>
|
||
1590 | |||
1591 | <H2><A NAME="SECTION004413000000000000000"> |
||
1592 | CompilePanel</A>
|
||
1593 | </H2>
|
||
1594 | |||
1595 | <P>
|
||
1596 | This panel allows you to compile just installed Java sourcecode. |
||
1597 | The details for the compilation are specified using the resource <TT>CompilePanel.Spec.xml</TT>. |
||
1598 | The XML file has the following format: |
||
1599 | <PRE>
|
||
1600 | <compilation> |
||
1601 | <global> |
||
1602 | <compiler> |
||
1603 | <choice value="$JAVA_HOME/bin/javac" /> |
||
1604 | <choice value="jikes" /> |
||
1605 | </compiler> |
||
1606 | <arguments> |
||
1607 | <choice value="-O -g:none" /> |
||
1608 | <choice value="-O" /> |
||
1609 | <choice value="-g" /> |
||
1610 | <choice value="" /> |
||
1611 | </arguments> |
||
1612 | </global> |
||
1613 | <jobs> |
||
1614 | <classpath add="$INSTALL_PATH/src/classes/" /> |
||
1615 | <job name="optional name"> |
||
1616 | <directory name="$INSTALL_PATH/src/classes/xyz" /> |
||
1617 | </job> |
||
1618 | <job name="another job"> |
||
1619 | <packdepency name="some package name" /> |
||
1620 | <classpath sub="$INSTALL_PATH/" /> |
||
1621 | <directory name="$INSTALL_PATH/src/classes/abc" /> |
||
1622 | <file name="$INSTALL_PATH/some/file.java" /> |
||
1623 | </job> |
||
1624 | </jobs> |
||
1625 | </compilation> |
||
1626 | </PRE>
|
||
1627 | |||
1628 | <P>
|
||
1629 | In theory, jobs can be nested but this has not been tested at all. A change to |
||
1630 | the classpath within a job only affects this job and nested jobs. The classpath |
||
1631 | should be specified before any files or directories. |
||
1632 | |||
1633 | <P>
|
||
1634 | The user can change the compiler to use and choose from some default |
||
1635 | compilation options before compilation is started. |
||
1636 | |||
1637 | <P>
|
||
1638 | <IMG
|
||
1639 | WIDTH="628" HEIGHT="455" ALIGN="BOTTOM" BORDER="0" |
||
1640 | SRC="./compilePanel.png" |
||
1641 | ALT="Image compilePanel"> |
||
1642 | |||
1643 | <P>
|
||
1644 | |||
1645 | <H2><A NAME="SECTION004414000000000000000"> |
||
1646 | ProcessPanel</A>
|
||
1647 | </H2>
|
||
1648 | |||
1649 | <P>
|
||
1650 | This panel allows you to execute arbitrary files after installation. |
||
1651 | The details for the compilation are specified using the resource <TT>ProcessPanel.Spec.xml</TT>. |
||
1652 | |||
1653 | <P>
|
||
1654 | The XML file has the following format: |
||
1655 | <PRE>
|
||
1656 | <processing> |
||
1657 | <job name="do xyz"> |
||
1658 | <os family="windows" /> |
||
1659 | <executefile name="$INSTALL_PATH/scripts/xyz.bat"> |
||
1660 | <arg>doit</arg><arg>$variable</arg> |
||
1661 | </executefile> |
||
1662 | </job> |
||
1663 | <job name="do xyz"> |
||
1664 | <os family="unix" /> |
||
1665 | <executefile name="$INSTALL_PATH/scripts/xyz.sh"> |
||
1666 | <arg>doit</arg><arg>$variable</arg> |
||
1667 | </executefile> |
||
1668 | </job> |
||
1669 | </processing> |
||
1670 | </PRE>
|
||
1671 | |||
1672 | <P>
|
||
1673 | Each job may have an <TT><os></TT> attribute - see <A HREF="#tag:os">2.3.8</A> for details. |
||
1674 | <BR>
|
||
1675 | <P>
|
||
1676 | It is also possible to execute Java classes from this panel. Here's what this |
||
1677 | feature author (Alex Bradley) says: |
||
1678 | <BLOCKQUOTE>
|
||
1679 | I've been able to work around my requirements by extending the |
||
1680 | <TT>ProcessPanelWorker</TT> functionality to run user-specified classes. I've |
||
1681 | extended the DTD of the <TT>ProcessPanel.Spec.xml</TT> to include a new element: |
||
1682 | </BLOCKQUOTE><PRE> |
||
1683 | <executeclass name="classname"> |
||
1684 | <args..../> |
||
1685 | </executeclass> |
||
1686 | </PRE><BLOCKQUOTE> |
||
1687 | I've also added a new sub-class of <TT>Processable</TT> called |
||
1688 | <TT>executeclass</TT>. This will run a user-specified class in the context of |
||
1689 | the installer JVM with a single method : |
||
1690 | </BLOCKQUOTE><PRE>run( AbstractUIProcessHandler handler, String[] args]); |
||
1691 | </PRE>
|
||
1692 | <P>
|
||
1693 | <BLOCKQUOTE>It can do everything I need and more. In particular, it allows me to write a
|
||
1694 | process extension and still be able to provide feedback to the user through |
||
1695 | the feedback panel, and to add new functionality to the installer, after its |
||
1696 | been built. |
||
1697 | |||
1698 | </BLOCKQUOTE>
|
||
1699 | |||
1700 | <P>
|
||
1701 | New with version 3.7 is the possibility to tee output that is written to |
||
1702 | the ProcessPanel's textarea into an optional logfile. Using this feature is |
||
1703 | pretty much straightforward, you only have to add a line in <TT>ProcessPanel.Spec.xml</TT> |
||
1704 | that will tell IzPack the location, where the logfile should be stored. |
||
1705 | |||
1706 | <P>
|
||
1707 | Variable substitution is performed, so you can use <TT>$INSTALL_PATH</TT> as example. |
||
1708 | |||
1709 | <P>
|
||
1710 | The name of the logfile is not (yet) configurable but should fit in most cases. It will |
||
1711 | be named |
||
1712 | <PRE>
|
||
1713 | Install_V<$APP_VER>_<YYYY>-<MM>-<DD>_<hh>-<mm>-<ss>_<RandomId>.log |
||
1714 | </PRE>
|
||
1715 | |||
1716 | <P>
|
||
1717 | Here's an example: |
||
1718 | |||
1719 | <P>
|
||
1720 | <PRE>
|
||
1721 | <processing> |
||
1722 | <logfiledir>$INSTALL_PATH</logfiledir> |
||
1723 | <job name="do xyz"> |
||
1724 | <os family="windows" /> |
||
1725 | <executefile name="$INSTALL_PATH/scripts/xyz.bat"> |
||
1726 | <arg>doit</arg><arg>$variable</arg> |
||
1727 | </executefile> |
||
1728 | </processing> |
||
1729 | </PRE>
|
||
1730 | |||
1731 | <P>
|
||
1732 | This will generate a logfile named e.g. <TT>Install_V1.3_2004-11-08_19-22-20_43423.log</TT> |
||
1733 | located in <TT>$INSTALL_PATH</TT>. |
||
1734 | |||
1735 | <P>
|
||
1736 | <TT>ProcessPanelWorker</TT> will write all output that is directed to <TT>stdout</TT> and <TT>stderr</TT> to this file |
||
1737 | if <TT>ProcessPanel.Spec.xml</TT> contains the <TT>logfiledir</TT> entry. |
||
1738 | |||
1739 | <P>
|
||
1740 | Please note that this one file is used for storing the complete output of all jobs and not |
||
1741 | a file for each job that is run. |
||
1742 | |||
1743 | <P>
|
||
1744 | |||
1745 | <H2><A NAME="SECTION004415000000000000000"> |
||
1746 | JDKPathPanel</A>
|
||
1747 | </H2>
|
||
1748 | This panel allows the user to select a JDK path. The variable JAVA_HOME does |
||
1749 | not point to a JDK, else to a JRE also the environment variable points to a JDK. |
||
1750 | This is not a bug, this is the behavior of the VM. But some products needs a JDK, |
||
1751 | for that this panel can be used. There is not only a selection of the path else |
||
1752 | a validation. The validation will be done with the file JDKPath/lib/tools.jar. |
||
1753 | If JAVA_HOME points to the VM which is placed in the JDK, the directory will |
||
1754 | be used as default (JAVA_HOME/..). If there is the variable |
||
1755 | <PRE>
|
||
1756 | JDKPathPanel.skipIfValid |
||
1757 | </PRE>
|
||
1758 | defined with the value "yes", the panel will be skiped if the path is valid. |
||
1759 | Additional it is possible to make a version control. If one or both variables |
||
1760 | <PRE>
|
||
1761 | JDKPathPanel.minVersion |
||
1762 | JDKPathPanel.maxVersion |
||
1763 | </PRE>
|
||
1764 | are defined, only a JDK will be accepted which has a version in the |
||
1765 | range of it. The detection is a little bit pragmatically, therefor it is |
||
1766 | possible, that the detection can fail at some VMs. |
||
1767 | The values in the install.xml should be like |
||
1768 | <PRE>
|
||
1769 | <variables> |
||
1770 | <variable name="JDKPathPanel.minVersion" value="1.4.1" /> |
||
1771 | <variable name="JDKPathPanel.maxVersion" value="1.4.99" /> |
||
1772 | <variable name="JDKPathPanel.skipIfValid" value="yes" /> |
||
1773 | </variables> |
||
1774 | </PRE>
|
||
1775 | |||
1776 | <P>
|
||
1777 | If all is valid, the panels isValidated method sets the variable |
||
1778 | <PRE>
|
||
1779 | JDKPath |
||
1780 | </PRE>
|
||
1781 | to the chosen path. Be aware, this variable exist not until the JDKPanel |
||
1782 | was quitted once. At a secound activation, the default will be the |
||
1783 | last selection. |
||
1784 | |||
1785 | <DIV CLASS="navigation"><HR> |
||
1786 | <!--Navigation Panel-->
|
||
1787 | <A NAME="tex2html351" |
||
1788 | HREF="node5.html"> |
||
1789 | <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> |
||
1790 | <A NAME="tex2html347" |
||
1791 | HREF="izpack-doc.html"> |
||
1792 | <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> |
||
1793 | <A NAME="tex2html341" |
||
1794 | HREF="node3.html"> |
||
1795 | <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> |
||
1796 | <A NAME="tex2html349" |
||
1797 | HREF="node1.html"> |
||
1798 | <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> |
||
1799 | <BR>
|
||
1800 | <B> Next:</B> <A NAME="tex2html352" |
||
1801 | HREF="node5.html">Advanced Features</A> |
||
1802 | <B> Up:</B> <A NAME="tex2html348" |
||
1803 | HREF="izpack-doc.html">izpack-doc</A> |
||
1804 | <B> Previous:</B> <A NAME="tex2html342" |
||
1805 | HREF="node3.html">Getting started</A> |
||
1806 | <B> <A NAME="tex2html350" |
||
1807 | HREF="node1.html">Contents</A></B> </DIV> |
||
1808 | <!--End of Navigation Panel-->
|
||
1809 | <ADDRESS>
|
||
1810 | Julien Ponge |
||
1811 | 2005-04-22 |
||
1812 | </ADDRESS>
|
||
1813 | </BODY>
|
||
1814 | </HTML> |