From 36c5496ac198891eea52e5a2bb779d8ccda93e68 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Thu, 19 Apr 2018 15:38:35 +0200 Subject: Warn when an asset is discarded due to unmet dependencies When generating apks we sometimes remove some assets because they won't be useful at runtime anyway. Make sure the pacakger knows so he can take action if required. Change-Id: I91c8f82b0d21d4fe0757d0a4d6f193b984c97627 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/androiddeployqt/main.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp index e955eab22..f00188396 100644 --- a/src/androiddeployqt/main.cpp +++ b/src/androiddeployqt/main.cpp @@ -1775,7 +1775,7 @@ bool readDependencies(Options *options) bool ok = readDependenciesFromElf(options, fileName, &usedDependencies, &remainingDependencies); if (!ok) return false; - } else if (options->verbose) { + } else { fprintf(stdout, "Skipping %s due to unmet dependencies: %s\n", qPrintable(fileName), qPrintable(unmetDependencies.join(QLatin1Char(',')))); @@ -1786,11 +1786,9 @@ bool readDependencies(Options *options) while (it != options->localLibs.end()) { QStringList unmetDependencies; if (!goodToCopy(options, qtDir + *it, &unmetDependencies)) { - if (options->verbose) { - fprintf(stdout, "Skipping %s due to unmet dependencies: %s\n", - qPrintable(*it), - qPrintable(unmetDependencies.join(QLatin1Char(',')))); - } + fprintf(stdout, "Skipping %s due to unmet dependencies: %s\n", + qPrintable(*it), + qPrintable(unmetDependencies.join(QLatin1Char(',')))); it = options->localLibs.erase(it); } else { ++it; @@ -1982,11 +1980,9 @@ bool copyQtFiles(Options *options) QStringList unmetDependencies; if (!goodToCopy(options, sourceFileName, &unmetDependencies)) { - if (options->verbose) { - fprintf(stdout, " -- Skipping %s. It has unmet dependencies: %s.\n", - qPrintable(sourceFileName), - qPrintable(unmetDependencies.join(QLatin1Char(',')))); - } + fprintf(stdout, " -- Skipping %s. It has unmet dependencies: %s.\n", + qPrintable(sourceFileName), + qPrintable(unmetDependencies.join(QLatin1Char(',')))); continue; } -- cgit v1.2.1