Packaging Qt applications on desktop platforms.
-
I am developing some applications (developed under LGPL license and hosted on project.forum.nokia.com site) for the three desktop Linux (ubuntu), Windows (Xp and Win7) and Mac (Osx 10 - Snow Leopard). Under Mac I have no great experience.
To distribute these applications, I need to package them in a sort of installer. Someone knows what is the good (or one of) solution to create debian packages, and what applications (open source, preferably) can I use to create an installer for Windows and for Mac?
Under Windows I have already explored sis packaging tools from sourceforge.net but I am not sure - also in this case - that this is the best solution. The application has no complex or strange installation options, simple needs to be copied in the right places to work.
Thank in advance to all the people that will share their experience.
-
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.
-
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.
-
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.