Skip to content

feat: add '--install-deps-path' and '--skip-*' options#87

Open
DenKoren wants to merge 9 commits into
auriamg:masterfrom
DenKoren:master
Open

feat: add '--install-deps-path' and '--skip-*' options#87
DenKoren wants to merge 9 commits into
auriamg:masterfrom
DenKoren:master

Conversation

@DenKoren

@DenKoren DenKoren commented Nov 1, 2024

Copy link
Copy Markdown

When playing with bundling complex application, I faced the challenge of patching several different binaries in several paths that need to refer the same 'libs' directory.

The challenge is that one should search for '../../libs', whle other - '../libs'.
The dependencies of binaries intersect, but are not entirely the same. When I patch the first binary, I still need to collect part of libraries for the second. Also, as libraries depend on each other, I need to use some 'stable' import path inside them to not be bound to the executable path.

The patch offers a way to solve the problem:

  1. --skip-existing makes dylibbundler to use existing files inside --dest-dir and not patch them, allowing dylibbundler to patch libraries only once when executed for several binaries, adding only missing dependencies.
  2. --skip-patching enables dylibbundler to iterate over dependencies and only bundle them into destination directory
  3. --skip-missing enables dylibbundler to not fail or request interactive input for dependencies it cannot locate on FS (suitable for CI)
  4. --install-deps-path makes dylibbundler to use different paths for install_name_tool when it patches the original file (--fix-file) and its dependencies. The option defaults to --install-path` value so the change is fully backward-compatible with previous logic of the tool.

@DenKoren

DenKoren commented Nov 1, 2024

Copy link
Copy Markdown
Author

@auriamg , this change is backward-compatible with current version of bundler, as far as I can understand the source code.

@DenKoren DenKoren changed the title feat: add '--install-deps-path' and '--ignore-existing' options feat: add '--install-deps-path' and '--skip-*' options Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant