diff options
-rw-r--r-- | tests/auto/Info.plist.in | 18 | ||||
-rw-r--r-- | tests/auto/core/tests.pri | 3 | ||||
-rw-r--r-- | tests/auto/embed_info_plist.pri | 13 | ||||
-rw-r--r-- | tests/auto/quick/tests.pri | 4 | ||||
-rw-r--r-- | tests/auto/widgets/tests.pri | 3 |
5 files changed, 37 insertions, 4 deletions
diff --git a/tests/auto/Info.plist.in b/tests/auto/Info.plist.in new file mode 100644 index 000000000..e7f314042 --- /dev/null +++ b/tests/auto/Info.plist.in @@ -0,0 +1,18 @@ +<?xml version=\"1.0\" encoding=\"UTF-8\"?> +<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"> +<plist version=\"1.0\"> +<dict> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleExecutable</key> + <string>$${TARGET}</string> + <key>CFBundleIdentifier</key> + <string>org.qt-project.qt.tests.$${TARGET_HYPHENATED}</string> + <key>CFBundleName</key> + <string>$${TARGET}</string> + <key>LSUIElement</key> + <string>0</string> +</dict> +</plist> diff --git a/tests/auto/core/tests.pri b/tests/auto/core/tests.pri index 606ed2a8c..19f53f12d 100644 --- a/tests/auto/core/tests.pri +++ b/tests/auto/core/tests.pri @@ -12,4 +12,5 @@ INCLUDEPATH += $$PWD exists($$_PRO_FILE_PWD_/$${TARGET}.qrc): RESOURCES += $${TARGET}.qrc QT += testlib network webenginewidgets widgets -osx: CONFIG -= app_bundle + +include(../embed_info_plist.pri) diff --git a/tests/auto/embed_info_plist.pri b/tests/auto/embed_info_plist.pri new file mode 100644 index 000000000..cca93c35e --- /dev/null +++ b/tests/auto/embed_info_plist.pri @@ -0,0 +1,13 @@ +macos { + CONFIG -= app_bundle + + # QTBUG-57354 embed Info.plist so that certain fonts can be found in non-bundle apps + out_info = $$OUT_PWD/Info.plist + embed_info_plist.input = $$PWD/Info.plist.in + embed_info_plist.output = $$out_info + TARGET_HYPHENATED = $$replace(TARGET, [^a-zA-Z0-9-.], -) + QMAKE_SUBSTITUTES += embed_info_plist + QMAKE_LFLAGS += -Wl,-sectcreate,__TEXT,__info_plist,$$shell_quote($$out_info) + PRE_TARGETDEPS += $$out_info + QMAKE_DISTCLEAN += $$out_info +} diff --git a/tests/auto/quick/tests.pri b/tests/auto/quick/tests.pri index efe9ff9d0..e00537b9e 100644 --- a/tests/auto/quick/tests.pri +++ b/tests/auto/quick/tests.pri @@ -13,11 +13,11 @@ INCLUDEPATH += \ QT += testlib network quick webengine -macx: CONFIG -= app_bundle - # This define is used by some tests to look up resources in the source tree DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD/\\\" isQMLTestSupportApiEnabled() { DEFINES += ENABLE_QML_TESTSUPPORT_API } + +include(../embed_info_plist.pri) diff --git a/tests/auto/widgets/tests.pri b/tests/auto/widgets/tests.pri index 14074cd08..d77cd5af5 100644 --- a/tests/auto/widgets/tests.pri +++ b/tests/auto/widgets/tests.pri @@ -13,7 +13,8 @@ RESOURCES += ../resources/tests.qrc exists($$_PRO_FILE_PWD_/$${TARGET}.qrc): RESOURCES += $${TARGET}.qrc QT += testlib network webenginewidgets widgets quick quickwidgets -macx: CONFIG -= app_bundle # This define is used by some tests to look up resources in the source tree DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD/\\\" + +include(../embed_info_plist.pri) |