IzPack

introduce console support for izPack installation

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 4.3.0
  • Component/s: Build, Installer, Panels
  • Labels:
    None
  • Patch Submitted:
    Yes
  • Number of attachments :
    1

Description

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

Activity

Hide
Julien Ponge added a comment -

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

Show
Julien Ponge added a comment - 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
Hide
Mounir el hajj added a comment -

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

Show
Mounir el hajj added a comment - 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
Hide
Julien Ponge added a comment -

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.

Show
Julien Ponge added a comment - 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.
Hide
Mounir el hajj added a comment -

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

Show
Mounir el hajj added a comment - yes i confirm. it is similar to the automated installer, when a helper class for the panel is not found, the panel is skipped
Hide
Julien Ponge added a comment -

Merged. Thanks Mounir!

Show
Julien Ponge added a comment - Merged. Thanks Mounir!
Hide
Mounir el hajj added a comment -

thank you Julien for your efforts and quick reactivity!

Show
Mounir el hajj added a comment - thank you Julien for your efforts and quick reactivity!
Hide
Julien Ponge added a comment -

Hi Mounir,

Could you please have a look at IZPACK-368?

Thanks a lot

Show
Julien Ponge added a comment - Hi Mounir, Could you please have a look at IZPACK-368? Thanks a lot
Hide
Mounir el hajj added a comment -

Hi Julien

i will have a look

Thanks
M

Show
Mounir el hajj added a comment - Hi Julien i will have a look Thanks M
Hide
Julien Ponge added a comment -

Thanks Mounir!

Show
Julien Ponge added a comment - Thanks Mounir!

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: