From 31fea661bb212636b9eca92fd18e6caf80cc2ee3 Mon Sep 17 00:00:00 2001 From: Jérôme Leclercq Date: Thu, 19 May 2022 18:28:07 +0200 Subject: Qt: add missing keys in android-deployment-settings.json --- xmake/rules/qt/deploy/android.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/xmake/rules/qt/deploy/android.lua b/xmake/rules/qt/deploy/android.lua index 2677c6a49..d5793ad93 100644 --- a/xmake/rules/qt/deploy/android.lua +++ b/xmake/rules/qt/deploy/android.lua @@ -158,6 +158,19 @@ function main(target, opt) if os.isexec(qmlimportscanner) then settings_file:print(' "qml-importscanner-binary": "%s",', _escape_path(qmlimportscanner)) end + -- for 6.3.x + local rcc = path.join(qt.bindir, "rcc") + if not os.isexec(rcc) and qt.bindir_host then + rcc = path.join(qt.bindir_host, "rcc") + end + if os.isexec(rcc) then + settings_file:print(' "rcc-binary": "%s",', _escape_path(rcc)) + end + local platformplugin = os.files(path.join(qt.sdkdir, "plugins", "platforms", "libplugins_platforms_qtforandroid_" .. target_arch .. "*")) + if #platformplugin > 0 then + settings_file:print(' "deployment-dependencies": {"%s":"%s"},', target_arch, _escape_path(platformplugin[1])) + end + local minsdkversion = target:values("qt.android.minsdkversion") if minsdkversion then settings_file:print(' "android-min-sdk-version": "%s",', tostring(minsdkversion)) -- cgit v1.3.1 From f2cfa5714f67e3d0e7700ebaf84d5c1958e6f93f Mon Sep 17 00:00:00 2001 From: Jérôme Leclercq Date: Thu, 19 May 2022 18:51:17 +0200 Subject: Update android.lua --- xmake/rules/qt/deploy/android.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xmake/rules/qt/deploy/android.lua b/xmake/rules/qt/deploy/android.lua index d5793ad93..c5bc810c4 100644 --- a/xmake/rules/qt/deploy/android.lua +++ b/xmake/rules/qt/deploy/android.lua @@ -25,6 +25,7 @@ import("core.base.semver") import("core.project.config") import("core.project.depend") import("core.tool.toolchain") +import("lib.detect.find_file") import("utils.progress") -- escape path @@ -166,9 +167,9 @@ function main(target, opt) if os.isexec(rcc) then settings_file:print(' "rcc-binary": "%s",', _escape_path(rcc)) end - local platformplugin = os.files(path.join(qt.sdkdir, "plugins", "platforms", "libplugins_platforms_qtforandroid_" .. target_arch .. "*")) - if #platformplugin > 0 then - settings_file:print(' "deployment-dependencies": {"%s":"%s"},', target_arch, _escape_path(platformplugin[1])) + local platformplugin = find_file("libplugins_platforms_qtforandroid_" .. target_arch .. "*", path.join(qt.sdkdir, "plugins", "platforms")) + if platformplugin then + settings_file:print(' "deployment-dependencies": {"%s":"%s"},', target_arch, _escape_path(platformplugin)) end local minsdkversion = target:values("qt.android.minsdkversion") -- cgit v1.3.1