root / trunk / install / IzPack / doc / izpack / html / node5.html @ 11445
History | View | Annotate | Download (12 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>Advanced Features</TITLE> |
||
11 | <META NAME="description" CONTENT="Advanced Features"> |
||
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="node6.html"> |
||
22 | <LINK REL="previous" HREF="node4.html"> |
||
23 | <LINK REL="up" HREF="izpack-doc.html"> |
||
24 | <LINK REL="next" HREF="node6.html"> |
||
25 | </HEAD>
|
||
26 | |||
27 | <BODY > |
||
28 | |||
29 | <DIV CLASS="navigation"><!--Navigation Panel--> |
||
30 | <A NAME="tex2html410" |
||
31 | HREF="node6.html"> |
||
32 | <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> |
||
33 | <A NAME="tex2html406" |
||
34 | HREF="izpack-doc.html"> |
||
35 | <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> |
||
36 | <A NAME="tex2html400" |
||
37 | HREF="node4.html"> |
||
38 | <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> |
||
39 | <A NAME="tex2html408" |
||
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="tex2html411" |
||
44 | HREF="node6.html">Desktop Shortcuts</A> |
||
45 | <B> Up:</B> <A NAME="tex2html407" |
||
46 | HREF="izpack-doc.html">izpack-doc</A> |
||
47 | <B> Previous:</B> <A NAME="tex2html401" |
||
48 | HREF="node4.html">Writing Installation XML Files</A> |
||
49 | <B> <A NAME="tex2html409" |
||
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="tex2html412" |
||
59 | HREF="node5.html#SECTION00510000000000000000">Ant Integration</A> |
||
60 | <LI><A NAME="tex2html413" |
||
61 | HREF="node5.html#SECTION00520000000000000000">System properties as variable</A> |
||
62 | <LI><A NAME="tex2html414" |
||
63 | HREF="node5.html#SECTION00530000000000000000">Automated Installers</A> |
||
64 | <LI><A NAME="tex2html415" |
||
65 | HREF="node5.html#SECTION00540000000000000000">Picture on the Language Selection Dialog</A> |
||
66 | <LI><A NAME="tex2html416" |
||
67 | HREF="node5.html#SECTION00550000000000000000">Picture in the installer</A> |
||
68 | <LI><A NAME="tex2html417" |
||
69 | HREF="node5.html#SECTION00560000000000000000">Web Installers</A> |
||
70 | <LI><A NAME="tex2html418" |
||
71 | HREF="node5.html#SECTION00570000000000000000">More Internationalization</A> |
||
72 | <UL>
|
||
73 | <LI><A NAME="tex2html419" |
||
74 | HREF="node5.html#SECTION00571000000000000000">Special resources</A> |
||
75 | <LI><A NAME="tex2html420" |
||
76 | HREF="node5.html#SECTION00572000000000000000">Packs</A> |
||
77 | </UL></UL> |
||
78 | <!--End of Table of Child-Links-->
|
||
79 | <HR>
|
||
80 | |||
81 | <H1><A NAME="SECTION00500000000000000000"> |
||
82 | Advanced Features</A>
|
||
83 | </H1>
|
||
84 | |||
85 | <P>
|
||
86 | |||
87 | <H1><A NAME="SECTION00510000000000000000"></A> |
||
88 | <A NAME="ant-integration"></A> |
||
89 | <BR>
|
||
90 | Ant Integration |
||
91 | </H1>
|
||
92 | |||
93 | <P>
|
||
94 | I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> can be easily integrated inside an Ant build process. To do so you |
||
95 | first need to tell Ant that you would like to use I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> : |
||
96 | <PRE>
|
||
97 | <!-- Allows us to use the IzPack Ant task --> |
||
98 | <taskdef name="izpack" classpath="${basedir}/lib/compiler.jar"
|
||
99 | classname="com.izforge.izpack.ant.IzPackTask"/>
|
||
100 | </PRE>
|
||
101 | <P>
|
||
102 | If you want to use the standalone compiler (and therefore don't need an |
||
103 | IzPack installation for building), the task needs to be defined as follows: |
||
104 | <PRE>
|
||
105 | <!-- Allows us to use the IzPack Ant task --> |
||
106 | <taskdef name="izpack" classpath="${basedir}/lib/standalone-compiler.jar"
|
||
107 | classname="com.izforge.izpack.ant.IzPackTask"/>
|
||
108 | </PRE>
|
||
109 | <P>
|
||
110 | Don't forget to add <TT>compiler.jar</TT> or <TT>standalone-compiler.jar</TT> |
||
111 | to the classpath of the Ant process. |
||
112 | |||
113 | <P>
|
||
114 | Then you can invoke I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> with the <TT>izpack</TT> task which takes the |
||
115 | following parameters: |
||
116 | |||
117 | <UL>
|
||
118 | <LI><TT>input</TT> : the XML installation file |
||
119 | </LI>
|
||
120 | <LI><TT>output</TT> : the output jar installer file |
||
121 | </LI>
|
||
122 | <LI><TT>installerType</TT> : optional. <TT>standard</TT> or |
||
123 | <TT>web</TT>. If <TT>web</TT>, the <TT><webdir></TT> attribute |
||
124 | must be specified in the input file (see |
||
125 | section <A HREF="#webinstaller">3.6</A>). Used to force creation of a standard |
||
126 | installer when the <TT><webdir></TT> attribute has been used. |
||
127 | </LI>
|
||
128 | <LI><TT>baseDir</TT> : the base directory to resolve the relative paths |
||
129 | </LI>
|
||
130 | <LI><TT>izPackDir</TT>: the I<SMALL>Z</SMALL>P<SMALL>ACK</SMALL> home directory. Only neccessary if |
||
131 | you do not use the standalone compiler. |
||
132 | |||
133 | <P>
|
||
134 | </LI>
|
||
135 | </UL>
|
||
136 | <P>
|
||
137 | Here is a sample of the task invocation: |
||
138 | <BR><PRE> |
||
139 | <!-- We call IzPack --> |
||
140 | <echo message="Makes the installer using IzPack"/> |
||
141 | <izpack input="${dist.dir}/IzPack-install.xml"
|
||
142 | output="${dist.dir}/IzPack-install.jar" |
||
143 | installerType="standard" |
||
144 | basedir="${dist.dir}" |
||
145 | izPackDir="${dist.dir}/"/>
|
||
146 | </PRE>
|
||
147 | <P>
|
||
148 | |||
149 | <H1><A NAME="SECTION00520000000000000000"> |
||
150 | System properties as variable</A>
|
||
151 | </H1>
|
||
152 | |||
153 | <P>
|
||
154 | All system properties are available as |
||
155 | $SYSTEM_<variable> where <variable> is the actual name _BUT_ with |
||
156 | all separators replaced by '_'. Properties with null values |
||
157 | are never stored. |
||
158 | <BR>
|
||
159 | <P>
|
||
160 | Examples: |
||
161 | <PRE>
|
||
162 | $SYSTEM_java_version or $SYSTEM_os_name |
||
163 | </PRE>
|
||
164 | |||
165 | <P>
|
||
166 | |||
167 | <H1><A NAME="SECTION00530000000000000000"> |
||
168 | Automated Installers</A>
|
||
169 | </H1>
|
||
170 | |||
171 | <P>
|
||
172 | When you conclude your installation with a FinishPanel, the user can |
||
173 | save the data for an automatic installation. With this data, he will be |
||
174 | able to run the same installation on another similar machine. In an |
||
175 | environment where many computers need to be supported this can save |
||
176 | <SPAN CLASS="textsl">a lot</SPAN> of time. |
||
177 | <BR>
|
||
178 | <P>
|
||
179 | So run once the installation on a machine and save your automatic installation |
||
180 | data in <TT>auto-install.xml</TT> (that's just a sample). Then put this file in |
||
181 | the same directory as the installer on another machine. Run it with: |
||
182 | <BR><TT>java -jar installer.jar auto-install.xml</TT> |
||
183 | <BR>
|
||
184 | <P>
|
||
185 | It has reproduced the same installation :-) |
||
186 | <BR>
|
||
187 | <P>
|
||
188 | |||
189 | <H1><A NAME="SECTION00540000000000000000"> |
||
190 | Picture on the Language Selection Dialog</A>
|
||
191 | </H1>
|
||
192 | |||
193 | <P>
|
||
194 | You can add a picture on the language selection dialog by adding the following |
||
195 | resource : <TT>installer.langsel.img</TT>. <SPAN CLASS="textsl">GIF</SPAN>, <SPAN CLASS="textsl">JPEG</SPAN> and |
||
196 | <SPAN CLASS="textsl">PNG</SPAN> pictures are supported starting from J2SE 1.3. |
||
197 | <BR>
|
||
198 | <P>
|
||
199 | |||
200 | <H1><A NAME="SECTION00550000000000000000"> |
||
201 | Picture in the installer</A>
|
||
202 | </H1>
|
||
203 | |||
204 | <P>
|
||
205 | It is possible to specify an optional picture to display on the left side of the |
||
206 | installer. To do this, you just have to define a resource whose id is |
||
207 | <TT>Installer.image</TT>. For instance, |
||
208 | <PRE>
|
||
209 | <res id="Installer.image" src="nice-image.png" /> |
||
210 | </PRE>
|
||
211 | will do that. If the resource isn't specified, no picture will be displayed at |
||
212 | all. <SPAN CLASS="textsl">GIF</SPAN>, <SPAN CLASS="textsl">JPEG</SPAN> and |
||
213 | <SPAN CLASS="textsl">PNG</SPAN> pictures are supported starting from J2SE 1.3. |
||
214 | <BR>
|
||
215 | <P>
|
||
216 | You can also give a specific picture for a specific panel by using the |
||
217 | <TT>Installer.image.n</TT> resource names where <SPAN CLASS="MATH"><IMG |
||
218 | WIDTH="16" HEIGHT="16" ALIGN="BOTTOM" BORDER="0" |
||
219 | SRC="img5.png" |
||
220 | ALT="$n$"></SPAN> is the panel index. For |
||
221 | instance if you want a specific picture for the third panel, use |
||
222 | <TT>Installer.image.2</TT> since the indexes start from 0. |
||
223 | <BR>
|
||
224 | <P>
|
||
225 | |||
226 | <H1><A NAME="SECTION00560000000000000000"></A> |
||
227 | <A NAME="webinstaller"></A> |
||
228 | <BR>
|
||
229 | Web Installers |
||
230 | </H1>
|
||
231 | |||
232 | <P>
|
||
233 | The web installers allow your users to download a small installer that |
||
234 | does not contain the files to install. These files will be downloaded |
||
235 | from an HTTP server such as <SPAN CLASS="textit">Apache HTTPD</SPAN>. If you have many |
||
236 | optional packs, this can save people's resources. Its very easy: |
||
237 | people download a small Jar file containing the installer, they launch |
||
238 | it and choose their packages. Then the installer will get the required |
||
239 | packages from individual Jar files located on a server, only |
||
240 | downloading those required. It's that simple. |
||
241 | <BR>
|
||
242 | <P>
|
||
243 | To create a web installer, add the <TT><webdir></TT> element to the |
||
244 | <TT><info></TT> element (see section <A HREF="node4.html#info-element">2.3.2</A>). The text must |
||
245 | be a valid, fully qualified URL for a direcory on the web server. |
||
246 | <BR>
|
||
247 | <P>
|
||
248 | <PRE>
|
||
249 | <info> |
||
250 | <appname>Super extractor</appname> |
||
251 | <appversion>2.1 beta 6</appversion> |
||
252 | <url>http://www.superextractor.com/</url> |
||
253 | <webdir>http://www.superextractor.com/download</url> |
||
254 | </info> |
||
255 | </PRE>
|
||
256 | <P>
|
||
257 | You can force creation of a standard installer even if <TT>webdir</TT> |
||
258 | is specified, by specifically creating a <TT>standard</TT> installer |
||
259 | from the command line invocation or ant task (see |
||
260 | <A NAME="ant-integration"></A>). |
||
261 | |||
262 | <P>
|
||
263 | When installing, if the user is behind a firewall, attempting download |
||
264 | the jar files may fail. If this happens, the user will be prompted to |
||
265 | enter the name hostname and port of their firewall. |
||
266 | |||
267 | <P>
|
||
268 | You may password protect the files using mechanisms provided by your |
||
269 | web server, IzPack will prompt for a password at install time, when |
||
270 | required. |
||
271 | |||
272 | <P>
|
||
273 | |||
274 | <H1><A NAME="SECTION00570000000000000000"> |
||
275 | More Internationalization</A>
|
||
276 | </H1>
|
||
277 | |||
278 | <P>
|
||
279 | |||
280 | <H2><A NAME="SECTION00571000000000000000"> |
||
281 | Special resources</A>
|
||
282 | </H2>
|
||
283 | |||
284 | <P>
|
||
285 | IzPack is available in several languages. However you might want to |
||
286 | internationalize some additional parts of your installer. In particular you |
||
287 | might want this for the *InfoPanel and *LicencePanel. This is actually pretty |
||
288 | easy to do. You just have to add one resource per localization, suffixed with the |
||
289 | ISO3 language code. At runtime these panels will try to load a localized version. |
||
290 | <BR>
|
||
291 | <P>
|
||
292 | For instance let's suppose that we use a HTMLInfoPanel. Suppose that we have it |
||
293 | in English, French and German. We want to have a French text for french users. |
||
294 | Here we add a resource pointing to the French text whose name is |
||
295 | <TT>HTMLInfoPanel.info_fra</TT>. And that's it ! English and German users (or |
||
296 | anywhere other than in France) will get the default text (denoted by |
||
297 | <TT>HTMLInfoPanel.info</TT>) and the French users will get the French version. |
||
298 | Same thing for the other Licence and Info panels. |
||
299 | <BR>
|
||
300 | <P>
|
||
301 | |||
302 | <SPAN CLASS="textit">To sum up :</SPAN> add <TT>_<iso3 code></TT> to the resource name for |
||
303 | <TT>InfoPanel</TT>, <TT>HTMLInfoPanel</TT>, <TT>LicencePanel</TT> and |
||
304 | <TT>HTMLLicencePanel</TT>. |
||
305 | <BR>
|
||
306 | <P>
|
||
307 | |||
308 | <H2><A NAME="SECTION00572000000000000000"> |
||
309 | Packs</A>
|
||
310 | </H2>
|
||
311 | |||
312 | <P>
|
||
313 | Thanks to Thorsten Kamann, it is possible to translate the packs names and |
||
314 | descriptions. To do that, you have to define a special identifier in the |
||
315 | elements of the XML installation file and add the related entries in the |
||
316 | suitable langpacks. For instance if you have the following XML snippet: |
||
317 | <PRE>
|
||
318 | <pack name="core" id="core.package" ...> |
||
319 | <description/> |
||
320 | </pack> |
||
321 | </PRE>
|
||
322 | then the related entries of the langpacks will look like this: |
||
323 | <PRE>
|
||
324 | <str id="core.package" txt="Core Package"/> |
||
325 | <str id="core.package.description" txt="The core package provides
|
||
326 | </PRE>
|
||
327 | |||
328 | <P>
|
||
329 | |||
330 | <DIV CLASS="navigation"><HR> |
||
331 | <!--Navigation Panel-->
|
||
332 | <A NAME="tex2html410" |
||
333 | HREF="node6.html"> |
||
334 | <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> |
||
335 | <A NAME="tex2html406" |
||
336 | HREF="izpack-doc.html"> |
||
337 | <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> |
||
338 | <A NAME="tex2html400" |
||
339 | HREF="node4.html"> |
||
340 | <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> |
||
341 | <A NAME="tex2html408" |
||
342 | HREF="node1.html"> |
||
343 | <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> |
||
344 | <BR>
|
||
345 | <B> Next:</B> <A NAME="tex2html411" |
||
346 | HREF="node6.html">Desktop Shortcuts</A> |
||
347 | <B> Up:</B> <A NAME="tex2html407" |
||
348 | HREF="izpack-doc.html">izpack-doc</A> |
||
349 | <B> Previous:</B> <A NAME="tex2html401" |
||
350 | HREF="node4.html">Writing Installation XML Files</A> |
||
351 | <B> <A NAME="tex2html409" |
||
352 | HREF="node1.html">Contents</A></B> </DIV> |
||
353 | <!--End of Navigation Panel-->
|
||
354 | <ADDRESS>
|
||
355 | Julien Ponge |
||
356 | 2005-04-22 |
||
357 | </ADDRESS>
|
||
358 | </BODY>
|
||
359 | </HTML> |