forked from qt-creator/qt-creator
Rename UploadAndInstallTarPackageStep into TarPackageDeployStep
Make class name shorter and consistent with others. Change-Id: I7102c981848b2a2854421d5b8b947dea81a1799a Reviewed-by: Christian Kandeler <christian.kandeler@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:
@@ -39,7 +39,7 @@ add_qtc_plugin(RemoteLinux
|
|||||||
sshkeycreationdialog.cpp sshkeycreationdialog.h sshkeycreationdialog.ui
|
sshkeycreationdialog.cpp sshkeycreationdialog.h sshkeycreationdialog.ui
|
||||||
sshprocessinterface.h
|
sshprocessinterface.h
|
||||||
tarpackagecreationstep.cpp tarpackagecreationstep.h
|
tarpackagecreationstep.cpp tarpackagecreationstep.h
|
||||||
uploadandinstalltarpackagestep.cpp uploadandinstalltarpackagestep.h
|
tarpackagedeploystep.cpp tarpackagedeploystep.h
|
||||||
)
|
)
|
||||||
|
|
||||||
extend_qtc_plugin(RemoteLinux
|
extend_qtc_plugin(RemoteLinux
|
||||||
|
@@ -83,8 +83,8 @@ Project {
|
|||||||
"sshprocessinterface.h",
|
"sshprocessinterface.h",
|
||||||
"tarpackagecreationstep.cpp",
|
"tarpackagecreationstep.cpp",
|
||||||
"tarpackagecreationstep.h",
|
"tarpackagecreationstep.h",
|
||||||
"uploadandinstalltarpackagestep.cpp",
|
"tarpackagedeploystep.cpp",
|
||||||
"uploadandinstalltarpackagestep.h",
|
"tarpackagedeploystep.h",
|
||||||
"images/embeddedtarget.png",
|
"images/embeddedtarget.png",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@@ -34,7 +34,7 @@ const char CheckForFreeDiskSpaceId[] = "RemoteLinux.CheckForFreeDiskSpaceStep";
|
|||||||
const char DirectUploadStepId[] = "RemoteLinux.DirectUploadStep";
|
const char DirectUploadStepId[] = "RemoteLinux.DirectUploadStep";
|
||||||
const char MakeInstallStepId[] = "RemoteLinux.MakeInstall";
|
const char MakeInstallStepId[] = "RemoteLinux.MakeInstall";
|
||||||
const char TarPackageCreationStepId[] = "MaemoTarPackageCreationStep";
|
const char TarPackageCreationStepId[] = "MaemoTarPackageCreationStep";
|
||||||
const char UploadAndInstallTarPackageStepId[] = "MaemoUploadAndInstallTarPackageStep";
|
const char TarPackageDeployStepId[] = "MaemoUploadAndInstallTarPackageStep";
|
||||||
const char RsyncDeployStepId[] = "RemoteLinux.RsyncDeployStep";
|
const char RsyncDeployStepId[] = "RemoteLinux.RsyncDeployStep";
|
||||||
const char CustomCommandDeployStepId[] = "RemoteLinux.GenericRemoteLinuxCustomCommandDeploymentStep";
|
const char CustomCommandDeployStepId[] = "RemoteLinux.GenericRemoteLinuxCustomCommandDeploymentStep";
|
||||||
const char KillAppStepId[] = "RemoteLinux.KillAppStep";
|
const char KillAppStepId[] = "RemoteLinux.KillAppStep";
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
#include "killappstep.h"
|
#include "killappstep.h"
|
||||||
#include "rsyncdeploystep.h"
|
#include "rsyncdeploystep.h"
|
||||||
#include "tarpackagecreationstep.h"
|
#include "tarpackagecreationstep.h"
|
||||||
#include "uploadandinstalltarpackagestep.h"
|
#include "tarpackagedeploystep.h"
|
||||||
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
#include "filesystemaccess_test.h"
|
#include "filesystemaccess_test.h"
|
||||||
@@ -76,7 +76,7 @@ public:
|
|||||||
RemoteLinuxCustomRunConfigurationFactory customRunConfigurationFactory;
|
RemoteLinuxCustomRunConfigurationFactory customRunConfigurationFactory;
|
||||||
RemoteLinuxDeployConfigurationFactory deployConfigurationFactory;
|
RemoteLinuxDeployConfigurationFactory deployConfigurationFactory;
|
||||||
GenericDeployStepFactory<TarPackageCreationStep> tarPackageCreationStepFactory;
|
GenericDeployStepFactory<TarPackageCreationStep> tarPackageCreationStepFactory;
|
||||||
GenericDeployStepFactory<UploadAndInstallTarPackageStep> uploadAndInstallTarPackageStepFactory;
|
GenericDeployStepFactory<TarPackageDeployStep> tarPackageDeployStepFactory;
|
||||||
GenericDeployStepFactory<GenericDirectUploadStep> genericDirectUploadStepFactory;
|
GenericDeployStepFactory<GenericDirectUploadStep> genericDirectUploadStepFactory;
|
||||||
GenericDeployStepFactory<RsyncDeployStep> rsyncDeployStepFactory;
|
GenericDeployStepFactory<RsyncDeployStep> rsyncDeployStepFactory;
|
||||||
GenericDeployStepFactory<RemoteLinuxCustomCommandDeploymentStep>
|
GenericDeployStepFactory<RemoteLinuxCustomCommandDeploymentStep>
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "uploadandinstalltarpackagestep.h"
|
#include "tarpackagedeploystep.h"
|
||||||
|
|
||||||
#include "remotelinux_constants.h"
|
#include "remotelinux_constants.h"
|
||||||
#include "remotelinuxpackageinstaller.h"
|
#include "remotelinuxpackageinstaller.h"
|
||||||
@@ -43,12 +43,12 @@ using namespace Utils;
|
|||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class UploadAndInstallTarPackageService : public AbstractRemoteLinuxDeployService
|
class TarPackageDeployService : public AbstractRemoteLinuxDeployService
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UploadAndInstallTarPackageService();
|
TarPackageDeployService();
|
||||||
void setPackageFilePath(const FilePath &filePath);
|
void setPackageFilePath(const FilePath &filePath);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -71,30 +71,30 @@ private:
|
|||||||
RemoteLinuxTarPackageInstaller m_installer;
|
RemoteLinuxTarPackageInstaller m_installer;
|
||||||
};
|
};
|
||||||
|
|
||||||
UploadAndInstallTarPackageService::UploadAndInstallTarPackageService()
|
TarPackageDeployService::TarPackageDeployService()
|
||||||
{
|
{
|
||||||
connect(&m_uploader, &FileTransfer::done, this,
|
connect(&m_uploader, &FileTransfer::done, this,
|
||||||
&UploadAndInstallTarPackageService::handleUploadFinished);
|
&TarPackageDeployService::handleUploadFinished);
|
||||||
connect(&m_uploader, &FileTransfer::progress, this,
|
connect(&m_uploader, &FileTransfer::progress, this,
|
||||||
&UploadAndInstallTarPackageService::progressMessage);
|
&TarPackageDeployService::progressMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UploadAndInstallTarPackageService::setPackageFilePath(const FilePath &filePath)
|
void TarPackageDeployService::setPackageFilePath(const FilePath &filePath)
|
||||||
{
|
{
|
||||||
m_packageFilePath = filePath;
|
m_packageFilePath = filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString UploadAndInstallTarPackageService::uploadDir() const
|
QString TarPackageDeployService::uploadDir() const
|
||||||
{
|
{
|
||||||
return QLatin1String("/tmp");
|
return QLatin1String("/tmp");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UploadAndInstallTarPackageService::isDeploymentNecessary() const
|
bool TarPackageDeployService::isDeploymentNecessary() const
|
||||||
{
|
{
|
||||||
return hasLocalFileChanged(DeployableFile(m_packageFilePath, {}));
|
return hasLocalFileChanged(DeployableFile(m_packageFilePath, {}));
|
||||||
}
|
}
|
||||||
|
|
||||||
void UploadAndInstallTarPackageService::doDeploy()
|
void TarPackageDeployService::doDeploy()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(m_state == Inactive, return);
|
QTC_ASSERT(m_state == Inactive, return);
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ void UploadAndInstallTarPackageService::doDeploy()
|
|||||||
m_uploader.start();
|
m_uploader.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UploadAndInstallTarPackageService::stopDeployment()
|
void TarPackageDeployService::stopDeployment()
|
||||||
{
|
{
|
||||||
switch (m_state) {
|
switch (m_state) {
|
||||||
case Inactive:
|
case Inactive:
|
||||||
@@ -124,7 +124,7 @@ void UploadAndInstallTarPackageService::stopDeployment()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UploadAndInstallTarPackageService::handleUploadFinished(const ProcessResultData &resultData)
|
void TarPackageDeployService::handleUploadFinished(const ProcessResultData &resultData)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(m_state == Uploading, return);
|
QTC_ASSERT(m_state == Uploading, return);
|
||||||
|
|
||||||
@@ -143,11 +143,11 @@ void UploadAndInstallTarPackageService::handleUploadFinished(const ProcessResult
|
|||||||
connect(&m_installer, &AbstractRemoteLinuxPackageInstaller::stderrData,
|
connect(&m_installer, &AbstractRemoteLinuxPackageInstaller::stderrData,
|
||||||
this, &AbstractRemoteLinuxDeployService::stdErrData);
|
this, &AbstractRemoteLinuxDeployService::stdErrData);
|
||||||
connect(&m_installer, &AbstractRemoteLinuxPackageInstaller::finished,
|
connect(&m_installer, &AbstractRemoteLinuxPackageInstaller::finished,
|
||||||
this, &UploadAndInstallTarPackageService::handleInstallationFinished);
|
this, &TarPackageDeployService::handleInstallationFinished);
|
||||||
m_installer.installPackage(deviceConfiguration(), remoteFilePath, true);
|
m_installer.installPackage(deviceConfiguration(), remoteFilePath, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UploadAndInstallTarPackageService::handleInstallationFinished(const QString &errorMsg)
|
void TarPackageDeployService::handleInstallationFinished(const QString &errorMsg)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(m_state == Installing, return);
|
QTC_ASSERT(m_state == Installing, return);
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ void UploadAndInstallTarPackageService::handleInstallationFinished(const QString
|
|||||||
setFinished();
|
setFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UploadAndInstallTarPackageService::setFinished()
|
void TarPackageDeployService::setFinished()
|
||||||
{
|
{
|
||||||
m_state = Inactive;
|
m_state = Inactive;
|
||||||
m_uploader.stop();
|
m_uploader.stop();
|
||||||
@@ -172,10 +172,10 @@ void UploadAndInstallTarPackageService::setFinished()
|
|||||||
|
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
UploadAndInstallTarPackageStep::UploadAndInstallTarPackageStep(BuildStepList *bsl, Id id)
|
TarPackageDeployStep::TarPackageDeployStep(BuildStepList *bsl, Id id)
|
||||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||||
{
|
{
|
||||||
auto service = createDeployService<UploadAndInstallTarPackageService>();
|
auto service = createDeployService<TarPackageDeployService>();
|
||||||
|
|
||||||
setWidgetExpandedByDefault(false);
|
setWidgetExpandedByDefault(false);
|
||||||
|
|
||||||
@@ -196,16 +196,16 @@ UploadAndInstallTarPackageStep::UploadAndInstallTarPackageStep(BuildStepList *bs
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Id UploadAndInstallTarPackageStep::stepId()
|
Id TarPackageDeployStep::stepId()
|
||||||
{
|
{
|
||||||
return Constants::UploadAndInstallTarPackageStepId;
|
return Constants::TarPackageDeployStepId;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString UploadAndInstallTarPackageStep::displayName()
|
QString TarPackageDeployStep::displayName()
|
||||||
{
|
{
|
||||||
return tr("Deploy tarball via SFTP upload");
|
return tr("Deploy tarball via SFTP upload");
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace RemoteLinux
|
} //namespace RemoteLinux
|
||||||
|
|
||||||
#include "uploadandinstalltarpackagestep.moc"
|
#include "tarpackagedeploystep.moc"
|
@@ -30,12 +30,12 @@
|
|||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
class AbstractRemoteLinuxPackageInstaller;
|
class AbstractRemoteLinuxPackageInstaller;
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT UploadAndInstallTarPackageStep : public AbstractRemoteLinuxDeployStep
|
class TarPackageDeployStep : public AbstractRemoteLinuxDeployStep
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UploadAndInstallTarPackageStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id);
|
TarPackageDeployStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id);
|
||||||
|
|
||||||
static Utils::Id stepId();
|
static Utils::Id stepId();
|
||||||
static QString displayName();
|
static QString displayName();
|
Reference in New Issue
Block a user