[izpack-devel] Implementation for conditions in izpack
Bartz, Klaus
Klaus.Bartz at coi.de
Thu Nov 9 15:15:02 CET 2006
Hi Dennis,
welcome in the IzPack team.
I hope we can have some good discussion about IzPack in the
future.
I think conditions can be a good thing. Hope it do not
interfere with the stuff Fabrice has announced some time ago.
The right branch for it is trunk, not 3.9 I think. Do you agree?
I am enquiring about the implementation.
Hope it is baseline at IzPanel level and will therefore also work
with custom panels without impl anything.
May be I can it also use (and impl) for custom actions.
Will be nice if a DTD exist in %IZ_HOME%\src\dtd.
Also an adapted docu :-)
But first things first...
Cheers
Klaus
>-----Original Message-----
>From: izpack-devel-bounces at lists.berlios.de
>[mailto:izpack-devel-bounces at lists.berlios.de]On Behalf Of Dennis Reil
>Sent: Thursday, November 09, 2006 8:49 AM
>To: izpack-devel at lists.berlios.de
>Subject: [izpack-devel] Implementation for conditions in izpack
>
>
>Hi,
>
>As mentioned, some time ago, I implemented an extension which adds the
>possibility of defining conditions for the izpack installer. These
>conditions can be used e.g. to only show panels for which
>conditions are
>met. Conditions can be currently defined based on pack selections,
>variables and Java field values. The boolean conditions and,
>or, xor and
>not are also possible to create more complex conditions.
>
>These conditions can be used to specify which panel are shown, which
>packs can be installed and which variables should be set. I also
>extended UserInputPanel so that conditions could be used to show fields
>on a panel.
>
>Conditions are currently defined in a resource file. An example
>conditions.xml could look like:
>
><?xml version="1.0" ?>
><conditions>
> <condition type="variable" id="notwarfilesetup">
> <name>izpack.setuptype</name>
> <value>standard</value>
> </condition>
> <condition type="packselection" id="demoprojectsselected">
> <packid>pack.demo.projects</packid>
> </condition>
> <panelcondition panelid="jvmpanel"
> conditionid="notwarfilesetup"/>
> <panelcondition panelid="projects.settings"
> conditionid="demoprojectsselected" />
> <packcondition packid="pack.appserver.tomcat"
> conditionid="notwarfilesetup" />
></conditions>
>
>This spec has two conditions, one based on a variable value
>(notwarfilesetup) and one based on a pack selection. Based on this
>conditions two panelconditions and one packcondition is defined. This
>means, that jvmpanel is only shown if notwarfilesetup validates true
>which means, that the variable with name izpack.setuptype has to be
>standard. The pack (pack.appserver.tomcat) will only be available for
>installation if condition notwarfilesetup validates true.
>
>
>If you find this useful, I would create the appropriate patches to
>integrate it in izpack. New types of conditions can easily be added by
>subclassing an abstract condition base class. As the rules engine loads
>conditions by reflections, a new type can easily be used in the spec
>file.
>For sure, there are many more places in izpack, where conditions can be
>useful (e.g. pack definition, executables, parsables).
>
>
>Do you find this useful?
>
>Regards
> Dennis
>
>_______________________________________________
>izpack-devel mailing list
>izpack-devel at lists.berlios.de
>https://lists.berlios.de/mailman/listinfo/izpack-devel
>
More information about the izpack-devel
mailing list