X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=scripts%2Fbuild%2Fmacosx_makebundle.py;fp=scripts%2Fbuild%2Fmacosx_makebundle.py;h=85742a0610a3cf7b97a4d5c1c99524bf54ca007b;hp=e313a0744fc2e03f71ec09cb6ff43f43f51f77c6;hb=528af0d9d853d40c6ab5b2b753cc4644b6ddcdd1;hpb=c144bdee0d8ab0c195b3088f5c6e57e372e526f7 diff --git a/scripts/build/macosx_makebundle.py b/scripts/build/macosx_makebundle.py index e313a074..85742a06 100755 --- a/scripts/build/macosx_makebundle.py +++ b/scripts/build/macosx_makebundle.py @@ -18,6 +18,9 @@ import os.path import sys import commands +# Handling Qt properties +import macosx_qt + # ============================== # Constants # ============================== @@ -60,10 +63,20 @@ def createPlist(bundleName, bundleVersion): template = templateFile.read() templateFile.close() + # Get the minimum macOS deployment version + QT_MACOSX_DEPLOYMENT_TARGET = macosx_qt.qtMakespec('QMAKE_MACOSX_DEPLOYMENT_TARGET') + # Keep in sync with QMAKE_MACOSX_DEPLOYMENT_TARGET + # See https://doc.qt.io/qt-5/macos.html + if QT_MACOSX_DEPLOYMENT_TARGET is None: + # Something went wrong + sys.exit("Could not determine 'QMAKE_MACOSX_DEPLOYMENT_TARGET', check build scripts") + print("Qt macOS deployment target (minimum version): %s" % QT_MACOSX_DEPLOYMENT_TARGET) + plistFile = file(CONTENTS_DIR + "Info.plist", 'w') plistFile.write(template % {"BUNDLE_NAME": bundleName, "ICON_FILE": "quassel.icns", - "BUNDLE_VERSION": bundleVersion}) + "BUNDLE_VERSION": bundleVersion, + "QT_MACOSX_DEPLOYMENT_TARGET": QT_MACOSX_DEPLOYMENT_TARGET}) plistFile.close() def convertIconset():