[izpack-devel] Multi-Panel Panels
Hal Vaughan
hal at thresholddigital.com
Mon Jan 9 20:59:52 CET 2006
On Monday 09 January 2006 02:30 pm, Klaus Bartz wrote:
...
> >> 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?
>
> Most not because this feature is only available since 3.8.0 :-)
> But for your problem I have looked into my registry and there are both
> programms registered.
I'm also using RealVNC, and haven't checked yet. It's one of those things
Windows developers would be much more aware of than others. I may write the
code for the directory search (I think there's one in UserInput that I can
copy) and let a Windows person write the registry code, if someone would
like. That's a ways off. The first step is to get it working! ;-) Then
it's time to figure out things like that.
...
> > 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.
>
> I agree. Because this behavior of real programms I have implemented a
> version
> scanner in JDKPathPanel (line 167ff).
I'll have to look at that. I think I remember having that problem at one
point a few years back when I had to figure out what version of Java a system
was using.
...
> > 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.
>
> I have accepted this rule of IzPack (a panel is like a singelton) long
> time ago.
> What I do is to write a base or intermediaer class which is configurable
> and
> the derived classes are most only configure the base class. That was the
> primary idea of splitting TargetPanel into a base class (PathInputPanel)
> and
> a really short derived TargetPanel. I think, I have ~ 6 panels derived
> from it.
> OK, JDKPathPanel is not so short...
I've looked at those panels in passing. I am not sure yet, but I think I can
use PathInputPanel as part of what I'm doing. It's easier to figure out what
3 panels of 200-400 lines are doing, if each handles separate tasks, then
trying to read 600-1200 lines of code. (And, the part I like is that it's
easier to debug!)
> We have in our server installation a customized JBoss installation. In my
> JBossPathPanel I ask with a Dialog triggert in the
> JBossPathPanel.panelActivate()
> the user whether he/she would install the customized JBoss or use an
> allready
> installed JBoss. Dependant on the return value of the Dialog I configure
> the
> JBossPathPanel whether it should handle a path for the new customized
> installation
> or a allready existent product. Late configure of PathInputPanel is
> possible.
>
> OK, I tend to resolve problems via inheritance. You can do it in your way,
> that's
> one of the big benefit of IzPack I think.
I think I'd use inheritance more if I understood it or was more used to it.
I'm self taught, especially in Java, and I learned what I have needed to
write the programs I needed. I'm learning more about using inheritance in
IzPack than I've learned before (and some of that is through the path panels
you wrote and mentioned here -- so thanks!)
Hal
More information about the izpack-devel
mailing list