IzPack

Dynamic variable enhancements

Details

  • Testcase included:
    yes
  • Number of attachments :
    2

Description

I prepared an enhanced and more flexible dynamic variable assignment system. This includes:

  • reading values from property files
  • reading values from INI files
  • reading values from XML files (XPath queries)
  • reading values from the Windows registry
  • being able to pre-process values using Java regular expressions.

I include a first testcase as an example.

To be discussed, of course. This is still work in progress.

  1. install.xml
    11/Feb/10 4:10 AM
    5 kB
    Rene Krell
  2. izpack_issue_519.patch
    11/Feb/10 4:10 AM
    163 kB
    Rene Krell

Issue Links

Activity

Hide
Rene Krell added a comment -

Further plan:

  • reading property, INI and XML files from URLs - first step: 'file:' + 'jar:'
Show
Rene Krell added a comment - Further plan:
  • reading property, INI and XML files from URLs - first step: 'file:' + 'jar:'
Hide
Rene Krell added a comment - - edited

Added a patch that shows the current implementation state for discussion.
Please note that there is a lightweight, 3rd-party framework used for accessing property files, INI files and registry without JNI (ini4j).

Show
Rene Krell added a comment - - edited Added a patch that shows the current implementation state for discussion. Please note that there is a lightweight, 3rd-party framework used for accessing property files, INI files and registry without JNI (ini4j).
Hide
Julien Ponge added a comment - - edited

Is the inclusion of the ini4j library optional? How big is it?

You should also ping the people on izpack-dev to get useful feedback

BTW pay attention to the file headers, they have improper copyrigh t assignments. Look at the the templates in src/.

Cheers

Show
Julien Ponge added a comment - - edited Is the inclusion of the ini4j library optional? How big is it? You should also ping the people on izpack-dev to get useful feedback BTW pay attention to the file headers, they have improper copyrigh t assignments. Look at the the templates in src/. Cheers
Hide
Rene Krell added a comment - - edited

INI4J's size is 91.5 KB (stripped, only the classes and MANIFEST, no Maven info) and it handles reading and writing (patching) property and INI files registry entries, while saving comments and ordering in them (not confusing the files as Ant's propertyfile task). The usage of ini4j could have another implication - Windows registry access can be done in future without JNI (COIOSHelper dll), because it uses the reg system command in a compatible manner with all known Windows versions.

In that case as shown in the patch I would say ini4j would not be optional. At the moment, I have no idea how to make it optional and using it at the same time in the IzPack description (dynamic variables).

The above patch still doesn't use the possibilities of ini4j 100%, but I'm thinking about another issue of merging and parametrized patching of configuration files directly from the install.xml. In that case the config file handling that ini4j offers will be a necessarity.

I will have a look at the copyright stuff, thanks.
Furthermore I'll post a hint to the mailinglist.

Show
Rene Krell added a comment - - edited INI4J's size is 91.5 KB (stripped, only the classes and MANIFEST, no Maven info) and it handles reading and writing (patching) property and INI files registry entries, while saving comments and ordering in them (not confusing the files as Ant's propertyfile task). The usage of ini4j could have another implication - Windows registry access can be done in future without JNI (COIOSHelper dll), because it uses the reg system command in a compatible manner with all known Windows versions. In that case as shown in the patch I would say ini4j would not be optional. At the moment, I have no idea how to make it optional and using it at the same time in the IzPack description (dynamic variables). The above patch still doesn't use the possibilities of ini4j 100%, but I'm thinking about another issue of merging and parametrized patching of configuration files directly from the install.xml. In that case the config file handling that ini4j offers will be a necessarity. I will have a look at the copyright stuff, thanks. Furthermore I'll post a hint to the mailinglist.
Hide
Rene Krell added a comment -

Replaced files:

  • more complete patch with fixed exception handling and working XPath queries
  • install.xml sample with added xpath queries. A runnable example is in the patch above including the Eclipse run configurations
Show
Rene Krell added a comment - Replaced files:
  • more complete patch with fixed exception handling and working XPath queries
  • install.xml sample with added xpath queries. A runnable example is in the patch above including the Eclipse run configurations
Hide
Rene Krell added a comment -
Show
Rene Krell added a comment - Resolved according to http://docs.codehaus.org/display/IZPACK/Dynamic+Variables

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: