[Interest] Is Qt Library for OS X frameworks only?

Daniel Price daniel.price at fxhome.com
Fri Oct 19 10:51:19 CEST 2012


I'm not sure I follow you. Are you using soft-links in place of actual libraries in all but one of the bundles? I'd assumed you were changing environment variables or something (I've encountered a few apps that do that - very bad).

But if you have a single directory, with three apps in it that cannot be broken up, that's really bad. Sure, most users won't mess with it, but OSX has the concept of relocatable bundles. The user should be able to move a .app bundle anywhere and the system will keep track of it. If you can't do that with your 'composite' approach, then sorry, that's the wrong way to do it.

The whole point of bundles on OSX (be they .app, .pkg, .framework) is that the user sees a single, self-contained package that they can move around at will. The AppStore requires apps to be uploaded and downloaded as a single code-signed .app, with the receipt copied to the bundle. If you're doing what I think you're doing, then you're doing it wrong.



-----Original Message-----
From: Michael Jackson [mailto:imikejackson at gmail.com] 
Sent: 18 October 2012 19:43
To: Daniel Price
Cc: Qt Project
Subject: Re: [Interest] Is Qt Library for OS X frameworks only?


On Oct 18, 2012, at 5:13 AM, Daniel Price wrote:

> Comments inline.
> 
>> A simple install rule will strip out the headers so they are not included in your app bundle.
> 
> My point exactly. Another choir that you have to do with Frameworks. And if you strip out the headers, they're not frameworks anymore.
> 
>> Write a script because if you are serious about development (not just doing some one-off app) you >are going to be doing this over and over again. Write a script, get it correct then you do not  >have to worry about these "deployment" issues any more.
> 
> Yes I've done this. Several times, for several products. Writing the script itself is error prone. My point is that if you build Qt without frameworks, the job is much simpler. 
> 
>> Incorrect. You actually CAN share the frameworks between Qt apps. I do it with the project I work >on. I have three Apps all of which share the same set of Qt Frameworks. Again, some scripting >will solve this issue for you.
> 
> Share the Qt framework? The frameworks embedded within the app bundles are being shared between app bundles at runtime? I'm not sure that's possible on OSX and would be a violation of Apple's sandboxing rules.
> 
> <plug> I use CMake and its "BundleUtilities" function to do all of 
> these deployment tasks and it works 100% of the time</plug>
> 
> You're assuming I have the choice to adopt CMake. I don't. It's not a simple case of 're-engineer your entire team's project and build system to simplify deployment on one particular platform'.

This doesn't violate anything. Lots of large Apps (MS Office, Adobe..) use this approach otherwise their installations would be larger than they are now. You don't need CMake to do this. I wrote a script (bash) that does this for me and I just have CMake call the script. The point being a simply app for me includes just QtGui, QtCore and a few of the image format plugins. This would make a single app about 18MB in size. I have at least 3 apps. That makes the OS X download 3x larger than the Windows and Linux Downloads. The only caveat with this is that one has to move the entire "Folder" of applications instead of just a single application. This is all done with symlinks and does work very well. If someone wants to point me to the specific Apple document that says NOT to do this I will happily change my code otherwise I'll keep going this route.

> 
>> See my comment from above. If you use CMake you can write (or copy) the proper CMake code to do >all of this for you.
> 
> See my comment above. The point I am trying to make is why go through all of this when Frameworks offer no benefit?
> 
>> 
>> 
>> -----Original Message-----
>> From: interest-bounces+daniel.price=fxhome.com at qt-project.org
>> [mailto:interest-bounces+daniel.price=fxhome.com at qt-project.org] On 
>> Behalf Of Andrea Franceschini
>> Sent: 17 October 2012 16:17
>> Cc: interest at qt-project.org
>> Subject: Re: [Interest] Is Qt Library for OS X frameworks only?
>> 
>> 2012/10/17 Daniel Price <daniel.price at fxhome.com>:
>> 
>>> I always build Qt on the Mac without frameworks. I have no idea why 
>>> Qt/mac defaults to using fraweworks as they add no value (with one 
>>> exception - the dummy menu nib) and just make deployment 1000x harder.
>> 
>> I may very well be wrong on this but I thought frameworks get included in the app bundle, hence making deployment way easier (but obviously heavier as it's almost like statically linking libs inside the executable). I find the shared libs deploy-once-run-everything better from an engineering point of view, but I recognise Apple's bundles and frameworks have some good points (like avoiding littering the filesystem with exotic libs that are only used by one application).
>> 
>> --
>> Andrea Franceschini
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>> 
>> This email is confidential. It may also be privileged or otherwise protected by work product immunity or other legal rules. Errors and Omissions Excluded. If you are not the intended recipient please notify the sender. Please delete the message from all places in your computer where it is stored. You should not copy the email or use it for any purpose or disclose its contents to any other person. To do so may be unlawful. Email is an informal means of communicating and may be subject to data corruption accidentally or deliberately. For this reason it is inappropriate to rely on advice contained in an email without obtaining written confirmation of it first.
>> 
>> FXhome Limited is a limited company registered in England and Wales. Registered number: 04172812. Registered office: Suite 4 St Giles House, 27 St Giles Street, Norwich, Norfolk, NR2 1JN, U.K.
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest




More information about the Interest mailing list