Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Self contained macOS app with custom libraries (macdeployqt)

Self contained macOS app with custom libraries (macdeployqt)

Scheduled Pinned Locked Moved Solved Installation and Deployment
macosmacdeployqt
6 Posts 3 Posters 856 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    artwaw
    wrote on 6 Mar 2020, 10:43 last edited by artwaw 3 Jun 2020, 11:01
    #1

    Good morning,
    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:

    • app1
    • app2
    • lib1
    • lib2
    • app3

    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:

    • app1
    • app2
    • app3
    • shared

    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.

    For more information please re-read.

    Kind Regards,
    Artur

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 6 Mar 2020, 18:41 last edited by
      #2

      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 macdeployqt 3 times, once for each app. You will get 3 .app packages, all containing (duplicated) libraries.

      (Z(:^

      A 1 Reply Last reply 9 Mar 2020, 09:49
      2
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 6 Mar 2020, 21:03 last edited by
        #3

        Hi,

        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.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • S sierdzio
          6 Mar 2020, 18:41

          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 macdeployqt 3 times, once for each app. You will get 3 .app packages, all containing (duplicated) libraries.

          A Offline
          A Offline
          artwaw
          wrote on 9 Mar 2020, 09:49 last edited by
          #4

          @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.

          For more information please re-read.

          Kind Regards,
          Artur

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sierdzio
            Moderators
            wrote on 9 Mar 2020, 09:54 last edited by sierdzio 3 Sept 2020, 09:54
            #5

            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.

            (Z(:^

            A 1 Reply Last reply 9 Mar 2020, 09:57
            2
            • S sierdzio
              9 Mar 2020, 09:54

              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.

              A Offline
              A Offline
              artwaw
              wrote on 9 Mar 2020, 09:57 last edited by
              #6

              @sierdzio Thank you for all the info, I think I'll be able to take things on from here.

              Have a lovely day :)

              For more information please re-read.

              Kind Regards,
              Artur

              1 Reply Last reply
              1

              5/6

              9 Mar 2020, 09:54

              • Login

              • Login or register to search.
              5 out of 6
              • First post
                5/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved