This issue has been coded, and tested. The patch is generated starting from the trunk at revision 2638.
We need to have installation with command line support, to be able to run installation on remote servers with no X11 server.
We also need to automate the installs, without having to run the install in GUI mode, and then generating the automatic installation script. We also need to have the generated script in a property file style.
The main entry class com/izforge/izpack/installer/Installer.java, has been modified to take as arguments:
-console: to run install in interactive console mode
-options-template: to generate a property file whose name is specified in args[1]
-options: to run install while reading the properties from property file specified in args[1]
These 3 possibilities will instantiate a ConsoleInstaller who has 3 methods to achieve respectively the above
ConsoleInstaller works like AutomatedInstaller, by iterating over panels order, and instantiating a class whose name is the same as the panel name, appended with ConsoleHelper, implementing interface PanelConsole
The 3 methods in the interface are
public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter); will print all requested user inputs in printWriter to have the properties file
public boolean runConsoleFromPropertiesFile(AutomatedInstallData installData, Properties p); will read all requested user inputs from the properties p, which are read from the properties file
public boolean runConsole(AutomatedInstallData installData); will perform interactive console installation
I implemented this interface for the following (the most relevant until now):
- FinishPanelConsoleHelper
- HelloPanelConsoleHelper
- InstallPanelConsoleHelper
- TargetPanelConsoleHelper
- UserInputPanelConsoleHelper
Hi Mounir,
Sounds great, however I get failures when trying to apply the patch:
Could you please check and update the patch?
Thanks a lot