packelf/README.md

44 lines
1.7 KiB
Markdown
Raw Normal View History

2024-07-08 11:38:58 +02:00
`packelf` was based on then [oufm](https://github.com/oufm/packelf) 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.
2022-10-05 04:46:42 +02:00
2024-07-07 22:07:35 +02:00
## Usage packelf:
2022-10-05 04:46:42 +02:00
```
2024-07-09 15:03:31 +02:00
Usage: ./packelf.sh <ELF_SRC_PATH> <DST_PATH_FILENAME>
2024-05-20 20:57:31 +02:00
```
2024-07-07 22:07:35 +02:00
Example:
2024-05-20 20:57:31 +02:00
```
2024-07-07 22:07:35 +02:00
# ./packelf.sh /usr/bin/mpv mpv-x86_64.AppRun
2022-10-05 04:46:42 +02:00
```
2024-07-07 22:07:35 +02:00
Note: Every time the packed program is executed, an internal unpacking operation is performed automatically, which results in a slower startup of the program.
2024-05-20 20:57:31 +02:00
2024-07-07 22:07:35 +02:00
## Extract without running:
2022-10-05 04:46:42 +02:00
2024-07-07 22:07:35 +02:00
You can extract the files of a created package without executing it with the following command:
```
# ./<package> --packelf-extract
```
2022-10-05 04:46:42 +02:00
2024-07-07 22:07:35 +02:00
## Usage Extra Tools:
2022-10-05 04:46:42 +02:00
2024-07-07 18:10:07 +02:00
```
Usage: ./packelf-copylibs.sh <ELF_SRC_PATH> <PATH_TO_COPY_LIBRARIES>
2022-10-05 04:46:42 +02:00
```
2024-05-20 20:57:31 +02:00
2024-07-07 18:10:07 +02:00
```
Usage: ./packelf-folder.sh <FOLDER> <FILENAME> <EXECUTABLE_RUN>
2022-10-05 04:46:42 +02:00
```
2024-07-07 18:10:07 +02:00
## Dependencies
2024-05-20 20:57:31 +02:00
* sh
* tar
2024-05-21 18:42:28 +02:00
* sed
* grep
* chmod
* ldd (only needed for packing, not needed for executing or unpacking)
2024-05-20 20:57:31 +02:00