diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-08-26 17:02:12 +0300 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-08-28 12:44:14 +0300 |
commit | 09ac1bdfc5d2ee7a537c63e54348a8cf8d905fcf (patch) | |
tree | a7c79eef5a1fc531354bbc32d58d25b83f9f07b5 /src/tools | |
parent | 70def4341a9f34248b8c0d3edb38ad5464953b9e (diff) |
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 <joerg.bornemann@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/androiddeployqt/main.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
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; @@ -1005,6 +1006,12 @@ bool readInputFile(Options *options) } { + 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()) { fprintf(stderr, "No application binary defined in json file.\n"); @@ -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 |