Details
-
Type:
Wish
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 4.3.3
-
Fix Version/s: None
-
Component/s: Utilities
-
Labels:None
-
Environment:Any Linux
-
Patch Submitted:Yes
-
Number of attachments :
Description
Enhancement: Add a small utility script 'izpack2sh' which creates a self-extracting linux script or binary. Similar to izpack2exe for Windows or izpack2app for Mac.
Requirements:
- It should allow an optionally bundled JRE as izpack2exe now does, see enhancement IZPACK-561.
- It should have the best possible compression ratio, as good as izpack2exe which uses 7zip.
- It should add minimal overhead to the .jar installer.
- It should require minimal extra /tmp space to unpack itself.
- The RAM required for decompression should be reasonable.
- The utility script should run on as many platforms as possible, not only Linux.
======= PATCH DESCRIPTION =======
Attached is my implementation, which aims to fulfil the above requirements. The utility script is written in Java, but uses native 'tar' and 'xz' to compress the package.
The self-extracting package consists of three parts concatenated together:
(1) sh script (dynamically generated from Java) which extracts parts (2) and (3), launches IzPack installer. About 200 bytes.
(2) xzminidec Linux binary supporting LZMA2 and X86 BCJ decompression. About 9K bytes.
(3) .tar.xz compressed archive, containing IzPack .jar file, optional bundled JRE, etc.
We assume that the Linux end user has certain basic tools available (sh, head/tail, chmod, mkdir, rm, tar).
======= PATCH FILES =======
Binaries for Windows, downloaded prebuilt:
tar.exe http://sourceforge.net/projects/unxutils
xz.exe,libiconv-2.dll http://sourceforge.net/projects/mingw
Binaries for Linux, downloaded and built on Red Hat Enterprise Linux 3.0 Update 7:
xz http://tukaani.org/xz
xzdec http://tukaani.org/xz/embedded.html
Utility written by me:
IzPack2Sh.java
I recommend to remove the compression switch "--x86" from IzPack2Sh.java since this frequently results in slightly worse compression ratio, even when the package contains a substantial amount of x86 code.