Issue Details (XML | Word | Printable)

Key: IZPACK-320
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Julien Ponge
Reporter: Mounir el hajj
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IzPack

introduce console support for izPack installation

Created: 06/Mar/09 01:55 AM   Updated: 20/Apr/09 03:26 AM   Resolved: 22/Mar/09 09:42 AM
Return to search
Component/s: Build, Installer, Panels
Affects Version/s: None
Fix Version/s: 4.3.0

Time Tracking:
Issue & Sub-Tasks
Issue Only
Not Specified

File Attachments: 1. Zip Archive console_install.zip (12 kB)


Patch Submitted: Yes

  • Sub-Tasks:
  • All
  • Open

 Description  « Hide

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


Julien Ponge added a comment - 15/Mar/09 09:45 AM

Hi Mounir,

Sounds great, however I get failures when trying to apply the patch:

julien@infinity ~/C/izpack.git> patch --dry-run -p0 < ~/Downloads/console_install/patch.txt 
(Stripping trailing CRs from patch.)
patching file src/build.xml
Hunk #2 FAILED at 199.
Hunk #3 FAILED at 888.
2 out of 3 hunks FAILED -- saving rejects to file src/build.xml.rej
(Stripping trailing CRs from patch.)
patching file src/lib/com/izforge/izpack/installer/ConsoleInstaller.java
(Stripping trailing CRs from patch.)
patching file src/lib/com/izforge/izpack/installer/Installer.java
(Stripping trailing CRs from patch.)
patching file src/lib/com/izforge/izpack/installer/PanelConsole.java
(Stripping trailing CRs from patch.)
patching file src/lib/com/izforge/izpack/installer/PanelConsoleHelper.java
(Stripping trailing CRs from patch.)
patching file src/lib/com/izforge/izpack/panels/FinishPanelConsoleHelper.java
(Stripping trailing CRs from patch.)
patching file src/lib/com/izforge/izpack/panels/HelloPanelConsoleHelper.java
(Stripping trailing CRs from patch.)
patching file src/lib/com/izforge/izpack/panels/InstallPanelConsoleHelper.java
(Stripping trailing CRs from patch.)
patching file src/lib/com/izforge/izpack/panels/TargetPanelConsoleHelper.java
(Stripping trailing CRs from patch.)
patching file src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
(Stripping trailing CRs from patch.)
patching file src/lib/com/izforge/izpack/rules/RulesEngine.java
julien@infinity ~/C/izpack.git> 

Could you please check and update the patch?

Thanks a lot


Mounir el hajj added a comment - 16/Mar/09 03:55 AM

Hi Julien

i have updated the patch. please make sure to have your working copy at revision 2638
and sorry for any incurred inconvenience

Thanks a lot
M


Julien Ponge added a comment - 18/Mar/09 01:44 PM

Impressive!

In my limited tests on the IzPack own installer it worked fine.

Mounir, when a panel console class cannot be found, the panel is skipped right?

I would appreciate if other developers could have a look at this patch.


Mounir el hajj added a comment - 19/Mar/09 02:59 AM

yes i confirm. it is similar to the automated installer, when a helper class for the panel is not found, the panel is skipped


Julien Ponge added a comment - 22/Mar/09 09:42 AM

Merged. Thanks Mounir!


Mounir el hajj added a comment - 23/Mar/09 02:28 AM

thank you Julien for your efforts and quick reactivity!


Julien Ponge added a comment - 14/Apr/09 04:50 PM

Hi Mounir,

Could you please have a look at IZPACK-368?

Thanks a lot


Mounir el hajj added a comment - 15/Apr/09 01:41 AM

Hi Julien

i will have a look

Thanks
M


Julien Ponge added a comment - 15/Apr/09 03:14 AM

Thanks Mounir!