Statistics
| Revision:

root / trunk / install / IzPack / doc / izpack / html / node3.html @ 11445

History | View | Annotate | Download (11.7 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>Getting started</TITLE>
11
<META NAME="description" CONTENT="Getting started">
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="node4.html">
22
<LINK REL="previous" HREF="node2.html">
23
<LINK REL="up" HREF="izpack-doc.html">
24
<LINK REL="next" HREF="node4.html">
25
</HEAD>
26
27
<BODY >
28
29
<DIV CLASS="navigation"><!--Navigation Panel-->
30
<A NAME="tex2html332"
31
  HREF="node4.html">
32
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
33
<A NAME="tex2html328"
34
  HREF="izpack-doc.html">
35
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
36
<A NAME="tex2html322"
37
  HREF="node2.html">
38
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
39
<A NAME="tex2html330"
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="tex2html333"
44
  HREF="node4.html">Writing Installation XML Files</A>
45
<B> Up:</B> <A NAME="tex2html329"
46
  HREF="izpack-doc.html">izpack-doc</A>
47
<B> Previous:</B> <A NAME="tex2html323"
48
  HREF="node2.html">Introduction</A>
49
 &nbsp; <B>  <A NAME="tex2html331"
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="tex2html334"
59
  HREF="node3.html#SECTION00310000000000000000">Overview</A>
60
<LI><A NAME="tex2html335"
61
  HREF="node3.html#SECTION00320000000000000000">First Compilation</A>
62
<LI><A NAME="tex2html336"
63
  HREF="node3.html#SECTION00330000000000000000">The I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> Architecture</A>
64
<UL>
65
<LI><A NAME="tex2html337"
66
  HREF="node3.html#SECTION00331000000000000000">The Compilation System</A>
67
<LI><A NAME="tex2html338"
68
  HREF="node3.html#SECTION00332000000000000000">How an Installer Works</A>
69
<LI><A NAME="tex2html339"
70
  HREF="node3.html#SECTION00333000000000000000">The Different Kinds of Installers</A>
71
<LI><A NAME="tex2html340"
72
  HREF="node3.html#SECTION00334000000000000000">Installers for older VM Versions</A>
73
</UL></UL>
74
<!--End of Table of Child-Links-->
75
<HR>
76
77
<H1><A NAME="SECTION00300000000000000000">
78
Getting started</A>
79
</H1>
80
81
<P>
82
83
<H1><A NAME="SECTION00310000000000000000">
84
Overview</A>
85
</H1>
86
87
<P>
88
To begin with, you should know what I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> is organized if you want to use
89
it. Let's go into the directory where you have installed I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> on your
90
machine. There are 3 text files and a set of directories. The most
91
important for the moment are <TT>bin/ doc/ sample/</TT>. If you are reading this,
92
you already know that <TT>doc</TT> contains this documentation :-)
93
<BR>
94
<P>
95
So let's go into <TT>bin/</TT>. The <TT>icons/</TT> directory contains some
96
directories for your system, in case you would like an icon to launch a
97
component of I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> . But the most important things you can see in <TT>bin</TT>
98
are the <TT>compile</TT> scripts (in both Unix* and Windows formats).
99
<TT>compile</TT> is used to compile a ready-to-go XML installation file from
100
a command-line context or from an external tool.
101
<BR>
102
<P>
103
104
<SPAN  CLASS="textit">Note : these scripts can be launched from anywhere on your system as the
105
installer has customized these scripts so that they can inform I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> of where
106
it is located.</SPAN>
107
<BR>
108
<P>
109
110
<H1><A NAME="SECTION00320000000000000000">
111
First Compilation</A>
112
</H1>
113
114
<P>
115
Now you probably can't wait to build your first installer. So go on open a
116
command-line shell and navigate to <TT>sample/</TT>. The following should work
117
on both Unix* and Windows systems. For the latter, just change the path
118
separator (slash '/') to a backslash. So type ($ is your shell prompt !) :
119
<PRE>
120
$ ../bin/compile install.xml -b . -o install.jar -k standard
121
 (installer generation text output here)
