forked from qt-creator/qt-creator
RemoteLinux: Slimmer interface of custom command deploy step handling
Change-Id: Iad10d6bd111c9f06adb510aae19e861bbce3425d Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
#include "customcommanddeploystep.h"
|
#include "customcommanddeploystep.h"
|
||||||
|
|
||||||
#include "abstractremotelinuxdeployservice.h"
|
#include "abstractremotelinuxdeployservice.h"
|
||||||
|
#include "abstractremotelinuxdeploystep.h"
|
||||||
#include "remotelinux_constants.h"
|
#include "remotelinux_constants.h"
|
||||||
|
|
||||||
#include <projectexplorer/devicesupport/idevice.h>
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
@@ -108,12 +109,15 @@ void CustomCommandDeployService::stopDeployment()
|
|||||||
handleDeploymentDone();
|
handleDeploymentDone();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Internal
|
class CustomCommandDeployStep : public AbstractRemoteLinuxDeployStep
|
||||||
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::Internal::CustomCommandDeployStep)
|
||||||
|
|
||||||
CustomCommandDeployStep::CustomCommandDeployStep(BuildStepList *bsl, Utils::Id id)
|
public:
|
||||||
|
CustomCommandDeployStep(BuildStepList *bsl, Id id)
|
||||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||||
{
|
{
|
||||||
auto service = createDeployService<Internal::CustomCommandDeployService>();
|
auto service = createDeployService<CustomCommandDeployService>();
|
||||||
|
|
||||||
auto commandLine = addAspect<StringAspect>();
|
auto commandLine = addAspect<StringAspect>();
|
||||||
commandLine->setSettingsKey("RemoteLinuxCustomCommandDeploymentStep.CommandLine");
|
commandLine->setSettingsKey("RemoteLinuxCustomCommandDeploymentStep.CommandLine");
|
||||||
@@ -128,15 +132,18 @@ CustomCommandDeployStep::CustomCommandDeployStep(BuildStepList *bsl, Utils::Id i
|
|||||||
|
|
||||||
addMacroExpander();
|
addMacroExpander();
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
Utils::Id CustomCommandDeployStep::stepId()
|
|
||||||
|
// CustomCommandDeployStepFactory
|
||||||
|
|
||||||
|
CustomCommandDeployStepFactory::CustomCommandDeployStepFactory()
|
||||||
{
|
{
|
||||||
return Constants::CustomCommandDeployStepId;
|
registerStep<CustomCommandDeployStep>(Constants::CustomCommandDeployStepId);
|
||||||
|
setDisplayName(CustomCommandDeployStep::tr("Run custom remote command"));
|
||||||
|
setSupportedConfiguration(RemoteLinux::Constants::DeployToGenericLinux);
|
||||||
|
setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CustomCommandDeployStep::displayName()
|
} // Internal
|
||||||
{
|
} // RemoteLinux
|
||||||
return tr("Run custom remote command");
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace RemoteLinux
|
|
||||||
|
@@ -25,21 +25,16 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "remotelinux_export.h"
|
#include <projectexplorer/buildstep.h>
|
||||||
|
|
||||||
#include "abstractremotelinuxdeploystep.h"
|
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
|
namespace Internal {
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT CustomCommandDeployStep : public AbstractRemoteLinuxDeployStep
|
class CustomCommandDeployStepFactory : public ProjectExplorer::BuildStepFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CustomCommandDeployStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id);
|
CustomCommandDeployStepFactory();
|
||||||
|
|
||||||
static Utils::Id stepId();
|
|
||||||
static QString displayName();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace RemoteLinux
|
} // Internal
|
||||||
|
} // RemoteLinux
|
||||||
|
@@ -78,7 +78,7 @@ public:
|
|||||||
TarPackageDeployStepFactory tarPackageDeployStepFactory;
|
TarPackageDeployStepFactory tarPackageDeployStepFactory;
|
||||||
GenericDeployStepFactory<GenericDirectUploadStep> genericDirectUploadStepFactory;
|
GenericDeployStepFactory<GenericDirectUploadStep> genericDirectUploadStepFactory;
|
||||||
GenericDeployStepFactory<RsyncDeployStep> rsyncDeployStepFactory;
|
GenericDeployStepFactory<RsyncDeployStep> rsyncDeployStepFactory;
|
||||||
GenericDeployStepFactory<CustomCommandDeployStep> customCommandDeployStepFactory;
|
CustomCommandDeployStepFactory customCommandDeployStepFactory;
|
||||||
GenericDeployStepFactory<CheckForFreeDiskSpaceStep> checkForFreeDiskSpaceStepFactory;
|
GenericDeployStepFactory<CheckForFreeDiskSpaceStep> checkForFreeDiskSpaceStepFactory;
|
||||||
GenericDeployStepFactory<KillAppStep> killAppStepFactory;
|
GenericDeployStepFactory<KillAppStep> killAppStepFactory;
|
||||||
GenericDeployStepFactory<MakeInstallStep> makeInstallStepFactory;
|
GenericDeployStepFactory<MakeInstallStep> makeInstallStepFactory;
|
||||||
|
Reference in New Issue
Block a user