[izpack-users] Language dependant file installation?

Bartz, Klaus Klaus.Bartz at coi.de
Tue May 9 16:10:27 CEST 2006

Hi Christophe,
to implement this feature is not so easy, I think.
if you wont, you can use the 'Additionals'.
I have implemented them original for file and dir rights I set
in my custom actions. But it is designed to use it also for
other things.

If we declare it "hard" for the pack contents, we have not only to
edit PackFile, else CompilerConfig, the Unpacker, the dtd, the docu 
and may be other places have to be addapted. That's the problem...
If you use 'Additionals', you need a Compiler Listener which 
implements reviseAdditionalDataMap to shift the data from the
xml file into the PackFile object.
An InstallerListner which implements afterFile can then do something,
may remove the just installed file. With this mimik you cannot 
prevent the file to be installed by the unpacker. I do not know
whether you can really delete the file at this point. It seems so,
that some VMs (e.g. 1.5.0 on Linux) do not every time close an
OutputStream just during close method; may be you cannot remove an
open file (I have problems at that point to perform a chmod).

You see, it is not the easiest "thing" to support locale dependant
We install a language files and select them at runtime. 



>-----Original Message-----
>From: izpack-users-admin at berlios.de
>[mailto:izpack-users-admin at berlios.de]On Behalf Of Christophe 
>Sent: Tuesday, May 09, 2006 2:28 PM
>To: 'izpack-users at berlios.de'
>Subject: RE : [izpack-users] Language dependant file installation?
>I have quite the same question but didn't find any answer.
>Does someone have the issue ? If change need to be made, I 
>think it's on
>PackFile to add this feature, or can we use the 'Additionals' 
>information ?
>Thanks in advance,
>-----Message d'origine-----
>De : Dominik S. Herwald [mailto:lists at dsh-elektronik.de] 
>Envoyé : jeudi 13 avril 2006 17:14
>À : izpack-users at berlios.de
>Objet : [izpack-users] Language dependant file installation?
>I need to create a Multi-Language installer - so far I have no 
>IzPack - great piece of Software!
>There is only one thing that I miss:
>An argument for a <file> element in the packs section of the 
>where I can specify the iso3 language code this file belongs to.
>This file should only be installed if the user has chosen this 
>This could look like this:
><file src="aDocFileInEnglish.pdf" targetdir="$INSTALL_PATH"  
><file src="aDocFileInFrench.pdf" targetdir="$INSTALL_PATH"  
><file src="aDocFileInGerman.pdf" targetdir="$INSTALL_PATH"  
>... and so on.
>(e.g. lang="eng" should have a similar behaiviour as the "os" argument 
>that only
>installs a file if the user OS matches the "os" value,  you 
>know - e.g. 
>os="unix" )
>The reason for this is that I have some files (documentation, a config 
>file that
>sets application language, ...) that are available in several 
>and I want
>ONLY those files in the language the user has selected to be 
>copied to the
>install directory...
>I could add this feature myself - but I have no time to look 
>through the
>several thousand lines of code of IzPack first to see WHERE to add
>such a modification ... so can anybody tell me if this is possible in 
>any way
>and where I could change the IzPack sources to achieve this?
>(not _what_ to change excactly - I need just a basic idea of 
>where I could
>add an additional argument to the <file> element and how to achieve the
>correct behaiviour of this ... )
>Or is this possible with IzPack already? How?
>izpack-users mailing list
>izpack-users at lists.berlios.de
>izpack-users mailing list
>izpack-users at lists.berlios.de

More information about the izpack-users mailing list