summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/Qt6AndroidMacros.cmake13
-rw-r--r--src/tools/androiddeployqt/main.cpp16
2 files changed, 26 insertions, 3 deletions
diff --git a/src/corelib/Qt6AndroidMacros.cmake b/src/corelib/Qt6AndroidMacros.cmake
index 635a2bd559..1bfa5eab2d 100644
--- a/src/corelib/Qt6AndroidMacros.cmake
+++ b/src/corelib/Qt6AndroidMacros.cmake
@@ -157,7 +157,7 @@ endif()
" \"application-binary\": \"${target_output_name}\",\n")
# Override qmlimportscanner binary path
- set(qml_importscanner_binary_path "${QT_HOST_PATH}/bin/qmlimportscanner")
+ set(qml_importscanner_binary_path "${QT_HOST_PATH}/${QT6_HOST_INFO_BINDIR}/qmlimportscanner")
if (WIN32)
string(APPEND qml_importscanner_binary_path ".exe")
endif()
@@ -165,6 +165,15 @@ endif()
string(APPEND file_contents
" \"qml-importscanner-binary\" : \"${qml_importscanner_binary_path_native}\",\n")
+ # Override rcc binary path
+ set(rcc_binary_path "${QT_HOST_PATH}/${QT6_HOST_INFO_BINDIR}/rcc")
+ if (WIN32)
+ string(APPEND rcc_binary_path ".exe")
+ endif()
+ file(TO_NATIVE_PATH "${rcc_binary_path}" rcc_binary_path_native)
+ string(APPEND file_contents
+ " \"rcc-binary\" : \"${rcc_binary_path_native}\",\n")
+
# Last item in json file
# base location of stdlibc++, will be suffixed by androiddeploy qt
@@ -226,7 +235,7 @@ function(qt6_android_add_apk_target target)
set(should_add_to_global_apk TRUE)
endif()
- set(deployment_tool "${QT_HOST_PATH}/bin/androiddeployqt")
+ set(deployment_tool "${QT_HOST_PATH}/${QT6_HOST_INFO_BINDIR}/androiddeployqt")
set(apk_dir "$<TARGET_PROPERTY:${target},BINARY_DIR>/android-build")
add_custom_target(${target}_prepare_apk_dir
DEPENDS ${target}
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