|
|||
---|---|---|---|
|
Quick StartA quick start demo application is provided for those who don't like reading documentationThe example application is in the demo directory and installs a "hello world" application to a user selected directory. Look at the antinstall-config.xml file to see how the installer UI is configured and the build.xml file should be familiar to users of Ant. Run the installer with the start script and look at the ant.install.properties file to see how the properties have been collected from the user and look at the ant.install.log to see the results of the install. N.B. passwords do not appear in the properties file but are passed to Ant at runtime. If the properties cannot be written to the curent directory it will silently be ommited this is to facilitate installing from read-only media. To view the properties file for debug purposes ensure you have write permissions to the current directory. You should then look at the build-demo.xml file to see how to create a self-extracting jar.N.B. You could build the self extracting jar for your installer with any jar tool but using Ant is highly recommended. There is an Ant task to create your installer jar called <installer>. There are three methods for running AntInstaller, the demo uses the SelfExtractor.
Order of eventsAntInstall takes the following steps to run an install.
Project WizardThere is a wizard to help generate the files for your installer. The tool assumes you have a standard Java project structure with a root directory for your projects and a base directory for each project. For example, if you use Eclipse the projects root directory is your workspace and the project directory would be the module name in CVS. The directory structure is not imposed but it sets some defaults.Usage Run the wizard script and enter the projects root (workspace) and short name which is the name of the subdirectory under projects root where the resources for the project exist. If you don't have a specific license for your project leave the default. Click next, and select the components for the installer. For each box checked you will be asked for a directory. When you have selected the directories in the subsequent pages, click the Create Project button and the wizard creates the files listed below.
Presumably you chose AntInstaller for its infinite flexibility, so now you customise and configure the installer to meet your needs. The wizard gives you a starting point. From here you will probably want to copy sections of create-installer.xml into your own Ant build, add user properties and targets to antinstall-config.xml and develop the build.xml that is run during the install.For a detailed guide to the features of AntInstaller the manual as a reference for the antinstall-config.xml file and the Ant documentation for the build.xml file.
|