[izpack-devel] Multi-Panel Panels

Hal Vaughan hal at thresholddigital.com
Mon Jan 9 18:29:40 CET 2006

On Monday 09 January 2006 11:41 am, Klaus Bartz wrote:
> Hi Hal,
> Am 08.01.2006, 21:04 Uhr, schrieb Hal Vaughan <hal at thresholddigital.com>:
> > I have an idea for a panel that would search for specified versions of an
> > application and report if it is on a computer or not.  In my case, this
> > would
> > help because my application needs OpenOffice 2.x.  If it is on the
> > computer,
> > I need the path to it, if it isn't, I need to know where I can install
> > it.
> >
> > This would require multiple steps:
> >
> > 1) Ask end user if app is present
> > 2) Search (if needed) to see if it is present and create list of
> > locations of
> > different versions or instances
> Or look (on windows) into the registry. There are all regular installed
> version registered. For Unix you can do an other way, may be search the
> common dirs for applications.

That's one way.  I haven't gotten into that much detail yet.  But are all 
programs installed with IzPack in the registry?  I know I, not being a 
Windows person, tend to forget to include things like that.  I think it would 
be possible, if you're using the registry enabled version, to check the 
registry and, if not found, do a directory search.

> > 3a) If app is present, ask end user which instance or version to use
> Do not forget to implement a range mimik (like in JDKPathPanel), or is your
> application able to use any version of OpenOffice ?.

I was thinking of something close to that, but I've seen programs change their 
version messages from one version to another (other than just updating the 
version number).  It'd be more work, but more accurate, to specify a command 
(and parameters) and a list of acceptable or unacceptable strings to search 
for in the output.  For example:

$ bigapp --version
BigApp, (C) 2005 by Megalithic Corporation
Version 2.1.9

$bigapp --version
Monolithic Corporation, a Megalithic subsidary
BigApp 1.9.2
(C) 2005

Since we're dealing with all programs out there, this would allow the 
developer to specify strings to match all acceptable (and some non 
acceptable) verisons.  A little more work, but it provides much more in terms 
of ability and accuracy.

> > OR
> > 3b) If app is not present, ask end user where it can be installed.
> >
> > I've noticed most panels are simple, like many installers.  This keeps
> > things
> > easy for the end user, allows for uncluttered panels (that are less
> > confusing), and also takes into account that different languages and 
> > translations may require different amounts of space.
> >
> > To do what I want to do would require either a cluttered panel where the
> > lower
> > portions would change according to input on the upper sections or several
> > different panels (some that would appear under some conditions, others
> > under
> > other conditions).
> >
> > Is here any problem with a "panel" that needs to have 3-4 panels in a
> > row?  In
> > the Panels section of the install.xml file it might look like this:
> >
> > <panel classname="ApplicationFinderPanel" stage="1"/>
> > <panel classname="ApplicationFinderPanel" stage="2"/>
> > <panel classname="ApplicationFinderPanel" stage="3"/>
> > <panel classname="ApplicationFinderPanel" stage="4"/>
> You know the problem with additional attributes in the <panel> element of
> install.xml. Why not use four different panels? May be one with the base
> outfit and three or four only with the additional different layout.

I'm thinking of that.  I'm still working out the overall idea.  It could be 4 
panels, specified in order (AppFinder0Panel, AppFinder1Panel, etc) or with 
different names, but if the order number is in the name, it helps senile 
people like me keep them in order.

> In IzPack there is only one panel which can exist in more than one stages,
> the UserInputPanel.
> Look into UserInputPanel. Would you write a secound one?
> It is a little bit complex. What is better, four simple hard coded panels
> or one
> really complex panel for which the most questions on this mailing list
> will be come.

I prefer the simpler panels.  I experimentend, though, and found just the code 
for multiple panels was not hard.  There are some custom panels I'm using 
that I need several times, and I found it easy to set that up.  But UserInput 
is definitely a complex panel.  I have no desire to write anything that 
complex -- which is why I was thinking of doing this as a series of panels.


More information about the izpack-devel mailing list