auriamg / macdylibbundler

Utility to ease bundling libraries into executables for OSX
MIT License
546 stars 83 forks source link

It doesn't fix QT framework dependencies #12

Open surak opened 9 years ago

surak commented 9 years ago

By default, QT installs itself on /usr/local/Qt-VERSION/VERSION/ etc...

When I use it to fix a binary, it correctly brings the binary's own libraries, but ignores Qt frameworks. (maybe because they don't have the .dylib on their name?)

I want to use it exactly to save me the work of adding QT's frameworks to my binary...

auriamg commented 9 years ago

Indeed, dylibbundler is only meant to work with "raw" dylib files. Frameworks come with many other constraints and are not managed by dylibbundler. However, frameworks also generally need no fixing, in my experience if they are built properly you can just copy them inside your executable and everything will work fine out of the box

sammy007 commented 8 years ago

Please add optional framework bundling. It's a waste of time to fix partially bundled apps.

agordon commented 8 years ago

@auriamg - can you elaborate what you mean by "[...] just copy them inside your executable" ? Each framework is a single file (e.g. /usr/local/lib/QtGui.framework/Versions/4/QtGui) - should this file be copied to the new libs directory, or somewhere else ?

EDIT: This page: https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Tasks/CreatingFrameworks.html#//apple_ref/doc/uid/20002258-106880 Suggests the 'private frameworks' can be (somehow?) bundled in a similar fashion, and the executable should then reference them with @executable_path/../Frameworks. Is it something that macdylibbundler can do ?

Thanks!

agordon commented 8 years ago

follow-up:

On mac os x, using HomeBrew, the program macdeployqt from the qt package will take care of bundling the Qt framework (and the dylibs, as well).

surak commented 8 years ago

Doesn't work.

[]s Alexandre Strube

Em 28 de nov de 2015, às 07:04, A. Gordon notifications@github.com escreveu:

follow-up:

On mac os x, using HomeBrew, the program macdeployqt from the qt package will take care of bundling the Qt framework (and the dylibs, as well).

— Reply to this email directly or view it on GitHub.

agordon commented 8 years ago

Works for me :)

Example here: https://github.com/agordon/glogg/blob/mac-os-x-build/INSTALL.macosx.md

ryandesign commented 1 year ago

frameworks also generally need no fixing

That is not a given. For example, any library installed by MacPorts—whether it is a bare library or within a framework—is linked with absolute paths that need fixing up if bundled into an app.