Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Tutorial on how to create an installer on OS X
QtWS25 Last Chance

Tutorial on how to create an installer on OS X

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 4 Posters 1.2k 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.
  • S Offline
    S Offline
    Sikarjan
    wrote on 11 Jun 2017, 05:21 last edited by
    #1

    Hi,

    I recently managed to create an installer for Windows using the installer framework. Now I am trying to do the same on OS X but I am totally lost on what to put in the data folder. I guess the .app file I create is too little. What other files need to go in the data folder?

    Is there any easily understandable tutorial out there?

    1 Reply Last reply
    0
    • E Offline
      E Offline
      Eddy
      wrote on 11 Jun 2017, 07:14 last edited by
      #2

      Hi Sikarjan,

      Did you find this extensive page about OSX deployment in the docs?

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      1
      • S Offline
        S Offline
        Sikarjan
        wrote on 11 Jun 2017, 08:10 last edited by
        #3

        @Eddy I did and I hoped that there is something easier to grasp like the youtube tutorial for the windows version. But if there is not I will try to work through that.

        thanks

        1 Reply Last reply
        1
        • R Offline
          R Offline
          Rondog
          wrote on 11 Jun 2017, 15:59 last edited by Rondog 6 Nov 2017, 15:59
          #4

          The steps I use work well (for me at least). Qt includes a utility called 'macdeployqt' which handles a lot of the complex stuff in building the app bundle. This is quite handy for OS X.

          First step is to switch your application build to release in XCode. When you compile your program you should now have the app bundle in the release directory of your program. The size of this is usually small (< 5mb is typical) as it doesn't have all the linked libraries included.

          Running 'macdeployqt' will populate the application bundle with everything it needs to contain and adjusts the relative path names of everything necessary:

          cd Release
          macdeployqt some_application.app
          

          The bundle size at this point should be noticably larger ( > 20 mb perhaps). Note: If you run 'macdeployqt' on an application bundle you can't do it a second time as it is already modified. It is easier to delete it and start again.

          I have had problems where 'macdeployqt' doesn't do a couple of things (like move the icons file into the resource folder of the app bundle). At this point make any changes that are necessary.

          Once you have the bundle the way you like it run this:

          hdiutil create some_application.dmg -srcfolder some_application.app -format UDZO -volname Name_Of_Volume
          

          This will create the distributable DMG file.

          Note: You can tell 'macdeployqt' to create the DMG bundle with a command line option. I don't do this because I usually need to tweak a few things first.

          1 Reply Last reply
          2
          • S Offline
            S Offline
            Sikarjan
            wrote on 11 Jun 2017, 18:19 last edited by
            #5

            @Rondog, thanks for the hint. That was really easy. I do not understand why this is not part of the installer documentation. It is one line. Actually it should be part of the framework itself.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 11 Jun 2017, 20:14 last edited by
              #6

              Hi,

              It is: macdeployqt -dmg

              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

              1/6

              11 Jun 2017, 05:21

              • Login

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