1 | ---+ Default Project Template Builder
|
---|
2 |
|
---|
3 | This template is a method of getting up and running with
|
---|
4 | AntInstaller quickly. The template will help you create
|
---|
5 | an installer for a Java project.
|
---|
6 |
|
---|
7 |
|
---|
8 | ---++ Output
|
---|
9 |
|
---|
10 | * create-installer.xml - An ant build script to package the installer
|
---|
11 | * build.xml - An Ant script used by the installer
|
---|
12 | * antinstall-config.xml - The definition of the installer
|
---|
13 | All of the above can be edited to suit your needs
|
---|
14 | * Optionally the script will run the create-installer.xml Ant script to make the Jar immediately
|
---|
15 |
|
---|
16 |
|
---|
17 | ---++ Usage
|
---|
18 |
|
---|
19 | Read this README first
|
---|
20 | Change directory to the location of this README file
|
---|
21 | Set the ANT_INSTALL_HOME variable to the directory where you have installed AntInstaller.
|
---|
22 | Set JAVA_HOME
|
---|
23 | > export ANT_INSTALL_HOME=/usr/local/AntInstaller-beta0.7.2
|
---|
24 | Start the runtemplate.sh script
|
---|
25 | > ./runtemplate.sh
|
---|
26 | Follow the instructions
|
---|
27 |
|
---|
28 | ---++ Project Structure
|
---|
29 |
|
---|
30 | AntInstaller launches and asks you for your project information
|
---|
31 | Generally it is assumed that your projects follow this structure
|
---|
32 |
|
---|
33 | /projects_root/
|
---|
34 |
|
---|
35 | /projects_root/project-name/
|
---|
36 |
|
---|
37 | for example if you use eclipse and CVS this will be
|
---|
38 | /workspace/cvs-module-name/
|
---|
39 |
|
---|
40 | By default the template selects the following subdirectories
|
---|
41 | which can be modified.
|
---|
42 | /projects_root/project-name/src/ - source code
|
---|
43 | /projects_root/project-name/bin/ - scripts (these get chmod u+x) in the installer
|
---|
44 | /projects_root/project-name/doc/ - documentation
|
---|
45 | /projects_root/project-name/lib/ - Jars
|
---|
46 | /projects_root/project-name/classes/ - err... classes?
|
---|
47 |
|
---|
48 | The template only lets you select one directory for each, dont worry
|
---|
49 | AntInstaller itself is infinately configurable.
|
---|
50 |
|
---|
51 |
|
---|
52 | First time you run the script you should let the template
|
---|
53 | create a new empty directory for creating installers
|
---|
54 | /usr/local/installers/
|
---|
55 | From this directory subdirectories will be created for each project
|
---|
56 | /usr/local/installers/project-name/
|
---|
57 |
|
---|
58 | ---++ Configuring the installer
|
---|
59 |
|
---|
60 | This template is NOT designed to create you the final installer you will
|
---|
61 | deploy. If you have a very simple standard project it may suffice,
|
---|
62 | but it is expected that you will want to modify the XML files created
|
---|
63 | to customise the build.
|
---|
64 |
|
---|
65 | Following the documentation on the web you can modify the
|
---|
66 | antinstall-config.xml file to add extra pages and collect extra input
|
---|
67 | when the user installs your application.
|
---|
68 | http://antinstaller.sourceforge.net
|
---|
69 |
|
---|
70 | The build.xml file can be modified to customise the install proces
|
---|
71 | that is run by AntInstaller on the users machine.
|
---|
72 | You have the full power of Ant so you can easily
|
---|
73 | * move files around
|
---|
74 | * replace text
|
---|
75 | * Zip Unzip
|
---|
76 | * run scripts
|
---|
77 | * call Java
|
---|
78 | * run sub ant build.xml files
|
---|
79 | * call SQL files via JDBC
|
---|
80 | * fix line ending s
|
---|
81 | * and anything in the CoreTypes in Ant.
|
---|
82 |
|
---|
83 | The create-installer.xml file is an Ant script that creates the installer
|
---|
84 | by modifying this file you can add extra resources to the final Jar
|
---|
85 | such as images that you want in the installer or extra source directories.
|
---|
86 | By adding Ant optional Jars to the installer you can then access any
|
---|
87 | additional features of Ant during the install enabling you to
|
---|
88 | * Call SSH or Telnet commands
|
---|
89 | * SCP/ FTP files
|
---|
90 | * Send emails
|
---|
91 | * and anything in the OptionaTypes in Ant
|
---|
92 |
|
---|
93 |
|
---|
94 |
|
---|
95 | ---++ Contributions
|
---|
96 |
|
---|
97 | This tool itself (obviously) uses AntInstaller.
|
---|
98 | You are free to modify the scripts to extend the features of the tool.
|
---|
99 | If you do I would encourage you to submit the changes back so
|
---|
100 | everyone can benefit from your enhancement.
|
---|
101 | It is a good example of using AntInstaller to acheive tasks other
|
---|
102 | than just installing apps.
|
---|
103 |
|
---|
104 |
|
---|
105 |
|
---|
106 |
|
---|
107 |
|
---|
108 |
|
---|
109 |
|
---|
110 |
|
---|
111 |
|
---|
112 |
|
---|
113 |
|
---|
114 |
|
---|
115 |
|
---|