122
$ java -jar install.jar
123
</PRE>
124
125
<P>
126
There you are! The first command has produced the installer and the
127
second one did launch it.
128
129
<P>
130
131
<H1><A NAME="SECTION00330000000000000000">
132
The I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> Architecture</A>
133
</H1>
134
135
<P>
136
Now that you have packaged your first installer, it's time for you to understand
137
how the whole thing works.
138
<BR>
139
<P>
140
141
<H2><A NAME="SECTION00331000000000000000">
142
The Compilation System</A>
143
</H2>
144
145
<P>
146
The compilation system (see figure <A HREF="#comparch">1.1</A>) is quite modular.
147
Indeed, you can use the compiler in 2 ways :
148
149
<UL>
150
<LI>from a command-line
151
</LI>
152
<LI>from Jakarta Ant
153
</LI>
154
</UL>
155
<P>
156
157
<DIV ALIGN="CENTER"><A NAME="comparch"></A><A NAME="310"></A>
158
<TABLE>
159
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1.1:</STRONG>
160
         <SPAN  CLASS="textit">The compiler architecture.</SPAN></CAPTION>
161
<TR><TD>
162
<DIV ALIGN="CENTER">
163
<!-- MATH
164
 $\fbox{\includegraphics[scale=0.4]{img/ch1-comparch}}$
165
 -->
166
<SPAN CLASS="MATH"><IMG
167
 WIDTH="382" HEIGHT="736" ALIGN="MIDDLE" BORDER="0"
168
 SRC="img2.png"
169
 ALT="\fbox{\includegraphics[scale=0.4]{img/ch1-comparch}}"></SPAN>
170
</DIV></TD></TR>
171
</TABLE>
172
</DIV>
173
174
<P>
175
The compiler takes as its input an XML installation file that describes
176
(at a relatively high-level) the installation. This file contains
177
detailed information such as the application name, the authors, the
178
files to install, the panels to use, which resources to load and much
179
more (see figure <A HREF="#archinstaller">1.2</A>).
180
<BR>
181
<P>
182
The compiler can generate different kinds of installers, but this information is
183
not located inside the XML file as it is not were it should be. On the contrary,
184
this is a compiler parameter.
185
<BR>
186
<P>
187
The compilation options for a command-line installer are the following:
188
189
<UL>
190
<LI><TT>-?</TT>: gives a list of the available options.
191
</LI>
192
<LI><TT>-b</TT>: specifies the base path, <SPAN  CLASS="textsl">ie</SPAN> the one that will be
193
used to resolve the relative paths. If your XML file contains absolute paths,
194
specify it to an empty string (<TT>-b ""</TT>).
195
</LI>
196
<LI><TT>-k</TT>: specifies the installer kind, for instance most users will
197
want <TT>standard</TT> here.
198
</LI>
199
<LI><TT>-o</TT>: specifies the resulting installer Jar file name.
200
</LI>
201
</UL>
202
<P>
203
204
<H2><A NAME="SECTION00332000000000000000">
205
How an Installer Works</A>
206
</H2>
207
208
<P>
209
An installer presents its panels to the end-user. For instance, there is
210
one to select the packages, one to prompt for the license agreement, one
211
to select the installation path and so on. You have a choice from a
212
variety of panels to place in the installer. For example, you can choose
213
between a plain text and a HTML text panel for the license agreement.
214
Also, if you don't want of the <SPAN  CLASS="textit">HelloPanel</SPAN>, you just don't
215
include it.
216
<BR>
217
<P>
218
219
<DIV ALIGN="CENTER"><A NAME="archinstaller"></A><A NAME="312"></A>
220
<TABLE>
221
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1.2:</STRONG>
222
         <SPAN  CLASS="textit">The installer architecture.</SPAN></CAPTION>
223
<TR><TD>
224
<DIV ALIGN="CENTER">
225
<!-- MATH
226
 $\fbox{\includegraphics[scale=0.4]{img/ch1-compinside}}$
227
 -->
228
<SPAN CLASS="MATH"><IMG
229
 WIDTH="525" HEIGHT="831" ALIGN="MIDDLE" BORDER="0"
230
 SRC="img3.png"
231
 ALT="\fbox{\includegraphics[scale=0.4]{img/ch1-compinside}}"></SPAN>
