diff options
-rw-r--r-- | src/core/config/mac_osx.pri | 11 | ||||
-rw-r--r-- | src/core/gyp_run.pro | 1 | ||||
-rw-r--r-- | src/webengine/doc/src/qtwebengine-platform-notes.qdoc | 19 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/configure.prf | 7 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/functions.prf | 29 |
5 files changed, 53 insertions, 14 deletions
diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri index dd2affca9..01c1ca977 100644 --- a/src/core/config/mac_osx.pri +++ b/src/core/config/mac_osx.pri @@ -1,5 +1,13 @@ include(common.pri) +# Reuse the cached sdk version value from mac/sdk.prf if available +# otherwise query for it. +QMAKE_MAC_SDK_VERSION = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.SDKVersion) +isEmpty(QMAKE_MAC_SDK_VERSION) { + QMAKE_MAC_SDK_VERSION = $$system("/usr/bin/xcodebuild -sdk $${QMAKE_MAC_SDK} -version SDKVersion 2>/dev/null") + isEmpty(QMAKE_MAC_SDK_VERSION): error("Could not resolve SDK version for \'$${QMAKE_MAC_SDK}\'") +} + QMAKE_CLANG_DIR = "/usr" QMAKE_CLANG_PATH = $$eval(QMAKE_MAC_SDK.macx-clang.$${QMAKE_MAC_SDK}.QMAKE_CXX) !isEmpty(QMAKE_CLANG_PATH) { @@ -10,10 +18,9 @@ QMAKE_CLANG_PATH = $$eval(QMAKE_MAC_SDK.macx-clang.$${QMAKE_MAC_SDK}.QMAKE_CXX) QMAKE_CLANG_PATH = "$${QMAKE_CLANG_DIR}/bin/clang++" message("Using clang++ from $${QMAKE_CLANG_PATH}") system("$${QMAKE_CLANG_PATH} --version") - GYP_CONFIG += \ qt_os=\"mac\" \ - mac_sdk_min=\"10.7\" \ + mac_sdk_min=\"$${QMAKE_MAC_SDK_VERSION}\" \ mac_deployment_target=\"$${QMAKE_MACOSX_DEPLOYMENT_TARGET}\" \ make_clang_dir=\"$${QMAKE_CLANG_DIR}\" \ clang_use_chrome_plugins=0 \ diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro index 02d1e41d6..51fe9ad1d 100644 --- a/src/core/gyp_run.pro +++ b/src/core/gyp_run.pro @@ -101,6 +101,7 @@ contains(QT_ARCH, "arm64"): GYP_CONFIG += target_arch=arm64 contains(QT_ARCH, "mips64"): GYP_CONFIG += target_arch=mips64el contains(WEBENGINE_CONFIG, use_proprietary_codecs): GYP_CONFIG += proprietary_codecs=1 ffmpeg_branding=Chrome +contains(WEBENGINE_CONFIG, use_appstore_compliant_code): GYP_CONFIG += appstore_compliant_code=1 # Compiling with -Os makes a huge difference in binary size, and the unwind tables is another big part, # but the latter are necessary for useful debug binaries. diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc index a8899a0cf..5a81c7775 100644 --- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc +++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc @@ -142,6 +142,25 @@ with the codec libraries. For some codecs, open source implementations, such as \l {OpenH264}, are available. + \section1 Mac App Store Compatibility + + By default, Qt WebEngine uses private OS X API, which might cause an application to be + rejected when submitted to the Mac App Store. To configure Qt WebEngine not to use these API + calls, Qt WebEngine has to be recompiled: + + \code + qmake WEBENGINE_CONFIG += use_appstore_compliant_code + \endcode + + However, this will cause some behavioral changes, such as: + + \list + \li The OS X Kill Ring functionality will no longer work (emacs-like copy pasting). + \li Certain Chromium sandboxing cleanup is not done. + \li Text areas will be painted with a different style. + \li Text fields might be painted with a different style on Mountain Lion (OS X 10.8). + \endlist + \section1 Default QSurfaceFormat OpenGL Profile Support If a new default QSurfaceFormat with a modified OpenGL profile has to be set, it should be set diff --git a/tools/qmake/mkspecs/features/configure.prf b/tools/qmake/mkspecs/features/configure.prf index b92c8af61..7703e3414 100644 --- a/tools/qmake/mkspecs/features/configure.prf +++ b/tools/qmake/mkspecs/features/configure.prf @@ -113,5 +113,12 @@ defineTest(finalizeConfigure) { } else { log("Proprietary codecs (H264, MP3).... Not enabled (Default, enable with WEBENGINE_CONFIG += use_proprietary_codecs)$${EOL}") } + osx { + use?(appstore_compliant_code) { + log("AppStore Compliant ............... Enabled$${EOL}") + } else { + log("AppStore Compliant ............... Not enabled (Default, enable with WEBENGINE_CONFIG += use_appstore_compliant_code)$${EOL}") + } + } } diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf index d06b55565..26db26f44 100644 --- a/tools/qmake/mkspecs/features/functions.prf +++ b/tools/qmake/mkspecs/features/functions.prf @@ -33,7 +33,10 @@ defineTest(isPlatformSupported) { skipBuild("Qt WebEngine requires OS X version 10.9 or newer.") return(false) } - !isOSXSDKVersionSupported(): return(false) + !isMinOSXSDKVersion(10, 10, 3): { + skipBuild("Qt WebEngine requires an OS X SDK version 10.10.3 or newer. Current version is $${WEBENGINE_OSX_SDK_PRODUCT_VERSION}.") + return(false) + } } else { skipBuild("Unknown platform. Qt WebEngine only supports Linux, Windows, and OS X.") return(false) @@ -90,22 +93,24 @@ defineTest(isBuildingOnWin32) { return(false) } -defineTest(isOSXSDKVersionSupported) { - osx_sdk_product_version = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null") - isEmpty(osx_sdk_product_version) { +defineTest(isMinOSXSDKVersion) { + requested_major = $$1 + requested_minor = $$2 + requested_patch = $$3 + WEBENGINE_OSX_SDK_PRODUCT_VERSION = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null") + export(WEBENGINE_OSX_SDK_PRODUCT_VERSION) + isEmpty(WEBENGINE_OSX_SDK_PRODUCT_VERSION) { skipBuild("Could not resolve SDK product version for \'$$QMAKE_MAC_SDK\'.") return(false) } - major_version = $$section(osx_sdk_product_version, ., 0, 0) - minor_version = $$section(osx_sdk_product_version, ., 1, 1) - patch_version = $$section(osx_sdk_product_version, ., 2, 2) + major_version = $$section(WEBENGINE_OSX_SDK_PRODUCT_VERSION, ., 0, 0) + minor_version = $$section(WEBENGINE_OSX_SDK_PRODUCT_VERSION, ., 1, 1) + patch_version = $$section(WEBENGINE_OSX_SDK_PRODUCT_VERSION, ., 2, 2) - # Will work only for SDKs version >= 10.10.3 - greaterThan(major_version, 10):return(true) - equals(major_version, 10):greaterThan(minor_version, 10):return(true) - equals(major_version, 10):equals(minor_version, 10):greaterThan(patch_version, 2):return(true) + greaterThan(major_version, $$requested_major):return(true) + equals(major_version, $$requested_major):greaterThan(minor_version, $$requested_minor):return(true) + equals(major_version, $$requested_major):equals(minor_version, $$requested_minor):!lessThan(patch_version, $$requested_patch):return(true) - skipBuild("Qt WebEngine requires an OS X SDK version 10.10.3 or newer. Current version is $${osx_sdk_product_version}.") return(false) } |