Pack elf binary and it's dependencies into standalone executable.
Go to file
2024-07-09 15:09:06 +02:00
apprun-script-example.txt Example script when packaging folders with executables 2024-07-09 14:59:30 +02:00
LICENSE.txt Add LICENSE (GPLv2.0) 2024-07-08 14:25:20 +02:00
packelf-copylibs.sh Add LICENSE (GPLv2.0) 2024-07-08 14:25:20 +02:00
packelf-folder.sh Add LICENSE (GPLv2.0) 2024-07-08 14:25:20 +02:00
packelf.sh Update help syntax for packelf 2024-07-09 15:03:31 +02:00
README.md README.md 2024-07-09 15:09:06 +02:00

packelf was based on then oufm script, but is simpler and has extra tools. It is used to pack a ELF program and its dependent libraries into a single executable file.

Usage packelf:

Usage: ./packelf.sh <ELF_SRC_PATH> <DST_PATH_FILENAME>

Example:

# ./packelf.sh /usr/bin/mpv mpv-x86_64.AppRun

Note: Every time the packed program is executed, an internal unpacking operation is performed automatically, which results in a slower startup of the program.

Extract without running:

You can extract the files of a created package without executing it with the following command:

# ./<package> --packelf-extract                                                                                                                                                                        

Usage Extra Tools:

Usage: ./packelf-copylibs.sh <ELF_SRC_PATH> <PATH_TO_COPY_LIBRARIES>

Example:

# ./packelf-copylibs.sh /usr/bin/mpv /opt/mpv-libs/
Usage: ./packelf-folder.sh <FOLDER> <FILENAME> <EXECUTABLE_RUN>

Example:

# ./packelf-folder.sh /opt/mpv-package mpv-x86_64.AppRun AppRun

Dependencies

  • sh
  • tar
  • sed
  • grep
  • chmod
  • ldd (only needed for packing, not needed for executing or unpacking)