[izpack-users] Substitution of variables

Per Newgro per.newgro at gmx.ch
Mon Nov 13 15:16:47 CET 2006


Hi *,

i try to substitute my variables server ip and server port in a html and a 
properties file. While installation i take default data from userInputPanel 
and press next. But if i check the target files nothing is substituted. What 
is wrong here?

PS: IzPack 3.9.0
I already checked if index.html is located 
at "${INSTALL_PATH}/server/default/deploy/client.war/" and it is!
I already tried to use type="plain", but same result.

izpack-install.xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<installation version="1.0">
        
        <info>
                <appname>Server</appname>
                <appversion>2.0</appversion>
                <authors>
                        <author name="per.newgro" email="per.newgro at gmx.ch"/>
                </authors>
                <uninstaller write="no"/> <!--doesn't work for me!:-(-->
                <url>http://www.gmx.ch</url>
        </info>
        
        <guiprefs height="600" resizable="yes" width="800">
                <laf name="metouia">
                        <os family="unix" />
                </laf>
                <laf name="looks">
                        <os family="windows" />
                        <param name="variant" value="extwin" />
                </laf>
        </guiprefs>

        <panels>
                <panel classname="HelloPanel"/>
                <panel classname="HTMLLicencePanel"/>
                <panel classname="HTMLInfoPanel"/>
                <panel classname="TargetPanel"/>
                <panel classname="ShortcutPanel"/>
                <panel classname="InstallPanel"/>
                <panel classname="UserInputPanel"/>
                <panel classname="FinishPanel"/>
        </panels>
        
        <locale>
                <langpack iso3="deu"/>
                <langpack iso3="eng"/>
        </locale>
        
        <native type="izpack" name="ShellLink.dll"/>
        
        <resources>
                <res src="background.gif" id="Installer.image"/>
                <res src="path_unix.txt" id="TargetPanel.dir.unix"/>
                <res src="path_linux.txt" id="TargetPanel.dir.linux"/>
                <res src="path_windows.txt" id="TargetPanel.dir.windows"/>
                <res src="license.html" id="HTMLLicencePanel.licence"/>
                <res src="readme.html" id="HTMLInfoPanel.info"/>
                <res src="shortcutSpec.xml" id="shortcutSpec.xml"/>
                <res src="Unix_shortcutSpec.xml" id="Unix_shortcutSpec.xml"/>
                <res src="userInputSpec.xml" id="userInputSpec.xml"/>
        </resources>
        
        <packs>
                <pack name="server" preselected="yes" required="yes">
                        <description>Server</description>
                        <fileset dir="." targetdir="$INSTALL_PATH" 
casesensitive="yes">
                                <include name="**"/>
                        </fileset>
                        <fileset dir="icons" targetdir="$INSTALL_PATH/icons" 
casesensitive="yes">
                                <include name="**"/>
                        </fileset>
                        <parsable 
targetfile="${INSTALL_PATH}/server/default/deploy/client.war/index.html" 
type="xml" />
                </pack>
        </packs>
</installation>

userInputSpec.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<userInput>
        <panel order="0">
                <field type="staticText" align="left" txt="Bitte hier die IP 
Adresse des 
Servers angeben" id="input.comment"/>
                <field type="text" variable="serverIP">
                        <spec txt="Server IP:" id="input.serverIP" 
layout="N:3:3 . N:3:3 . N:3:3 . 
N:3:3" size="25" set="$IP_ADDRESS"/>
                </field>
                <field type="space" />
                <field type="staticText" align="left" txt="Bitte hier den Port 
eingeben 
(Standard: 1099)" id="input.port.comment"/>
                <field type="text" variable="serverPort">
                        <spec txt="Server Port:" id="input.serverPort" 
layout="N:4:4" size="6" 
set="1099"/>
                </field>
        </panel>
</userInput>

index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
        <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; 
charset=iso-8859-15">
        <TITLE></TITLE>
        <META NAME="GENERATOR" CONTENT="OpenOffice.org 2.0  (Linux)">
        <META NAME="CREATED" CONTENT="20061109;16433200">
        <META NAME="CHANGED" CONTENT="20061109;16455700">
</HEAD>
<BODY LANG="de-DE" DIR="LTR">
<P>Dieser Link führt Sie zum <A HREF="/client/setup.jnlp" 
NAME="setup">Setup</A></P>
<P>Während der Installation werden Sie aufgefordert die IP-Adresse des Servers 
einzugeben.
Der vom Administrator vorgegebene Wert lautet
<ul><li>Server IP: $serverIP</li><li>Server Port: $serverPort</li></ul></P>
</BODY>
</HTML>

Cheers
Per


More information about the izpack-users mailing list