232
</DIV></TD></TR>
233
</TABLE>
234
</DIV>
235
236
<P>
237
It is very important to understand that some of the panels may need extra data. For
238
instance, the license agreement panel needs the license text. A simple approach
239
to specify such data would have been to add as many XML tags as needed for
240
each panel. However, this makes the XML file too specific and not easy to
241
maintain. The approach that has been chosen is to put the data in files and we
242
call these files <SPAN  CLASS="textit">resource files</SPAN>. They are specified with a unique XML
243
tag. This is a much cleaner approach.
244
<BR>
245
<P>
246
You might wonder how your files are packaged. They can be grouped in
247
<SPAN  CLASS="textit">packs</SPAN>. For instance, you can have one pack for the core files, one for
248
the documentation, one for the source code and so on. In this way, your end-users
249
will have the choice to install a pack or not (provided that the pack they don't
250
want to install is not mandatory). Inside the jar file (which is a zip file), a
251
sub directory contains the pack files. Each pack file contains the files that are
252
part of it. Could we do it simpler ? :-)
253
<BR>
254
<P>
255
256
<H2><A NAME="SECTION00333000000000000000">
257
The Different Kinds of Installers</A>
258
</H2>
259
260
<P>
261
There are 2 kinds of installers available :
262
263
<UL>
264
<LI><TT>standard</TT> : a single-file ready-to-run installer
265
</LI>
266
<LI><TT>web</TT> : a web based installer (pack data is located on
267
  an HTTP server, and the installer retrieves it at install time (see
268
  section&nbsp;<A HREF="node5.html#webinstaller">3.6</A>))
269
</LI>
270
</UL>
271
272
<P>
273
274
<H2><A NAME="SECTION00334000000000000000">
275
Installers for older VM Versions</A>
276
</H2>
277
For default the installer will be made for the current most used version of
278
the java runtime environment. It is possible to create an installation that
279
is runable with an older VM version.
280
<BR>
281
What version is used can be detected in the Ant properties file that is used
282
to build IzPack. It is <TT>[IzPackRoot]/src/ant.properties</TT>.
283
The value of the property "source" determines the VM version.
284
<BR>
285
If compatibility to older versions is needed, a recompilation of the jar files
286
of the IzPack system should be done. For this the sources of IzPack and an Ant
287
installation are needed. The sources of IzPack are selectable at installation
288
time of IzPack. Before a recompilation of all can be triggered, the version of
289
byte code should be changed. This can be done simple by changing the "source"
290
entry in <TT>[IzPackRoot]/src/ant.properties</TT> to the needed value. The
291
recompilation should be performed with the current most used VM version
292
because there are classes of it referenced in the IzPack code. Usage of an
293
older VM version at installation time will be possible because the classes of
294
the newer VM version are only used after a VM version check. Of course, some
295
features of IzPack will be missing at using an old VM version. To recompile
296
IzPack go into <TT>[IzPackRoot]/src</TT>. Use a current JDK (not JRE) for this.
297
Call
298
<PRE>
299
ant clean
300
</PRE>followed by
301
<PRE>
302
ant all
303
</PRE>Then all jar files in <TT>[IzPackRoot]/lib</TT>,
304
<TT>[IzPackRoot]/bin/panels</TT> and <TT>[IzPackRoot]/bin/customActions</TT>
305
should be recompiled with the selected source version.
306
307
<DIV CLASS="navigation"><HR>
308
<!--Navigation Panel-->
309
<A NAME="tex2html332"
310
  HREF="node4.html">
311
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
312
<A NAME="tex2html328"
313
  HREF="izpack-doc.html">
314
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
315
<A NAME="tex2html322"
316
  HREF="node2.html">
317
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
318
<A NAME="tex2html330"
319
  HREF="node1.html">
320
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
321
<BR>
322
<B> Next:</B> <A NAME="tex2html333"
323
  HREF="node4.html">Writing Installation XML Files</A>
324
<B> Up:</B> <A NAME="tex2html329"
325
  HREF="izpack-doc.html">izpack-doc</A>
326
<B> Previous:</B> <A NAME="tex2html323"
327
  HREF="node2.html">Introduction</A>
328
 &nbsp; <B>  <A NAME="tex2html331"
329
  HREF="node1.html">Contents</A></B> </DIV>
330
<!--End of Navigation Panel-->
331
<ADDRESS>
332
Julien Ponge
333
2005-04-22
334
</ADDRESS>
335
</BODY>
336
</HTML>