summaryrefslogtreecommitdiff
path: root/src/androiddeployqt
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@theqtcompany.com>2015-09-22 12:42:34 +0200
committerDaniel Teske <daniel.teske@theqtcompany.com>2015-09-25 13:28:22 +0000
commit48bd9fce66b766409c476087cecb3d44e94d8124 (patch)
tree541759b8cb92e90f21f7163a3ca738bf1296059a /src/androiddeployqt
parent01b0e90fa10d188765d50cb1d1356845dbcf7c09 (diff)
downloadqttools-48bd9fce66b766409c476087cecb3d44e94d8124.tar.gz
Add options to control gdbserver bundling separately from signing
So that the gdbserver can be added to a signed package. Also add the reverse option to prevent adding the gdbserver to unsigned packages. Task-number: QTCREATORBUG-13035 Change-Id: Ief9dbb8f5c1b458691d4dda332216bb0ce71f60e Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/androiddeployqt')
-rw-r--r--src/androiddeployqt/main.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp
index 1f8f274d0..05bc5e87e 100644
--- a/src/androiddeployqt/main.cpp
+++ b/src/androiddeployqt/main.cpp
@@ -109,6 +109,7 @@ struct Options
, internalSf(false)
, sectionsOnly(false)
, protectedAuthenticationPath(false)
+ , gdbServer(Auto)
, installApk(false)
, uninstallApk(false)
, fetchedRemoteModificationDates(false)
@@ -127,6 +128,12 @@ struct Options
Debug
};
+ enum TriState {
+ Auto,
+ False,
+ True
+ };
+
bool helpRequested;
bool verbose;
bool timing;
@@ -184,6 +191,9 @@ struct Options
bool sectionsOnly;
bool protectedAuthenticationPath;
+ // Gdbserver
+ TriState gdbServer;
+
// Installation information
bool installApk;
bool uninstallApk;
@@ -382,6 +392,10 @@ Options parseOptions()
options.installLocation = arguments.at(++i);
} else if (argument.compare(QLatin1String("--release"), Qt::CaseInsensitive) == 0) {
options.releasePackage = true;
+ } else if (argument.compare(QLatin1String("--gdbserver"), Qt::CaseInsensitive) == 0) {
+ options.gdbServer = Options::True;
+ } else if (argument.compare(QLatin1String("--no-gdbserver"), Qt::CaseInsensitive) == 0) {
+ options.gdbServer = Options::False;
} else if (argument.compare(QLatin1String("--jdk"), Qt::CaseInsensitive) == 0) {
if (i + 1 == arguments.size())
options.helpRequested = true;
@@ -514,6 +528,10 @@ void printHelp()
" --internalsf: Include the .SF file inside the signature block.\n"
" --sectionsonly: Don't compute hash of entire manifest.\n"
" --protected: Keystore has protected authentication path.\n"
+ " --gdbserver: Adds the gdbserver to the package. By default the gdbserver\n"
+ " is bundled for debug pacakges.\n"
+ " --no-gdbserver: Prevents the gdbserver from being added to the package\n"
+ " By default the gdbserver is bundled for debug pacakges.\n"
" --jdk <path/to/jdk>: Used to find the jarsigner tool when used\n"
" in combination with the --release argument. By default,\n"
" an attempt is made to detect the tool using the JAVA_HOME and\n"
@@ -2948,7 +2966,9 @@ int main(int argc, char *argv[])
if (Q_UNLIKELY(options.timing))
fprintf(stdout, "[TIMING] %d ms: Checked for application binary\n", options.timer.elapsed());
- if (!options.releasePackage && !copyGdbServer(options))
+ bool needToCopyGdbServer = options.gdbServer == Options::True
+ || (options.gdbServer == Options::Auto && !options.releasePackage);
+ if (needToCopyGdbServer && !copyGdbServer(options))
return CannotCopyGdbServer;
if (Q_UNLIKELY(options.timing))