Skip to content

Swift Bundler updates library install name to point to original dylib, not moved dylib #85

@stackotter

Description

@stackotter

When bundling apps, Swift Bundler copies dynamic libraries referenced by the main executable into the app bundle. This involves updating the install name of each library to reflect its new path (relative to the main executable). When I introduced support for frameworks, I had to refactor a lot of the dynamic library copying code, and in the process I accidentally introduced a logic error; the new install name was computed using the original library location instead of the new location. This wasn't caught by the tests because the dynamic library bundling test just ran the app in-place, so the relative locations of the original libraries (outside of the bundle) were still correct.

I've fixed the logic error and updated the test to ensure at least some portability of the bundled app (by moving the app to a different directory and deleting the .build directory).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions