From 61547c8e43390a36a2cda0ca6856e2f0f53547c0 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 16 Oct 2013 14:44:10 +0200 Subject: [PATCH] androiddeployqt: Use correct prefix for tools on x86 When building for x86, the prefix for the tools is not equal to the prefix for the toolchain directory, so we need a separate option for this. Task-number: QTBUG-34110 Change-Id: I72d727832dd4a5f11952c84882496f85075cd9cd Reviewed-by: BogDan Vatra --- src/androiddeployqt/main.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp index d92d193..9db0706 100644 --- a/src/androiddeployqt/main.cpp +++ b/src/androiddeployqt/main.cpp @@ -126,6 +126,7 @@ struct Options QString architecture; QString toolchainVersion; QString toolchainPrefix; + QString toolPrefix; QString ndkHost; // Package information @@ -537,6 +538,16 @@ bool readInputFile(Options *options) } { + QJsonValue toolPrefix = jsonObject.value("tool-prefix"); + if (toolPrefix.isUndefined()) { + fprintf(stderr, "Warning: No tool prefix defined in json file.\n"); + options->toolPrefix = options->toolchainPrefix; + } else { + options->toolPrefix = toolPrefix.toString(); + } + } + + { QJsonValue toolchainVersion = jsonObject.value("toolchain-version"); if (toolchainVersion.isUndefined()) { fprintf(stderr, "No toolchain version defined in json file.\n"); @@ -1094,7 +1105,7 @@ QStringList getQtLibsFromElf(const Options &options, const QString &fileName) + QLatin1String("/prebuilt/") + options.ndkHost + QLatin1String("/bin/") - + options.toolchainPrefix + + options.toolPrefix + QLatin1String("-readelf"); #if defined(Q_OS_WIN32) readElf += QLatin1String(".exe"); @@ -1217,7 +1228,7 @@ bool stripFile(const Options &options, const QString &fileName) + QLatin1String("/prebuilt/") + options.ndkHost + QLatin1String("/bin/") - + options.toolchainPrefix + + options.toolPrefix + QLatin1String("-strip"); #if defined(Q_OS_WIN32) strip += QLatin1String(".exe"); -- 2.7.4