[izpack-user] Ability to unzip JAR/ZIP

1,132 views
Skip to first unread message

Marcin Zajączkowski

unread,
Jul 17, 2010, 8:30:36 AM7/17/10
to us...@izpack.codehaus.org
Hi,


Due to a limitation of sound player using in my application I need to
unzip sound files during the installation process from JAR which is
already in an installation pack. Just copy selected files from JAR to
installation directory.
Is there an easy way (easier then writing custom code) to do that with
izpack or it would better to try to use assembly plugin in building phase?


Regards
Marcin

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Dirk Räder

unread,
Jul 17, 2010, 1:09:27 PM7/17/10
to us...@izpack.codehaus.org
The simplest way would probably be to extract the sound files before
creating the installer and then add them as their own pack.

2010/7/17 Marcin Zajączkowski <msz...@wp.pl>:

jakubklimek

unread,
Jul 17, 2010, 4:28:44 PM7/17/10
to us...@izpack.codehaus.org
Hello Marcin,

I recently have similiar problem like you and I was trying do this by using ant script after installation, but finally i have found more simple way. You can unzip files using attribute 'unpack' in 'file' tag. As documentation says: "unpack: if true and the file is an archive then its content will be unpacked and added as individual files". For example you can put in install.xml line: <file unpack="true" src="sounds_files.jar" targetdir="$INSTALL_PATH/sounds" />. I hope this will help you.

Regards
Jakub

Marcin Zajączkowski

unread,
Jul 20, 2010, 4:00:05 PM7/20/10
to us...@izpack.codehaus.org
On 2010-07-17 22:28, jakubklimek wrote:
> Hello Marcin,
>
> I recently have similiar problem like you and I was trying do this by using ant script after installation, but finally i have found more simple way. You can unzip files using attribute 'unpack' in 'file' tag. As documentation says: "unpack: if true and the file is an archive then its content will be unpacked and added as individual files". For example you can put in install.xml line: <file unpack="true" src="sounds_files.jar" targetdir="$INSTALL_PATH/sounds" />. I hope this will help you.

I had to miss it. It could have an ability to exclude some files (like
META-INF/*) and by supported by fileset, but in fact it works and for
simple work is very convenient.


Thanks guys for your replies!


Regards
Marcin

>> The simplest way would probably be to extract the sound files before
>> creating the installer and then add them as their own pack.
>>

>> 2010/7/17 Marcin Zajączkowski <mszpak-5t...@public.gmane.org>:

Reply all
Reply to author
Forward
0 new messages