forked from qt-creator/qt-creator
Rename RemoteLinuxCustomCommandDeploymentStep
... into CustomCommandDeployStep Change-Id: I67e4d74f6df76ad301cb45926ecc550d9275d779 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -5,6 +5,7 @@ add_qtc_plugin(RemoteLinux
|
|||||||
abstractpackagingstep.cpp abstractpackagingstep.h
|
abstractpackagingstep.cpp abstractpackagingstep.h
|
||||||
abstractremotelinuxdeployservice.cpp abstractremotelinuxdeployservice.h
|
abstractremotelinuxdeployservice.cpp abstractremotelinuxdeployservice.h
|
||||||
abstractremotelinuxdeploystep.cpp abstractremotelinuxdeploystep.h
|
abstractremotelinuxdeploystep.cpp abstractremotelinuxdeploystep.h
|
||||||
|
customcommanddeploystep.cpp customcommanddeploystep.h
|
||||||
deploymenttimeinfo.cpp deploymenttimeinfo.h
|
deploymenttimeinfo.cpp deploymenttimeinfo.h
|
||||||
genericdirectuploadservice.cpp genericdirectuploadservice.h
|
genericdirectuploadservice.cpp genericdirectuploadservice.h
|
||||||
genericdirectuploadstep.cpp genericdirectuploadstep.h
|
genericdirectuploadstep.cpp genericdirectuploadstep.h
|
||||||
@@ -22,7 +23,6 @@ add_qtc_plugin(RemoteLinux
|
|||||||
remotelinux_constants.h
|
remotelinux_constants.h
|
||||||
remotelinux_export.h
|
remotelinux_export.h
|
||||||
remotelinuxcheckforfreediskspacestep.cpp remotelinuxcheckforfreediskspacestep.h
|
remotelinuxcheckforfreediskspacestep.cpp remotelinuxcheckforfreediskspacestep.h
|
||||||
remotelinuxcustomcommanddeploymentstep.cpp remotelinuxcustomcommanddeploymentstep.h
|
|
||||||
remotelinuxcustomrunconfiguration.cpp remotelinuxcustomrunconfiguration.h
|
remotelinuxcustomrunconfiguration.cpp remotelinuxcustomrunconfiguration.h
|
||||||
remotelinuxdebugsupport.cpp remotelinuxdebugsupport.h
|
remotelinuxdebugsupport.cpp remotelinuxdebugsupport.h
|
||||||
remotelinuxdeployconfiguration.cpp remotelinuxdeployconfiguration.h
|
remotelinuxdeployconfiguration.cpp remotelinuxdeployconfiguration.h
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "remotelinuxcustomcommanddeploymentstep.h"
|
#include "customcommanddeploystep.h"
|
||||||
|
|
||||||
#include "remotelinux_constants.h"
|
#include "remotelinux_constants.h"
|
||||||
|
|
||||||
@@ -38,14 +38,12 @@ using namespace Utils;
|
|||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
// RemoteLinuxCustomCommandDeployService
|
class CustomCommandDeployService : public AbstractRemoteLinuxDeployService
|
||||||
|
|
||||||
class RemoteLinuxCustomCommandDeployService : public AbstractRemoteLinuxDeployService
|
|
||||||
{
|
{
|
||||||
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::Internal::RemoteLinuxCustomCommandDeployService)
|
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::Internal::CustomCommandDeployService)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RemoteLinuxCustomCommandDeployService();
|
CustomCommandDeployService();
|
||||||
|
|
||||||
void setCommandLine(const QString &commandLine);
|
void setCommandLine(const QString &commandLine);
|
||||||
|
|
||||||
@@ -60,7 +58,7 @@ protected:
|
|||||||
QtcProcess m_process;
|
QtcProcess m_process;
|
||||||
};
|
};
|
||||||
|
|
||||||
RemoteLinuxCustomCommandDeployService::RemoteLinuxCustomCommandDeployService()
|
CustomCommandDeployService::CustomCommandDeployService()
|
||||||
{
|
{
|
||||||
connect(&m_process, &QtcProcess::readyReadStandardOutput, this, [this] {
|
connect(&m_process, &QtcProcess::readyReadStandardOutput, this, [this] {
|
||||||
emit stdOutData(QString::fromUtf8(m_process.readAllStandardOutput()));
|
emit stdOutData(QString::fromUtf8(m_process.readAllStandardOutput()));
|
||||||
@@ -82,12 +80,12 @@ RemoteLinuxCustomCommandDeployService::RemoteLinuxCustomCommandDeployService()
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxCustomCommandDeployService::setCommandLine(const QString &commandLine)
|
void CustomCommandDeployService::setCommandLine(const QString &commandLine)
|
||||||
{
|
{
|
||||||
m_commandLine = commandLine;
|
m_commandLine = commandLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckResult RemoteLinuxCustomCommandDeployService::isDeploymentPossible() const
|
CheckResult CustomCommandDeployService::isDeploymentPossible() const
|
||||||
{
|
{
|
||||||
if (m_commandLine.isEmpty())
|
if (m_commandLine.isEmpty())
|
||||||
return CheckResult::failure(tr("No command line given."));
|
return CheckResult::failure(tr("No command line given."));
|
||||||
@@ -95,7 +93,7 @@ CheckResult RemoteLinuxCustomCommandDeployService::isDeploymentPossible() const
|
|||||||
return AbstractRemoteLinuxDeployService::isDeploymentPossible();
|
return AbstractRemoteLinuxDeployService::isDeploymentPossible();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxCustomCommandDeployService::doDeploy()
|
void CustomCommandDeployService::doDeploy()
|
||||||
{
|
{
|
||||||
emit progressMessage(tr("Starting remote command \"%1\"...").arg(m_commandLine));
|
emit progressMessage(tr("Starting remote command \"%1\"...").arg(m_commandLine));
|
||||||
m_process.setCommand({deviceConfiguration()->filePath("/bin/sh"),
|
m_process.setCommand({deviceConfiguration()->filePath("/bin/sh"),
|
||||||
@@ -103,7 +101,7 @@ void RemoteLinuxCustomCommandDeployService::doDeploy()
|
|||||||
m_process.start();
|
m_process.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxCustomCommandDeployService::stopDeployment()
|
void CustomCommandDeployService::stopDeployment()
|
||||||
{
|
{
|
||||||
m_process.close();
|
m_process.close();
|
||||||
handleDeploymentDone();
|
handleDeploymentDone();
|
||||||
@@ -111,14 +109,10 @@ void RemoteLinuxCustomCommandDeployService::stopDeployment()
|
|||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
|
|
||||||
|
CustomCommandDeployStep::CustomCommandDeployStep(BuildStepList *bsl, Utils::Id id)
|
||||||
// RemoteLinuxCustomCommandDeploymentStep
|
|
||||||
|
|
||||||
RemoteLinuxCustomCommandDeploymentStep::RemoteLinuxCustomCommandDeploymentStep
|
|
||||||
(BuildStepList *bsl, Utils::Id id)
|
|
||||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||||
{
|
{
|
||||||
auto service = createDeployService<Internal::RemoteLinuxCustomCommandDeployService>();
|
auto service = createDeployService<Internal::CustomCommandDeployService>();
|
||||||
|
|
||||||
auto commandLine = addAspect<StringAspect>();
|
auto commandLine = addAspect<StringAspect>();
|
||||||
commandLine->setSettingsKey("RemoteLinuxCustomCommandDeploymentStep.CommandLine");
|
commandLine->setSettingsKey("RemoteLinuxCustomCommandDeploymentStep.CommandLine");
|
||||||
@@ -134,14 +128,12 @@ RemoteLinuxCustomCommandDeploymentStep::RemoteLinuxCustomCommandDeploymentStep
|
|||||||
addMacroExpander();
|
addMacroExpander();
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteLinuxCustomCommandDeploymentStep::~RemoteLinuxCustomCommandDeploymentStep() = default;
|
Utils::Id CustomCommandDeployStep::stepId()
|
||||||
|
|
||||||
Utils::Id RemoteLinuxCustomCommandDeploymentStep::stepId()
|
|
||||||
{
|
{
|
||||||
return Constants::CustomCommandDeployStepId;
|
return Constants::CustomCommandDeployStepId;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString RemoteLinuxCustomCommandDeploymentStep::displayName()
|
QString CustomCommandDeployStep::displayName()
|
||||||
{
|
{
|
||||||
return tr("Run custom remote command");
|
return tr("Run custom remote command");
|
||||||
}
|
}
|
@@ -29,14 +29,12 @@
|
|||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT RemoteLinuxCustomCommandDeploymentStep
|
class REMOTELINUX_EXPORT CustomCommandDeployStep : public AbstractRemoteLinuxDeployStep
|
||||||
: public AbstractRemoteLinuxDeployStep
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RemoteLinuxCustomCommandDeploymentStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id);
|
CustomCommandDeployStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id);
|
||||||
~RemoteLinuxCustomCommandDeploymentStep() override;
|
|
||||||
|
|
||||||
static Utils::Id stepId();
|
static Utils::Id stepId();
|
||||||
static QString displayName();
|
static QString displayName();
|
@@ -21,6 +21,8 @@ Project {
|
|||||||
"abstractremotelinuxdeploystep.h",
|
"abstractremotelinuxdeploystep.h",
|
||||||
"deploymenttimeinfo.cpp",
|
"deploymenttimeinfo.cpp",
|
||||||
"deploymenttimeinfo.h",
|
"deploymenttimeinfo.h",
|
||||||
|
"customcommanddeploystep.cpp",
|
||||||
|
"customcommanddeploystep.h",
|
||||||
"genericdirectuploadservice.cpp",
|
"genericdirectuploadservice.cpp",
|
||||||
"genericdirectuploadservice.h",
|
"genericdirectuploadservice.h",
|
||||||
"genericdirectuploadstep.cpp",
|
"genericdirectuploadstep.cpp",
|
||||||
@@ -49,8 +51,6 @@ Project {
|
|||||||
"remotelinux_export.h",
|
"remotelinux_export.h",
|
||||||
"remotelinuxcheckforfreediskspacestep.cpp",
|
"remotelinuxcheckforfreediskspacestep.cpp",
|
||||||
"remotelinuxcheckforfreediskspacestep.h",
|
"remotelinuxcheckforfreediskspacestep.h",
|
||||||
"remotelinuxcustomcommanddeploymentstep.cpp",
|
|
||||||
"remotelinuxcustomcommanddeploymentstep.h",
|
|
||||||
"remotelinuxcustomrunconfiguration.cpp",
|
"remotelinuxcustomrunconfiguration.cpp",
|
||||||
"remotelinuxcustomrunconfiguration.h",
|
"remotelinuxcustomrunconfiguration.h",
|
||||||
"remotelinuxdebugsupport.cpp",
|
"remotelinuxdebugsupport.cpp",
|
||||||
|
@@ -25,20 +25,19 @@
|
|||||||
|
|
||||||
#include "remotelinuxplugin.h"
|
#include "remotelinuxplugin.h"
|
||||||
|
|
||||||
|
#include "customcommanddeploystep.h"
|
||||||
|
#include "genericdirectuploadstep.h"
|
||||||
|
#include "killappstep.h"
|
||||||
#include "linuxdevice.h"
|
#include "linuxdevice.h"
|
||||||
|
#include "makeinstallstep.h"
|
||||||
#include "remotelinux_constants.h"
|
#include "remotelinux_constants.h"
|
||||||
|
#include "remotelinuxcheckforfreediskspacestep.h"
|
||||||
|
#include "remotelinuxdeployconfiguration.h"
|
||||||
#include "remotelinuxqmltoolingsupport.h"
|
#include "remotelinuxqmltoolingsupport.h"
|
||||||
#include "remotelinuxcustomrunconfiguration.h"
|
#include "remotelinuxcustomrunconfiguration.h"
|
||||||
#include "remotelinuxdebugsupport.h"
|
#include "remotelinuxdebugsupport.h"
|
||||||
#include "remotelinuxdeployconfiguration.h"
|
#include "remotelinuxdeployconfiguration.h"
|
||||||
#include "remotelinuxrunconfiguration.h"
|
#include "remotelinuxrunconfiguration.h"
|
||||||
|
|
||||||
#include "genericdirectuploadstep.h"
|
|
||||||
#include "makeinstallstep.h"
|
|
||||||
#include "remotelinuxcheckforfreediskspacestep.h"
|
|
||||||
#include "remotelinuxdeployconfiguration.h"
|
|
||||||
#include "remotelinuxcustomcommanddeploymentstep.h"
|
|
||||||
#include "killappstep.h"
|
|
||||||
#include "rsyncdeploystep.h"
|
#include "rsyncdeploystep.h"
|
||||||
#include "tarpackagecreationstep.h"
|
#include "tarpackagecreationstep.h"
|
||||||
#include "tarpackagedeploystep.h"
|
#include "tarpackagedeploystep.h"
|
||||||
@@ -79,8 +78,7 @@ public:
|
|||||||
GenericDeployStepFactory<TarPackageDeployStep> tarPackageDeployStepFactory;
|
GenericDeployStepFactory<TarPackageDeployStep> tarPackageDeployStepFactory;
|
||||||
GenericDeployStepFactory<GenericDirectUploadStep> genericDirectUploadStepFactory;
|
GenericDeployStepFactory<GenericDirectUploadStep> genericDirectUploadStepFactory;
|
||||||
GenericDeployStepFactory<RsyncDeployStep> rsyncDeployStepFactory;
|
GenericDeployStepFactory<RsyncDeployStep> rsyncDeployStepFactory;
|
||||||
GenericDeployStepFactory<RemoteLinuxCustomCommandDeploymentStep>
|
GenericDeployStepFactory<CustomCommandDeployStep> customCommandDeployStepFactory;
|
||||||
customCommandDeploymentStepFactory;
|
|
||||||
GenericDeployStepFactory<RemoteLinuxCheckForFreeDiskSpaceStep>
|
GenericDeployStepFactory<RemoteLinuxCheckForFreeDiskSpaceStep>
|
||||||
checkForFreeDiskSpaceStepFactory;
|
checkForFreeDiskSpaceStepFactory;
|
||||||
GenericDeployStepFactory<KillAppStep> killAppStepFactory;
|
GenericDeployStepFactory<KillAppStep> killAppStepFactory;
|
||||||
|
Reference in New Issue
Block a user