Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Tutorial on how to create an installer on OS X
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?
Eddy last edited by
Did you find this extensive page about OSX deployment in the docs?
@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.
Rondog last edited by Rondog
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.
@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.