[izpack-users] How does variable substitution work?

Gernot Stenz stenzg at in.tum.de
Thu Jun 14 10:44:51 CEST 2007


"Bartz, Klaus" <Klaus.Bartz at coi.de> writes:

> Hi Gernot,

Good morning!

> variables will be not substituted by the contents of variables.
> I see to ways to solve your problem.
> 
> 1: write a custom action which does the substitution.
> 
> 2: use
> in install.xml
> ...
> <variable name="APPLICATIONS_SUB_PATH" 
>     value="/OpenOffice/orgPortable/App/openoffice/program/soffice.exe"/>
> in your parsable file
> <value>${APPLICATIONS_DEFAULT_ROOT}${APPLICATIONS_SUB_PATH}</value>

Thank you! I hadn't thought of that! BTW, why the braces here? Are they necessary?

Also, on my way to the office this morning I thought of something different
that turned out to be working:

I simply doubled the line containing the <parsable> tag. My installer xml now
looks like this:
...
<parsable type="xml" targetfile="$INSTALL_PATH/Projektassistent-1.2.4rc3/res/vmodellexport.xml"/>
<parsable type="xml" targetfile="$INSTALL_PATH/Projektassistent-1.2.4rc3/res/vmodellexport.xml"/>
...

And this procuded the desired result. Obviously the <parsable> tag does not
only mark a file as parsable, every tag seems to initiate a parsing run, and
for a two level variable substitution problem, two tags apparently do the
trick.

But now that I have more than one solution for the problem, I ask myself:
Which is the canonical one more in line iwth IzPack's future development?

Ciao, Gernot

-- 
    __o  Gernot Stenz  e-mail:stenzg at informatik.tu-muenchen.de        /\
   -\<,          WWW:  http://www4.in.tum.de/~stenzg               /\/--\
_(_)/(_)_London - Paris: 3547 km__________________________________/      \



More information about the izpack-users mailing list