RemoteLinux: Make build/deploysteps constructible by id only

Will help to remove some of the remaining hard dependencies of Qnx and
Boot2Qt on RemoteLinux.

Change-Id: I1a327249a9b2903b5b9d869cb9cd60bb50250a5c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-09-16 12:08:11 +02:00
parent b7ec9d2fbe
commit 9f378d41e4
7 changed files with 21 additions and 7 deletions

View File

@@ -57,6 +57,7 @@
#include <remotelinux/genericdirectuploadstep.h>
#include <remotelinux/makeinstallstep.h>
#include <remotelinux/remotelinuxcheckforfreediskspacestep.h>
#include <remotelinux/remotelinux_constants.h>
#include <qtsupport/qtkitinformation.h>
@@ -98,13 +99,13 @@ public:
addSupportedTargetDeviceType(Constants::QNX_QNX_OS_TYPE);
setUseDeploymentDataView();
addInitialStep(RemoteLinux::MakeInstallStep::stepId(), [](Target *target) {
addInitialStep(RemoteLinux::Constants::MakeInstallStepId, [](Target *target) {
const Project * const prj = target->project();
return prj->deploymentKnowledge() == DeploymentKnowledge::Bad
&& prj->hasMakeInstallEquivalent();
});
addInitialStep(DeviceCheckBuildStep::stepId());
addInitialStep(RemoteLinux::RemoteLinuxCheckForFreeDiskSpaceStep::stepId());
addInitialStep(RemoteLinux::Constants::CheckForFreeDiskSpaceId);
addInitialStep(QnxUploadStep::stepId());
}
};

View File

@@ -33,6 +33,12 @@ const char GenericLinuxOsType[] = "GenericLinuxOsType";
const char CheckForFreeDiskSpaceId[] = "RemoteLinux.CheckForFreeDiskSpaceStep";
const char DirectUploadStepId[] = "RemoteLinux.DirectUploadStep";
const char MakeInstallStepId[] = "RemoteLinux.MakeInstall";
const char TarPackageCreationStepId[] = "MaemoTarPackageCreationStep";
const char UploadAndInstallTarPackageStepId[] = "MaemoUploadAndInstallTarPackageStep";
const char RsyncDeployStepId[] = "RemoteLinux.RsyncDeployStep";
const char CustomCommandDeployStepId[] = "RemoteLinux.GenericRemoteLinuxCustomCommandDeploymentStep";
const char KillAppStepId[] = "RemoteLinux.KillAppStep";
const char SupportsRSync[] = "RemoteLinux.SupportsRSync";
} // Constants

View File

@@ -24,6 +24,8 @@
****************************************************************************/
#include "remotelinuxcustomcommanddeploymentstep.h"
#include "remotelinux_constants.h"
#include "remotelinuxcustomcommanddeployservice.h"
#include <projectexplorer/runconfigurationaspects.h>
@@ -58,7 +60,7 @@ RemoteLinuxCustomCommandDeploymentStep::~RemoteLinuxCustomCommandDeploymentStep(
Utils::Id RemoteLinuxCustomCommandDeploymentStep::stepId()
{
return "RemoteLinux.GenericRemoteLinuxCustomCommandDeploymentStep";
return Constants::CustomCommandDeployStepId;
}
QString RemoteLinuxCustomCommandDeploymentStep::displayName()

View File

@@ -25,6 +25,7 @@
#include "remotelinuxkillappstep.h"
#include "remotelinux_constants.h"
#include "remotelinuxkillappservice.h"
#include <projectexplorer/runcontrol.h>
@@ -55,7 +56,7 @@ RemoteLinuxKillAppStep::RemoteLinuxKillAppStep(BuildStepList *bsl, Utils::Id id)
Utils::Id RemoteLinuxKillAppStep::stepId()
{
return "RemoteLinux.KillAppStep";
return Constants::KillAppStepId;
}
QString RemoteLinuxKillAppStep::displayName()

View File

@@ -26,6 +26,7 @@
#include "rsyncdeploystep.h"
#include "abstractremotelinuxdeployservice.h"
#include "remotelinux_constants.h"
#include <projectexplorer/deploymentdata.h>
#include <projectexplorer/runconfigurationaspects.h>
@@ -211,7 +212,7 @@ RsyncDeployStep::~RsyncDeployStep() = default;
Utils::Id RsyncDeployStep::stepId()
{
return "RemoteLinux.RsyncDeployStep";
return Constants::RsyncDeployStepId;
}
QString RsyncDeployStep::displayName()

View File

@@ -25,6 +25,8 @@
#include "tarpackagecreationstep.h"
#include "remotelinux_constants.h"
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/deploymentdata.h>
#include <projectexplorer/project.h>
@@ -386,7 +388,7 @@ QVariantMap TarPackageCreationStep::toMap() const
Utils::Id TarPackageCreationStep::stepId()
{
return "MaemoTarPackageCreationStep";
return Constants::TarPackageCreationStepId;
}
QString TarPackageCreationStep::displayName()

View File

@@ -25,6 +25,7 @@
#include "uploadandinstalltarpackagestep.h"
#include "remotelinux_constants.h"
#include "remotelinuxdeployconfiguration.h"
#include "remotelinuxpackageinstaller.h"
#include "tarpackagecreationstep.h"
@@ -87,7 +88,7 @@ UploadAndInstallTarPackageStep::UploadAndInstallTarPackageStep(BuildStepList *bs
Utils::Id UploadAndInstallTarPackageStep::stepId()
{
return "MaemoUploadAndInstallTarPackageStep";
return Constants::UploadAndInstallTarPackageStepId;
}
QString UploadAndInstallTarPackageStep::displayName()