Skip to content

Commit

Permalink
Add lib4bin hooks
Browse files Browse the repository at this point in the history
Add lib4bin compression
Add LIBDECOR_PLUGIN_DIR env
Add GTK_IM_MODULE_FILE env
Refactoring
  • Loading branch information
VHSgunzo committed Dec 2, 2024
1 parent f680adf commit b373a19
Show file tree
Hide file tree
Showing 4 changed files with 261 additions and 120 deletions.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sharun"
version = "0.1.9"
version = "0.2.1"
readme = "README.md"
license = "MIT"
repository = "https://github.com/VHSgunzo/sharun"
Expand All @@ -22,5 +22,8 @@ opt-level = 0
[dependencies]
which = "7.0.0"
walkdir = "2.5.0"
flate2 = "1.0.35"
userland-execve = "0.2.0"
include_file_compress = "0.1.3"
nix = { version = "0.29.0", features = [ "fs" ] }
dotenv = { git = "https://github.com/VHSgunzo/dotenv.git" }
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ cp ./target/$(uname -m)-unknown-linux-musl/release/sharun .
[ Options ]:
l, lib4bin [ARGS] Launch the built-in lib4bin
-g, --gen-lib-path Generate library path file
-g, --gen-lib-path Generate a lib.path file
-v, --version Print version
-h, --help Print help
Expand All @@ -50,7 +50,7 @@ cp ./target/$(uname -m)-unknown-linux-musl/release/sharun .

## Usage lib4bin:
```
[ Usage ]: lib4bin [OPTIONS] /path/executable -- [STRACE CMD ARGS]
[ Usage ]: lib4bin [OPTIONS] /path/executable -- [STRACE MODE EXEC ARGS]
[ Options ]:
-a, --any-executable Pack any executable (env: ANY_EXECUTABLE=1)
Expand All @@ -59,7 +59,8 @@ cp ./target/$(uname -m)-unknown-linux-musl/release/sharun .
-g, --gen-lib-path Generate a lib.path file (env: GEN_LIB_PATH=1)
-h, --help Show this message
-i, --patch-interpreter Patch INTERPRETER to a relative path (env: PATCH_INTERPRETER=1)
-l, --libs-only Pack only libraries (env: LIBS_ONLY=1)
-k, --with-hooks Pack additional files required for libraries (env: WITH_HOOKS=1)
-l, --libs-only Pack only libraries without executables (env: LIBS_ONLY=1)
-n, --not-one-dir Separate directories for each executable (env: ONE_DIR=0)
-p, --hard-links Pack sharun and create hard links (env: HARD_LINKS=1)
-q, --quiet-mode Show only errors (env: QUIET_MODE=1)
Expand Down Expand Up @@ -110,6 +111,8 @@ cp ./target/$(uname -m)-unknown-linux-musl/release/sharun .
* `TK_LIBRARY` -- `${SHARUN_DIR}/shared/$LIB/tk*`
* `GST_PLUGIN_PATH`, `GST_PLUGIN_SYSTEM_PATH`, `GST_PLUGIN_SYSTEM_PATH_1_0`, and `GST_PLUGIN_SCANNER` -- `${SHARUN_DIR}/shared/$LIB/gstreamer-*`
* `GDK_PIXBUF_MODULEDIR` and `GDK_PIXBUF_MODULE_FILE` -- `${SHARUN_DIR}/shared/$LIB/gdk-pixbuf-*`
* `LIBDECOR_PLUGIN_DIR` -- `${SHARUN_DIR}/shared/$LIB/libdecor/plugins-1`
* `GTK_IM_MODULE_FILE` -- `${SHARUN_DIR}/shared/$LIB/gtk-*/*/immodules.cache`

* `XDG_DATA_DIRS` -- `${SHARUN_DIR}/share`
* `VK_DRIVER_FILES` -- `${SHARUN_DIR}/share/vulkan/icd.d`
Expand Down
Loading

0 comments on commit b373a19

Please sign in to comment.