Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Self contained macOS app with custom libraries (macdeployqt)
artwaw last edited by artwaw
I need advice regarding macdeployqt.
Following the documentation and using otool with macdeployqt works just fine, however I am somehow puzzled as to where in the package should I put my own dynamic libraries?
I have a subdir project structured inside more or less like this:
app3 depends on lib1 and lib2, app2 on lib1 only, app1 on lib2 only, so for the simplicity all the libs are built into one folder - the build tree of the project contains respectively:
All the libs are in the shared folder. On Windows I don't even bother, the installer creates shared folder, programs find there their libs, all is golden. On Mac, however, I've decided to go with the self contained approach - what would be solution here?
Can post my .pro files if some adjustments need to be made.
Thank you in advance.
Do you want all 3 apps to reside inside your .app package? Or you want 3 separate .apps?
If the former - then it's up to you. People tend to put all libs in the same directory where executable is -
.app/Contents/MacOS. If the latter - run
macdeployqt3 times, once for each app. You will get 3 .app packages, all containing (duplicated) libraries.
One thing to take into account, there are guidelines with regards to what out where in an app bundle. Depending on the way you are going to distribute it, this is important.
artwaw last edited by
@sierdzio three separate ones. Use pattern is that most of the users will have only one, two others are the matter of one's choice.
@SGaist this is internal tool to be distributed locally only. So I thought of three separate self contained apps distributed on one .dmg - I think it does not violate anything? To clarify - none of this is intended for AppStore or any other kind of public distribution.
Then 3 separate .apps is probably the easiest course of action. They can be sewn into a single DMG using many tools available commercially. I've never used them so I can't really recommend a specific one.
artwaw last edited by
@sierdzio Thank you for all the info, I think I'll be able to take things on from here.
Have a lovely day :)