forked from qt-creator/qt-creator
iostool: Improve deployment speed using delta deploy
The iostool did always deploy the whole bundle, without taking into account whether anything has actually changed. This meant that for big bundles anytime the user starts the application on his device, a full deployment was done. For a ~1GB bundle this would take around a minute on a recent Mac and iPhone 12. This fix uses a new function from the mobiledevice framework called AMDeviceSecureInstallApplicationBundle. This function takes a new parameter "ShadowPathKey" which points to a directory where the last deploy state is captured temporarily. Before deploying to the device, the function compares what is to be deployed against the last deploy state and only deploys the parts that actually changed. QtCreator provides a temporary folder for this. Due to this, the initial deployment still does a complete deployment as no state is available yet. All subsequent deployments take the captured state into account. For backwards compatibility, the old deployment method is left intact. Fixes: QTCREATORBUG-24371 Change-Id: I4df6aa79d41b34c326d78be7952d7eeb23774648 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
#include <utils/runextensions.h>
|
||||
#include <utils/temporarydirectory.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
@@ -701,10 +702,14 @@ void IosDeviceToolHandlerPrivate::requestTransferApp(const QString &bundlePath,
|
||||
{
|
||||
m_bundlePath = bundlePath;
|
||||
m_deviceId = deviceId;
|
||||
QString tmpDeltaPath = Utils::TemporaryDirectory::masterDirectoryFilePath().pathAppended("ios").toString();
|
||||
QStringList args;
|
||||
args << QLatin1String("--id") << deviceId << QLatin1String("--bundle")
|
||||
<< bundlePath << QLatin1String("--timeout") << QString::number(timeout)
|
||||
<< QLatin1String("--install");
|
||||
<< QLatin1String("--install")
|
||||
<< QLatin1String("--delta-path")
|
||||
<< tmpDeltaPath;
|
||||
|
||||
start(IosToolHandler::iosDeviceToolPath(), args);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user