diff options
author | Daniel Teske <daniel.teske@digia.com> | 2013-01-22 16:03:31 +0100 |
---|---|---|
committer | Daniel Teske <daniel.teske@digia.com> | 2013-01-24 15:07:07 +0100 |
commit | dc40099d0b3d4a4fa56501d0927a59c2233d7642 (patch) | |
tree | e5dab901a1e8978d9ec87e46b09879ef93f1c562 /src/plugins/android/androiddeploystep.h | |
parent | 259145f08010242d23938b314c7592d9f5ba930d (diff) | |
download | qt-creator-dc40099d0b3d4a4fa56501d0927a59c2233d7642.tar.gz |
Android: Make local deployment smart
On deploying, first check the timestamps of the files on the device,
and then only copy+strip+deploy the files that are newer.
Add a button for cleaning /data/local/tmp/qt as that is no longer
done on each deployment.
Task-number: QTCREATORBUG-8538
Change-Id: I93c4e6266d7d748b0a4735e00806282315227d4b
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Diffstat (limited to 'src/plugins/android/androiddeploystep.h')
-rw-r--r-- | src/plugins/android/androiddeploystep.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/plugins/android/androiddeploystep.h b/src/plugins/android/androiddeploystep.h index 7668327693..6d21a80750 100644 --- a/src/plugins/android/androiddeploystep.h +++ b/src/plugins/android/androiddeploystep.h @@ -47,6 +47,26 @@ namespace Internal { class AndroidDeviceConfigListModel; class AndroidPackageCreationStep; +class DeployItem +{ +public: + DeployItem(const QString &_localFileName, + unsigned int _localTimeStamp, + const QString &_remoteFileName, + bool _needsStrip) + : localFileName(_localFileName), + remoteFileName(_remoteFileName), + localTimeStamp(_localTimeStamp), + remoteTimeStamp(0), + needsStrip(_needsStrip) + {} + QString localFileName; + QString remoteFileName; + unsigned int localTimeStamp; + unsigned int remoteTimeStamp; + bool needsStrip; +}; + class AndroidDeployStep : public ProjectExplorer::BuildStep { Q_OBJECT @@ -75,6 +95,8 @@ public: bool fromMap(const QVariantMap &map); QVariantMap toMap() const; + void cleanLibsOnDevice(); + public slots: void setDeployAction(AndroidDeployAction deploy); void setDeployQASIPackagePath(const QString &package); @@ -89,6 +111,7 @@ private slots: bool deployPackage(); void handleBuildOutput(); void handleBuildError(); + void cleanLibsFinished(); private: AndroidDeployStep(ProjectExplorer::BuildStepList *bc, @@ -98,11 +121,19 @@ private: virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget(); virtual bool immutable() const { return true; } - void copyLibs(const QString &srcPath, const QString &destPath, QStringList &copiedLibs, const QStringList &filter = QStringList()); void ctor(); void raiseError(const QString &error); void writeOutput(const QString &text, OutputFormat = MessageOutput); bool runCommand(QProcess *buildProc, const QString &program, const QStringList &arguments); + unsigned int remoteModificationTime(const QString &fullDestination, + QHash<QString, unsigned int> *cache); + void collectFiles(QList<DeployItem> *deployList, const QString &localPath, + const QString &remotePath, bool strip, const QStringList &filter = QStringList()); + void filterModificationTimes(QList<DeployItem> *deployList); + void copyFilesToTemp(QList<DeployItem> *deployList, const QString &tempDirectory, const QString &sourcePrefix); + void fetchRemoteModificationTimes(QList<DeployItem> *deployList); + void stripFiles(const QList<DeployItem> &deployList, ProjectExplorer::Abi::Architecture architecture); + void deployFiles(QProcess *process, const QList<DeployItem> &deployList); private: QString m_deviceSerialNumber; |