How can we create a binary on Leopard that runs on both 10.4 and 10.5?

When creating an application on Leopard , then in order for the application to run on both 10.4 and 10.5 then you need to set the QMAKE_MACOSX_DEPLOYMENT_TARGET to 10.4 in your .pro file as follows:

  1.  QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4

This is documented here [qt.nokia.com].

Note that if you are using native calls then you will have to add checks yourself to ensure that it works correctly for all versions of the operating system. You can for example use

  1.  QSysInfo::MacintoshVersion < QSysInfo::MV_10_5

or check if the function pointer is non-zero. This will not be necessary when only using the Qt API as Qt does such checks for you.

Note that a Qt application compiled against 10.4 should run fine on 10.5.

No comments

Write a comment

Sorry, you must be logged in to post a comment.