Packaging Qt applications on desktop platforms.
-
Thank you Andre, search and try it.
The medium problem is for debian delivery, simple it is the first time I need it. While the great problem is for Mac: I have no idea :)
-
For Windows I can also recommend InnoSetup. I will see if I can provide a sample script template in the wiki.
For Unix/Linux it would be best to provide a package for the package manager of the distribution (for example .deb on Debian/Ubunug, .rpm on RedHat). "Bitrock": http://bitrock.com/ offers an installer for Linux too.
For Mac OS X, you usually create an application bundle, that contains everything. The bundle behaves like a single file in the finder, but is a regular directory in the file system. Please do not create an installer on OS X, that's very unusual. Have a look at the "macdeployqt":http://doc.trolltech.com/stable/deployment-mac.html#the-mac-deployment-tool utility.
For all platforms "Deploying Qt Applications":http://doc.trolltech.com/stable/deployment.html in the docs is the starting point, with platform dependent hints in the links at the end of that page.
-
i've used bitrock recently on windows, it was quite a nice experience. They do also have features for installers on mac and linux, but i think users definately prefer the dmg or package method on those platforms...
-
Thank you very much, volker, about in one day I release the first application (also on the nokia hosting)... I know mac but I should try all to these new versions. Took the mac only this morning. :)
But... Qt is wonderful!!! Installed on mac, took the software and run in debug. No problems! It's a great starting point.
-
Indeed it is.
For the Mac, watch out for the different layout of directories. Usually the PlugIns directory is not a sibling of the executable but from the executables view in ../PlugIns. So you usually have:
@
MyFancyApplication.app/Contents/MacOS/MyFancyApplication (the executable)
MyFancyApplication.app/Contents/PlugIns (the plugin base)
MyFancyApplication.app/Contents/PlugIns/imageformats
MyFancyApplication.app/Contents/PlugIns/iconengines
MyFancyApplication.app/Contents/PlugIns/sqldrivers
MyFancyApplication.app/Contents/Resources (for your images, help files)
@So, if you are using plugins in your application add in your main function, as soon as possible after the creation of the QApplication object:
@
#if defined( Q_OS_MACX )
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath() + "/../PlugIns");
#endif
@EDIT: The optimum would be to add this to a DMG (disk image), but it is ok for your Mac Users, if you just put the application bundle into a zip file.
-
Thanks.
Volker, in effect I saw that almos all the packages are dmg files under mac, that is very useful also for usage, because is simple to manage, can be opened as a mounted volume after download etc. I saw some pkg under mac but it seems archeology ...
-
On the Mac, packages are mostly used to distribute frameworks and libs. The regular user should not fiddle around in /Library and /usr/lib and the like, so for this purpose it is perfectly ok. For normal applications, an application bundle is much more convenient.
-
Mmmh, it's what I supposed. I should find how to create a diskimage, but it seems to be a good way to do. Thanks.
-
you can try this:
@
hdiutil create -srcfolder /path/to/your/FancyApplication.app -format UDBZ -quiet /path/and/name/of/your/diskimage.dmg
@Or have the macdeployqt tool create the image for you (there is a command line switch for this).
-
Thanks, VOlker, I think I have at least the needed links and informations. Now (this night) I go ahead on the project, because I'm anxious to work on it to finish and package :)
Many thanks for your precious suppor.