[izpack-users] Generating Applications uninstalls

Bartz, Klaus Klaus.Bartz at coi.de
Mon Oct 23 10:19:59 CEST 2006


Hi Jurii,
see context related.

Cheers Klaus

>-----Original Message-----
>From: izpack-users-bounces at lists.berlios.de
>[mailto:izpack-users-bounces at lists.berlios.de]On Behalf Of J-Pro
>Sent: Friday, October 20, 2006 8:34 PM
>To: izpack-users at lists.berlios.de
>Subject: Re: [izpack-users] Generating Applications uninstalls
>
>
>Hi, Klaus.
>
>Thanks for the answer.
>
>First, I should say that english is not my native language 

My too not.


>so some things 
>are hard to understand. Can I ask you some questions please?
>
>I've found two "uninstall" occurrences in IzPack doc.
>
>1. Ant Actions (InstallerListener and UninstallerListener)
>2. Custom Actions at Uninstallation Time (UninstallerListener)
>
>1. As I've understood - it's only for developers who uses Ant and for 
>developers who want to customize their application uninstall 
>by changing 
>IzPack source code, right?
>

A custom action is an action which will by added by a user to the
default behavior of IzPack. You should not change the standard
IzPack code self, else you write some java code which follows the
given rules. Custom actions are implemented as listener. Therefore
the name is (for uninstallation) <CustomName>UninstallerListener. 

AntActionUninstallerListener is one implementation of an 
UninstallerListener. I have done it to give a little bit complicated
example for users. Secondary it is full functional. 
An other full functional example is RegistryUninstallerListener.

>But I use Intellij IDEA 6.0 to compile IzPack sources. I don't 
>use Ant. Can 
>this part(Ant Actions (InstallerListener and 
>UninstallerListener)) still 
>help me to add custom acts while uninstalling like remove 
>custom files, 
>other than installed packs?
>

You can use the ant stuff for your problem. But may be to use
ant for some delete jobs in the uninstaller will be a little bit
over sized. On the other hand, if you are firm with ant it can
be the fastest implementation (only configuration files are neede).
Be aware, that a AntActionInstallerListener will be needed also 
no action should be done at installation. It creates the
informations for the uninstaller and put it into the uninstaller.jar.

>
>2. As I've understood - I should  extend 
>com.izforge.izpack.event.SimpleUninstallerListener in a newly 
>created class 
>[IzPackRoot]/src/lib/[MyPackagePath]/MyUninstallerListener.java

Have not to be (path and source can be elsewhere) but the simplest
is to use package
com.izforge.izpack.event.<MyClassPraefix>UninstallerListener
others are for java (and IzPack) experts.

>. Then I 
>should add some custom actions in the code, right? So this is 
>the only one 
>way to make custom actions while uninstalling(like remove 
>custom files, other than installed packs)?
>
>So, as I've understood - there is no way to make custom actions while 
>uninstalling(like remove custom files, other than installed 
>packs) but the 
>way of RE-compiling IzPack source, right? I mean I can't just 
>write some 
>uninstall.xml file and write there some file executions like 
>in install.xml 
>or ProcessPanel.Spec.xml?
>


An UninstallerListener is one way todo it. But it is not the only one.
An alternative is to write a batch or shell script and add it as
<executable> with stage="uninstall".
If you need the installation (or other system dependant) path in it,
you can use IzPack variables and use the <parseable> tag to revise.
May be this will be easier for you.
If needed, I have made an example last week to verify problems 
Hans-Georg have had.



>Please unswer these questions, it's very important to me... I 
>really try to 
>understand it by myself, using the doc, but not all things are 
>so easy for 
>me.
>
>Thank you very much in advance!
>
>
>
>
> ----- Original Message ----- 
>
>> From: "Bartz, Klaus" <Klaus.Bartz at coi.de>
>> Subject: Re: [izpack-users] Generating Applications uninstalls
>> To: <izpack-users at lists.berlios.de>
>> Message-ID: <591E33C080D2E5449BB1791B70D66B2889174B at coi11.coi.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> Hi Yurii,
>> the "normal" uninstaller will be created automatically as
>> %INSTALL_DIR%\Uninstaller\Uninstaller.jar.
>>
>> There are more than one entries for uninstaller in the docu.
>> If you would search for it, you can grep or search for it.
>>
>> If you would register the uninstallation on windows see also
>> the docu and the entries in
>>
>> \src\dist-files\IzPack-install.xml
>> \src\dist-files\RegistrySpec.xml
>>
>> Hope it helps
>>
>> Klaus
>
>
>
>
>________________________________
>With respect,
>
>Yurii Kartsev,
>Soft IT 
>
>_______________________________________________
>izpack-users mailing list
>izpack-users at lists.berlios.de
>https://lists.berlios.de/mailman/listinfo/izpack-users
>



More information about the izpack-users mailing list