<commit_before>% Chapter 3
\chapter{Advanced Features}

% Ant Integration
\section{Ant Integration}

\IzPack can be easily integrated inside an Ant build process. To do so you
first need to tell Ant that you would like to use \IzPack :
\footnotesize
\begin{verbatim}
<!-- Allows us to use the IzPack Ant task -->
<taskdef name="izpack" classpath="${basedir}/lib/compiler.jar"
         classname="com.izforge.izpack.ant.IzPackTask"/>
\end{verbatim}
\normalsize

Don't forget to add \texttt{compiler.jar} to the classpath of the Ant process.\\

Then you can invoke \IzPack with the \texttt{izpack} task which takes the
following parameters :
\begin{itemize}

  \item \texttt{input} : the XML installation file
  \item \texttt{output} : the output jar installer file
  \item \texttt{installerType} : the installer type
  \item \texttt{baseDir} : the base directory to resolve the relative paths
  \item \texttt{izPackDir} : the \IzPack home directory.
  
\end{itemize}\

Here is a sample of the task invocation :\\
\footnotesize
\begin{verbatim}
<!-- We call IzPack -->
<echo message="Makes the installer using IzPack"/>
<izpack input="${dist.dir}/IzPack-install.xml"
        output="${dist.dir}/IzPack-install.jar"
        installerType="standard-kunststoff"
        basedir="${dist.dir}"
        izPackDir="${dist.dir}/"/>
\end{verbatim}
\normalsize

% Automated Installers
\section{Automated Installers}

When you conclude your installation with a FinishPanel, the user can
save the data for an automatic installation. With this data, he will be
able to run the same installation on another similar machine. In an
environment where many computers need to be supported this can save
\textsl{a lot} of time.\\

So run once the installation on a machine and save your automatic installation
data in \texttt{auto-install.xml} (that's just a sample). Then put this file in
the same directory as the installer on another machine. Run it with :\\
\texttt{java -jar installer.jar auto-install.xml}\\

It has reproduced the same installation :-)\\

% Picture on the Language Selection Dialog
\section{Picture on the Language Selection Dialog}

You can add a picture on the language selection dialog by adding the following
resource : \texttt{installer.langsel.img}.\\

% Web Installers
\section{Web Installers}

The web installers allow your users to download a small installer that does not
contain the files to install. These files will be downloaded from a HTTP server
such as \textit{Apache HTTPD}. If you have many optional packs, this can save
people's resources.\\

When building a web installer you get two files at the installer
compilation time. The one to put on the server ends with '\texttt{\_web}'.
The location of this file must be in a resource named
\texttt{WebInstallers.url}. Just make a text file containing on the
first line the URL to the file. And that's it.\\

Please note that the installation can look like frozen while the installer
grabs the server part.\\

% More Internationalization<commit_msg>Improved the web installers part<commit_after>% Chapter 3
\chapter{Advanced Features}

% Ant Integration
\section{Ant Integration}

\IzPack can be easily integrated inside an Ant build process. To do so you
first need to tell Ant that you would like to use \IzPack :
\footnotesize
\begin{verbatim}
<!-- Allows us to use the IzPack Ant task -->
<taskdef name="izpack" classpath="${basedir}/lib/compiler.jar"
         classname="com.izforge.izpack.ant.IzPackTask"/>
\end{verbatim}
\normalsize

Don't forget to add \texttt{compiler.jar} to the classpath of the Ant process.\\

Then you can invoke \IzPack with the \texttt{izpack} task which takes the
following parameters :
\begin{itemize}

  \item \texttt{input} : the XML installation file
  \item \texttt{output} : the output jar installer file
  \item \texttt{installerType} : the installer type
  \item \texttt{baseDir} : the base directory to resolve the relative paths
  \item \texttt{izPackDir} : the \IzPack home directory.
  
\end{itemize}\

Here is a sample of the task invocation :\\
\footnotesize
\begin{verbatim}
<!-- We call IzPack -->
<echo message="Makes the installer using IzPack"/>
<izpack input="${dist.dir}/IzPack-install.xml"
        output="${dist.dir}/IzPack-install.jar"
        installerType="standard-kunststoff"
        basedir="${dist.dir}"
        izPackDir="${dist.dir}/"/>
\end{verbatim}
\normalsize

% Automated Installers
\section{Automated Installers}

When you conclude your installation with a FinishPanel, the user can
save the data for an automatic installation. With this data, he will be
able to run the same installation on another similar machine. In an
environment where many computers need to be supported this can save
\textsl{a lot} of time.\\

So run once the installation on a machine and save your automatic installation
data in \texttt{auto-install.xml} (that's just a sample). Then put this file in
the same directory as the installer on another machine. Run it with :\\
\texttt{java -jar installer.jar auto-install.xml}\\

It has reproduced the same installation :-)\\

% Picture on the Language Selection Dialog
\section{Picture on the Language Selection Dialog}

You can add a picture on the language selection dialog by adding the following
resource : \texttt{installer.langsel.img}.\\

% Web Installers
\section{Web Installers}

The web installers allow your users to download a small installer that does not
contain the files to install. These files will be downloaded from a HTTP server
such as \textit{Apache HTTPD}. If you have many optional packs, this can save
people's resources. It's really easy : people download a small Jar
file containing the installer, they launch it and choose their
packages. Then the installer will get the files from another Jar file
located on a server. It's that simple.\\

Now suppose that you want to make an installer for your application
that you want to be named \texttt{install.jar}.
\begin{enumerate}
  \item open your favorite text editor and make a plain text file
  containing on the first line the URL to where you want to put the
  Jar file containing your packs, let's say for instance
  \url{http://www.mywebsite/myapp/install\_web.jar}
  \item add this text file as a resource named
  \texttt{WebInstallers.url}
  \item compile your installer : you get \texttt{install.jar} and
  \texttt{install\_web.jar}
  \item copy \texttt{install\_web.jar} to
  \url{http://www.mywebsite/myapp/install\_web.jar} and give your
  users \texttt{install.jar} for download.
\end{enumerate}\

That's all you need to make web installers.
Please note that the installation can look like frozen while the installer
grabs the server part.\\

% More Internationalization
{'fraction_non_alphanumeric': 0.0841024114319738, 'fraction_numerical': 0.00029770765108663293, 'mean_word_length': 4.029191616766467, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6471123', 'n_tokens_mistral': 1897, 'n_tokens_neox': 1835, 'n_words': 860}