2013-04-25 16:02:17 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2013-04-25 16:02:17 +02:00
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator.
|
|
|
|
|
**
|
|
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2013-04-25 16:02:17 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2013-04-25 16:02:17 +02:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
2016-01-15 14:57:40 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2013-04-25 16:02:17 +02:00
|
|
|
|
|
|
|
|
#include "iosconfigurations.h"
|
|
|
|
|
#include "iosdevice.h"
|
|
|
|
|
#include "iossimulator.h"
|
|
|
|
|
|
|
|
|
|
#include <projectexplorer/buildstep.h>
|
|
|
|
|
#include <projectexplorer/devicesupport/idevice.h>
|
|
|
|
|
#include <qtsupport/baseqtversion.h>
|
|
|
|
|
|
|
|
|
|
#include <QFutureInterface>
|
|
|
|
|
#include <QProcess>
|
|
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QEventLoop;
|
|
|
|
|
class QTimer;
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
|
|
namespace Ios {
|
|
|
|
|
class IosToolHandler;
|
|
|
|
|
namespace Internal {
|
|
|
|
|
class IosDeviceConfigListModel;
|
|
|
|
|
class IosPackageCreationStep;
|
|
|
|
|
|
|
|
|
|
class IosDeployStep : public ProjectExplorer::BuildStep
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
enum TransferStatus {
|
|
|
|
|
NoTransfer,
|
|
|
|
|
TransferInProgress,
|
|
|
|
|
TransferOk,
|
|
|
|
|
TransferFailed
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
friend class IosDeployStepFactory;
|
2015-11-13 11:06:27 +01:00
|
|
|
explicit IosDeployStep(ProjectExplorer::BuildStepList *bc);
|
2013-04-25 16:02:17 +02:00
|
|
|
|
2015-06-03 15:32:21 +02:00
|
|
|
bool fromMap(const QVariantMap &map) override;
|
|
|
|
|
QVariantMap toMap() const override;
|
2013-04-25 16:02:17 +02:00
|
|
|
|
2015-06-03 15:32:21 +02:00
|
|
|
void run(QFutureInterface<bool> &fi) override;
|
2013-04-25 16:02:17 +02:00
|
|
|
void cleanup();
|
2015-08-17 15:33:18 +02:00
|
|
|
void cancel() override;
|
2013-04-25 16:02:17 +02:00
|
|
|
signals:
|
|
|
|
|
//void done();
|
|
|
|
|
//void error();
|
|
|
|
|
|
2016-06-29 19:35:23 +03:00
|
|
|
private:
|
2013-04-25 16:02:17 +02:00
|
|
|
void handleIsTransferringApp(Ios::IosToolHandler *handler, const QString &bundlePath,
|
|
|
|
|
const QString &deviceId, int progress, int maxProgress,
|
|
|
|
|
const QString &info);
|
|
|
|
|
void handleDidTransferApp(Ios::IosToolHandler *handler, const QString &bundlePath, const QString &deviceId,
|
|
|
|
|
Ios::IosToolHandler::OpStatus status);
|
|
|
|
|
void handleFinished(Ios::IosToolHandler *handler);
|
2013-10-07 16:07:16 +02:00
|
|
|
void handleErrorMsg(Ios::IosToolHandler *handler, const QString &msg);
|
2014-05-13 16:09:11 +02:00
|
|
|
void updateDisplayNames();
|
2016-06-29 19:35:23 +03:00
|
|
|
IosDeployStep(ProjectExplorer::BuildStepList *bc, IosDeployStep *other);
|
2015-11-13 12:19:35 +01:00
|
|
|
bool init(QList<const BuildStep *> &earlierSteps) override;
|
2015-06-03 15:32:21 +02:00
|
|
|
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
|
|
|
|
|
bool immutable() const override { return true; }
|
|
|
|
|
bool runInGuiThread() const override { return true; }
|
2014-05-13 16:09:11 +02:00
|
|
|
ProjectExplorer::IDevice::ConstPtr device() const;
|
|
|
|
|
IosDevice::ConstPtr iosdevice() const;
|
|
|
|
|
IosSimulator::ConstPtr iossimulator() const;
|
2013-04-25 16:02:17 +02:00
|
|
|
|
|
|
|
|
void ctor();
|
|
|
|
|
QString deviceId() const;
|
|
|
|
|
QString appBundle() const;
|
|
|
|
|
void raiseError(const QString &error);
|
|
|
|
|
void writeOutput(const QString &text, OutputFormat = MessageOutput);
|
2014-05-08 13:43:25 +02:00
|
|
|
void checkProvisioningProfile();
|
2016-06-29 19:35:23 +03:00
|
|
|
|
2013-04-25 16:02:17 +02:00
|
|
|
TransferStatus m_transferStatus;
|
|
|
|
|
IosToolHandler *m_toolHandler;
|
|
|
|
|
QFutureInterface<bool> m_futureInterface;
|
|
|
|
|
ProjectExplorer::IDevice::ConstPtr m_device;
|
2014-02-14 00:48:40 +01:00
|
|
|
QString m_bundlePath;
|
2013-04-25 16:02:17 +02:00
|
|
|
static const Core::Id Id;
|
2014-05-08 13:43:25 +02:00
|
|
|
bool m_expectFail;
|
2013-04-25 16:02:17 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Ios
|