From 09ac1bdfc5d2ee7a537c63e54348a8cf8d905fcf Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Wed, 26 Aug 2020 17:02:12 +0300 Subject: Android: enable androiddeployqt to get the host's rcc binary path Since Qt 6 CMake installs the host and target into separate directories, androiddeployqt fails to get the correct path to rcc. This change includes the host's rcc binary path in deployment-settings.json. Task-number: QTBUG-85399 Change-Id: I610bb6fea1180a119e4c0ceb75bf78c175ae430e Reviewed-by: Joerg Bornemann --- src/tools/androiddeployqt/main.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/tools') diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp index 621d5554f0..47a0667387 100644 --- a/src/tools/androiddeployqt/main.cpp +++ b/src/tools/androiddeployqt/main.cpp @@ -169,6 +169,7 @@ struct Options QString applicationBinary; QString applicationArguments; QString rootPath; + QString rccBinaryPath; QStringList qmlImportPaths; QStringList qrcFiles; @@ -1004,6 +1005,12 @@ bool readInputFile(Options *options) options->qmlImportScannerBinaryPath = qmlImportScannerBinaryPath.toString(); } + { + const QJsonValue rccBinaryPath = jsonObject.value(QLatin1String("rcc-binary")); + if (!rccBinaryPath.isUndefined()) + options->rccBinaryPath = rccBinaryPath.toString(); + } + { const QJsonValue applicationBinary = jsonObject.value(QLatin1String("application-binary")); if (applicationBinary.isUndefined()) { @@ -1963,7 +1970,14 @@ bool createRcc(const Options &options) if (options.verbose) fprintf(stdout, "Create rcc bundle.\n"); - QString rcc = options.qtInstallDirectory + QLatin1String("/bin/rcc"); + + QString rcc; + if (!options.rccBinaryPath.isEmpty()) { + rcc = options.rccBinaryPath; + } else { + rcc = options.qtInstallDirectory + QLatin1String("/bin/rcc"); + } + #if defined(Q_OS_WIN32) rcc += QLatin1String(".exe"); #endif -- cgit v1.2.3