Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

DenKoren
Copy link

@DenKoren DenKoren commented Nov 1, 2024

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
Copy link
Author

DenKoren commented Nov 1, 2024

@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