summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-08-20 12:38:59 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2018-08-21 08:24:53 +0000
commit5be5b798b2c4260a5baa6ceb920e6bdd676a7013 (patch)
tree8f243a08a817f87be984092647b1be2f6eb14904 /src
parent65b95b61d67f7802ea27f2965c62ac69808b32a0 (diff)
androiddeployqt: Add auxiliary mode
In this mode, library and other dependencies are copied into the build directory, and the XML templates in the build directory are updated accordingly, but the project is not built or installed. Needed by qbs. No existing code has been touched. Change-Id: Ib8015f7c2315b39dfb21750fecc8618bce03cb8c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/tools/androiddeployqt/main.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp
index 29681bf5ce..3b78d2487f 100644
--- a/src/tools/androiddeployqt/main.cpp
+++ b/src/tools/androiddeployqt/main.cpp
@@ -95,6 +95,7 @@ struct Options
, generateAssetsFileList(true)
, build(true)
, gradle(false)
+ , auxMode(false)
, deploymentMechanism(Bundled)
, releasePackage(false)
, digestAlg(QLatin1String("SHA1"))
@@ -126,6 +127,7 @@ struct Options
bool generateAssetsFileList;
bool build;
bool gradle;
+ bool auxMode;
QTime timer;
// External tools
@@ -432,6 +434,8 @@ Options parseOptions()
options.jarSigner = true;
} else if (argument.compare(QLatin1String("--no-generated-assets-cache"), Qt::CaseInsensitive) == 0) {
options.generateAssetsFileList = false;
+ } else if (argument.compare(QLatin1String("--aux-mode"), Qt::CaseInsensitive) == 0) {
+ options.auxMode = true;
}
}
@@ -517,6 +521,9 @@ void printHelp()
" --verbose: Prints out information during processing.\n"
" --no-generated-assets-cache: Do not pregenerate the entry list for\n"
" the assets file engine.\n"
+ " --aux-mode: Operate in auxiliary mode. This will only copy the\n"
+ " dependencies into the build directory and update the XML templates.\n"
+ " The project will not be built or installed.\n"
" --help: Displays this information.\n\n",
qPrintable(QCoreApplication::arguments().at(0))
);
@@ -2826,6 +2833,22 @@ int main(int argc, char *argv[])
: "No"
);
+ if (options.auxMode) {
+ if (!readDependencies(&options))
+ return CannotReadDependencies;
+ if (!copyQtFiles(&options))
+ return CannotCopyQtFiles;
+ if (!copyAndroidExtraResources(options))
+ return CannotCopyAndroidExtraResources;
+ if (!stripLibraries(options))
+ return CannotStripLibraries;
+ if (!updateAndroidFiles(options))
+ return CannotUpdateAndroidFiles;
+ if (options.generateAssetsFileList && !generateAssetsFileList(options))
+ return CannotGenerateAssetsFileList;
+ return 0;
+ }
+
if (options.build) {
if (options.gradle)
cleanAndroidFiles(options);