IzPack
  1. IzPack
  2. IZPACK-568

Create izpack2sh wrapper (self extracting Linux executable)

    Details

    • Type: Wish Wish
    • Status: Open Open
    • Priority: Major 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 :
      1

      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

        Activity

        Hide
        Ben Golding added a comment -

        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.

        Show
        Ben Golding added a comment - 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.
        Hide
        Julien Ponge added a comment -

        Sounds great. Do you have a Git repository somewhere I could pull from? There is a Maven submodule for izpack2* projects.

        Show
        Julien Ponge added a comment - Sounds great. Do you have a Git repository somewhere I could pull from? There is a Maven submodule for izpack2* projects.
        Hide
        Ben Golding added a comment -

        I didn't make these changes in git and besides, I'm behind a firewall so you wouldn't be able to pull.

        I'm not familiar with Maven etc so you will need to help me turn this patch into something which is ready to commit.

        These guys need to be part of the IzPack installer:
        tar.exe
        xz.exe
        libiconv-2.dll
        xz
        xzdec

        This also needs to be in git:
        IzPack2Sh.java

        It should probably be compiled into IzPack2Sh.jar by Maven (similar to the build process izpack2exe.py --> izpack2exe.exe). Then there is no need to force the end user to have a JDK installed too. That's the part I need some help with.

        Show
        Ben Golding added a comment - I didn't make these changes in git and besides, I'm behind a firewall so you wouldn't be able to pull. I'm not familiar with Maven etc so you will need to help me turn this patch into something which is ready to commit. These guys need to be part of the IzPack installer: tar.exe xz.exe libiconv-2.dll xz xzdec This also needs to be in git: IzPack2Sh.java It should probably be compiled into IzPack2Sh.jar by Maven (similar to the build process izpack2exe.py --> izpack2exe.exe). Then there is no need to force the end user to have a JDK installed too. That's the part I need some help with.
        Hide
        Dan Tran added a comment -
        Show
        Dan Tran added a comment - another option is http://megastep.org/makeself/

          People

          • Assignee:
            Unassigned
            Reporter:
            Ben Golding
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 4 days
              4d
              Remaining:
              Remaining Estimate - 4 days
              4d
              Logged:
              Time Spent - Not Specified
              Not Specified